@leing2021/super-pi 0.23.0 → 0.23.2

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.
@@ -0,0 +1,46 @@
1
+ # Solution Search Strategy
2
+
3
+ Grep-first strategy for finding relevant solutions before planning or reviewing.
4
+
5
+ ## Steps
6
+
7
+ 1. **Extract keywords** from the task description
8
+ 2. **Grep frontmatter** fields (tags, title) in both locations:
9
+ ```bash
10
+ grep -rl "tags:.*keyword" docs/solutions/ ~/.pi/agent/docs/solutions/
11
+ ```
12
+ 3. **Read frontmatter only** (first 15 lines) of matching files
13
+ 4. **Score by:**
14
+ - Severity match (higher severity = higher priority)
15
+ - Tag relevance (exact matches rank higher)
16
+ 5. **Fully read top 3** candidates
17
+ 6. If no matches: report "No relevant solutions found" and proceed
18
+
19
+ ## Search locations
20
+
21
+ | Level | Path | Use for |
22
+ |---|---|---|
23
+ | Project | `docs/solutions/` | Project-specific learnings |
24
+ | Global | `~/.pi/agent/docs/solutions/` | Cross-project patterns |
25
+
26
+ ## Scoring rubric
27
+
28
+ | Score | Criteria |
29
+ |---|---|
30
+ | 5 | Exact tag match + high severity + same language |
31
+ | 4 | Tag match + same category |
32
+ | 3 | Partial tag match |
33
+ | 2 | Same category, no tag match |
34
+ | 1 | Worth reading for context |
35
+ | 0 | No relevance |
36
+
37
+ ## Output
38
+
39
+ - List of relevant solutions with paths and relevance scores
40
+ - Key takeaways from top solutions
41
+ - How they apply to current task
42
+
43
+ ## When to use
44
+
45
+ - `02-plan`: Before creating implementation units, check for existing patterns
46
+ - `04-review`: Before reviewing, check for known failure modes or solutions
@@ -5,73 +5,52 @@ description: Execute plan-driven work in a controlled Phase 1 workflow.
5
5
 
6
6
  # Work
7
7
 
8
- Use this skill when there is a plan path or a tightly scoped bare prompt ready for execution.
8
+ Use this skill when there is a plan path or tightly scoped bare prompt ready for execution.
9
9
 
10
10
  See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
11
11
 
12
12
  ## Core rules
13
13
 
14
- - Before execution, load project rules:
15
- 1. `rules/common/development-workflow.md` and `rules/common/testing.md`
16
- 2. Detect the project's primary language using [language detection](../references/language-detection.md)
17
- 3. Load all files in the matching language-specific rules directory (e.g. `rules/typescript/`)
18
- 4. If the task involves frontend/browser concerns, also load `rules/web/` files
19
- - Priority: project-level `{repo-root}/rules/` overrides package-level defaults
20
- - Distinguish between a **plan path** input and a **bare prompt** input before doing work.
21
- - Prefer deriving execution tasks from plan **implementation units**.
22
- - Prefer inline execution for small or tightly scoped units.
23
- - Use **`ce_parallel_subagent`** for independent CE skill-based units that can run concurrently.
24
- - Use **`ce_subagent`** only for dependent serial chains that benefit from isolated context or specialized CE skill execution.
25
- - Note: the generic `subagent` / `parallel_subagent` tool names are reserved for third-party agent extensions (e.g. `pi-subagents`); CE skill-router uses the `ce_`-prefixed names to avoid tool-name conflicts.
26
- - Use **`session_checkpoint`** to track plan execution progress. On start, load the checkpoint and skip completed units. After each unit, save the checkpoint.
27
- - On execution failure, use `session_checkpoint` `fail` to record the error, then `retry` to get a retry strategy. Follow the suggested strategy to recover.
28
- - Use **`task_splitter`** to analyze implementation units for file-level dependencies before execution. Run independent units via `ce_parallel_subagent` and dependent units serially.
29
- - If inside a **worktree** (created via `07-worktree`), execute within it. Otherwise, consider recommending `07-worktree` for isolation.
30
- - End by recommending `04-review`.
14
+ 1. Load project rules (4 steps):
15
+ - Load `rules/common/development-workflow.md` and `rules/common/testing.md`
16
+ - Detect project language via [language detection](../references/language-detection.md)
17
+ - Load matching language-specific rules
18
+ - If frontend/browser concerns, also load `rules/web/` files
19
+ 2. **Priority:** project-level `{repo-root}/rules/` overrides package defaults
20
+ 3. **Distinguish input:** plan path vs bare prompt
21
+ 4. Derive tasks from plan **implementation units**
22
+ 5. **Execution mode:**
23
+ - **Inline mode** for small/scoped units
24
+ - **`ce_parallel_subagent`** for independent CE skill units
25
+ - **`ce_subagent`** only for dependent serial chains
26
+ 6. Use **`session_checkpoint`** to track progress and enable resume
27
+ 7. Use **`task_splitter`** to analyze dependencies before execution
28
+ 8. If in **worktree** (via `07-worktree`), execute inside it
29
+ 9. End by recommending `04-review`
31
30
 
