-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.json
More file actions
54 lines (54 loc) · 5.02 KB
/
Copy pathopencode.json
File metadata and controls
54 lines (54 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"$schema": "https://opencode.ai/config.json",
"instructions": ["docs/AGENTS.md"],
"agent": {
"build": {
"model": "opencode-go/deepseek-v4-pro",
"steps": 50,
"description": "Primary coding agent for SynaFlow",
"prompt": "SynaFlow is a pure-Python, type-hint-driven DAG/streaming engine. Follow KISS/YAGNI/DRY and SOLID. 100% type hints mandatory. Fail fast/fail loud at build time; never silently coerce types. Preserve sync/async parity: any change to sync_engine must be mirrored in async_engine and vice versa. Prefer functions over stateless classes; no @staticmethod-only modules. Before changing runtime behavior, read docs/DESIGN_PHILOSOPHY.md and docs/CODING_AND_TESTING_STANDARDS.md. Verify with `uv run pytest tests/ -q`; corpus tests under tests/execution/{sync_engine,async_engine}/corpus are spec compliance tests — never weaken them."
},
"plan": {
"model": "opencode-go/glm-5.2",
"description": "Architecture-aware planning agent",
"prompt": "Plan changes against docs/DESIGN_PHILOSOPHY.md (decision log), docs/CODING_AND_TESTING_STANDARDS.md, and docs/ROADMAP.md. Respect build/run separation, deep modules, Open/Closed via factories, and the DAG JSON as the externalized contract. Design twice before committing. Output a step-by-step plan naming affected files in synaflow/core, synaflow/execution/{sync_engine,async_engine}, and the corpus/tests that will assert the new contract."
},
"architect": {
"model": "opencode-go/glm-5.2",
"mode": "subagent",
"description": "Validate a change against SynaFlow's architecture and contracts",
"prompt": "Read docs/DESIGN_PHILOSOPHY.md, docs/CODING_AND_TESTING_STANDARDS.md, docs/ROADMAP.md and the proposed diff. Check: KISS/YAGNI/DRY, SOLID, deep modules, build/run separation, sync/async parity, no silent type wrapping/coercion, materializer resolved at build time, observer contract unchanged, DAG JSON contract preserved. Report violations as a concrete checklist with file:line references. Do not edit files."
},
"reviewer": {
"model": "opencode-go/deepseek-v4-flash",
"mode": "subagent",
"description": "Spec/corpus and style compliance review",
"prompt": "Review the diff for: 100% type hints, Given-When-Then test names, tests organized by responsibility (tests/core vs tests/execution), corpus packs updated when topology changes, observer contract tests added when observer/laziness behavior changes, no @staticmethod-only modules, module docstrings present. Flag any spec/corpus test weakened instead of fixed. Do not edit files."
}
},
"command": {
"tests": { "description": "Run the full test suite (universal contract gate)", "template": "Run `uv run pytest tests/ -q` and report failures with file:line." },
"corpus": { "description": "Run corpus spec-compliance tests", "template": "Run `uv run pytest tests/execution/sync_engine/corpus tests/execution/async_engine/corpus -q` and report any spec violations." },
"parity": { "description": "Check sync/async parity (core invariant)", "template": "Run `uv run pytest tests/execution/sync_engine/test_runner_materialization.py tests/execution/async_engine/test_async_runner_materialization.py tests/execution/sync_engine/test_runner_max_in_flight.py tests/execution/async_engine/test_async_runner_max_in_flight.py -q` and report divergence." },
"lint": { "description": "Run ruff format check + F401", "template": "Run `uvx ruff format --check --exclude boilerplates/` then `uvx ruff check --select F401 --exclude boilerplates/` and report issues." },
"coverage": { "description": "Run tests with coverage", "template": "Run `uv run pytest --cov=synaflow --cov-report=term -q` and summarize coverage." },
"docs": { "description": "Build the MkDocs site strictly", "template": "Run `uv run mkdocs build --strict` and report any broken references." },
"pr": { "description": "Draft a PR description (Conventional Commits)", "template": "Inspect `git diff origin/main...HEAD` and the commit log, then draft a PR description using Conventional Commits (feat/fix/refactor/test/docs/ci/chore) with Summary, Changes, and Tests sections. Match the repo's existing PR style." }
},
"watcher": {
"ignore": ["site/", ".venv/", "node_modules/", ".pytest_cache/", ".ruff_cache/", "__pycache__/", "dist/", "build/", "*.pyc", ".coverage", "coverage.json", "uv.lock"]
},
"permission": {
"edit": {
"synaflow/**": "allow", "tests/**": "allow", "docs/**": "allow",
"scripts/**": "allow", ".github/**": "allow", "boilerplates/**": "allow",
".venv/**": "deny", "site/**": "deny", "uv.lock": "deny",
"coverage.json": "deny", ".coverage": "deny", "node_modules/**": "deny"
},
"bash": {
"uv run pytest*": "allow", "uvx ruff*": "allow", "uv run mkdocs*": "allow",
"git status*": "allow", "git diff*": "allow", "git log*": "allow",
"git show*": "allow", "git branch*": "allow"
}
}
}