@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.
- package/README.md +55 -324
- package/extensions/ce-core/index.ts +96 -41
- package/extensions/ce-core/tools/context-handoff.ts +115 -1
- package/extensions/ce-core/tools/workflow-state.ts +68 -1
- package/package.json +1 -1
- package/skills/01-brainstorm/SKILL.md +42 -79
- package/skills/01-brainstorm/references/ce-brainstorm-mode.md +47 -0
- package/skills/02-plan/SKILL.md +43 -62
- package/skills/02-plan/references/solution-search.md +46 -0
- package/skills/03-work/SKILL.md +34 -55
- package/skills/03-work/references/completion-report.md +51 -0
- package/skills/04-review/SKILL.md +44 -52
- package/skills/04-review/references/solution-search.md +46 -0
- package/skills/06-next/SKILL.md +15 -28
- package/skills/06-next/references/recommendation-logic.md +45 -0
- package/skills/07-worktree/SKILL.md +20 -20
- package/skills/08-help/SKILL.md +37 -28
- package/skills/08-help/references/workflow-sequence.md +128 -3
- package/skills/references/pipeline-config.md +15 -0
|
@@ -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
|
package/skills/03-work/SKILL.md
CHANGED
|
@@ -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
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
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
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
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
|
|
50
|
-
2.
|
|
51
|
-
3.
|
|
52
|
-
4. Use `
|
|
53
|
-
5.
|
|
54
|
-
6.
|
|
55
|
-
7.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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,
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
32
|
-
- **YAGNI check
|
|
33
|
-
- **No performative agreement
|
|
34
|
-
- **Push back with reasoning
|
|
35
|
-
- **Evidence before assertions
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
49
|
-
2. Collect
|
|
50
|
-
3. Read
|
|
51
|
-
4.
|
|
52
|
-
5. Apply each reviewer persona
|
|
53
|
-
6. Merge
|
|
54
|
-
7. Verify each finding against
|
|
55
|
-
8.
|
|
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
|
|
60
|
+
After code review complete, offer browser QA:
|
|
60
61
|
|
|
61
|
-
> Code review
|
|
62
|
-
>
|
|
63
|
-
> - **
|
|
64
|
-
> - **
|
|
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
|
|
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
|
-
|
|
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
|
package/skills/06-next/SKILL.md
CHANGED
|
@@ -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
|
|
13
|
-
- Use
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
## Available skills
|
|
48
|
+
**Available skills:** `01-brainstorm`, `02-plan`, `03-work`, `04-review`, `05-learn`, `07-worktree`
|
|
57
49
|
|
|
58
|
-
|
|
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
|
|
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
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
30
|
-
- Worktree path
|
|
31
|
-
- Branch name
|
|
32
|
-
- Instruction to run `03-work` in the worktree directory
|
|
30
|
+
## Branch naming
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
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).
|
package/skills/08-help/SKILL.md
CHANGED
|
@@ -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
|
-
##
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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).
|