32
31
  ## Hard gates — TDD enforcement
33
32
 
34
- Every execution step must follow **RED → GREEN → REFACTOR**:
35
- - No production code before a verified failing test.
36
- - No skipping RED or GREEN verification.
37
- - No completion claim without command output evidence.
38
- - Evidence before assertions — always.
33
+ Every step follows **RED → GREEN → REFACTOR**:
39
34
 
40
35
  **Blocking violations** — stop and ask if:
41
- - code is written before the RED test
42
- - a RED step fails for the wrong reason
43
- - missing evidence that the test failed before implementation
44
- - missing evidence that the test passed after implementation
45
- - tests added only after code
36
+ - Code written before RED test
37
+ - RED fails for wrong reason
38
+ - Missing evidence test failed before implementation
39
+ - Missing evidence test passed after implementation
40
+ - Tests added only after code
46
41
 
47
42
  ## Workflow
48
43
 
49
- 1. Detect whether the input is a plan path or a bare prompt.
50
- 2. If it is a plan path, read the implementation units and execute from them.
51
- 3. If it is a bare prompt, do a small scope scan before deciding whether to proceed.
52
- 4. Use `session_checkpoint` to load progress and skip completed units.
53
- 5. Use `task_splitter` to identify parallel-safe vs dependent units.
54
- 6. Execute in inline mode by default; use `ce_parallel_subagent` for independent CE skill units and `ce_subagent` only for valuable dependent serial chains.
55
- 7. For each unit, follow strict TDD:
56
- a. Run the RED test and confirm expected failure.
57
- b. Apply minimal implementation.
58
- c. Run the GREEN test and confirm pass.
59
- d. Refactor only while tests stay green.
60
- e. Run unit-level verification.
61
- 8. Record progress using `references/progress-update-format.md`.
62
- 9. After each unit, save `session_checkpoint`.
63
- 10. On failure, use `session_checkpoint` `fail` then `retry`.
64
- 11. Provide a **completion report** when done.
65
- 12. Hand off to `04-review` using `references/handoff.md`.
66
-
67
- ## Completion report
68
-
69
- When all units are done, provide:
70
-
71
- - **Completed units**: list of unit names
72
- - **Files changed**: all files created or modified
73
- - **Commands run**: all verification commands executed
74
- - **Verification results**: pass/fail status for each
75
- - **Follow-up work**: any remaining risks or open questions
44
+ 1. Detect input type (plan path vs bare prompt)
45
+ 2. Read implementation units if plan path
46
+ 3. Load `session_checkpoint` to skip completed units
47
+ 4. Use `task_splitter` for dependency analysis
48
+ 5. Execute: **inline mode** by default, `ce_parallel_subagent` for independent units
49
+ 6. Follow TDD per unit: RED minimal code GREEN refactor unit-level **verification**
50
+ 7. Record progress via `references/progress-update-format.md`
51
+ 8. Save `session_checkpoint` after each unit
52
+ 9. On failure: `session_checkpoint` `fail` → `retry` → follow strategy
53
+ 10. Provide completion report (see `references/completion-report.md`)
54
+ 11. Handoff to `04-review` using `references/handoff.md`
76
55
 
