compound-workflow 1.8.0 → 1.9.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.
Files changed (92) hide show
  1. package/README.md +62 -68
  2. package/package.json +2 -8
  3. package/scripts/check-pack-readme.mjs +1 -16
  4. package/scripts/check-workflow-contracts.mjs +34 -44
  5. package/scripts/install-cli.mjs +273 -555
  6. package/src/AGENTS.md +59 -192
  7. package/src/{.agents/agents → agents}/research/best-practices-researcher.md +2 -2
  8. package/src/{.agents/commands → commands}/assess.md +4 -4
  9. package/src/commands/install.md +43 -0
  10. package/src/{.agents/commands → commands}/metrics.md +1 -1
  11. package/src/{.agents/commands → commands}/test-browser.md +8 -8
  12. package/src/commands/workflow-agents.md +101 -0
  13. package/src/{.agents/commands → commands}/workflow-brainstorm.md +5 -5
  14. package/src/{.agents/commands → commands}/workflow-compound.md +1 -1
  15. package/src/{.agents/commands → commands}/workflow-plan.md +62 -85
  16. package/src/commands/workflow-work.md +839 -0
  17. package/src/{.agents/references → references}/README.md +1 -1
  18. package/src/{.agents/skills → skills}/capture-skill/SKILL.md +1 -1
  19. package/src/{.agents/skills → skills}/compound-docs/SKILL.md +6 -6
  20. package/src/{.agents/skills → skills}/compound-docs/references/yaml-schema.md +2 -2
  21. package/src/skills/setup-agents/SKILL.md +247 -0
  22. package/src/skills/standards/SKILL.md +79 -0
  23. package/src/skills/standards/references/architecture.md +228 -0
  24. package/src/skills/standards/references/code-quality.md +192 -0
  25. package/src/skills/standards/references/presentation.md +515 -0
  26. package/src/skills/standards/references/services.md +172 -0
  27. package/src/skills/standards/references/state-management.md +936 -0
  28. package/.claude-plugin/plugin.json +0 -7
  29. package/.cursor-plugin/plugin.json +0 -20
  30. package/.cursor-plugin/registration.json +0 -5
  31. package/scripts/check-version-parity.mjs +0 -36
  32. package/scripts/generate-platform-artifacts.mjs +0 -230
  33. package/src/.agents/commands/install.md +0 -51
  34. package/src/.agents/commands/workflow-work.md +0 -690
  35. package/src/.agents/registry.json +0 -48
  36. package/src/.agents/scripts/self-check.mjs +0 -227
  37. package/src/.agents/scripts/sync-opencode.mjs +0 -362
  38. package/src/.agents/skills/presentation-composability/SKILL.md +0 -72
  39. package/src/.agents/skills/react-ddd-mvc-frontend/SKILL.md +0 -51
  40. package/src/.agents/skills/react-ddd-mvc-frontend/references/feature-structure.md +0 -25
  41. package/src/.agents/skills/react-ddd-mvc-frontend/references/implementation-principles.md +0 -21
  42. package/src/.agents/skills/react-ddd-mvc-frontend/references/responsibility-gates.md +0 -41
  43. package/src/.agents/skills/react-ddd-mvc-frontend/references/source-map.md +0 -11
  44. package/src/.agents/skills/standards/SKILL.md +0 -747
  45. package/src/.agents/skills/xstate-actor-orchestration/SKILL.md +0 -197
  46. package/src/.agents/skills/xstate-actor-orchestration/agents/openai.yaml +0 -4
  47. package/src/.agents/skills/xstate-actor-orchestration/assets/statecharts/.gitkeep +0 -0
  48. package/src/.agents/skills/xstate-actor-orchestration/references/actor-system-patterns.md +0 -71
  49. package/src/.agents/skills/xstate-actor-orchestration/references/event-contracts.md +0 -73
  50. package/src/.agents/skills/xstate-actor-orchestration/references/functional-domain-patterns.md +0 -53
  51. package/src/.agents/skills/xstate-actor-orchestration/references/machine-structure-and-tags.md +0 -36
  52. package/src/.agents/skills/xstate-actor-orchestration/references/react-container-pattern.md +0 -45
  53. package/src/.agents/skills/xstate-actor-orchestration/references/reliability-observability.md +0 -39
  54. package/src/.agents/skills/xstate-actor-orchestration/references/skill-validation.md +0 -33
  55. package/src/.agents/skills/xstate-actor-orchestration/references/source-map.md +0 -44
  56. package/src/.agents/skills/xstate-actor-orchestration/references/statechart-review-and-signoff.md +0 -59
  57. package/src/.agents/skills/xstate-actor-orchestration/references/testing-strategy.md +0 -35
  58. package/src/.agents/skills/xstate-actor-orchestration/scripts/create-statechart-artifact.sh +0 -71
  59. package/src/.agents/skills/xstate-actor-orchestration/scripts/validate-skill.sh +0 -138
  60. package/src/generated/opencode.managed.json +0 -115
  61. /package/src/{.agents/agents → agents}/research/framework-docs-researcher.md +0 -0
  62. /package/src/{.agents/agents → agents}/research/git-history-analyzer.md +0 -0
  63. /package/src/{.agents/agents → agents}/research/learnings-researcher.md +0 -0
  64. /package/src/{.agents/agents → agents}/research/repo-research-analyst.md +0 -0
  65. /package/src/{.agents/agents → agents}/review/agent-native-reviewer.md +0 -0
  66. /package/src/{.agents/agents → agents}/review/planning-technical-reviewer.md +0 -0
  67. /package/src/{.agents/agents → agents}/workflow/bug-reproduction-validator.md +0 -0
  68. /package/src/{.agents/agents → agents}/workflow/lint.md +0 -0
  69. /package/src/{.agents/agents → agents}/workflow/spec-flow-analyzer.md +0 -0
  70. /package/src/{.agents/commands → commands}/workflow-review.md +0 -0
  71. /package/src/{.agents/commands → commands}/workflow-tech-review.md +0 -0
  72. /package/src/{.agents/commands → commands}/workflow-triage.md +0 -0
  73. /package/src/{.agents/references → references}/standards/README.md +0 -0
  74. /package/src/{.agents/skills → skills}/agent-browser/SKILL.md +0 -0
  75. /package/src/{.agents/skills → skills}/audit-traceability/SKILL.md +0 -0
  76. /package/src/{.agents/skills → skills}/brainstorming/SKILL.md +0 -0
  77. /package/src/{.agents/skills → skills}/compound-docs/assets/critical-pattern-template.md +0 -0
  78. /package/src/{.agents/skills → skills}/compound-docs/assets/resolution-template.md +0 -0
  79. /package/src/{.agents/skills → skills}/compound-docs/schema.project.yaml +0 -0
  80. /package/src/{.agents/skills → skills}/compound-docs/schema.yaml +0 -0
  81. /package/src/{.agents/skills → skills}/data-foundations/SKILL.md +0 -0
  82. /package/src/{.agents/skills → skills}/document-review/SKILL.md +0 -0
  83. /package/src/{.agents/skills → skills}/file-todos/SKILL.md +0 -0
  84. /package/src/{.agents/skills → skills}/file-todos/assets/todo-template.md +0 -0
  85. /package/src/{.agents/skills → skills}/financial-workflow-integrity/SKILL.md +0 -0
  86. /package/src/{.agents/skills → skills}/git-worktree/SKILL.md +0 -0
  87. /package/src/{.agents/skills → skills}/pii-protection-prisma/SKILL.md +0 -0
  88. /package/src/{.agents/skills → skills}/process-metrics/SKILL.md +0 -0
  89. /package/src/{.agents/skills → skills}/process-metrics/assets/daily-template.md +0 -0
  90. /package/src/{.agents/skills → skills}/process-metrics/assets/monthly-template.md +0 -0
  91. /package/src/{.agents/skills → skills}/process-metrics/assets/weekly-template.md +0 -0
  92. /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
