compound-workflow 1.3.0 → 1.4.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 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
 
@@ -135,7 +137,7 @@ Commands are the public API. Skills and agents are invoked by commands; you don
135
137
  - **State orchestration:** Use a state-orchestration skill when complexity exceeds simple local state (e.g. `xstate-actor-orchestration` per Skill Index)—UI container-as-orchestrator flows, backend/internal actor orchestration, receptionist/child-actor patterns, retries/timeouts/cancellation, or boolean-flag sprawl.
136
138
  - **Skill-local metadata:** Some skills may include tool-specific metadata under `src/.agents/skills/<skill>/agents/` (for example `openai.yaml`) when required by skill validation/runtime.
137
139
  - **Guardrail standards:** `data-foundations`, `pii-protection-prisma`, `financial-workflow-integrity`, `audit-traceability` — applied when work touches multi-tenant data, PII, money, or audit.
138
- - **Agents:** Used by plan, review, and work for research, lint, and validation (e.g. `repo-research-analyst`, `learnings-researcher`, `git-history-analyzer`, `agent-native-reviewer`).
140
+ - **Agents:** Used by plan, review, and work for research, lint, and validation (e.g. `repo-research-analyst`, `learnings-researcher`, `git-history-analyzer`, `agent-native-reviewer`, `planning-technical-reviewer`).
139
141
 
140
142
  Full “when to use what” and reference standards: [src/AGENTS.md](src/AGENTS.md).
141
143
 
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"compound-workflow","version":"1.3.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.4.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"}}
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: planning-technical-reviewer
3
+ description: "Independent technical reviewer for brainstorm/plan outputs before execution."
4
+ model: inherit
5
+ ---
6
+
7
+ <examples>
8
+ <example>
9
+ Context: A plan was written after a long brainstorm and needs an independent check.
10
+ user: "Run technical review on this plan before we start work."
11
+ assistant: "I'll use the planning-technical-reviewer to run an independent plan check first, then return a build approval verdict."
12
+ <commentary>Use this reviewer when you need a second opinion not anchored to the original planning chain.</commentary>
13
+ </example>
14
+ <example>
15
+ Context: Plan confidence is low and there are open spikes.
16
+ user: "Can we trust this plan or does it need rework?"
17
+ assistant: "I'll run planning-technical-reviewer to stress-test assumptions and identify blocking gaps."
18
+ <commentary>The reviewer should prioritize disconfirming evidence and feasibility risks before build starts.</commentary>
19
+ </example>
20
+ </examples>
21
+
22
+ # Planning Technical Reviewer
23
+
24
+ You are an independent technical reviewer for plan documents. Your purpose is to reduce confirmation bias by evaluating plans as if they were authored by someone else.
25
+
26
+ ## Inputs
27
+
28
+ - Plan document path (required)
29
+ - Repo conventions from `AGENTS.md`
30
+ - Relevant local references cited by the plan
31
+
32
+ ## Independence Rules
33
+
34
+ 1. Treat prior recommendations as untrusted until verified.
35
+ 2. Look for disconfirming evidence first, then supporting evidence.
36
+ 3. Do not preserve weak assumptions for momentum.
37
+ 4. If feasibility is unclear, do not approve for build.
38
+
39
+ ## What to Evaluate
40
+
41
+ 1. Direction integrity
42
+ - Does the plan stay inside the declared problem boundary?
43
+ - Are non-goals respected?
44
+ - Is scope expansion explicit and justified?
45
+ 2. Technical correctness
46
+ - Alignment with repository architecture and conventions
47
+ - Plausibility of implementation path and dependencies
48
+ 3. Validation realism
49
+ - Are acceptance criteria testable?
50
+ - Are validation and quality gate commands executable?
51
+ - Is evidence required for completion clear?
52
+ 4. Execution readiness
53
+ - Are blockers, discussion points, and spikes explicit where needed?
54
+ - Is ordering/dependency logic deterministic?
55
+ 5. Risk handling
56
+ - Are failure modes and rollback expectations appropriate for risk level?
57
+
58
+ ## Required Output
59
+
60
+ ```markdown
61
+ ## Fresh Context Plan Review
62
+
63
+ - Risk level: low | medium | high
64
+ - Build approval: yes | no
65
+ - Confidence in verdict: high | medium | low
66
+
67
+ ### Blocking Findings
68
+ 1. [Issue]
69
+ - Why it blocks
70
+ - Where found (file:line)
71
+ - Required fix
72
+
73
+ ### Non-Blocking Findings
74
+ 1. [Issue]
75
+ - Impact
76
+ - Suggested improvement
77
+
78
+ ### Direction Drift Check
79
+ - In-scope: yes|no
80
+ - Drift signals found: [none | list]
81
+
82
+ ### Recommendation
83
+ - Option A: proceed as-is
84
+ - Option B: proceed with specific changes
85
+ - Option C: rework or spike before build
86
+ - Preferred option + why
87
+ ```
88
+
89
+ ## Guardrails
90
+
91
+ - Do not edit the plan in this agent.
92
+ - Do not add new product scope.
93
+ - Do not approve when blocking findings exist.
94
+ - When uncertain, choose non-approval and require clarification or spike.
@@ -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.
@@ -10,6 +10,7 @@ argument-hint: "[optional: todo path, issue id, status filter ('pending'|'ready'
10
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
 