77
56
  Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
@@ -0,0 +1,51 @@
1
+ # Completion Report Template
2
+
3
+ When all implementation units are complete, provide this report:
4
+
5
+ ## Summary
6
+
7
+ Brief description of what was completed.
8
+
9
+ ## Completed units
10
+
11
+ | Unit | Status | Verification |
12
+ |---|---|---|
13
+ | unit-name-1 | ✅ Done | command output |
14
+ | unit-name-2 | ✅ Done | command output |
15
+
16
+ ## Files changed
17
+
18
+ - Created: `path/to/file`
19
+ - Modified: `path/to/file`
20
+
21
+ ## Commands run
22
+
23
+ | Command | Result |
24
+ |---|---|
25
+ | `npm test` | ✅ Pass |
26
+ | `npm run build` | ✅ Pass |
27
+
28
+ ## Verification results
29
+
30
+ All tests pass. Build succeeds. No regressions.
31
+
32
+ ## Follow-up work
33
+
34
+ - Any remaining risks
35
+ - Open questions
36
+ - Suggested next steps
37
+
38
+ ---
39
+
40
+ ## Report format for skill output
41
+
42
+ ```
43
+ ## Completion Report
44
+
45
+ **Completed:** list of unit names
46
+ **Files changed:** all created/modified files
47
+ **Commands run:** all verification commands
48
+ **Verification:** pass/fail status for each
49
+
50
+ **Next:** `/skill:04-review`
51
+ ```
@@ -5,78 +5,70 @@ description: "Review code with structured findings. Optional browser QA and regr
5
5
 
6
6
  # Review
7
7
 
8
- Use this skill after implementation to review changes against the diff, the relevant plan, and prior learnings.
8
+ Use this skill after implementation to review changes against the diff, plan, and prior learnings.
9
9
 
10
10
  See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
11
11
 
12
12
  ## Core rules
13
13
 
14
- - Before reviewing, load project rules:
15
- 1. `rules/common/code-review.md`
16
- 2. Detect the project's primary language from the changed files using [language detection](../references/language-detection.md)
17
- 3. Load all files in the matching language-specific rules directory (e.g. `rules/typescript/`)
18
- 4. If the review involves frontend/browser changes, also load `rules/web/` files
19
- - Priority: project-level `{repo-root}/rules/` overrides package-level defaults
20
- - Determine the **diff scope** before selecting reviewers.
21
- - Use the **`review_router`** tool to automatically select reviewer personas based on diff metadata.
22
- - Read the relevant **plan** artifact when one exists.
23
- - Search solutions with grep-first strategy: extract keywords from the task → `bash grep -rl "tags:.*keyword" docs/solutions/ ~/.pi/agent/docs/solutions/` → read only frontmatter (first 15 lines) of matching files → score by severity + tag relevance → fully read top 3. Search both project-level (`docs/solutions/`) and global-level (`~/.pi/agent/docs/solutions/`). If no matches, report "No relevant solutions found" and proceed.
24
- - Produce **structured findings** using `references/findings-schema.md`.
25
- - When findings are **autofixable**, apply fixes and re-review (max 3 iterations).
26
- - End with a handoff that can point toward fixes, re-review, or `05-learn`.
27
-
28
- ## Review discipline technical evaluation
14
+ 1. Load project rules (4 steps):
15
+ - Load `rules/common/code-review.md`
16
+ - Detect language from changed files via [language detection](../references/language-detection.md)
17
+ - Load matching language-specific rules (e.g., `rules/typescript/`)
18
+ - If frontend/browser changes, also load `rules/web/` files
19
+ 2. **Priority:** project-level `{repo-root}/rules/` overrides package defaults
20
+ 3. Determine **diff scope** before selecting reviewers
21
+ 4. Use **`review_router`** tool to select reviewer personas based on diff metadata
22
+ 5. Read relevant **plan** artifact when exists
23
+ 6. Run solution search (see `references/solution-search.md`):
24
+ - Extract keywords `grep -rl "tags:.*keyword" docs/solutions/ ~/.pi/agent/docs/solutions/`
25
+ - Read **frontmatter** only (first 15 lines) of matches score by severity + tag relevance
26
+ - Fully read top 3 candidates
27
+ 7. Produce structured findings using `references/findings-schema.md`
28
+ 8. **Autofixable findings:** apply and re-review (max 3 iterations)
29
+
30
+ ## Review discipline
29
31
 
