compound-workflow 1.8.0 → 1.9.0
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 +61 -69
- package/package.json +2 -8
- package/scripts/check-pack-readme.mjs +1 -16
- package/scripts/check-workflow-contracts.mjs +34 -44
- package/scripts/install-cli.mjs +273 -555
- package/src/AGENTS.md +59 -192
- package/src/{.agents/agents → agents}/research/best-practices-researcher.md +2 -2
- package/src/{.agents/commands → commands}/assess.md +4 -4
- package/src/commands/install.md +43 -0
- package/src/{.agents/commands → commands}/metrics.md +1 -1
- package/src/commands/workflow-agents.md +101 -0
- package/src/{.agents/commands → commands}/workflow-compound.md +1 -1
- package/src/{.agents/commands → commands}/workflow-plan.md +24 -33
- package/src/commands/workflow-work.md +836 -0
- package/src/{.agents/references → references}/README.md +1 -1
- package/src/{.agents/skills → skills}/capture-skill/SKILL.md +1 -1
- package/src/{.agents/skills → skills}/compound-docs/SKILL.md +6 -6
- package/src/{.agents/skills → skills}/compound-docs/references/yaml-schema.md +2 -2
- package/src/skills/setup-agents/SKILL.md +250 -0
- package/src/skills/standards/SKILL.md +79 -0
- package/src/skills/standards/references/architecture.md +228 -0
- package/src/skills/standards/references/code-quality.md +192 -0
- package/src/skills/standards/references/presentation.md +515 -0
- package/src/skills/standards/references/services.md +172 -0
- package/src/skills/standards/references/state-management.md +936 -0
- package/.claude-plugin/plugin.json +0 -7
- package/.cursor-plugin/plugin.json +0 -20
- package/.cursor-plugin/registration.json +0 -5
- package/scripts/check-version-parity.mjs +0 -36
- package/scripts/generate-platform-artifacts.mjs +0 -230
- package/src/.agents/commands/install.md +0 -51
- package/src/.agents/commands/workflow-work.md +0 -690
- package/src/.agents/registry.json +0 -48
- package/src/.agents/scripts/self-check.mjs +0 -227
- package/src/.agents/scripts/sync-opencode.mjs +0 -362
- package/src/.agents/skills/presentation-composability/SKILL.md +0 -72
- package/src/.agents/skills/react-ddd-mvc-frontend/SKILL.md +0 -51
- package/src/.agents/skills/react-ddd-mvc-frontend/references/feature-structure.md +0 -25
- package/src/.agents/skills/react-ddd-mvc-frontend/references/implementation-principles.md +0 -21
- package/src/.agents/skills/react-ddd-mvc-frontend/references/responsibility-gates.md +0 -41
- package/src/.agents/skills/react-ddd-mvc-frontend/references/source-map.md +0 -11
- package/src/.agents/skills/standards/SKILL.md +0 -747
- package/src/.agents/skills/xstate-actor-orchestration/SKILL.md +0 -197
- package/src/.agents/skills/xstate-actor-orchestration/agents/openai.yaml +0 -4
- package/src/.agents/skills/xstate-actor-orchestration/assets/statecharts/.gitkeep +0 -0
- package/src/.agents/skills/xstate-actor-orchestration/references/actor-system-patterns.md +0 -71
- package/src/.agents/skills/xstate-actor-orchestration/references/event-contracts.md +0 -73
- package/src/.agents/skills/xstate-actor-orchestration/references/functional-domain-patterns.md +0 -53
- package/src/.agents/skills/xstate-actor-orchestration/references/machine-structure-and-tags.md +0 -36
- package/src/.agents/skills/xstate-actor-orchestration/references/react-container-pattern.md +0 -45
- package/src/.agents/skills/xstate-actor-orchestration/references/reliability-observability.md +0 -39
- package/src/.agents/skills/xstate-actor-orchestration/references/skill-validation.md +0 -33
- package/src/.agents/skills/xstate-actor-orchestration/references/source-map.md +0 -44
- package/src/.agents/skills/xstate-actor-orchestration/references/statechart-review-and-signoff.md +0 -59
- package/src/.agents/skills/xstate-actor-orchestration/references/testing-strategy.md +0 -35
- package/src/.agents/skills/xstate-actor-orchestration/scripts/create-statechart-artifact.sh +0 -71
- package/src/.agents/skills/xstate-actor-orchestration/scripts/validate-skill.sh +0 -138
- package/src/generated/opencode.managed.json +0 -115
- /package/src/{.agents/agents → agents}/research/framework-docs-researcher.md +0 -0
- /package/src/{.agents/agents → agents}/research/git-history-analyzer.md +0 -0
- /package/src/{.agents/agents → agents}/research/learnings-researcher.md +0 -0
- /package/src/{.agents/agents → agents}/research/repo-research-analyst.md +0 -0
- /package/src/{.agents/agents → agents}/review/agent-native-reviewer.md +0 -0
- /package/src/{.agents/agents → agents}/review/planning-technical-reviewer.md +0 -0
- /package/src/{.agents/agents → agents}/workflow/bug-reproduction-validator.md +0 -0
- /package/src/{.agents/agents → agents}/workflow/lint.md +0 -0
- /package/src/{.agents/agents → agents}/workflow/spec-flow-analyzer.md +0 -0
- /package/src/{.agents/commands → commands}/test-browser.md +0 -0
- /package/src/{.agents/commands → commands}/workflow-brainstorm.md +0 -0
- /package/src/{.agents/commands → commands}/workflow-review.md +0 -0
- /package/src/{.agents/commands → commands}/workflow-tech-review.md +0 -0
- /package/src/{.agents/commands → commands}/workflow-triage.md +0 -0
- /package/src/{.agents/references → references}/standards/README.md +0 -0
- /package/src/{.agents/skills → skills}/agent-browser/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/audit-traceability/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/brainstorming/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/compound-docs/assets/critical-pattern-template.md +0 -0
- /package/src/{.agents/skills → skills}/compound-docs/assets/resolution-template.md +0 -0
- /package/src/{.agents/skills → skills}/compound-docs/schema.project.yaml +0 -0
- /package/src/{.agents/skills → skills}/compound-docs/schema.yaml +0 -0
- /package/src/{.agents/skills → skills}/data-foundations/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/document-review/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/file-todos/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/file-todos/assets/todo-template.md +0 -0
- /package/src/{.agents/skills → skills}/financial-workflow-integrity/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/git-worktree/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/pii-protection-prisma/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/process-metrics/SKILL.md +0 -0
- /package/src/{.agents/skills → skills}/process-metrics/assets/daily-template.md +0 -0
- /package/src/{.agents/skills → skills}/process-metrics/assets/monthly-template.md +0 -0
- /package/src/{.agents/skills → skills}/process-metrics/assets/weekly-template.md +0 -0
- /package/src/{.agents/skills → skills}/technical-review/SKILL.md +0 -0
package/src/AGENTS.md
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
# Agent Operating Principles
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
3
|
+
<!-- Default template. Structural source of truth: src/skills/setup-agents/SKILL.md Phase 4.
|
|
4
|
+
When changing sections here, keep that template in sync (and vice versa). -->
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
- Non-negotiables (Structure Integrity)
|
|
9
|
-
- Planning Fidelity Model
|
|
10
|
-
- Routing Rules
|
|
11
|
-
- Repo Configuration (Optional)
|
|
12
|
-
- Directory Layout
|
|
13
|
-
- Implemented Components (Current Scope)
|
|
14
|
-
- Skill Index (When to Use What)
|
|
15
|
-
- Reference Standards Policy (Anti-Skill-Sprawl)
|
|
6
|
+
This `.agents` workspace is portable and command-first.
|
|
16
7
|
|
|
17
8
|
## Core Principles
|
|
18
9
|
|
|
@@ -22,122 +13,69 @@ This `.agents` workspace is portable and command-first.
|
|
|
22
13
|
4. Selection must be deterministic and visible: always state which skills/agents were selected and why.
|
|
23
14
|
5. Brainstorm and plan do not write code.
|
|
24
15
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
1. `/workflow:brainstorm` -> clarify what to build
|
|
28
|
-
2. `/workflow:plan` -> define how to build it
|
|
29
|
-
3. `/workflow:work` -> implement (includes triage gate for todo readiness/prioritization)
|
|
30
|
-
4. `/workflow:review` -> validate quality
|
|
31
|
-
5. `/workflow:compound` -> capture durable learnings
|
|
16
|
+
## Contract Precedence
|
|
32
17
|
|
|
33
|
-
|
|
18
|
+
If workflow documents conflict, resolve in this order:
|
|
34
19
|
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
1. `docs/principles/workflow-baseline-principles.md`
|
|
21
|
+
2. This file — non-negotiables and repo config
|
|
22
|
+
3. Workflow command specs
|
|
23
|
+
4. Skill docs
|
|
37
24
|
|
|
38
|
-
|
|
25
|
+
## Canonical Workflow
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
1. `/workflow:brainstorm` — clarify what to build
|
|
28
|
+
2. `/workflow:plan` — define how to build it
|
|
29
|
+
3. `/workflow:work` — implement (includes triage gate)
|
|
30
|
+
4. `/workflow:review` — validate quality
|
|
31
|
+
5. `/workflow:compound` — capture durable learnings
|
|
42
32
|
|
|
43
|
-
|
|
33
|
+
Optional:
|
|
44
34
|
|
|
45
|
-
- `/
|
|
35
|
+
- `/workflow:triage` — manually curate/prioritize queue before execution
|
|
36
|
+
- `/workflow:tech-review` — technical correctness check on a plan before build
|
|
46
37
|
|
|
47
|
-
|
|
38
|
+
Continuous improvement:
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
- `/metrics` — log + assess a session
|
|
41
|
+
- `/assess` — aggregate metrics and propose improvements
|
|
50
42
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
If workflow documents conflict, resolve them in this order:
|
|
43
|
+
Onboarding:
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
2. This file (`src/AGENTS.md`) non-negotiables and repo config
|
|
57
|
-
3. Workflow command specs (`src/.agents/commands/workflow-*.md`)
|
|
58
|
-
4. Skill docs (`src/.agents/skills/*/SKILL.md`)
|
|
45
|
+
- `/install` — one action: copies agents/skills/commands, writes opencode.json, merges AGENTS.md, creates docs/todo dirs (run `npx compound-workflow install` in the project)
|
|
59
46
|
|
|
60
47
|
## Non-negotiables (Structure Integrity)
|
|
61
48
|
|
|
62
49
|
- **Commands are the public API.** Keep `/workflow:*` command docs stable; add capability via skills/agents, not new command variants.
|
|
63
50
|
- **Brainstorm = WHAT, Plan = HOW.** `/workflow:plan` must not re-litigate decisions already captured in `docs/brainstorms/`.
|
|
64
|
-
- **Local grounding is mandatory.** Every plan must cite at least 1–3 internal file path/line refs
|
|
65
|
-
- **Fidelity + confidence are required declarations** in every plan file
|
|
66
|
-
- **Solution scope contract is mandatory in every plan.** Plans must declare `solution_scope` (`partial_fix|full_remediation|migration`) plus
|
|
67
|
-
- **
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
- **Independent review is required for code/config changes.** `/workflow:review` must emit `review_independence_mode: independent|degraded`, plus independence evidence and skipped-pass disclosure.
|
|
73
|
-
- **Standards baseline is mandatory for code/config changes.** `/workflow:work` and `/workflow:review` must apply `skill: standards` as a hard gate for declarative flow, immutable transforms, and maintainability boundaries.
|
|
74
|
-
- **Todo completion requires evidence.** A todo may move to `complete` only after success criteria evidence and quality gate evidence are recorded in Work Log.
|
|
75
|
-
- **Blockers change todo state immediately.** Blocked work must move from `ready` back to `pending` with `tags: [blocker]` and an options+recommendation decision record.
|
|
76
|
-
- **Quality gates are enforced with ask-once fallback.** If `lint_command` or `typecheck_command` is missing, ask once per run and continue only when commands are provided and pass.
|
|
77
|
-
- **Skills are invoked only by trigger.** `document-review` only when user selects "Review and refine" (or explicit request); guardrail skills (PII/financial/audit/data) only when the feature touches that domain.
|
|
51
|
+
- **Local grounding is mandatory.** Every plan must cite at least 1–3 internal file path/line refs and any relevant `docs/solutions/**` learnings.
|
|
52
|
+
- **Fidelity + confidence are required declarations** in every plan file.
|
|
53
|
+
- **Solution scope contract is mandatory in every plan.** Plans must declare `solution_scope` (`partial_fix|full_remediation|migration`) plus completion expectation and non-goals.
|
|
54
|
+
- **Isolation preflight is a hard gate.** `/workflow:work` must complete and record worktree/isolation preflight before any implementation commands.
|
|
55
|
+
- **Triage before execution is mandatory.** `/workflow:work` must run a triage pass before executing todos.
|
|
56
|
+
- **Independent review is required for code/config changes.** `/workflow:review` must emit `review_independence_mode: independent|degraded`.
|
|
57
|
+
- **Standards baseline is mandatory for code/config changes.** `/workflow:work` and `/workflow:review` must apply `skill: standards` as a hard gate.
|
|
58
|
+
- **Todo completion requires evidence.** A todo may move to `complete` only after success criteria and quality gate evidence are recorded.
|
|
78
59
|
- **No ad-hoc artifacts outside canonical outputs** (`docs/plans`, `todos`, `docs/solutions`, `docs/metrics`) unless explicitly requested.
|
|
79
|
-
- **Plan file is the artifact.** Post-generation options are actions on the artifact; they do not change the workflow shape.
|
|
80
|
-
- **Tighten over expand.** Resolve ambiguity, standardize naming, enforce sections—avoid adding new process steps unless they reduce rework.
|
|
81
60
|
|
|
82
61
|
## Planning Fidelity Model
|
|
83
62
|
|
|
84
|
-
`/workflow:plan` must always declare:
|
|
85
|
-
|
|
86
|
-
- `Fidelity selected`: `Low | Medium | High`
|
|
87
|
-
- `Confidence`: `High | Medium | Low`
|
|
88
|
-
- `solution_scope`: `partial_fix | full_remediation | migration`
|
|
89
|
-
- Why this fidelity (2-4 reasons)
|
|
90
|
-
- Research mode used (`local only` or `local + external`)
|
|
91
|
-
- Open questions (if any)
|
|
92
|
-
|
|
93
|
-
### Selection Rules
|
|
94
|
-
|
|
95
|
-
- If any high-risk trigger exists, select `High`.
|
|
96
|
-
- If signals are mixed or unclear, default to `Medium`.
|
|
97
|
-
- Otherwise select `Low`.
|
|
63
|
+
`/workflow:plan` must always declare: `Fidelity`, `Confidence`, `solution_scope`, rationale, research mode, and open questions.
|
|
98
64
|
|
|
99
|
-
|
|
65
|
+
- **Low** — problem, constraints, acceptance criteria, implementation outline, verification checklist.
|
|
66
|
+
- **Medium** — all Low + alternatives/tradeoffs, dependency/risk table, rollout notes, observability/test notes.
|
|
67
|
+
- **High** — all Medium + failure modes, rollback plan, deployment gates, migration/data safety checks, expanded test matrix.
|
|
100
68
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- `Low`: problem, constraints, acceptance criteria, implementation outline, verification checklist.
|
|
104
|
-
- `Medium`: all Low + alternatives/tradeoffs, dependency/risk table, rollout notes, observability/test notes.
|
|
105
|
-
- `High`: all Medium + failure modes, rollback plan, deployment gates, migration/data safety checks, expanded test matrix.
|
|
69
|
+
Select `High` if any high-risk trigger exists (security, payments, privacy, data migration, production infra). Default to `Medium` for mixed signals. Otherwise `Low`.
|
|
106
70
|
|
|
107
71
|
## Routing Rules
|
|
108
72
|
|
|
109
|
-
- **
|
|
110
|
-
- **
|
|
111
|
-
- **
|
|
112
|
-
-
|
|
113
|
-
- Prefer existing project patterns before introducing new ones.
|
|
114
|
-
- Always run local repo + institutional learnings research first for planning.
|
|
115
|
-
- Run external best-practice/framework research based on fidelity and risk.
|
|
116
|
-
- For medium/high fidelity plans that touch existing behavior, consider `git-history-analyzer` to understand why the current code is the way it is.
|
|
117
|
-
- Use generic fallback behavior if domain-specific skills are unavailable.
|
|
118
|
-
|
|
119
|
-
## Repo Configuration (Optional)
|
|
120
|
-
|
|
121
|
-
To keep this `.agents` bundle portable, prefer configuring repo-specific commands and defaults in this file.
|
|
122
|
-
|
|
123
|
-
Suggested keys (examples):
|
|
124
|
-
|
|
125
|
-
- `default_branch: main`
|
|
126
|
-
- `dev_server_url: http://localhost:3000`
|
|
127
|
-
- `test_command: npm test`
|
|
128
|
-
- `test_fast_command: npm test -- --watch=false --runInBand`
|
|
129
|
-
- `lint_command: npm run lint`
|
|
130
|
-
- `typecheck_command: npm run typecheck`
|
|
131
|
-
- `format_command: npm run format`
|
|
132
|
-
- `project_tracker: github` (or `linear`)
|
|
133
|
-
- `worktree_dir: .worktrees` (optional; where worktrees are created)
|
|
134
|
-
- `worktree_copy_files: [...]` (optional; env/config files to copy into new worktrees; non-overwriting)
|
|
135
|
-
- `worktree_install_command: <cmd>` (optional; deps install command to run in new worktrees)
|
|
136
|
-
- `worktree_bootstrap_notes: [...]` (optional; prerequisites per worktree: system deps/services/tooling; documented only)
|
|
73
|
+
- **Centralized skill routing:** Add new domain/reference skill routing in this file (Skill Index) rather than per-command.
|
|
74
|
+
- **Default selection order:** (1) safety/guardrail standards, (2) domain architecture/reference skills, (3) workflow execution skills. Minimal set that covers the problem.
|
|
75
|
+
- **Explain selection:** Always state which skills were selected and why.
|
|
76
|
+
- Run local repo + institutional learnings research first for planning. External research based on fidelity and risk.
|
|
137
77
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
If you want commands to read these values deterministically, add a small YAML block under this section:
|
|
78
|
+
## Repo Config Block
|
|
141
79
|
|
|
142
80
|
```yaml
|
|
143
81
|
default_branch: main
|
|
@@ -149,101 +87,30 @@ typecheck_command: npm run typecheck
|
|
|
149
87
|
format_command: npm run format
|
|
150
88
|
project_tracker: github
|
|
151
89
|
worktree_dir: .worktrees
|
|
90
|
+
worktree_install_command: npm ci
|
|
152
91
|
worktree_copy_files:
|
|
153
92
|
- .env
|
|
154
93
|
- .env.local
|
|
155
|
-
|
|
156
|
-
worktree_bootstrap_notes:
|
|
157
|
-
- Ensure required system deps are installed (e.g. via brew/apt)
|
|
158
|
-
- Ensure local services are running (e.g. postgres/redis)
|
|
159
|
-
- If using direnv: run `direnv allow`
|
|
94
|
+
harnesses: []
|
|
160
95
|
```
|
|
161
96
|
|
|
162
|
-
##
|
|
163
|
-
|
|
164
|
-
- Commands: `.agents/commands/*.md` and `.agents/commands/workflow-*.md` (workflow namespace)
|
|
165
|
-
- Skills: `.agents/skills/*/SKILL.md`
|
|
166
|
-
- Skills may optionally include tool-specific agent metadata under `.agents/skills/*/agents/` (for example `openai.yaml`) when required by that skill's validator/runtime.
|
|
167
|
-
- References: `.agents/references/**`
|
|
168
|
-
- Agents: `.agents/agents/**/*.md`
|
|
169
|
-
|
|
170
|
-
**Single source of truth (declarative):** Commands and agents are discovered from the registry and `generate-platform-artifacts`; skills are discovered by scanning `skills/` for `*/SKILL.md`. Add or remove files/dirs, then run install—no other registration. See install-cli header comment for the full pipeline.
|
|
171
|
-
|
|
172
|
-
## Implemented Components (Current Scope)
|
|
173
|
-
|
|
174
|
-
- Commands: `workflow:brainstorm`, `workflow:plan`, `workflow:triage`, `workflow:work`, `workflow:review`, `workflow:tech-review`, `workflow:compound` (under `.agents/commands/` as `workflow-*.md`), plus `test-browser`, `metrics`, `assess`, `install` (root commands)
|
|
175
|
-
- Skills: `brainstorming`, `document-review`, `technical-review`, `compound-docs` (alias: `compound_doc`), `capture-skill`, `file-todos`, `agent-browser`, `git-worktree`, `process-metrics`, `react-ddd-mvc-frontend`, `xstate-actor-orchestration`, `standards`, `pii-protection-prisma`, `financial-workflow-integrity`, `audit-traceability`, `data-foundations`, `presentation-composability`
|
|
176
|
-
- Agents:
|
|
177
|
-
- `repo-research-analyst`
|
|
178
|
-
- `learnings-researcher`
|
|
179
|
-
- `git-history-analyzer`
|
|
180
|
-
- `best-practices-researcher`
|
|
181
|
-
- `framework-docs-researcher`
|
|
182
|
-
- `spec-flow-analyzer`
|
|
183
|
-
- `lint`
|
|
184
|
-
- `bug-reproduction-validator`
|
|
185
|
-
- `agent-native-reviewer`
|
|
186
|
-
- `planning-technical-reviewer`
|
|
187
|
-
|
|
188
|
-
## Skill Index (When to Use What)
|
|
189
|
-
|
|
190
|
-
Skills fall into two buckets:
|
|
191
|
-
|
|
192
|
-
1. Workflow skills: invoked by commands to do work (e.g. `/workflow:review`, `/workflow:compound`).
|
|
193
|
-
2. Reference standards: enforce design/build guardrails when the work touches security, privacy, money, or multi-tenant data.
|
|
194
|
-
|
|
195
|
-
Use reference standards proactively during `/workflow:plan`, `/workflow:work`, and PR review.
|
|
97
|
+
## Skill Index
|
|
196
98
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
To keep this workspace usable and portable, reference standards are intentionally limited.
|
|
200
|
-
|
|
201
|
-
Rules:
|
|
202
|
-
|
|
203
|
-
- Cap: MAX 12 reference standards skills under `.agents/skills/`.
|
|
204
|
-
- Promotion: create a new reference standard skill only if it meets at least 2 criteria:
|
|
205
|
-
- introduces MUST/MUST NOT rules that change build decisions
|
|
206
|
-
- includes required schema/contracts/checklists that can be enforced in review
|
|
207
|
-
- has operational failure modes/runbooks
|
|
208
|
-
- applies across multiple features (not one-off project trivia)
|
|
209
|
-
- prevents a high-cost incident if followed
|
|
210
|
-
- Overlap: each domain has a single "owner" skill; overlapping material MUST be added to the owner skill (as a new section) or demoted to a non-skill reference doc.
|
|
211
|
-
- References location: non-skill references live in `.agents/references/` (this repo: `src/.agents/references/`) and are linked from `src/AGENTS.md` or the owning skill.
|
|
212
|
-
|
|
213
|
-
Owner skills:
|
|
214
|
-
|
|
215
|
-
- `data-foundations`: multi-tenant boundaries (views/functions), RLS, grants/revokes, tenant context.
|
|
216
|
-
- `pii-protection-prisma`: PII placement, envelope encryption, key rotation, logging restrictions.
|
|
217
|
-
- `financial-workflow-integrity`: idempotency, concurrency, webhooks, approvals for money-adjacent workflows.
|
|
218
|
-
- `audit-traceability`: append-only audit logs, actor attribution, correlation IDs, privileged access audit.
|
|
219
|
-
|
|
220
|
-
Maintenance:
|
|
221
|
-
|
|
222
|
-
- If a reference standard becomes mostly examples/links, demote it into `.agents/references/` (this repo: `src/.agents/references/`) and keep the skill as the enforceable rules/checklists only.
|
|
223
|
-
|
|
224
|
-
### Workflow skills
|
|
225
|
-
|
|
226
|
-
| Skill | Use when |
|
|
227
|
-
| --- | --- |
|
|
228
|
-
| `brainstorming` | You need structured idea exploration and clarification without writing code. |
|
|
229
|
-
| `document-review` | You need to review a document/spec and extract issues, gaps, and concrete next actions. |
|
|
230
|
-
| `technical-review` | A plan or feature approach has passed document review and must be checked for technical correctness before build. |
|
|
231
|
-
| `compound-docs` (alias: `compound_doc`) | A durable learning (solved problem or implementation insight) should be captured as institutional knowledge. |
|
|
232
|
-
| `capture-skill` | You want to capture conversation learnings as a reusable skill, while defaulting to project-overlay refinement and avoiding implicit edits to repo-provided base skills. |
|
|
233
|
-
| `file-todos` | You need a file-backed todo workflow for iterative multi-step changes. |
|
|
234
|
-
| `agent-browser` | You need to inspect available agents/skills and route deterministically. |
|
|
235
|
-
| `git-worktree` | You need isolated parallel work (review/feature) using git worktrees. |
|
|
236
|
-
| `process-metrics` | You want to log and assess session performance and process improvements. |
|
|
237
|
-
| `react-ddd-mvc-frontend` | You need React frontend architecture guidance (DDD + MVC hybrid) during planning or review to enforce feature structure, layer boundaries, composable pure components, container/controller responsibilities, and maintainable patterns. |
|
|
238
|
-
| `xstate-actor-orchestration` | You are evaluating complexity and need explicit state orchestration: React container-as-orchestrator for UI flows, or actor/state-machine orchestration for backend/internal workflows (especially multi-step async branching, retries/timeouts/cancellation, receptionist/child-actor coordination, or boolean-flag sprawl). |
|
|
239
|
-
| `standards` | You need Altai coding standards for implementation and refactoring, including domain entity patterns, XState conventions, type usage, and feature code organization. |
|
|
240
|
-
| `presentation-composability` | You are creating or refactoring presentation components in tapesv3 and need folder-per-component structure with barrel exports and styles separation. |
|
|
241
|
-
|
|
242
|
-
### Reference standards (guardrails)
|
|
99
|
+
<!-- Default rows — reflects skills shipped with this package. Run /setup-agents to regenerate from installed skills. -->
|
|
243
100
|
|
|
244
101
|
| Skill | Use when |
|
|
245
102
|
| --- | --- |
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
| `
|
|
249
|
-
| `
|
|
103
|
+
| `brainstorming` | Exploring intent and approaches before planning. |
|
|
104
|
+
| `document-review` | Reviewing a document/spec for issues, gaps, and next actions. |
|
|
105
|
+
| `technical-review` | Checking a plan for technical correctness before build. |
|
|
106
|
+
| `compound-docs` | Capturing a solved problem as durable institutional knowledge. |
|
|
107
|
+
| `capture-skill` | Saving conversation learnings as a reusable skill. |
|
|
108
|
+
| `file-todos` | Managing a file-backed todo workflow for iterative multi-step changes. |
|
|
109
|
+
| `git-worktree` | Isolated parallel work using Git worktrees. |
|
|
110
|
+
| `process-metrics` | Logging and assessing session performance. |
|
|
111
|
+
| `setup-agents` | Creating or updating AGENTS.md for a project. |
|
|
112
|
+
| `agent-browser` | Inspecting available agents/skills and routing deterministically. |
|
|
113
|
+
| `data-foundations` | Designing multi-tenant schema/access boundaries (RLS, grants). |
|
|
114
|
+
| `pii-protection-prisma` | Storing or processing PII. |
|
|
115
|
+
| `financial-workflow-integrity` | Workflows with money or regulatory outcomes. |
|
|
116
|
+
| `audit-traceability` | Append-only auditing with actor attribution. |
|
|
@@ -31,7 +31,7 @@ Before going online, check if curated knowledge already exists in skills:
|
|
|
31
31
|
|
|
32
32
|
1. **Discover Available Skills**:
|
|
33
33
|
|
|
34
|
-
- Use Glob to find all SKILL.md files
|
|
34
|
+
- Resolve the skills directory from `harnesses` in AGENTS.md Repo Config — use the first listed harness that has a `skills/` subdirectory. Use Glob to find all SKILL.md files there, plus `**/**/SKILL.md` as a fallback.
|
|
35
35
|
- Optionally check any user/global skill locations supported by your runtime
|
|
36
36
|
- Read the skill descriptions to understand what each covers
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ Before going online, check if curated knowledge already exists in skills:
|
|
|
42
42
|
- Work isolation → `git-worktree`
|
|
43
43
|
- Browser QA (optional) → `agent-browser`
|
|
44
44
|
|
|
45
|
-
If a skill is not present in
|
|
45
|
+
If a skill is not present in the detected skills directory, treat it as unavailable.
|
|
46
46
|
|
|
47
47
|
3. **Extract Patterns from Skills**:
|
|
48
48
|
|
|
@@ -34,9 +34,9 @@ This command is the feedback loop that improves the `.agents` system over time.
|
|
|
34
34
|
- Trend call: quality up/down and speed up/down (simple narrative)
|
|
35
35
|
4. Propose actions:
|
|
36
36
|
- Each action should target a component:
|
|
37
|
-
- command (
|
|
38
|
-
- skill (
|
|
39
|
-
- agent (
|
|
37
|
+
- command (commands directory of the current harness — resolve from `harnesses` in AGENTS.md Repo Config)
|
|
38
|
+
- skill (skills directory of the current harness — resolve from `harnesses` in AGENTS.md Repo Config)
|
|
39
|
+
- agent (agents directory of the current harness — resolve from `harnesses` in AGENTS.md Repo Config)
|
|
40
40
|
- repo config (`AGENTS.md` keys)
|
|
41
41
|
- Provide the smallest change that would move the metric.
|
|
42
42
|
5. Materialize actions:
|
|
@@ -56,5 +56,5 @@ This command is the feedback loop that improves the `.agents` system over time.
|
|
|
56
56
|
|
|
57
57
|
## Guardrails
|
|
58
58
|
|
|
59
|
-
- Do not modify code or
|
|
59
|
+
- Do not modify code or harness components automatically.
|
|
60
60
|
- Only create todos and summary docs.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: install
|
|
3
|
+
invocation: install
|
|
4
|
+
description: Install compound-workflow in this project — copies agents/skills/commands, writes opencode.json, merges AGENTS.md, and creates docs/todo dirs.
|
|
5
|
+
argument-hint: "[--dry-run] [--root <path>]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /install
|
|
9
|
+
|
|
10
|
+
Install or update compound-workflow in this project with **one action**.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
- First-time setup in a repository.
|
|
15
|
+
- After updating `compound-workflow` to refresh agents, skills, commands, and AGENTS.md template content.
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
- The project must have `compound-workflow` installed: `npm install compound-workflow`.
|
|
20
|
+
|
|
21
|
+
## Instructions for the agent
|
|
22
|
+
|
|
23
|
+
Run in the workspace root (or user-provided root):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx compound-workflow install
|
|
27
|
+
npx compound-workflow install --root /path/to/project
|
|
28
|
+
npx compound-workflow install --dry-run
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- `--dry-run`: Print planned changes only; no writes.
|
|
32
|
+
- `--root <path>`: Target project directory (default: current directory).
|
|
33
|
+
|
|
34
|
+
## What install does
|
|
35
|
+
|
|
36
|
+
1. Copies agents (flat) to `.claude/agents/` for Claude Code discovery.
|
|
37
|
+
2. Copies agents, skills, and commands to `.cursor/agents/`, `.cursor/skills/`, `.cursor/commands/` for Cursor discovery.
|
|
38
|
+
3. Copies agents, skills, and commands to `.agents/agents/`, `.agents/skills/`, `.agents/commands/` for OpenCode and general use.
|
|
39
|
+
4. Writes/merges `opencode.json` pointing commands and agents at `.agents/`.
|
|
40
|
+
5. Creates/merges `AGENTS.md` using the package template while preserving an existing Repo Config Block.
|
|
41
|
+
6. Creates missing directories: `docs/brainstorms`, `docs/plans`, `docs/solutions`, `docs/metrics/daily|weekly|monthly`, `todos`.
|
|
42
|
+
|
|
43
|
+
Stale files from previous installs are pruned automatically on each run.
|
|
@@ -32,7 +32,7 @@ It creates or appends to one file under `docs/metrics/daily/`.
|
|
|
32
32
|
- file: `docs/metrics/daily/YYYY-MM-DD.md`
|
|
33
33
|
- if it exists, append a new "Session" block
|
|
34
34
|
4. Use the template from `process-metrics` skill:
|
|
35
|
-
-
|
|
35
|
+
- `process-metrics/assets/daily-template.md` within the skills directory of the current harness (resolve from `harnesses` in AGENTS.md Repo Config)
|
|
36
36
|
5. Ask for the minimum missing fields:
|
|
37
37
|
- workflow (`brainstorm|plan|work|triage|review|compound|test-browser|other`)
|
|
38
38
|
- outcome (`success|partial|failed`)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agents
|
|
3
|
+
invocation: workflow:agents
|
|
4
|
+
description: Review and update AGENTS.md to keep skills and agents accurate, consistent, and aligned to current workflow needs
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /workflow:agents
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Maintain `AGENTS.md` as the single source of truth for:
|
|
12
|
+
|
|
13
|
+
- skills
|
|
14
|
+
- agents
|
|
15
|
+
- capability routing
|
|
16
|
+
|
|
17
|
+
This command reviews the registry and updates it in place.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Modes
|
|
22
|
+
|
|
23
|
+
### Default (review + update)
|
|
24
|
+
|
|
25
|
+
/workflow:agents
|
|
26
|
+
|
|
27
|
+
#### Behaviour
|
|
28
|
+
|
|
29
|
+
1. Locate registry:
|
|
30
|
+
|
|
31
|
+
- src/AGENTS.md
|
|
32
|
+
- fallback: AGENTS.md
|
|
33
|
+
|
|
34
|
+
2. Read entire file
|
|
35
|
+
|
|
36
|
+
3. Review:
|
|
37
|
+
|
|
38
|
+
- skills (clarity, overlap, gaps)
|
|
39
|
+
- agents (scope, supported skills, duplication)
|
|
40
|
+
- structure (consistency)
|
|
41
|
+
|
|
42
|
+
4. Fix:
|
|
43
|
+
|
|
44
|
+
- tighten vague skills
|
|
45
|
+
- remove or merge duplicates
|
|
46
|
+
- add missing capabilities ONLY if:
|
|
47
|
+
- a clear responsibility exists in the current workflow
|
|
48
|
+
- no existing skill covers it
|
|
49
|
+
- align agents to skills
|
|
50
|
+
- mark outdated entries as deprecated
|
|
51
|
+
- resolve any ambiguity or overlap during this run
|
|
52
|
+
|
|
53
|
+
5. Update AGENTS.md
|
|
54
|
+
|
|
55
|
+
6. Output summary
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### Validate (no changes)
|
|
60
|
+
|
|
61
|
+
/workflow:agents validate
|
|
62
|
+
|
|
63
|
+
#### Behaviour
|
|
64
|
+
|
|
65
|
+
- read registry
|
|
66
|
+
- report:
|
|
67
|
+
- overlaps
|
|
68
|
+
- missing skills
|
|
69
|
+
- inconsistent structure
|
|
70
|
+
- do NOT update file
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
- No step-by-step prompts
|
|
77
|
+
- No partial updates
|
|
78
|
+
- Prefer refinement over expansion
|
|
79
|
+
- Avoid broad/general-purpose skills
|
|
80
|
+
- Keep responsibilities explicit
|
|
81
|
+
- Do not modify other files
|
|
82
|
+
- Do not introduce new skills unless clearly justified by workflow gaps
|
|
83
|
+
- Do not leave unresolved overlaps or unclear definitions
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Output
|
|
88
|
+
|
|
89
|
+
## Registry Update Summary
|
|
90
|
+
|
|
91
|
+
- Registry: <path>
|
|
92
|
+
|
|
93
|
+
## Changes
|
|
94
|
+
|
|
95
|
+
- <refinements>
|
|
96
|
+
- <additions>
|
|
97
|
+
- <deprecations>
|
|
98
|
+
|
|
99
|
+
## Notes
|
|
100
|
+
|
|
101
|
+
- <observations>
|
|
@@ -68,7 +68,7 @@ Execute the capture by following the **`compound-docs` skill**: gather context,
|
|
|
68
68
|
|
|
69
69
|
### 4. Optional review after capture
|
|
70
70
|
|
|
71
|
-
User may optionally run `document-review` on the created doc. If the repo has domain guardrail skills that match the doc's problem type/component and those skills exist
|
|
71
|
+
User may optionally run `document-review` on the created doc. If the repo has domain guardrail skills that match the doc's problem type/component and those skills exist in the skills directory of the current harness (resolve from `harnesses` in AGENTS.md Repo Config), they may be invoked only when the user requests deeper review; do not name or assume skills that are not present.
|
|
72
72
|
|
|
73
73
|
## Preconditions
|
|
74
74
|
|
|
@@ -94,22 +94,6 @@ Refine the idea through collaborative dialogue using **AskQuestion**:
|
|
|
94
94
|
**Skip option:** If the feature description is already detailed, offer:
|
|
95
95
|
"Your description is clear. Should I proceed with research, or would you like to refine it further?"
|
|
96
96
|
|
|
97
|
-
### 0.5. State-Orchestration Fit Check (Decision in planning)
|
|
98
|
-
|
|
99
|
-
Before finalizing architecture, decide whether to load an appropriate
|
|
100
|
-
state-orchestration skill (see Skill Index in AGENTS.md; e.g.
|
|
101
|
-
`xstate-actor-orchestration` when the stack uses that approach).
|
|
102
|
-
|
|
103
|
-
Load one when complexity exceeds simple local state, especially for:
|
|
104
|
-
|
|
105
|
-
- UI flows where a React container should orchestrate context/state and
|
|
106
|
-
compose presentational components
|
|
107
|
-
- Backend/internal workflows with hidden state complexity, lifecycle
|
|
108
|
-
management, retries/timeouts/cancellation, or actor coordination
|
|
109
|
-
- Cases where more than one boolean/flag currently controls flow
|
|
110
|
-
|
|
111
|
-
If not selected, document why simpler state management is sufficient.
|
|
112
|
-
|
|
113
97
|
## Main Tasks
|
|
114
98
|
|
|
115
99
|
### 1. Local Research (Always Runs - Parallel)
|
|
@@ -123,11 +107,13 @@ Run these agents **in parallel** to gather local context:
|
|
|
123
107
|
- Task repo-research-analyst(feature_description)
|
|
124
108
|
- Task learnings-researcher(feature_description)
|
|
125
109
|
|
|
110
|
+
Also read the Skill Index from `AGENTS.md` directly — capture which skills are available and their trigger conditions. This will be used to annotate plan tasks with relevant skills in Step 1.6.
|
|
111
|
+
|
|
126
112
|
**What to look for:**
|
|
127
113
|
|
|
128
114
|
- **Repo research:** existing patterns, AGENTS.md guidance, technology familiarity, pattern consistency
|
|
129
|
-
- Also consider repo-level guidance files such as `AGENTS.md`.
|
|
130
115
|
- **Learnings:** documented solutions in `docs/solutions/` that might apply (gotchas, patterns, lessons learned)
|
|
116
|
+
- **Skill Index:** available skills, their purpose, and when to apply them
|
|
131
117
|
|
|
132
118
|
These findings inform the next step.
|
|
133
119
|
|
|
@@ -250,6 +236,7 @@ After all research steps complete, consolidate findings:
|
|
|
250
236
|
- Note external documentation URLs and best practices (if external research was done)
|
|
251
237
|
- List related issues or PRs discovered
|
|
252
238
|
- Capture AGENTS.md conventions
|
|
239
|
+
- **Annotate skill assignments:** for each planned implementation phase or task, identify the relevant skills from the Skill Index. Record these as `required_skills` per phase/task — they will be embedded in the plan and consumed by `/workflow:work` when delegating to subagents.
|
|
253
240
|
|
|
254
241
|
**Optional validation:** Briefly summarize findings and ask if anything looks off or missing before proceeding to planning.
|
|
255
242
|
|
|
@@ -261,7 +248,9 @@ Run flow/gap analysis to surface missing requirements before locking structure:
|
|
|
261
248
|
- **Medium fidelity:** recommended
|
|
262
249
|
- **High fidelity:** required
|
|
263
250
|
|
|
264
|
-
|
|
251
|
+
**Step 1 — Dispatch subagent:** Task spec-flow-analyzer(feature_description, research_findings)
|
|
252
|
+
|
|
253
|
+
**Step 2 — Parent review:** Once findings are returned, assess whether gaps and edge cases are adequately surfaced. If coverage is insufficient or a critical flow was missed, re-dispatch with refined context before locking structure. Incorporate confirmed gaps into the upcoming issue structure and acceptance criteria.
|
|
265
254
|
|
|
266
255
|
### 2. Issue Planning & Structure
|
|
267
256
|
|
|
@@ -333,13 +322,6 @@ Placement:
|
|
|
333
322
|
- Add a dedicated section in the plan body: `## Agentic Access & Validation Contract`.
|
|
334
323
|
- Reference this section from implementation phases/todos so `/workflow:work` can enforce it directly.
|
|
335
324
|
|
|
336
|
-
### 3. Incorporate SpecFlow (if Step 1.7 ran)
|
|
337
|
-
|
|
338
|
-
If SpecFlow was run in Step 1.7:
|
|
339
|
-
|
|
340
|
-
- [ ] Review SpecFlow analysis results
|
|
341
|
-
- [ ] Ensure any identified gaps or edge cases are reflected in the issue structure and acceptance criteria
|
|
342
|
-
|
|
343
325
|
### 3.5. Discussion Points & Spike Candidates
|
|
344
326
|
|
|
345
327
|
When you declared Open questions in Step 1.5 (other than "none"), and/or when risky-work spike evaluation requires spikes, the plan file MUST include one or both sections below with checkboxes so `/workflow:work` and `file-todos` can create pending todos for triage:
|
|
@@ -467,6 +449,13 @@ solution_scope: [partial_fix|full_remediation|migration]
|
|
|
467
449
|
- lint: [command or "ask once if not configured"]
|
|
468
450
|
- typecheck: [command or "ask once if not configured"]
|
|
469
451
|
|
|
452
|
+
## Implementation Tasks
|
|
453
|
+
|
|
454
|
+
- [ ] Task: [description]
|
|
455
|
+
- required_skills: [skill1, skill2]
|
|
456
|
+
- [ ] Task: [description]
|
|
457
|
+
- required_skills: [skill1]
|
|
458
|
+
|
|
470
459
|
## References
|
|
471
460
|
|
|
472
461
|
- Related issue: #[issue_number]
|
|
@@ -557,6 +546,13 @@ solution_scope: [partial_fix|full_remediation|migration]
|
|
|
557
546
|
|
|
558
547
|
[What to monitor; how to test and validate]
|
|
559
548
|
|
|
549
|
+
## Implementation Tasks
|
|
550
|
+
|
|
551
|
+
- [ ] Task: [description]
|
|
552
|
+
- required_skills: [skill1, skill2]
|
|
553
|
+
- [ ] Task: [description]
|
|
554
|
+
- required_skills: [skill1]
|
|
555
|
+
|
|
560
556
|
## Agentic Access & Validation Contract
|
|
561
557
|
|
|
562
558
|
- Access Preconditions: [services/fixtures/env needed]
|
|
@@ -636,18 +632,21 @@ solution_scope: [partial_fix|full_remediation|migration]
|
|
|
636
632
|
#### Phase 1: [Foundation]
|
|
637
633
|
|
|
638
634
|
- Tasks and deliverables
|
|
635
|
+
- required_skills: [skill1, skill2]
|
|
639
636
|
- Success criteria
|
|
640
637
|
- Estimated effort
|
|
641
638
|
|
|
642
639
|
#### Phase 2: [Core Implementation]
|
|
643
640
|
|
|
644
641
|
- Tasks and deliverables
|
|
642
|
+
- required_skills: [skill1, skill2]
|
|
645
643
|
- Success criteria
|
|
646
644
|
- Estimated effort
|
|
647
645
|
|
|
648
646
|
#### Phase 3: [Polish & Optimization]
|
|
649
647
|
|
|
650
648
|
- Tasks and deliverables
|
|
649
|
+
- required_skills: [skill1]
|
|
651
650
|
- Success criteria
|
|
652
651
|
- Estimated effort
|
|
653
652
|
|
|
@@ -793,14 +792,6 @@ Apply best practices for clarity and actionability, making the issue easy to sca
|
|
|
793
792
|
</details>
|
|
794
793
|
````
|
|
795
794
|
|
|
796
|
-
**AI-Era Considerations:**
|
|
797
|
-
|
|
798
|
-
- [ ] Account for accelerated development with AI pair programming
|
|
799
|
-
- [ ] Include prompts or instructions that worked well during research
|
|
800
|
-
- [ ] Note which AI tools were used for initial exploration (Claude, Copilot, etc.)
|
|
801
|
-
- [ ] Emphasize comprehensive testing given rapid implementation
|
|
802
|
-
- [ ] Document any AI-generated code that needs human review
|
|
803
|
-
|
|
804
795
|
### 6. Final Review & Submission
|
|
805
796
|
|
|
806
797
|
**Pre-submission Checklist:**
|