- This `.agents` workspace is portable and command-first.
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
- - Canonical Workflow
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
- ## Canonical Workflow
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
- Optional manual steps:
18
+ If workflow documents conflict, resolve in this order:
34
19
 
35
- - `/workflow:triage` -> explicitly curate/prioritize backlog items before execution when needed
36
- - `/workflow:tech-review` -> run technical review on a plan (technical correctness before build); optional plan path
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
- Continuous improvement:
25
+ ## Canonical Workflow
39
26
 
40
- - `/metrics` -> log + assess a session and suggest improvements
41
- - `/assess` -> aggregate daily metrics (weekly/monthly) and propose improvements
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
- Onboarding:
33
+ Optional:
44
34
 
45
- - `/install` -> one action: writes opencode.json, merges AGENTS.md, creates dirs, preserves Repo Config Block (run `npx compound-workflow install` in the project)
35
+ - `/workflow:triage` manually curate/prioritize queue before execution
36
+ - `/workflow:tech-review` — technical correctness check on a plan before build
46
37
 
47
- This workspace currently implements `brainstorm`, `plan`, `triage`, `work`, `review`, `tech-review`, `compound`, and optional QA utilities.
38
+ Continuous improvement:
48
39
 
49
- Use the canonical command names (`/workflow:plan`, `/workflow:work`, `/workflow:review`, `/workflow:tech-review`, etc.). This template does not ship aliases.
40
+ - `/metrics` log + assess a session
41
+ - `/assess` — aggregate metrics and propose improvements
50
42
 