30
32
  Code review is **technical evaluation**, not social performance:
31
- - **Verify before implementing** any suggestion — check against codebase reality.
32
- - **YAGNI check**: if a suggestion adds a feature nothing uses, question whether it's needed.
33
- - **No performative agreement** do not agree with findings without technical verification.
34
- - **Push back with reasoning** when a finding is technically incorrect for this codebase.
35
- - **Evidence before assertions** — every finding must cite specific code, not general principles.
33
+ - **Verify before implementing** any suggestion
34
+ - **YAGNI check:** question features nothing uses
35
+ - **No performative agreement:** verify before concurring
36
+ - **Push back** with reasoning when findings are incorrect
37
+ - **Evidence before assertions:** cite specific code, not principles
36
38
 
37
39
  ## Handling findings
38
40
 
39
- When processing review findings:
40
- 1. **Read** — complete all findings without reacting.
41
- 2. **Verify** — check each finding against codebase reality.
42
- 3. **Evaluate** — is it technically sound for THIS codebase?
43
- 4. **Act** — fix confirmed issues, push back on incorrect ones with reasoning.
44
- 5. **Test** — verify each fix individually, no regressions.
41
+ 1. **Read** complete all findings without reacting
42
+ 2. **Verify** — check each against codebase reality
43
+ 3. **Evaluate** — is it sound for THIS codebase?
44
+ 4. **Act** — fix confirmed issues, push back on incorrect ones
45
+ 5. **Test** — verify each fix individually, no regressions
45
46
 
46
47
  ## Workflow
47
48
 
48
- 1. Determine diff scope from the current branch or explicit review target.
49
- 2. Collect diff stats (files changed, insertions, deletions) and call `review_router`.
50
- 3. Read the matching plan artifact when one exists.
51
- 4. Execute the solution search strategy: extract keywords → grep frontmatter fields (tags, title) in `docs/solutions/` and `~/.pi/agent/docs/solutions/` → read frontmatter of candidates only → score and rank → fully read top 3.
52
- 5. Apply each reviewer persona returned by `review_router`.
53
- 6. Merge the results into structured findings.
54
- 7. Verify each finding against the codebase before acting.
55
- 8. If any findings are autofixable, apply fixes, re-run tests, and re-review.
49
+ 1. Determine diff scope from branch or explicit target
50
+ 2. Collect stats (files, insertions, deletions) call `review_router`
51
+ 3. Read matching plan artifact
52
+ 4. Run solution search
53
+ 5. Apply each reviewer persona from `review_router`
54
+ 6. Merge into structured findings
55
+ 7. Verify each finding against codebase
56
+ 8. Apply autofixes, re-run tests, re-review if needed
56
57
 
57
58
  ## Optional: QA Test Mode
58
59
 
59
- After step 8 (code review complete), offer browser-based QA testing:
60
+ After code review complete, offer browser QA:
60
61
 
61
- > Code review complete. Want me to also run the app through browser-based QA?
62
- >
63
- > - **A) Just code review** — done here
64
- > - **B) Run browser QA** — use agent-browser to test the live app, find visual/functional bugs
65
- > - **C) Browser QA + write regression tests** — find bugs, fix them, add regression tests
62
+ > Code review done. Run browser QA?
63
+ > - **A) Done** — stop here
64
+ > - **B) Browser QA** — find visual/functional bugs
65
+ > - **C) QA + regression tests** — find bugs, fix, add tests
66
66
 
