compound-workflow 1.2.0 → 1.3.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 CHANGED
@@ -48,11 +48,11 @@ To update to a new release, see [Updating compound-workflow](#updating-compound-
48
48
 
49
49
  ## Workflow at a glance
50
50
 
51
- Clarify what to build plan how (fidelity + confidence) execute via todos triage and review capture learnings log and assess.
51
+ Clarify what to build -> plan how (fidelity + confidence) -> triage todos -> execute -> review -> capture learnings -> log and assess.
52
52
 
53
53
  ```mermaid
54
54
  flowchart LR
55
- A["brainstorm"] --> B["plan"] --> C["work"] --> D["triage"] --> E["review"] --> F["capture"] --> G["metrics"]
55
+ A["brainstorm"] --> B["plan"] --> C["triage"] --> D["work"] --> E["review"] --> F["capture"] --> G["metrics"]
56
56
  ```
57
57
 
58
58
  ---
@@ -63,8 +63,8 @@ flowchart LR
63
63
  |------|--------|---------|---------------|
64
64
  | Clarify what to build | Dialogue only; no code | `/workflow:brainstorm [topic]` | `docs/brainstorms/` |
65
65
  | Define how (fidelity + confidence) | Plan only; no code; include agentic access + validation contract | `/workflow:plan [description or brainstorm path]` | `docs/plans/` |
66
- | Execute | File-based todos; risk-tier testing; evidence-backed completion; no auto-ship | `/workflow:work <plan-path>` | `todos/` |
67
66
  | Ready the queue | Priority/dependencies + executable agentic contract checks for pending todos | `/workflow:triage` | — |
67
+ | Execute | File-based todos; risk-tier testing; evidence-backed completion; no auto-ship | `/workflow:work <plan-path>` | `todos/` |
68
68
  | Validate quality | Evidence-based review + agentic executability checks; no fixes by default | `/workflow:review [PR, branch, or current]` | pass / pass-with-notes / fail |
69
69
  | Capture learnings | One solution doc for future use | `/workflow:compound [context]` | `docs/solutions/` |
70
70
  | Log and improve | Session log + optional aggregate review | `/metrics` + `/assess weekly 7` (or monthly) | `docs/metrics/daily/`, weekly/monthly |
@@ -77,13 +77,15 @@ flowchart LR
77
77
 
78
78
  **Intent:** Plan only; no code; fidelity + confidence; include an agentic access + validation contract. **Command:** `/workflow:plan [description or brainstorm path]`. **Output:** `docs/plans/`.
79
79
 
80
- #### 3. Execute (work)
80
+ #### 3. Ready the queue (triage)
81
81
 
82
- **Intent:** File-based todos; risk-tier testing; success-criteria evidence + quality gates before completion; no auto-ship. **Command:** `/workflow:work <plan-path>`. **Output:** `todos/`.
82
+ **Intent:** Priority/dependencies for pending todos and readiness checks for agentic executability. **Command:** `/workflow:triage`. **Output:** —.
83
83
 
84
- #### 4. Ready the queue (triage)
84
+ #### 4. Execute (work)
85
85
 
86
- **Intent:** Priority/dependencies for pending todos and readiness checks for agentic executability. **Command:** `/workflow:triage`. **Output:** —.
86
+ **Intent:** File-based todos; risk-tier testing; success-criteria evidence + quality gates before completion; no auto-ship. **Command:** `/workflow:work <plan-path>`. **Output:** `todos/`.
87
+
88
+ `/workflow:work` must not run until `/workflow:triage` has approved executable ready todos.
87
89
 
88
90
  #### 5. Validate quality (review)
89
91
 
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"compound-workflow","version":"1.2.0","description":"Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/cjerochim/compound-workflow.git"},"bin":{"compound-workflow":"scripts/install-cli.mjs"},"files":["src","scripts",".cursor-plugin",".claude-plugin","skills"],"scripts":{"check:pack-readme":"node scripts/check-pack-readme.mjs"},"engines":{"node":">=18"},"devDependencies":{"@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.4","semantic-release":"^25.0.3"}}
1
+ {"name":"compound-workflow","version":"1.3.1","description":"Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/cjerochim/compound-workflow.git"},"bin":{"compound-workflow":"scripts/install-cli.mjs"},"files":["src","scripts",".cursor-plugin",".claude-plugin","skills"],"scripts":{"check:pack-readme":"node scripts/check-pack-readme.mjs"},"engines":{"node":">=18"},"devDependencies":{"@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.4","semantic-release":"^25.0.3"}}
@@ -861,13 +861,15 @@ Examples:
861
861
 
