Skip to content

Commit 90bb694

Browse files
committed
Inital Commit
0 parents  commit 90bb694

34 files changed

+1375
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
name: CI
3+
on:
4+
push: { branches: [ main, master ] }
5+
pull_request: { branches: [ main, master ] }
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with: { python-version: '3.11' }
13+
- name: Install system deps (MIDI)
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y libasound2-dev
17+
- name: Install deps
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements.txt
21+
pip install pytest ruff black
22+
- name: Lint (ruff)
23+
run: ruff check .
24+
- name: Format check (black)
25+
run: black --check .
26+
- name: Tests
27+
env:
28+
OPENAI_API_KEY: ""
29+
USE_LLM: "0"
30+
run: pytest -q

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
name: Release
3+
on:
4+
push:
5+
tags: [ "v*" ]
6+
jobs:
7+
build-and-publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with: { python-version: "3.11" }
13+
- name: Install build tools
14+
run: |
15+
python -m pip install --upgrade pip
16+
pip install build twine
17+
- name: Build
18+
run: python -m build
19+
- name: Publish to PyPI
20+
if: secrets.PYPI_API_TOKEN != ''
21+
env:
22+
TWINE_USERNAME: __token__
23+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
24+
run: twine upload dist/*

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
repos:
3+
- repo: https://github.com/psf/black
4+
rev: 24.8.0
5+
hooks:
6+
- id: black
7+
args: ["--line-length=100"]
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.6.4
10+
hooks:
11+
- id: ruff
12+
args: ["--fix"]
13+
- id: ruff-format
14+
- repo: https://github.com/pre-commit/mirrors-isort
15+
rev: v5.13.2
16+
hooks:
17+
- id: isort
18+
args: ["--profile=black", "--line-length=100"]
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: v4.6.0
21+
hooks:
22+
- id: end-of-file-fixer
23+
- id: trailing-whitespace
24+
- id: check-merge-conflict
69 Bytes
Loading
69 Bytes
Loading

Agents.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)]()
3+
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](LICENSE)
4+
[![Build](https://img.shields.io/badge/build-passing-brightgreen.svg)]()
5+
[![Status](https://img.shields.io/badge/status-experimental-orange.svg)]()
6+
7+
# Agents.md — Codegen Workflow for *PhaelusJam*
8+
9+
## Getting Started
10+
```bash
11+
git clone https://github.com/YOURNAME/phaelus-jam.git
12+
cd phaelus-jam
13+
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scriptsctivate
14+
pip install -e .
15+
uvicorn server.main:app --reload
16+
```
17+
18+
## Contributing
19+
- Use small PRs; docstrings & typing.
20+
- `agents/agent_cli.py` composes prompts; tests under `tests/`.
21+
- Share preset packs via `server/presets/*.json`.
22+
23+
## Visual Mockups
24+
![Functional](A_2D_digital_graphic_user_interface_(GUI)_showcase.png)
25+
![Polished](A_digital_2D_rendering_displays_a_virtual_audio_pr.png)
26+
![Front](server/static/previews/front.png)
27+
![Config](server/static/previews/config.png)
28+
![Monitor](server/static/previews/monitor.png)
29+
![Logging](server/static/previews/logging.png)
30+
![Testing](server/static/previews/testing.png)

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
GNU LESSER GENERAL PUBLIC LICENSE
3+
Version 3, 29 June 2007
4+
5+
Copyright (C) 2007 Free Software Foundation
6+
7+
This project is licensed under the terms of the GNU LGPL v3 license.
8+
See <https://www.gnu.org/licenses/lgpl-3.0.en.html> for full details.

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)]()
3+
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](LICENSE)
4+
[![Build](https://img.shields.io/badge/build-passing-brightgreen.svg)]()
5+
[![Status](https://img.shields.io/badge/status-experimental-orange.svg)]()
6+
7+
# PhaelusJam
8+
**An AI-powered real-time composer & accompanist**
9+
by **LogicMUSE**
10+
11+
## Interface (DAW-style)
12+
- **Top bar**: Title *Phaelus Jam by LogicMUSE*, AI On/Off, LED strip (WS, IN, OUT, ENG, LLM)
13+
- **Tabs**: Front, Configuration, Monitoring, Advanced Logging, Testing
14+
15+
## Run (Web UI)
16+
```bash
17+
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scriptsctivate
18+
pip install -r requirements.txt
19+
uvicorn server.main:app --reload
20+
# open http://127.0.0.1:8000
21+
```
22+
23+
## 🖼 Mockups
24+
### Current functional look
25+
![Mockup functional](A_2D_digital_graphic_user_interface_(GUI)_showcase.png)
26+
27+
### Target polished design (Cubase-style plugin)
28+
![Mockup polished](A_digital_2D_rendering_displays_a_virtual_audio_pr.png)
29+
30+
### Tab Previews
31+
- **Front Panel**
32+
![Front Panel](server/static/previews/front.png)
33+
34+
- **Configuration Panel**
35+
![Configuration Panel](server/static/previews/config.png)
36+
37+
- **Monitoring Panel**
38+
![Monitoring Panel](server/static/previews/monitor.png)
39+
40+
- **Advanced Logging Panel**
41+
![Advanced Logging Panel](server/static/previews/logging.png)
42+
43+
- **Testing Panel**
44+
![Testing Panel](server/static/previews/testing.png)
45+
46+
## CI
47+
This repo includes GitHub Actions CI (ruff, black, pytest). Update the build badge after pushing.
48+
49+
## Developer workflow
50+
### Pre-commit
51+
```bash
52+
pip install pre-commit
53+
pre-commit install
54+
```
55+
56+
### Releasing (optional)
57+
Add PYPI_API_TOKEN secret. Tag and push `v0.1.0` to release.

agents/agent_cli.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
import argparse
3+
import json
4+
import pathlib
5+
6+
HERE = pathlib.Path(__file__).parent
7+
8+
def load(p: str) -> str:
9+
return pathlib.Path(p).read_text(encoding='utf-8')
10+
11+
def main() -> None:
12+
ap = argparse.ArgumentParser()
13+
ap.add_argument("--task", choices=["new_feature", "bugfix"], required=True)
14+
ap.add_argument("--prompt-file")
15+
args = ap.parse_args()
16+
system = load(HERE / "prompts" / "system.md")
17+
task = load(HERE / "prompts" / f"task_{args.task}.md")
18+
user = load(args.prompt_file) if args.prompt_file else ""
19+
print(
20+
json.dumps(
21+
{
22+
"system": system,
23+
"task": task,
24+
"user": user,
25+
"config_path": str(HERE / "config.yaml"),
26+
"repo_root": str((HERE / "..").resolve()),
27+
},
28+
indent=2,
29+
)
30+
)
31+
32+
if __name__ == "__main__":
33+
main()

agents/config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
model: gpt-4o-mini
3+
temperature: 0.4
4+
repo_root: ".."
5+
code_paths:
6+
- "phaelusjam/"
7+
- "scripts/"
8+
- "tests/"
9+
write_policy:
10+
allow_edits: true
11+
protected:
12+
- "pyproject.toml"
13+
- "README.md"
14+
goals:
15+
- "Keep interfaces stable; prefer additive changes."
16+
- "Write clean, typed Python and docstrings."
17+
- "Add tests for complex logic."

0 commit comments

Comments
 (0)