51
- ## Contract Precedence
52
-
53
- If workflow documents conflict, resolve them in this order:
43
+ Onboarding:
54
44
 
55
- 1. `docs/principles/workflow-baseline-principles.md`
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 (existing patterns) and any relevant `docs/solutions/**` learnings.
65
- - **Fidelity + confidence are required declarations** in every plan file: always output the Fidelity/Confidence/Research-mode block; the chosen template must include the required sections for that fidelity (Low/Medium/High).
66
- - **Solution scope contract is mandatory in every plan.** Plans must declare `solution_scope` (`partial_fix|full_remediation|migration`) plus explicit completion expectation and non-goals so `/workflow:work` can enforce intent.
67
- - **SpecFlow is a validation gate, not a rewrite engine.** High fidelity required; Medium recommended; Low optional. Output must translate into acceptance criteria/edge cases, not new scope.
68
- - **Isolation preflight is a hard gate.** `/workflow:work` must complete and record worktree/isolation preflight before any implementation commands. `/workflow:review` must do the same for non-current PR/branch targets before analysis.
69
- - **Triage before execution is mandatory.** `/workflow:work` must run a triage pass before executing todos to prioritize the queue and validate dependencies/ready state for the current plan. `/workflow:triage` remains available as an explicit manual command.
70
- - **Spike governance is explicit and ordered.** Risky plans must evaluate spike need, spike candidates must declare initial priority/dependencies/unblocks/timebox/deliverable, triage confirms those assumptions, and `/workflow:work` executes blocking spikes before dependent build todos.
71
- - **Agentic access/testability is mandatory in planning.** Every plan must include an executable access + validation contract so work/review can run deterministically.
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
- High-risk triggers include: security, payments, privacy, data migration/backfills, production infra/deployment, or hard rollback.
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
- ### Required Output by Fidelity
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
- - **Capability-first in commands:** Core workflow command docs should name capabilities (problem shape), not specific libraries. Concrete skill resolution comes from the Skill Index.
110
- - **Centralized skill routing:** Add new domain/reference skill routing in this file (Skill Index + rules) rather than hard-coding per-skill logic into each workflow command, except for rare high-criticality cases.
111
- - **Default skill selection order:** (1) safety/guardrail standards when applicable, (2) domain architecture/reference skills, (3) workflow execution skills. Choose the minimal set that covers the problem.
112
- - **Explain selection:** When selecting skills, state which skills were selected and why.
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
- ### Repo Config Block (Optional)
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
- worktree_install_command: npm ci
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
- ## Directory Layout
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
- ## Reference Standards Policy (Anti-Skill-Sprawl)
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
- | `data-foundations` | You are designing multi-tenant schema/access boundaries (views/functions, RLS, grants/revokes). |
247
- | `pii-protection-prisma` | You store/process PII and need table separation + envelope encryption + rotation + logging rules. |
248
- | `financial-workflow-integrity` | A workflow has money/regulatory outcomes and must be correct under retries/concurrency/webhooks/approvals. |
249
- | `audit-traceability` | You need append-only auditing with actor attribution + correlation IDs without leaking PII. |
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 in this repo first: `.agents/skills/**/SKILL.md` and `**/**/SKILL.md`
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 this repo's `.agents/skills/`, treat it as unavailable.
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 (`.agents/commands/*.md`)
38
- - skill (`.agents/skills/**/SKILL.md`)
39
- - agent (`.agents/agents/**/*.md`)
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 `.agents` components automatically.
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
- - `.agents/skills/process-metrics/assets/daily-template.md`
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`)
@@ -97,7 +97,7 @@ If installation fails, inform the user and stop.
97
97
 
98
98
  Before starting tests, ask user if they want to watch the browser:
99
99
 
100
- Use AskQuestion with:
100
+ Use AskUserQuestion with:
101
101
  - Question: "Do you want to watch the browser tests run?"
102
102
  - Options:
103
103
  1. **Headed (watch)** - Opens visible browser window so you can see tests run
@@ -154,7 +154,7 @@ git diff --name-only "origin/${default_branch}"...HEAD
154
154
 
155
155
  </determine_scope>
156
156
 
157
- ### 3. Map Files to Routes
157
+ ### 4. Map Files to Routes
158
158
 
159
159
  <file_to_route_mapping>
160
160
 
@@ -175,7 +175,7 @@ Build a list of URLs to test based on the mapping.
175
175
 
176
176
  </file_to_route_mapping>
177
177
 
178
- ### 4. Verify Server is Running
178
+ ### 5. Verify Server is Running
179
179
 
180
180
  <check_server>
181
181
 
@@ -200,7 +200,7 @@ Then run `/test-browser` again.
200
200
 
201
201
  </check_server>
202
202
 
203
- ### 5. Test Each Affected Page
203
+ ### 6. Test Each Affected Page
204
204
 
205
205
  <test_pages>
206
206
 
@@ -239,7 +239,7 @@ agent-browser screenshot --full page-name-full.png # Full page
239
239
 
240
240
  </test_pages>
241
241
 
242
- ### 6. Human Verification (When Required)
242
+ ### 7. Human Verification (When Required)
243
243
 
244
244
  <human_verification>
245
245
 
@@ -253,7 +253,7 @@ Pause for human input when testing touches:
253
253
  | SMS | "Verify you received the SMS code" |
254
254
  | External APIs | "Confirm the [service] integration is working" |
255
255
 
256
- Use AskQuestion:
256
+ Use AskUserQuestion:
257
257
  ```markdown