67
- If the user picks B or C, read `references/qa-test-mode.md` and execute the QA workflow.
68
-
69
- After QA:
70
- 1. Include QA findings in the review handoff alongside code review findings.
71
- 2. If bugs were fixed, note the fix commits.
72
- 3. If regression tests were written, note the test files.
67
+ If B or C: read `references/qa-test-mode.md` and execute workflow.
68
+ After QA: include findings in handoff, note fix commits/test files.
73
69
 
74
70
  ## Handoff
75
71
 
76
- After review (and optional QA) is complete, hand off using `references/handoff.md`:
77
- 1. Summarize all findings (code review + QA if run).
78
- 2. Note fix commits if any were applied.
79
- 3. Recommend `05-learn` if learnings are worth capturing.
80
- 4. Recommend `03-work` if fixes need further implementation.
72
+ See `references/handoff.md` for format.
81
73
 
82
74
  Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
@@ -0,0 +1,46 @@
1
+ # Solution Search Strategy
2
+
3
+ Grep-first strategy for finding relevant solutions before planning or reviewing.
4
+
5
+ ## Steps
6
+
7
+ 1. **Extract keywords** from the task description
8
+ 2. **Grep frontmatter** fields (tags, title) in both locations:
9
+ ```bash
10
+ grep -rl "tags:.*keyword" docs/solutions/ ~/.pi/agent/docs/solutions/
11
+ ```
12
+ 3. **Read frontmatter only** (first 15 lines) of matching files
13
+ 4. **Score by:**
14
+ - Severity match (higher severity = higher priority)
15
+ - Tag relevance (exact matches rank higher)
16
+ 5. **Fully read top 3** candidates
17
+ 6. If no matches: report "No relevant solutions found" and proceed
18
+
19
+ ## Search locations
20
+
21
+ | Level | Path | Use for |
22
+ |---|---|---|
23
+ | Project | `docs/solutions/` | Project-specific learnings |
24
+ | Global | `~/.pi/agent/docs/solutions/` | Cross-project patterns |
25
+
26
+ ## Scoring rubric
27
+
28
+ | Score | Criteria |
29
+ |---|---|
30
+ | 5 | Exact tag match + high severity + same language |
31
+ | 4 | Tag match + same category |
32
+ | 3 | Partial tag match |
33
+ | 2 | Same category, no tag match |
34
+ | 1 | Worth reading for context |
35
+ | 0 | No relevance |
36
+
37
+ ## Output
38
+
39
+ - List of relevant solutions with paths and relevance scores
40
+ - Key takeaways from top solutions
41
+ - How they apply to current task
42
+
43
+ ## When to use
44
+
45
+ - `02-plan`: Before creating implementation units, check for existing patterns
46
+ - `04-review`: Before reviewing, check for known failure modes or solutions
@@ -9,11 +9,11 @@ Use this skill when the user wants to know what to run next in the Compound Engi
9
9
 
10
10
  ## Core rules
11
11
 
12
- - Use the `workflow_state` tool to scan repo artifacts before making a recommendation.
13
- - Use the `session_history` tool to check recent executions and avoid recommending already-completed steps.
12
+ - Use **`workflow_state`** tool to scan repo artifacts before making a recommendation.
13
+ - Use **`session_history`** tool to check recent executions and avoid already-completed steps.
14
14
  - Recommend exactly **one** next skill with a clear reason.
15
15
  - Do not execute the recommended skill — only suggest it.
16
- - If the workflow state suggests multiple valid paths, pick the one closest to completing a full loop.
16
+ - If multiple valid paths exist, pick the one closest to completing a full loop.
17
17
 
18
18
  ## Two modes
19
19
 
@@ -21,29 +21,23 @@ Use this skill when the user wants to know what to run next in the Compound Engi
21
21
 
22
22
  When the user asks "what should I do next?", "continue", or runs `/skill:06-next`:
23
23
 