862
862
  After writing the plan file, use **AskQuestion** to present these options:
863
863
 
864
+ Do not route directly from plan generation to `/workflow:work`.
865
+
864
866
  **Question:** "Plan ready at `docs/plans/YYYY-MM-DD-<type>-<slug>-plan.md`. What would you like to do next?"
865
867
 
866
868
  **Options:**
867
869
 
868
870
  1. **Open plan in editor** - Open the plan file for review
869
871
  2. **Review and refine** - Improve the document through structured self-review
870
- 3. **Start `/workflow:work`** - Begin implementing this plan locally
872
+ 3. **Start `/workflow:triage`** - Triage todos derived from this plan before execution
871
873
  4. **Create Issue** - Create issue in project tracker (GitHub/Linear)
872
874
  5. **Other** - Adjust the plan
873
875
 
@@ -880,13 +882,14 @@ Based on selection:
880
882
 
881
883
  - **Open plan in editor** → Open the plan file in the editor (navigate to `docs/plans/<plan_filename>.md`)
882
884
  - **Review and refine** → Load `document-review` skill.
885
+ - **Start `/workflow:triage`** → Ensure plan todos exist (create via `file-todos` if needed), then run `/workflow:triage` to approve priority/dependencies and the executable ready queue.
883
886
  - **Technical review** → Load `technical-review` skill; then if user agrees to changes, load `document-review` to update the plan.
884
887
  - **Create Issue** → See "Issue Creation" section below
885
888
  - **Other** → Accept free text for rework or specific changes
886
889
 
887
890
  **Note:** Only if `/deepen-plan` exists in this repo and the user has enabled it (e.g., ultrathink), you may run `/deepen-plan` after plan creation for extra depth; it is optional, not required.
888
891
 
889
- Loop back to options after changes until user selects `/workflow:work` or ends the session.
892
+ Loop back to options after changes until user selects `/workflow:triage` or ends the session.
890
893
 
891
894
  ## Issue Creation
892
895
 
@@ -928,6 +931,6 @@ When user selects "Create Issue", detect their project tracker from repo guidanc
928
931
 
929
932
  5. **After creation:**
930
933
  - Display the issue URL
931
- - Ask if they want to proceed to `/workflow:work`
934
+ - Ask if they want to proceed to `/workflow:triage`
932
935
 
933
936
  NEVER CODE! Just research and write the plan.
@@ -1,19 +1,20 @@
1
1
  ---
2
2
  name: triage
3
3
  invocation: workflow:triage
4
- description: Triage pending todo files into an executable ready queue (priority, dependencies, recommended action)
5
- argument-hint: "[optional: todo path, issue id, or 'pending' (default)]"
4
+ description: Triage and prioritize todo files into an executable ready queue (priority, dependencies, recommended action)
5
+ argument-hint: "[optional: todo path, issue id, status filter ('pending'|'ready'|'active')]"
6
6
  ---
7
7
 
8
8
  # /workflow:triage
9
9
 
10
- Turn `todos/*-pending-*.md` items into an executable queue.
10
+ Turn todo items into a prioritized executable queue.
11
11
 
12
12
  This command does not implement fixes. It approves and organizes work so `/workflow:work` can execute without ambiguity.
13
+ Output of this command is the only executable queue for `/workflow:work`.
13
14
 
14
15
  ## Inputs
15
16
 
16
- - Default: triage all pending todos under `todos/`
17
+ - Default: triage all active todos under `todos/` (`pending` + `ready`)
17
18
  - Optional: a specific todo file path or issue id
18
19
 
19
20
  ## Preconditions
