opencode-agile-agent 1.0.4 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -14
- package/bin/cli.js +180 -254
- package/bin/sync-templates.js +1 -7
- package/bin/validate-templates.js +17 -19
- package/package.json +1 -1
- package/templates/.opencode/ARCHITECTURE.md +94 -64
- package/templates/.opencode/README.md +115 -63
- package/templates/.opencode/agents/archiver.md +45 -0
- package/templates/.opencode/agents/backend-specialist.md +43 -46
- package/templates/.opencode/agents/context-gatherer.md +26 -26
- package/templates/.opencode/agents/debugger.md +45 -45
- package/templates/.opencode/agents/developer.md +54 -45
- package/templates/.opencode/agents/devops-engineer.md +42 -45
- package/templates/.opencode/agents/feature-lead.md +81 -50
- package/templates/.opencode/agents/frontend-specialist.md +44 -46
- package/templates/.opencode/agents/performance-optimizer.md +45 -45
- package/templates/.opencode/agents/pr-reviewer.md +46 -45
- package/templates/.opencode/agents/project-planner.md +41 -45
- package/templates/.opencode/agents/retrospective-writer.md +48 -0
- package/templates/.opencode/agents/security-auditor.md +39 -45
- package/templates/.opencode/agents/system-analyst.md +43 -43
- package/templates/.opencode/agents/test-engineer.md +44 -44
- package/templates/.opencode/bun.lock +18 -0
- package/templates/.opencode/commands/archive.md +15 -0
- package/templates/.opencode/commands/assign-models.md +39 -0
- package/templates/.opencode/commands/brainstorm.md +5 -2
- package/templates/.opencode/commands/check-progress.md +21 -0
- package/templates/.opencode/commands/create.md +8 -3
- package/templates/.opencode/commands/plan.md +7 -2
- package/templates/.opencode/commands/reframe.md +17 -0
- package/templates/.opencode/commands/review.md +9 -3
- package/templates/.opencode/commands/rubber-duck.md +14 -0
- package/templates/.opencode/commands/status.md +3 -0
- package/templates/.opencode/commands/test.md +8 -3
- package/templates/.opencode/config.template.json +160 -20
- package/templates/.opencode/package-lock.json +115 -0
- package/templates/.opencode/package.json +6 -0
- package/templates/.opencode/plugins/session-artifacts.ts +611 -0
- package/templates/.opencode/skills/archive-writing/SKILL.md +36 -0
- package/templates/.opencode/skills/artifact-discipline/SKILL.md +30 -0
- package/templates/.opencode/skills/clarify-first/SKILL.md +34 -0
- package/templates/.opencode/skills/context-archive/SKILL.md +10 -26
- package/templates/.opencode/skills/context-gathering/SKILL.md +2 -0
- package/templates/.opencode/skills/intelligent-routing/SKILL.md +10 -2
- package/templates/.opencode/skills/plan-writing/SKILL.md +5 -5
- package/templates/.opencode/templates/brief.template.md +25 -0
- package/templates/.opencode/templates/notes.template.md +13 -0
- package/templates/.opencode/templates/review-summary.template.md +6 -0
- package/templates/.opencode/templates/session-summary.template.md +7 -0
- package/templates/.opencode/templates/spec.template.md +17 -0
- package/templates/.opencode/templates/status.template.yaml +14 -0
- package/templates/.opencode/templates/task.template.md +5 -0
- package/templates/opencode.json +12 -0
- package/templates/.opencode/agents/api-designer.md +0 -45
- package/templates/.opencode/agents/code-archaeologist.md +0 -45
- package/templates/.opencode/agents/database-architect.md +0 -45
- package/templates/.opencode/agents/documentation-writer.md +0 -45
- package/templates/.opencode/agents/explorer-agent.md +0 -55
- package/templates/.opencode/agents/game-developer.md +0 -45
- package/templates/.opencode/agents/mobile-developer.md +0 -45
- package/templates/.opencode/agents/orchestrator.md +0 -48
- package/templates/.opencode/agents/penetration-tester.md +0 -46
- package/templates/.opencode/agents/product-manager.md +0 -46
- package/templates/.opencode/agents/qa-automation-engineer.md +0 -46
- package/templates/.opencode/agents/seo-specialist.md +0 -45
- package/templates/.opencode/archive/README.md +0 -24
- package/templates/.opencode/commands/debug.md +0 -10
- package/templates/.opencode/skills/parallel-agents/SKILL.md +0 -38
- package/templates/.opencode/skills/redteam-validation/SKILL.md +0 -33
- package/templates/AGENTS.template.md +0 -300
|
@@ -10,59 +10,57 @@ const templatesDir = join(__dirname, '..', 'templates');
|
|
|
10
10
|
|
|
11
11
|
// Required files for templates
|
|
12
12
|
const requiredFiles = [
|
|
13
|
-
'
|
|
13
|
+
'opencode.json',
|
|
14
|
+
'.opencode/.gitignore',
|
|
14
15
|
'.opencode/README.md',
|
|
15
16
|
'.opencode/ARCHITECTURE.md',
|
|
16
17
|
'.opencode/archive/README.md',
|
|
18
|
+
'.opencode/artifacts/README.md',
|
|
17
19
|
'.opencode/config.template.json',
|
|
18
20
|
'.opencode/package.json',
|
|
19
|
-
'.opencode/
|
|
21
|
+
'.opencode/plugins/session-artifacts.ts',
|
|
22
|
+
'.opencode/agents/retrospective-writer.md',
|
|
23
|
+
'.opencode/agents/archiver.md',
|
|
20
24
|
'.opencode/agents/context-gatherer.md',
|
|
21
|
-
'.opencode/agents/api-designer.md',
|
|
22
25
|
'.opencode/agents/backend-specialist.md',
|
|
23
|
-
'.opencode/agents/code-archaeologist.md',
|
|
24
|
-
'.opencode/agents/database-architect.md',
|
|
25
26
|
'.opencode/agents/debugger.md',
|
|
26
27
|
'.opencode/agents/developer.md',
|
|
27
28
|
'.opencode/agents/devops-engineer.md',
|
|
28
|
-
'.opencode/agents/documentation-writer.md',
|
|
29
|
-
'.opencode/agents/explorer-agent.md',
|
|
30
29
|
'.opencode/agents/feature-lead.md',
|
|
31
30
|
'.opencode/agents/frontend-specialist.md',
|
|
32
|
-
'.opencode/agents/game-developer.md',
|
|
33
|
-
'.opencode/agents/mobile-developer.md',
|
|
34
|
-
'.opencode/agents/orchestrator.md',
|
|
35
|
-
'.opencode/agents/penetration-tester.md',
|
|
36
31
|
'.opencode/agents/performance-optimizer.md',
|
|
37
32
|
'.opencode/agents/pr-reviewer.md',
|
|
38
|
-
'.opencode/agents/product-manager.md',
|
|
39
33
|
'.opencode/agents/project-planner.md',
|
|
40
|
-
'.opencode/agents/qa-automation-engineer.md',
|
|
41
34
|
'.opencode/agents/security-auditor.md',
|
|
42
|
-
'.opencode/agents/seo-specialist.md',
|
|
43
35
|
'.opencode/agents/system-analyst.md',
|
|
44
36
|
'.opencode/agents/test-engineer.md',
|
|
45
37
|
'.opencode/commands/brainstorm.md',
|
|
38
|
+
'.opencode/commands/archive.md',
|
|
39
|
+
'.opencode/commands/assign-models.md',
|
|
40
|
+
'.opencode/commands/check-progress.md',
|
|
46
41
|
'.opencode/commands/create.md',
|
|
47
|
-
'.opencode/commands/debug.md',
|
|
48
42
|
'.opencode/commands/plan.md',
|
|
43
|
+
'.opencode/commands/reframe.md',
|
|
49
44
|
'.opencode/commands/review.md',
|
|
45
|
+
'.opencode/commands/rubber-duck.md',
|
|
50
46
|
'.opencode/commands/status.md',
|
|
51
47
|
'.opencode/commands/test.md',
|
|
52
48
|
'.opencode/skills/api-patterns/SKILL.md',
|
|
49
|
+
'.opencode/skills/archive-writing/SKILL.md',
|
|
50
|
+
'.opencode/skills/artifact-discipline/SKILL.md',
|
|
53
51
|
'.opencode/skills/brainstorming/SKILL.md',
|
|
52
|
+
'.opencode/skills/clarify-first/SKILL.md',
|
|
54
53
|
'.opencode/skills/clean-code/SKILL.md',
|
|
55
54
|
'.opencode/skills/code-philosophy/SKILL.md',
|
|
56
55
|
'.opencode/skills/context-archive/SKILL.md',
|
|
57
56
|
'.opencode/skills/context-gathering/SKILL.md',
|
|
58
|
-
|
|
59
|
-
'.opencode/skills/intelligent-routing/SKILL.md',
|
|
60
|
-
'.opencode/skills/parallel-agents/SKILL.md',
|
|
57
|
+
'.opencode/skills/intelligent-routing/SKILL.md',
|
|
61
58
|
'.opencode/skills/plan-writing/SKILL.md',
|
|
62
|
-
'.opencode/skills/redteam-validation/SKILL.md',
|
|
63
59
|
'.opencode/skills/security-gate/SKILL.md',
|
|
64
60
|
'.opencode/skills/systematic-debugging/SKILL.md',
|
|
65
61
|
'.opencode/skills/testing-patterns/SKILL.md',
|
|
62
|
+
'.opencode/templates/review-summary.template.md',
|
|
63
|
+
'.opencode/templates/session-summary.template.md',
|
|
66
64
|
'.opencode/rules/coding-standards.md',
|
|
67
65
|
'.opencode/rules/git-conventions.md',
|
|
68
66
|
];
|
package/package.json
CHANGED
|
@@ -1,82 +1,112 @@
|
|
|
1
|
-
# OpenCode Agent Kit
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
1
|
+
# OpenCode Agent Kit — Architecture
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- All other agents are subagents and communicate through @ handoffs
|
|
3
|
+
## Overview
|
|
4
|
+
- 15 agents, 19 skills, 11 commands, 1 runtime plugin
|
|
5
|
+
- Primary: feature-lead
|
|
6
|
+
- All others are subagents communicating through @ handoffs
|
|
7
|
+
- `session-artifacts` is the runtime spine for active feature state and handoff safety
|
|
11
8
|
|
|
12
9
|
## Request Lifecycle
|
|
13
|
-
|
|
14
10
|
1. User request lands with @feature-lead.
|
|
15
|
-
2. @
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
18
|
-
5.
|
|
19
|
-
6.
|
|
20
|
-
7.
|
|
21
|
-
8.
|
|
22
|
-
9.
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
2. @feature-lead **clarifies first** — iterates questions until scope, intent, and business value are clear. If user has no idea, offers default + trade-offs.
|
|
12
|
+
3. `session_artifact_current` restores active feature state.
|
|
13
|
+
4. @context-gatherer maps current project and active work.
|
|
14
|
+
5. If new feature: create context bundle + status.yaml. If continuing: refresh the active artifact.
|
|
15
|
+
6. Discovery and planning produce the compact context bundle.
|
|
16
|
+
7. Build agents implement the approved spec from canonical handoff packets.
|
|
17
|
+
8. Quality agents review, test, and harden.
|
|
18
|
+
9. Security-sensitive changes pass through @security-auditor.
|
|
19
|
+
10. Any failure loops back to the owning agent.
|
|
20
|
+
11. When the flow may compact before the final gates, @retrospective-writer captures a compact checkpoint.
|
|
21
|
+
12. After a meaningful failure is resolved, the agent may ask whether the lesson should become a reusable skill or rule.
|
|
22
|
+
13. Approved work summaries archived under `.opencode/archive/<feature-slug>.md` through the artifact finalizer.
|
|
23
|
+
14. @archiver writes the final archive record.
|
|
24
|
+
15. feature-lead synthesizes the final outcome.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
26
|
+
## Context Bundle
|
|
27
|
+
Create only for new features. Skip if no active feature and user is continuing work.
|
|
28
|
+
- brief.md: why, outcome, business context, scope, constraints, default choice
|
|
29
|
+
- spec.md: contract, data flow, edge cases, risks, acceptance criteria
|
|
29
30
|
- task.md: ordered checklist, dependencies, owners
|
|
30
|
-
-
|
|
31
|
+
- notes.md: facts, decisions, blockers, links
|
|
32
|
+
- status.yaml: live execution state
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
`status.yaml.status` allowed: `brainstorm`, `planning`, `implementation`, `verification`, `review`, `done`, `blocked`.
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
+
## Archive
|
|
37
|
+
- Archive in `.opencode/archive/<feature-slug>.md`.
|
|
38
|
+
- Include the shipped summary, changed surfaces, verification signal, and remaining follow-up.
|
|
39
|
+
- Finalize only when `status.yaml` is `done`.
|
|
40
|
+
- Finalize only from the primary agent.
|
|
36
41
|
|
|
37
42
|
## Skill Design
|
|
38
|
-
|
|
39
43
|
- Skills are small, philosophy-first mental models.
|
|
40
|
-
- Skill descriptions
|
|
44
|
+
- Skill descriptions state the trigger and decision domain.
|
|
41
45
|
- Prefer the smallest skill that changes the next decision.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
- `artifact-discipline` keeps runtime state out of prompt memory.
|
|
47
|
+
- `session-closeout` leaves a durable checkpoint before compaction or pause.
|
|
48
|
+
- Use `cross-model-regression` when risky changes need multiple specialist checks across different reviewer models.
|
|
49
|
+
- Promote lessons from repeated or costly failures only when they create durable guidance.
|
|
50
|
+
|
|
51
|
+
## Runtime Spine
|
|
52
|
+
- Active work lives in `.opencode/artifacts/features/<feature-slug>/`.
|
|
53
|
+
- `.opencode/artifacts/` is local runtime state and should be git-ignored.
|
|
54
|
+
- Planning docs and runtime evidence live side-by-side but stay separate.
|
|
55
|
+
- Every subagent should start from `session_artifact_handoff` instead of a document dump.
|
|
56
|
+
- `session_artifact_repo_delta` guards against drift between artifact state and git state.
|
|
57
|
+
- Archive remains the immutable shipped summary.
|
|
58
|
+
|
|
59
|
+
## Flow Rules
|
|
60
|
+
- The default command spine is `/brainstorm -> /plan -> /create -> /test -> /review -> /archive`.
|
|
61
|
+
- The flow is resumable and non-linear. Any command can be re-entered when the work needs that lens.
|
|
62
|
+
- Re-plan on scope drift, re-brainstorm on ambiguity, re-test on risky changes, and re-review at meaningful checkpoints.
|
|
63
|
+
- Use @retrospective-writer when a failure may deserve a reusable lesson.
|
|
64
|
+
|
|
65
|
+
## Role Map
|
|
66
|
+
|
|
45
67
|
| Stage | Agents | Responsibility |
|
|
46
68
|
|-------|--------|----------------|
|
|
47
|
-
| Primary | feature-lead |
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
| Spec | system-analyst
|
|
53
|
-
| Build | developer, frontend-specialist, backend-specialist,
|
|
54
|
-
| Quality | test-engineer, security-auditor,
|
|
55
|
-
|
|
56
|
-
| Output | documentation-writer, seo-specialist | Explain and publish clearly |
|
|
57
|
-
| Maintenance | code-archaeologist | Clean and simplify legacy code |
|
|
58
|
-
|
|
69
|
+
| Primary | feature-lead | Own request, tradeoffs, final gate loop |
|
|
70
|
+
| Archive | archiver | Write compact archive summaries for approved work |
|
|
71
|
+
| Learning | retrospective-writer | Capture a reusable failure lesson and decide whether it should become a skill or rule |
|
|
72
|
+
| Context | context-gatherer | Map project state and archive-ready history |
|
|
73
|
+
| Coordination | project-planner | Split, map, sequence work |
|
|
74
|
+
| Spec | system-analyst | Create compact context bundle and contracts |
|
|
75
|
+
| Build | developer, frontend-specialist, backend-specialist, devops-engineer | Implement approved spec |
|
|
76
|
+
| Quality | test-engineer, security-auditor, performance-optimizer, debugger, pr-reviewer | Verify, review, harden |
|
|
77
|
+
|
|
59
78
|
## Command Map
|
|
60
79
|
|
|
61
80
|
| Command | Entry | Exit |
|
|
62
81
|
|---------|-------|------|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- Do not
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
82
|
+
| archive | @archiver closes approved work | Archive path and saved summary are explicit |
|
|
83
|
+
| brainstorm | @feature-lead receives request or ambiguity returns | One recommended path is clear |
|
|
84
|
+
| check-progress | @feature-lead needs a git-aware status read | Current state and next step are explicit |
|
|
85
|
+
| create | @feature-lead receives feature request | Implementation matches spec |
|
|
86
|
+
| plan | @feature-lead receives request or scope drift | Planning bundle is short and complete |
|
|
87
|
+
| review | @feature-lead hands change to @pr-reviewer at any meaningful checkpoint | APPROVED or CHANGES REQUESTED |
|
|
88
|
+
| reframe | @feature-lead detects a framing mismatch | Better direction and next step are explicit |
|
|
89
|
+
| rubber-duck | @feature-lead needs to reason before changing code | Assumptions and next check are explicit |
|
|
90
|
+
| status | @feature-lead asks for project state | Current health is easy to understand |
|
|
91
|
+
| test | @feature-lead defines test scope | Important paths are covered |
|
|
92
|
+
|
|
93
|
+
## Gate Rules
|
|
94
|
+
- Do not hand off to build until spec bundle is clear.
|
|
95
|
+
- Do not hand off to review until implementation is complete.
|
|
96
|
+
- Do not ship until review gate is clean.
|
|
97
|
+
- Do not archive until repo delta is reconciled.
|
|
98
|
+
- Loop back to owning agent when a gate fails.
|
|
99
|
+
|
|
100
|
+
## Decision Rules
|
|
101
|
+
- Prefer defaults when tradeoff is low risk AND business intent is clear.
|
|
102
|
+
- Escalate to user when scope, security, or architecture changes materially.
|
|
103
|
+
- Keep context compact enough for a subagent to finish without asking again.
|
|
104
|
+
- Pass intent in prompts and retrieve documents through tools.
|
|
105
|
+
|
|
106
|
+
## Clarification Rules
|
|
107
|
+
- **Iterate until clear**: Keep asking until scope, intent, and business value are unambiguous.
|
|
108
|
+
- **No hallucination**: If you don't know, ask. Never assume user intent.
|
|
109
|
+
- **Default + trade-offs**: If user has no idea, propose a default path with trade-offs. Let them choose.
|
|
110
|
+
- **Business before technical**: Capture who, what value, and success criteria before any technical planning.
|
|
111
|
+
- **State assumptions**: Flag what you inferred and what is unverified.
|
|
112
|
+
- **Compact but complete**: Keep context bundle output compact, but never skip user requirements.
|
|
@@ -1,14 +1,42 @@
|
|
|
1
|
-
# OpenCode Agent Kit
|
|
2
|
-
|
|
3
|
-
Spec-driven multi-agent system for OpenCode.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
1
|
+
# OpenCode Agent Kit
|
|
2
|
+
|
|
3
|
+
Spec-driven multi-agent system for OpenCode.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
7
|
## Included
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
9
|
+
- 15 agents
|
|
10
|
+
- 15 skills
|
|
11
|
+
- 11 commands
|
|
12
|
+
- 1 runtime plugin
|
|
13
|
+
|
|
14
|
+
## Plannotator (Optional)
|
|
15
|
+
|
|
16
|
+
- This kit can integrate with Plannotator for browser-based plan review.
|
|
17
|
+
- If your project has `opencode.json` with `"plugin": ["@plannotator/opencode@latest"]`, the `submit_plan` tool becomes available (by default for OpenCode's built-in `plan` agent).
|
|
18
|
+
- The template `opencode.json` included with this repo configures Plannotator in `plan-agent` mode and allows `feature-lead` to call `submit_plan` during `/plan`.
|
|
19
|
+
- Optional slash commands (installs globally):
|
|
20
|
+
- macOS/Linux/WSL: `curl -fsSL https://plannotator.ai/install.sh | bash`
|
|
21
|
+
- Windows PowerShell: `irm https://plannotator.ai/install.ps1 | iex`
|
|
22
|
+
|
|
23
|
+
## Runtime Spine
|
|
24
|
+
|
|
25
|
+
- `session-artifacts` keeps live feature state in `.opencode/artifacts/features/<feature-slug>/`.
|
|
26
|
+
- `.opencode/artifacts/` is local runtime state and should stay out of git.
|
|
27
|
+
- Agents should retrieve active state through artifact tools instead of carrying full bundle context.
|
|
28
|
+
- Archive writes a concise summary record to `.opencode/archive/<feature-slug>.md`, and finalization runs through the artifact plugin.
|
|
29
|
+
|
|
30
|
+
## Flow Shape
|
|
31
|
+
|
|
32
|
+
- The default spine is `/brainstorm -> /plan -> /create -> /test -> /review -> /archive`.
|
|
33
|
+
- The flow is not rigid. Commands can be reused mid-stream when the work needs them.
|
|
34
|
+
- Common examples:
|
|
35
|
+
- Use `/brainstorm` again during implementation when a requirement turns ambiguous.
|
|
36
|
+
- Use `/plan` again when scope changes materially.
|
|
37
|
+
- Use `/test` before `/create` is fully done when a risky slice needs early proof.
|
|
38
|
+
- Use `/review` on an intermediate slice before the full feature is complete.
|
|
39
|
+
- Use `/archive` to preserve one finished slice even if the larger feature continues.
|
|
12
40
|
|
|
13
41
|
## Skill Design
|
|
14
42
|
|
|
@@ -19,92 +47,116 @@ Spec-driven multi-agent system for OpenCode.
|
|
|
19
47
|
## Context Skills
|
|
20
48
|
|
|
21
49
|
- `context-gathering` maps the current project and active work.
|
|
22
|
-
- `context-archive` stores completed
|
|
50
|
+
- `context-archive` stores completed work summaries in `.opencode/archive/<feature-slug>.md`.
|
|
51
|
+
- `archive-writing` turns approved work into a compact archive note.
|
|
52
|
+
- `cross-model-regression` coordinates multi-agent regression sweeps across different reviewer models.
|
|
53
|
+
- `failure-learning` turns verified mistakes into reusable skills or rules when the lesson is worth keeping.
|
|
23
54
|
- `security-gate` decides when a change needs a security gate or redteam phase.
|
|
24
55
|
- `redteam-validation` simulates attacker behavior and proves exploitability.
|
|
25
|
-
- `orchestrator` is optional; default routing stays with `feature-lead` and the owning specialists.
|
|
26
56
|
|
|
27
57
|
## Commands
|
|
28
58
|
|
|
29
59
|
- Custom slash commands live in `.opencode/commands/`.
|
|
30
60
|
- Each command file uses Markdown frontmatter plus a prompt body, matching OpenCode's command format.
|
|
31
|
-
- The current command set is `brainstorm`, `
|
|
61
|
+
- The current command set is `archive`, `assign-models`, `brainstorm`, `check-progress`, `create`, `plan`, `reframe`, `review`, `rubber-duck`, `status`, and `test`.
|
|
32
62
|
|
|
33
63
|
## Primary Flow
|
|
34
64
|
|
|
35
65
|
1. @feature-lead receives the request.
|
|
36
|
-
2.
|
|
37
|
-
3. @
|
|
38
|
-
4. @
|
|
39
|
-
5. @
|
|
40
|
-
6. @
|
|
41
|
-
|
|
66
|
+
2. `session_artifact_current` restores the live feature state.
|
|
67
|
+
3. @context-gatherer maps the current project state.
|
|
68
|
+
4. @project-planner and @system-analyst create or refresh the compact bundle: brief.md, spec.md, task.md, notes.md, and status.yaml.
|
|
69
|
+
5. @developer implements the approved spec from a canonical handoff packet.
|
|
70
|
+
6. @test-engineer, @security-auditor, and @pr-reviewer close the loop.
|
|
71
|
+
7. When a failure exposed a reusable lesson, ask whether to promote it into a skill or rule.
|
|
72
|
+
8. If the session may compact before the final gate, @retrospective-writer captures a checkpoint.
|
|
73
|
+
9. @archiver writes the completed work summary through the artifact plugin.
|
|
74
|
+
|
|
42
75
|
## Context Bundle
|
|
43
76
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- spec.md: contract, data flow, edge cases, risks
|
|
77
|
+
- Templates live in `.opencode/templates/` for quick bundle creation.
|
|
78
|
+
- brief.md: why, outcome, scope, constraints, default choice
|
|
79
|
+
- spec.md: contract, data flow, edge cases, risks, acceptance criteria
|
|
47
80
|
- task.md: ordered checklist, dependencies, owners
|
|
48
|
-
-
|
|
81
|
+
- notes.md: facts, decisions, blockers, links
|
|
82
|
+
- status.yaml: live execution state
|
|
83
|
+
|
|
84
|
+
- `status.yaml` is the live execution artifact; the markdown files stay as stable planning/reference context.
|
|
85
|
+
- `status.yaml.status` allowed values: `brainstorm`, `planning`, `implementation`, `verification`, `review`, `done`, `blocked`.
|
|
49
86
|
|
|
50
87
|
## Archive
|
|
51
88
|
|
|
52
|
-
- Completed
|
|
89
|
+
- Completed work summaries live in `.opencode/archive/<feature-slug>.md`.
|
|
90
|
+
- Live artifacts in `.opencode/artifacts/` should not be committed.
|
|
53
91
|
- Keep the archive copy approved, compact, and read-only in practice.
|
|
54
|
-
|
|
92
|
+
- Archive only when `status.yaml` is `done`.
|
|
93
|
+
- Archive the outcome, not the full live bundle.
|
|
94
|
+
- Only the archive flow should finalize the archive summary.
|
|
95
|
+
|
|
55
96
|
## Agent Groups
|
|
56
97
|
|
|
57
|
-
| Group
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
68
|
-
| Output | `documentation-writer`, `seo-specialist` |
|
|
69
|
-
| Maintenance | `code-archaeologist` |
|
|
70
|
-
|
|
98
|
+
| Group | Agents |
|
|
99
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------------- |
|
|
100
|
+
| Archive | `archiver` |
|
|
101
|
+
| Context | `context-gatherer` |
|
|
102
|
+
| Primary | `feature-lead` |
|
|
103
|
+
| Coordination | `project-planner` |
|
|
104
|
+
| Spec | `system-analyst` |
|
|
105
|
+
| Build | `developer`, `frontend-specialist`, `backend-specialist`, `devops-engineer` |
|
|
106
|
+
| Quality | `test-engineer`, `security-auditor`, `performance-optimizer`, `debugger`, `pr-reviewer` |
|
|
107
|
+
| Learning | `retrospective-writer` |
|
|
108
|
+
|
|
71
109
|
## Command Catalog
|
|
72
110
|
|
|
73
|
-
| Command
|
|
74
|
-
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
111
|
+
| Command | Use When |
|
|
112
|
+
| -------------- | ---------------------------------------------------------------------------------------------- |
|
|
113
|
+
| archive | Save an approved work summary into `.opencode/archive/<feature-slug>.md` for future reference. |
|
|
114
|
+
| assign-models | Map available models to each agent, confirm the routing, and update the active OpenCode config. |
|
|
115
|
+
| brainstorm | Explore options and clarify requirements before planning, or reopen ambiguity mid-flow. |
|
|
116
|
+
| check-progress | Check current status, visible changes, remaining work, and the next best step. |
|
|
117
|
+
| create | Build new features, components, or project slices with a spec-driven flow. |
|
|
118
|
+
| plan | Create or refresh structured task breakdowns and spec artifacts. |
|
|
119
|
+
| reframe | Reset the framing when the output is off-target, unclear, or stuck repeating the same mistake. |
|
|
120
|
+
| review | Review code against the spec, standards, and quality gates at any meaningful checkpoint. |
|
|
121
|
+
| rubber-duck | Think out loud, challenge assumptions, and isolate the real problem before changing anything. |
|
|
122
|
+
| status | Check project health, docs, and operating readiness. |
|
|
123
|
+
| test | Run and generate tests for the codebase whenever proof is needed. |
|
|
124
|
+
|
|
83
125
|
## Skills
|
|
84
126
|
|
|
85
127
|
- context-gathering
|
|
86
128
|
- context-archive
|
|
129
|
+
- archive-writing
|
|
130
|
+
- cross-model-regression
|
|
131
|
+
- artifact-discipline
|
|
87
132
|
- clean-code
|
|
88
133
|
- brainstorming
|
|
134
|
+
- clarify-first
|
|
89
135
|
- plan-writing
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
136
|
+
- intelligent-routing
|
|
137
|
+
- frontend-design
|
|
138
|
+
- api-patterns
|
|
139
|
+
- session-closeout
|
|
94
140
|
- testing-patterns
|
|
95
141
|
- systematic-debugging
|
|
96
142
|
- code-philosophy
|
|
97
143
|
- security-gate
|
|
98
144
|
- redteam-validation
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
145
|
+
- failure-learning
|
|
146
|
+
|
|
147
|
+
## Repo Delta Guard
|
|
148
|
+
|
|
149
|
+
- `session_artifact_repo_delta` compares artifact-tracked files with actual git working tree changes.
|
|
150
|
+
- Use it in `status`, `review`, and `archive` to catch drift before summaries or approval claims go stale.
|
|
151
|
+
|
|
152
|
+
## Routing Examples
|
|
153
|
+
|
|
154
|
+
- Add JWT auth -> @feature-lead -> @system-analyst -> @backend-specialist + @security-auditor -> @test-engineer
|
|
155
|
+
- Fix a UI bug -> @feature-lead -> @frontend-specialist -> @test-engineer -> @pr-reviewer
|
|
104
156
|
- Ship a multi-domain feature -> @feature-lead -> @project-planner -> specialist agents -> @pr-reviewer
|
|
105
|
-
|
|
106
|
-
## Rules
|
|
107
|
-
|
|
108
|
-
- Use the safest default when the downside is small.
|
|
109
|
-
- Ask only when scope, security, or architecture changes materially.
|
|
110
|
-
- Keep every handoff compact and explicit.
|
|
157
|
+
|
|
158
|
+
## Rules
|
|
159
|
+
|
|
160
|
+
- Use the safest default when the downside is small.
|
|
161
|
+
- Ask only when scope, security, or architecture changes materially.
|
|
162
|
+
- Keep every handoff compact and explicit.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archiver
|
|
3
|
+
description: Convert approved work into a compact archive summary with clear outcome, evidence, and follow-up.
|
|
4
|
+
mode: subagent
|
|
5
|
+
temperature: 0.1
|
|
6
|
+
top_p: 0.82
|
|
7
|
+
steps: 30
|
|
8
|
+
permission:
|
|
9
|
+
task:
|
|
10
|
+
"*": deny
|
|
11
|
+
tools:
|
|
12
|
+
read: true
|
|
13
|
+
grep: true
|
|
14
|
+
glob: true
|
|
15
|
+
write: false
|
|
16
|
+
edit: false
|
|
17
|
+
skills:
|
|
18
|
+
- context-archive
|
|
19
|
+
- archive-writing
|
|
20
|
+
- artifact-discipline
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Archiver
|
|
24
|
+
|
|
25
|
+
## Role
|
|
26
|
+
Turn finished work into a durable archive summary. Keep it compact, specific, and useful to the next human or agent.
|
|
27
|
+
|
|
28
|
+
## @ Awareness
|
|
29
|
+
- @feature-lead → archive gate owner
|
|
30
|
+
- @pr-reviewer → review evidence or safety concerns
|
|
31
|
+
- @test-engineer → verification evidence or coverage gaps
|
|
32
|
+
- @system-analyst → scope or decision record needs clarification
|
|
33
|
+
|
|
34
|
+
## Working Loop
|
|
35
|
+
1. Start from `session_artifact_current`.
|
|
36
|
+
2. Pull `session_artifact_review_packet`, `session_artifact_changed_files`, and `session_artifact_repo_delta` before writing.
|
|
37
|
+
3. If artifact state and git state disagree, call out the mismatch before summarizing.
|
|
38
|
+
4. Summarize what shipped, what changed, what was verified, and what follow-up remains.
|
|
39
|
+
5. Hand the final summary back to the caller for `session_artifact_finalize`.
|
|
40
|
+
|
|
41
|
+
## Guardrails
|
|
42
|
+
- Do not archive before approval.
|
|
43
|
+
- Do not copy the full live bundle into the archive summary.
|
|
44
|
+
- Do not hide unresolved follow-up or verification gaps.
|
|
45
|
+
- Prefer concise, evidence-backed summaries over narrative history.
|
|
@@ -1,46 +1,43 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: backend-specialist
|
|
3
|
-
description: Subagent for APIs, services, business logic, and integration boundaries.
|
|
4
|
-
mode: subagent
|
|
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
|
-
## Guardrails
|
|
45
|
-
- Do not write UI code.
|
|
46
|
-
- Keep error handling close to the boundary.
|
|
1
|
+
---
|
|
2
|
+
name: backend-specialist
|
|
3
|
+
description: Subagent for APIs, services, business logic, and integration boundaries.
|
|
4
|
+
mode: subagent
|
|
5
|
+
temperature: 0.25
|
|
6
|
+
top_p: 0.9
|
|
7
|
+
steps: 80
|
|
8
|
+
permission:
|
|
9
|
+
task:
|
|
10
|
+
"*": ask
|
|
11
|
+
"security-auditor": ask
|
|
12
|
+
tools:
|
|
13
|
+
read: true
|
|
14
|
+
grep: true
|
|
15
|
+
glob: true
|
|
16
|
+
bash: true
|
|
17
|
+
write: true
|
|
18
|
+
edit: true
|
|
19
|
+
skills:
|
|
20
|
+
- clean-code
|
|
21
|
+
- api-patterns
|
|
22
|
+
- code-philosophy
|
|
23
|
+
- testing-patterns
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Backend Specialist
|
|
27
|
+
|
|
28
|
+
## Role
|
|
29
|
+
Build explicit APIs and service logic. Validate inputs, keep contracts predictable.
|
|
30
|
+
|
|
31
|
+
## @ Awareness
|
|
32
|
+
- @security-auditor → auth, permissions, data exposure
|
|
33
|
+
- @test-engineer → contract and integration coverage
|
|
34
|
+
|
|
35
|
+
## Working Loop
|
|
36
|
+
1. Read assigned context.
|
|
37
|
+
2. Implement backend logic.
|
|
38
|
+
3. Update runtime state with `session_artifact_update`: `summary`, `next_step`, and any changed backend risks.
|
|
39
|
+
4. Hand off.
|
|
40
|
+
|
|
41
|
+
## Guardrails
|
|
42
|
+
- Do not write UI code.
|
|
43
|
+
- Keep error handling close to the boundary.
|