24
- 1. Call `workflow_state` with the repo root.
25
- 2. Apply the recommendation logic from `references/recommendation-logic.md`.
26
- 3. Return:
27
- - **Recommended skill name**
28
- - **Why** this is the next step
29
- - **Brief** summary of current workflow state (1-2 lines)
24
+ 1. Call `workflow_state` with the repo root
25
+ 2. Apply recommendation logic from `references/recommendation-logic.md`
26
+ 3. Return: skill name, reason (1-2 lines), brief workflow state summary
30
27
 
31
28
  ### Verbose mode: "full status"
32
29
 
33
- When the user asks "show status", "what's the current state", or explicitly requests a detailed report:
30
+ When the user asks "show status", "what's the current state", or uses `--verbose`:
34
31
 
35
- 1. Call `workflow_state` with the repo root.
36
- 2. Call `session_history` with `latest` operation to check recent executions.
37
- 3. Return:
38
- - Latest relevant brainstorm (path + brief summary)
39
- - Latest relevant plan (path + brief summary)
40
- - Latest relevant solution (path + brief summary)
41
- - Latest runtime artifacts under `.context/compound-engineering/`
42
- - Recommended next step with reason
43
- - Overall workflow phase summary
32
+ 1. Call `workflow_state` with the repo root
33
+ 2. Call `session_history` with `latest` operation
34
+ 3. Return: latest artifacts (path + summary), status of each phase, recommended next step
44
35
 
45
36
  ## Artifact locations
46
37
 
38
+ See `references/recommendation-logic.md` for full recommendation rules and skill list.
39
+
40
+ **Quick reference:**
47
41
  | Artifact | Path |
48
42
  |---|---|
49
43
  | Brainstorm | `docs/brainstorms/` |
@@ -51,15 +45,8 @@ When the user asks "show status", "what's the current state", or explicitly requ
51
45
  | Solution | `docs/solutions/` |
52
46
  | Runtime | `.context/compound-engineering/` |
53
47
 
54
- If `workflow_state` is not available, fall back to `bash` with `ls` and `find` to check which directories and recent files exist, then use `read` on the most relevant recent artifact.
55
-
56
- ## Available skills
48
+ **Available skills:** `01-brainstorm`, `02-plan`, `03-work`, `04-review`, `05-learn`, `07-worktree`
57
49
 
58
- - `01-brainstorm` clarify the problem and produce requirements
59
- - `02-plan` — turn requirements into implementation units
60
- - `03-work` — execute the plan
61
- - `04-review` — review changes with structured findings
62
- - `05-learn` — capture learnings as solution artifacts
63
- - `07-worktree` — isolated git worktree development
50
+ **Fallback:** If `workflow_state` is unavailable, use `bash ls/find` to check directories, then `read` recent artifacts.
64
51
 
65
52
  Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
@@ -44,3 +44,48 @@ If brainstorm, plan, and solution all exist:
44
44
  If no rule matches cleanly:
45
45
  - Summarize the ambiguous state
46
46
  - Ask the user what they want to focus on