@@ -24,9 +25,9 @@ This command does not implement fixes. It approves and organizes work so `/workf
24
25
  ## Workflow
25
26
 
26
27
  1. Identify the target set:
27
- - all `todos/*-pending-*.md`, or
28
+ - all active todos (`todos/*-pending-*.md` + `todos/*-ready-*.md`), or
28
29
  - the requested todo
29
- 2. For each pending todo:
30
+ 2. For each target todo:
30
31
  - read Problem Statement + Findings + Proposed Solutions
31
32
  - fill **Recommended Action** (make it executable)
32
33
  - set `priority` (`p1|p2|p3`)
@@ -45,8 +46,9 @@ This command does not implement fixes. It approves and organizes work so `/workf
45
46
  - **Blocking spikes first:** If a spike unblocks downstream build todos, prioritize approving that spike before its dependents. Do not approve dependent build todos as executable ahead of unresolved blocking spikes.
46
47
  - **Parallel spike readiness:** If multiple spike todos are independent (no dependency edges between them), they may be approved together for parallel execution.
47
48
  3. Decision:
48
- - **approve now** -> rename `*-pending-*` -> `*-ready-*` and set frontmatter `status: ready` (only when Acceptance Criteria and Agentic Execution Contract are executable)
49
- - **defer** -> rename `*-pending-*` -> `*-deferred-*` and set frontmatter `status: deferred` (keep priority, typically `p3`). Ensure Recommended Action, Findings, and Work Log have enough context for future reference. Deferred items are not executed until re-triaged to `ready`.
49
+ - **approve now** -> if pending, rename `*-pending-*` -> `*-ready-*` and set frontmatter `status: ready`; if already ready, keep `status: ready` and update priority/dependencies as needed
50
+ - **defer** -> rename `*-pending-*` or `*-ready-*` -> `*-deferred-*` and set frontmatter `status: deferred` (keep priority, typically `p3`). Ensure Recommended Action, Findings, and Work Log have enough context for future reference. Deferred items are not executed until re-triaged to `ready`.
51
+ - **needs rework** -> when a `ready` todo is not executable, rename `*-ready-*` -> `*-pending-*`, set `status: pending`, and record what is missing before re-approval.
50
52
  - **blocked follow-up** -> when work returns a blocked todo, keep it as `pending` (rename from `*-ready-*` when needed), add `tags: [blocker]`, and require blocker options + recommendation in Work Log before re-approval.
51
53
  4. Output:
52
54
  - list approved `ready` todos (blocking spikes first, then other unblocked items)
@@ -91,6 +91,12 @@ The input must be a plan file path.
91
91
 
92
92
  1.6. **Agentic Access + Validation Preflight (HARD GATE)**
93
93
 
94
+ Contract checksum (MUST all be true before implementation):
95
+
96
+ - triage completed for this plan
97
+ - isolation gate recorded (`worktree_decision`, context, `gate_status: passed`)
98
+ - blocking spikes execute before dependent build todos
99
+
94
100
  Before any implementation commands:
95
101
 
96
102
  - Verify each `ready` todo has an executable Agentic Execution Contract:
@@ -221,8 +227,9 @@ The input must be a plan file path.
221
227
 
222
228
  After creating todos:
223
229
 
224
- - If any todos are `pending`, stop and offer `/workflow:triage` to approve and prioritize before execution.
225
- - If all todos are `ready`, proceed to Phase 2.
230
+ - Run `/workflow:triage` before any implementation work to approve/prioritize the queue for this plan.
231
+ - Do not proceed to Phase 2 until triage completes and execution order is explicit.
232
+ - If triage leaves no unblocked `ready` todos, stop and report pending/deferred/blocked items.
226
233
 
227
234
  ### Phase 2: Execute
228
235
 
@@ -249,7 +256,7 @@ The input must be a plan file path.
249
256
 
250
257
  - If no unblocked `ready` todos remain:
251
258
  - summarize remaining `pending`, `deferred` (parked for reference), and blocked items
252
- - recommend running `/workflow:triage` for pending items
259
+ - require re-running `/workflow:triage` for pending/blocked prioritization
253
260
  - stop (do not invent work)
254
261
 
255
262
  For each task in priority order:
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: capture-skill
3
+ description: Capture learnings, patterns, or workflows from the current conversation into a new or existing skill. Use when the user wants to save what was learned, discovered, or built during a conversation as a reusable skill for future sessions.
4
+ ---
5
+
6
+ # Capture Skill from Conversation
7
+
8
+ This skill extracts reusable knowledge from the current conversation and stores it as a skill.
9
+
10
+ ## Default Policy
11
+
12
+ `capture-skill` uses an overlay model by default:
13
+
14
+ - Treat existing repo-provided skills as immutable unless the user explicitly asks to edit a specific one.
15
+ - Store project-specific refinements in a project overlay skill (for example, `.agents/skills/project-standards/`).
16
+ - Only modify an existing skill when the user clearly says to do so (for example, "update skill X").
17
+ - Promote overlay content into base skills only as an explicit, deliberate follow-up action.
18
+
19
+ ## When to Use
20
+
21
+ - The user says "capture this as a skill" or "save this for next time"
22
+ - A reusable workflow, pattern, or piece of domain knowledge emerged
23
+ - The user wants to refine project standards based on this conversation
24
+ - The conversation revealed non-obvious steps, gotchas, or best practices worth preserving
25
+
26
+ ## Capture Process
27
+
28
+ ### Phase 1: Identify What to Capture
29
+
30
+ Prioritize broad, reusable patterns over one-off implementation details.
31
+
32
+ Look for:
33
+
34
+ 1. High-level principles and standards
35
+ 2. Multi-step workflows discovered through trial and error
36
+ 3. Domain constraints that are not obvious
37
+ 4. Gotchas and reliable fixes
38
+ 5. Decision rationale that establishes a repeatable rule
39
+
40
+ Summarize the planned capture and confirm with the user before writing.
41
+
42
+ ### Phase 2: Check Related Skills and Consolidate
43
+
44
+ Before creating a new skill:
45
+
46
+ 1. List existing skills in personal and project locations.
47
+ 2. Find related skill scopes.
48
+ 3. Decide: consolidate into existing skill, extend an existing skill section, or create a new skill.
49
+
50
+ Consolidate when content overlaps domain, trigger conditions, or workflow usage.
51
+
52
+ ### Phase 3: Choose Destination
53
+
54
+ If not already specified:
55
+
56
+ 1. Decide whether this is a new skill or an update.
57
+ 2. For new captures, decide storage:
58
+ - Personal skill directory for cross-project behavior
59
+ - Project skill directory for project-specific behavior
60
+ 3. Apply the default policy:
61
+ - Prefer project overlay skills for refinements
62
+ - Do not mutate repo-provided skills by default
63
+
64
+ ### Phase 4: Draft Skill Content
65
+
66
+ For new skills:
67
+
68
+ 1. Use a descriptive kebab-case name (max 64 chars)
69
+ 2. Write a precise description with WHAT + WHEN
70
+ 3. Distill into actionable instructions
71
+ 4. Add compact examples
72
+ 5. Include scripts/assets only when needed
73
+
74
+ For updates:
75
+
76
+ 1. Read existing `SKILL.md`
77
+ 2. Integrate into the best section
78
+ 3. Avoid duplication
79
+ 4. Keep structure and voice consistent
80
+
81
+ ### Phase 5: Distill for Reuse
82
+
83
+ Guidelines:
84
+
85
+ 1. Lead with general principles
86
+ 2. Generalize from specific files/functions
87
+ 3. Explain why the pattern exists
88
+ 4. Include only context the agent would not infer
89
+ 5. Keep content concise and maintainable (`SKILL.md` under 500 lines)
90
+
91
+ Do not:
92
+
93
+ - Store conversation artifacts
94
+ - Overfit to single-file fixes
95
+ - Repeat obvious model knowledge
96
+ - Include excessive implementation trivia
97
+
98
+ ### Phase 6: Write and Verify
99
+
100
+ If consolidating:
101
+
102
+ 1. Merge into the chosen home skill
103
+ 2. Keep sections clear and non-overlapping
104
+ 3. Remove obsolete duplicate skills
105
+ 4. Update name/description if scope broadened
106
+
107
+ If creating/updating:
108
+
109
+ 1. Write `SKILL.md`
110
+ 2. Verify trigger description accuracy
111
+ 3. Verify no duplicate scope across skills
112
+ 4. Confirm captured content with the user
113
+
114
+ ## Consolidation Rules
115
+
116
+ - Prefer fewer, broader, discoverable skills over many narrow duplicates.
117
+ - Group frequently co-used patterns into one skill with clear sections.
118
+ - If overlap is discovered after creation, consolidate immediately.
119
+
120
+ ## Edge Cases
121
+
122
+ - Multiple unrelated learnings: split into separate skills.
123
+ - Tiny single-rule capture: recommend a rule file instead of a skill.
124
+ - Major rewrite needed: ask whether to restructure or supersede.
125
+ - User asks to evolve standards safely: keep changes in project overlay unless explicit promotion is requested.
package/src/AGENTS.md CHANGED
@@ -26,13 +26,10 @@ This `.agents` workspace is portable and command-first.
26
26
 
27
27
  1. `/workflow:brainstorm` -> clarify what to build
28
28
  2. `/workflow:plan` -> define how to build it
29
- 3. `/workflow:work` -> implement
30
- 4. `/workflow:review` -> validate quality
31
- 5. `/workflow:compound` -> capture durable learnings
32
-
33
- Supporting command:
34
-
35
- - `/workflow:triage` -> approve and prioritize pending todos
29
+ 3. `/workflow:triage` -> approve and prioritize the todo queue before execution
30
+ 4. `/workflow:work` -> implement
31
+ 5. `/workflow:review` -> validate quality
32
+ 6. `/workflow:compound` -> capture durable learnings
36
33
 
37
34
  Continuous improvement:
38
35
 
@@ -43,7 +40,7 @@ Onboarding:
43
40
 
44
41
  - `/install` -> one action: writes opencode.json, merges AGENTS.md, creates dirs, preserves Repo Config Block (run `npx compound-workflow install` in the project)
45
42
 
46
- This workspace currently implements `brainstorm`, `plan`, `work`, `review`, `compound`, and optional QA utilities.
43
+ This workspace currently implements `brainstorm`, `plan`, `triage`, `work`, `review`, `compound`, and optional QA utilities.
47
44
 
48
45
  Use the canonical command names (`/workflow:plan`, `/workflow:work`, `/workflow:review`, etc.). This template does not ship aliases.
49
46
 
@@ -56,6 +53,7 @@ Use the canonical command names (`/workflow:plan`, `/workflow:work`, `/workflow:
56
53
  - **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.
57
54
  - **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.
58
55
  - **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.
56
+ - **Triage before execution is mandatory.** `/workflow:work` must not execute todos until a `/workflow:triage` pass has prioritized the queue and validated dependencies/ready state for the current plan.
59
57
  - **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.
60
58
  - **Agentic access/testability is mandatory in planning.** Every plan must include an executable access + validation contract so work/review can run deterministically.
61
59
  - **Todo completion requires evidence.** A todo may move to `complete` only after success criteria evidence and quality gate evidence are recorded in Work Log.
@@ -156,8 +154,8 @@ worktree_bootstrap_notes:
156
154
 
157
155
  ## Implemented Components (Current Scope)
158
156
 
159
- - Commands: `workflow:brainstorm`, `workflow:plan`, `workflow:work`, `workflow:triage`, `workflow:review`, `workflow:compound` (under `.agents/commands/workflow/`), plus `test-browser`, `metrics`, `assess`, `setup`, `sync` (root commands)
160
- - Skills: `brainstorming`, `document-review`, `technical-review`, `compound-docs` (alias: `compound_doc`), `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`
157
+ - Commands: `workflow:brainstorm`, `workflow:plan`, `workflow:triage`, `workflow:work`, `workflow:review`, `workflow:compound` (under `.agents/commands/workflow/`), plus `test-browser`, `metrics`, `assess`, `setup`, `sync` (root commands)
158
+ - 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`
161
159
  - Agents:
162
160
  - `repo-research-analyst`
163
161
  - `learnings-researcher`
@@ -213,6 +211,7 @@ Maintenance:
213
211
  | `document-review` | You need to review a document/spec and extract issues, gaps, and concrete next actions. |
214
212
  | `technical-review` | A plan or feature approach has passed document review and must be checked for technical correctness before build. |
215
213
  | `compound-docs` (alias: `compound_doc`) | A durable learning (solved problem or implementation insight) should be captured as institutional knowledge. |
214
+ | `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. |
216
215
  | `file-todos` | You need a file-backed todo workflow for iterative multi-step changes. |
217
216
  | `agent-browser` | You need to inspect available agents/skills and route deterministically. |
218
217
  | `git-worktree` | You need isolated parallel work (review/feature) using git worktrees. |