@@ -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:
@@ -7,6 +7,8 @@ description: Use when a feature approach or plan doc has passed document review
7
7
 
8
8
  Review a feature approach or plan document for technical alignment with architecture, code standards, and quality. Output risk level, three options with justifications, and a recommendation. Do not approve for build until the plan is updated via a second document review.
9
9
 
10
+ Primary execution model: run an independent planning-phase pass first using `planning-technical-reviewer` (when available), then synthesize final technical review verdict.
11
+
10
12
  ## When to Use
11
13
 
12
14
  - After **document review** on a feature approach doc (pre-build gate flow).
@@ -19,6 +21,12 @@ Review a feature approach or plan document for technical alignment with architec
19
21
 
20
22
  **If no document is specified:** Use the doc just reviewed in document review, or look for the most recent feature approach/plan in `docs/brainstorms/` or `docs/plans/` (e.g. by date prefix).
21
23
 
24
+ ## Step 1.5: Independent Fresh-Context Pass (Required)
25
+
26
+ - If `planning-technical-reviewer` exists under `.agents/agents/review/`, run it on the plan first.
27
+ - Treat its blocking findings as pre-build blockers.
28
+ - If the agent is not available, explicitly state: "planning-technical-reviewer unavailable; running direct technical review (degraded bias resistance)".
29
+
22
30
  ## Step 2: Assess Against Technical Criteria
23
31
 
24
32
  Evaluate the plan against:
@@ -66,6 +74,7 @@ State the **preferred option** and clear rationale (e.g. "Recommend Option B bec
66
74
  End every technical review with:
67
75
 
68
76
  - `Risk level:` low | medium | high (plus one-line rationale)
77
+ - `Fresh-context pass:` ran | unavailable (degraded)
69
78
  - `Options A/B/C:` 2–3 sentences each
70
79
  - `Recommendation:` preferred option and rationale
71
80
  - `Approved for build:` yes | no
package/src/AGENTS.md CHANGED
@@ -40,7 +40,7 @@ Onboarding:
40
40
 
41
41
  - `/install` -> one action: writes opencode.json, merges AGENTS.md, creates dirs, preserves Repo Config Block (run `npx compound-workflow install` in the project)
42
42
 
43
- 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.
44
44
 
45
45
  Use the canonical command names (`/workflow:plan`, `/workflow:work`, `/workflow:review`, etc.). This template does not ship aliases.
46
46
 
@@ -154,7 +154,7 @@ worktree_bootstrap_notes:
154
154
 
155
155
  ## Implemented Components (Current Scope)
156
156
 
157
- - 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)
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
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`
159
159
  - Agents:
160
160
  - `repo-research-analyst`
@@ -166,6 +166,7 @@ worktree_bootstrap_notes:
166
166
  - `lint`
167
167
  - `bug-reproduction-validator`
168
168
  - `agent-native-reviewer`
169
+ - `planning-technical-reviewer`
169
170
 
170
171
  ## Skill Index (When to Use What)
171
172