47
+
48
+ ---
49
+
50
+ # Skill registry
51
+
52
+ ## Available skills
53
+
54
+ | Skill | Purpose | When to use |
55
+ |---|---|---|
56
+ | `01-brainstorm` | Clarify problem, produce requirements | Ambiguous request, new idea |
57
+ | `02-plan` | Turn requirements into implementation units | Requirements clear |
58
+ | `03-work` | Execute the plan | Plan ready |
59
+ | `04-review` | Review changes with structured findings | After implementation |
60
+ | `05-learn` | Capture learnings as solution artifacts | After solving a problem |
61
+ | `07-worktree` | Isolated git worktree development | Large/risky/parallel work |
62
+
63
+ ## Artifact locations
64
+
65
+ | Artifact | Project path | Global path |
66
+ |---|---|---|
67
+ | Brainstorm | `docs/brainstorms/` | — |
68
+ | Plan | `docs/plans/` | — |
69
+ | Solution | `docs/solutions/` | `~/.pi/agent/docs/solutions/` |
70
+ | Handoff | `.context/compound-engineering/handoffs/` | — |
71
+ | Runtime | `.context/compound-engineering/` | — |
72
+
73
+ ## Skill to artifact mapping
74
+
75
+ When `workflow_state` returns artifacts, map them back to skills:
76
+
77
+ - Files in `docs/brainstorms/` → produced by `01-brainstorm`
78
+ - Files in `docs/plans/` → produced by `02-plan`
79
+ - Files in `docs/solutions/` → produced by `05-learn`
80
+ - `.context/compound-engineering/` runtime artifacts → produced by `03-work` or `04-review`
81
+
82
+ ## Recommendation priority
83
+
84
+ When multiple conditions are met, prioritize:
85
+
86
+ 1. `01-brainstorm` — if nothing exists yet
87
+ 2. `02-plan` — if brainstorm exists but no plan
88
+ 3. `03-work` — if plan exists but no execution
89
+ 4. `04-review` — if execution exists but no review
90
+ 5. `05-learn` — if review exists but no learning captured
91
+ 6. Loop back to `01-brainstorm` or `06-next` for full cycle completion
@@ -5,32 +5,32 @@ description: Create and manage git worktrees for isolated feature development.
5
5
 
6
6
  # Worktree
7
7
 
8
- Use this skill when you need optional isolated git worktree development for large, risky, or parallel feature work, then merge changes back or clean up after completion.
8
+ Use this skill for optional isolated git worktree development for large, risky, or parallel feature work.
9
9
 
10
10
  ## Core rules
11
11
 
12
- - Use the `worktree_manager` tool for all git worktree operations.
13
- - Create a worktree only when the user explicitly asks for isolation, or when the task is large/risky enough and the user confirms.
14
- - Use a descriptive branch name derived from the plan or task.
15
- - After creation, report the worktree path so that `03-work` can execute inside it.
16
- - On completion, offer to merge back and clean up; ask for confirmation before changing the main worktree or deleting branches.
17
- - Never force operations if a worktree already exists, report its status instead of creating a duplicate.
12
+ - Use **`worktree_manager`** tool for all operations
13
+ - Only create when user explicitly asks or task is large/risky enough (with confirmation)
14
+ - Derive branch name from plan or task
15
+ - Report worktree path after creation so `03-work` can execute inside it
16
+ - **Never force operations** if worktree exists, report status instead of duplicating
17
+ - On completion: offer merge cleanup (with user confirmation)
18
18
 
19
19
  ## Workflow
20
20
 
21
- 1. **Detect**: Use `worktree_manager` with operation `detect` to check if already inside a worktree.
22
- 2. **Create**: When confirmed, use `worktree_manager` with operation `create` to spin up a new worktree with a feature branch.
23
- 3. **Execute**: Run `03-work` inside the worktree directory.
24
- 4. **Merge**: After user confirmation, use `worktree_manager` with operation `merge` to merge the feature branch back to main.
25
- 5. **Cleanup**: After user confirmation, use `worktree_manager` with operation `cleanup` to remove the worktree and delete the branch.
21
+ See `references/worktree-lifecycle.md` for detailed flow, branch naming, and error handling.
26
22
 
27
- ## Output
23
+ **Quick reference:**
24
+ 1. `detect` — check if already in worktree
25
+ 2. `create` — spin up new worktree with feature branch
26
+ 3. Execute `03-work` inside worktree directory
27
+ 4. `merge` — merge feature branch back (with confirmation)
28
+ 5. `cleanup` — remove worktree and delete branch (with confirmation)
28
29
 
29
- After creation, report:
30
- - Worktree path
31
- - Branch name
32
- - Instruction to run `03-work` in the worktree directory
30
+ ## Branch naming
33
31
 
34
- After merge, report:
35
- - Merge result
36
- - Whether cleanup is recommended
32
+ - `feat/<slug>` — feature work
33
+ - `fix/<slug>` — bug fixes
34
+ - `chore/<slug>` maintenance tasks
35
+
36
+ Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
@@ -7,31 +7,40 @@ description: Explain when to use each Compound Engineering Phase 1 skill and how
7
7
 