258
258
  **Human Verification Needed**
259
259
 
@@ -268,7 +268,7 @@ Did it work correctly?
268
268
 
269
269
  </human_verification>
270
270
 
271
- ### 7. Handle Failures
271
+ ### 8. Handle Failures
272
272
 
273
273
  <failure_handling>
274
274
 
@@ -307,7 +307,7 @@ When a test fails:
307
307
 
308
308
  </failure_handling>
309
309
 
310
- ### 8. Test Summary
310
+ ### 9. Test Summary
311
311
 
312
312
  <test_summary>
313
313
 
@@ -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>
@@ -58,7 +58,7 @@ description.
58
58
  - Constrained, well-defined scope
59
59
 
60
60
  **If requirements are already clear:**\
61
- Use **AskQuestion** to suggest:
61
+ Use **AskUserQuestion** to suggest:
62
62
 
63
63
  > "Your requirements seem detailed enough to proceed directly to
64
64
  > planning. Should I run `/workflow:plan` instead, or would you like to
@@ -97,9 +97,9 @@ Also consider any repo-level guidance files such as `AGENTS.md`.
97
97
 
98
98
  Engage in collaborative dialogue rather than a rapid question loop.
99
99
 
100
- **Critical (non-negotiable):** Default response shape is **synthesize + discussion prompts + assumptions**. Multiple-choice / AskQuestion only for handoffs (Phase 0, Phase 4) or a single blocking question when the user is stuck.
100
+ **Critical (non-negotiable):** Default response shape is **synthesize + discussion prompts + assumptions**. Multiple-choice / AskUserQuestion only for handoffs (Phase 0, Phase 4) or a single blocking question when the user is stuck.
101
101
 
102
- **Enforcement rule:** Do **not** use AskQuestion during exploration until **after** at least one full dialogue iteration (Synthesize + discussion prompts + Capture). AskQuestion is only for handoffs or when one focused multiple-choice truly unblocks.
102
+ **Enforcement rule:** Do **not** use AskUserQuestion during exploration until **after** at least one full dialogue iteration (Synthesize + discussion prompts + Capture). AskUserQuestion is only for handoffs or when one focused multiple-choice truly unblocks.
103
103
 
104
104
  **Default cadence (per iteration):**
105
105
 
@@ -191,7 +191,7 @@ For each approach, provide:
191
191
  Lead with your recommendation and explain why. Apply YAGNI --- prefer
192
192
  simpler solutions.
193
193
 
194
- Use **AskQuestion** to confirm preferred direction if needed.
194
+ Use **AskUserQuestion** to confirm preferred direction if needed.
195
195
 
196
196
  ---
197
197
 
@@ -224,7 +224,7 @@ If Open Questions exist:
224
224
 
225
225
  ### Phase 4: Handoff
226
226
 
227
- Use **AskQuestion** to present next steps:
227
+ Use **AskUserQuestion** to present next steps:
228
228
 
229
229
  **Question:**
230
230
  "Brainstorm captured. What would you like to do next?"
@@ -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 under `.agents/skills/`, they may be invoked only when the user requests deeper review; do not name or assume skills that are not present.
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