8
8
  Use this skill when the user asks how to use the package, which workflow step comes next, or which Compound Engineering skill fits the current task.
9
9
 
10
- ## Phase 1 skill guide
11
-
12
- - `01-brainstorm` use when the request is ambiguous, needs requirements discovery, or the user has a new idea. Three modes: CE requirements discovery (adding features), Startup Diagnostic (YC-style forcing questions for new products/startups), Builder Mode (side projects, hackathons, learning).
13
- - `02-plan` — use when requirements are clear enough to turn into implementation units. After planning, user can optionally run a CEO-style strategic review or strict review (error maps, failure modes, test diagrams).
14
- - `03-work` — use when there is a plan or a tightly scoped task ready for controlled execution.
15
- - `04-review` — use after code changes to produce structured findings. After code review, user can optionally extend to browser-based QA testing (find visual/functional bugs with agent-browser) and regression test generation.
16
- - `05-learn` use after solving a problem so the repo gains a durable learning in `docs/solutions/`.
17
- - `06-next` — use when the user wants to know what to run next, or wants a full status report of the current project state. Default mode recommends one next step; verbose mode (`--verbose` or ask "show status") shows full artifact details.
18
-
19
- ## Recommended flow
20
-
21
- 1. Start with `01-brainstorm` when the problem is still fuzzy or you have a new idea.
22
- - **Startup founders** get the YC-style diagnostic: demand reality, status quo, narrowest wedge.
23
- - **Side project builders** get generative brainstorming: coolest version, fastest path to ship.
24
- - **Feature additions** get the standard CE requirements discovery.
25
- 2. Move to `02-plan` once the desired behavior is clear.
26
- - Optionally run **CEO Review** to challenge premises, map alternatives, check dream-state alignment.
27
- - Or **Strict Review** for full error maps, failure modes, and test diagrams.
28
- 3. Use `03-work` to execute the plan.
29
- 4. Run `04-review` after implementation.
30
- - Optionally extend to **Browser QA** for visual and functional bug finding.
31
- - Or **Browser QA + Regression Tests** to also generate automated test coverage.
32
- 5. Capture key learnings with `05-learn`.
33
- 6. Use `06-next` at any point to check what to do next, or ask for a full status report.
34
-
35
- ## Output
36
-
37
- When responding, explain the smallest useful next step instead of forcing the full sequence.
10
+ ## Core principle
11
+
12
+ **Explain the smallest useful next step** do not force the full sequence.
13
+
14
+ ## Trigger conditions
15
+
16
+ | User asks | Use this skill |
17
+ |---|---|
18
+ | How to use the package | Help with skill selection |
19
+ | Which step comes next | Recommend via workflow state |
20
+ | Which skill fits | Match task to skill |
21
+
22
+ ## Skill mapping
23
+
24
+ | Skill | When to use |
25
+ |---|---|
26
+ | `01-brainstorm` | Ambiguous request, new idea, requirements discovery |
27
+ | `02-plan` | Requirements clear, turn into implementation units |
28
+ | `03-work` | Plan ready, controlled execution |
29
+ | `04-review` | After code changes, structured findings |
30
+ | `05-learn` | After solving, capture reusable learning |
31
+ | `06-next` | Check status or get next step recommendation |
32
+ | `07-worktree` | Isolated feature development |
33
+
34
+ ## Workflow sequence
35
+
36
+ See `references/workflow-sequence.md` for detailed flow, mode variants, and output formats.
37
+
38
+ **Quick reference:**
39
+ 1. `01-brainstorm` → clarify problem
40
+ 2. `02-plan` → break into units (optional CEO/Strict review)
41
+ 3. `03-work` → execute
42
+ 4. `04-review` → inspect (optional Browser QA)
43
+ 5. `05-learn` → capture learnings
44
+ 6. `06-next` → check status anytime
45
+
46
+ Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).