@leing2021/super-pi 0.22.1 → 0.23.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 +66 -293
- package/extensions/ce-core/index.ts +276 -48
- package/extensions/ce-core/tools/parallel-subagent.ts +3 -3
- package/extensions/ce-core/tools/subagent.ts +2 -2
- package/package.json +4 -20
- package/rules/common/naming.md +154 -0
- 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 -61
- package/skills/02-plan/references/solution-search.md +46 -0
- package/skills/03-work/SKILL.md +34 -52
- package/skills/03-work/references/completion-report.md +51 -0
- package/skills/04-review/SKILL.md +44 -51
- package/skills/04-review/references/solution-search.md +46 -0
- package/skills/06-next/SKILL.md +35 -20
- package/skills/06-next/references/recommendation-logic.md +47 -2
- package/skills/07-worktree/SKILL.md +21 -20
- package/skills/08-help/SKILL.md +46 -0
- package/skills/08-help/references/workflow-sequence.md +135 -0
- package/skills/references/language-detection.md +44 -0
- package/LICENSE +0 -21
- package/THIRD-PARTY-NOTICES.md +0 -35
- package/extensions/subagent/__tests__/async-job-tracker.test.ts +0 -21
- package/extensions/subagent/__tests__/execution-activity.test.ts +0 -15
- package/extensions/subagent/__tests__/parallel-render-stress.test.ts +0 -82
- package/extensions/subagent/__tests__/render-dedup.test.ts +0 -98
- package/extensions/subagent/__tests__/render-widget.test.ts +0 -28
- package/extensions/subagent/__tests__/throttle.test.ts +0 -90
- package/extensions/subagent/agent-management.ts +0 -596
- package/extensions/subagent/agent-manager-chain-detail.ts +0 -163
- package/extensions/subagent/agent-manager-detail.ts +0 -232
- package/extensions/subagent/agent-manager-edit.ts +0 -391
- package/extensions/subagent/agent-manager-list.ts +0 -279
- package/extensions/subagent/agent-manager-parallel.ts +0 -305
- package/extensions/subagent/agent-manager.ts +0 -706
- package/extensions/subagent/agent-scope.ts +0 -9
- package/extensions/subagent/agent-selection.ts +0 -26
- package/extensions/subagent/agent-serializer.ts +0 -124
- package/extensions/subagent/agent-templates.ts +0 -63
- package/extensions/subagent/agents/context-builder.md +0 -37
- package/extensions/subagent/agents/delegate.md +0 -9
- package/extensions/subagent/agents/oracle.md +0 -73
- package/extensions/subagent/agents/planner.md +0 -52
- package/extensions/subagent/agents/researcher.md +0 -50
- package/extensions/subagent/agents/reviewer.md +0 -38
- package/extensions/subagent/agents/scout.md +0 -48
- package/extensions/subagent/agents/worker.md +0 -52
- package/extensions/subagent/agents.ts +0 -762
- package/extensions/subagent/artifacts.ts +0 -101
- package/extensions/subagent/async-execution.ts +0 -521
- package/extensions/subagent/async-job-tracker.ts +0 -240
- package/extensions/subagent/async-status.ts +0 -242
- package/extensions/subagent/chain-clarify.ts +0 -1365
- package/extensions/subagent/chain-execution.ts +0 -854
- package/extensions/subagent/chain-serializer.ts +0 -127
- package/extensions/subagent/completion-dedupe.ts +0 -66
- package/extensions/subagent/doctor.ts +0 -201
- package/extensions/subagent/execution.ts +0 -748
- package/extensions/subagent/file-coalescer.ts +0 -43
- package/extensions/subagent/fork-context.ts +0 -64
- package/extensions/subagent/formatters.ts +0 -123
- package/extensions/subagent/frontmatter.ts +0 -32
- package/extensions/subagent/index.ts +0 -586
- package/extensions/subagent/intercom-bridge.ts +0 -241
- package/extensions/subagent/jsonl-writer.ts +0 -84
- package/extensions/subagent/model-fallback.ts +0 -109
- package/extensions/subagent/notify.ts +0 -111
- package/extensions/subagent/parallel-utils.ts +0 -109
- package/extensions/subagent/pi-args.ts +0 -139
- package/extensions/subagent/pi-spawn.ts +0 -101
- package/extensions/subagent/post-exit-stdio-guard.ts +0 -88
- package/extensions/subagent/prompt-template-bridge.ts +0 -400
- package/extensions/subagent/prompts/gather-context-and-clarify.md +0 -13
- package/extensions/subagent/prompts/parallel-cleanup.md +0 -42
- package/extensions/subagent/prompts/parallel-research.md +0 -50
- package/extensions/subagent/prompts/parallel-review.md +0 -40
- package/extensions/subagent/render-helpers.ts +0 -83
- package/extensions/subagent/render.ts +0 -908
- package/extensions/subagent/result-intercom.ts +0 -238
- package/extensions/subagent/result-watcher.ts +0 -172
- package/extensions/subagent/run-history.ts +0 -58
- package/extensions/subagent/run-status.ts +0 -137
- package/extensions/subagent/schemas.ts +0 -165
- package/extensions/subagent/session-tokens.ts +0 -51
- package/extensions/subagent/settings.ts +0 -368
- package/extensions/subagent/single-output.ts +0 -98
- package/extensions/subagent/skills.ts +0 -627
- package/extensions/subagent/slash-bridge.ts +0 -177
- package/extensions/subagent/slash-commands.ts +0 -304
- package/extensions/subagent/slash-live-state.ts +0 -295
- package/extensions/subagent/subagent-control.ts +0 -151
- package/extensions/subagent/subagent-executor.ts +0 -1915
- package/extensions/subagent/subagent-prompt-runtime.ts +0 -76
- package/extensions/subagent/subagent-runner.ts +0 -1471
- package/extensions/subagent/subagents-status.ts +0 -473
- package/extensions/subagent/text-editor.ts +0 -273
- package/extensions/subagent/throttle.ts +0 -77
- package/extensions/subagent/top-level-async.ts +0 -16
- package/extensions/subagent/types.ts +0 -624
- package/extensions/subagent/utils.ts +0 -457
- package/extensions/subagent/worktree.ts +0 -580
- package/extensions/super-pi-extension/agents/ce-oracle.md +0 -109
- package/extensions/super-pi-extension/agents/ce-planner.md +0 -116
- package/extensions/super-pi-extension/agents/ce-reviewer.md +0 -99
- package/extensions/super-pi-extension/agents/ce-scout.md +0 -80
- package/extensions/super-pi-extension/agents/ce-worker.md +0 -78
- package/extensions/super-pi-extension/chains/ce-parallel-review.chain.md +0 -34
- package/extensions/super-pi-extension/chains/ce-review-only.chain.md +0 -12
- package/extensions/super-pi-extension/chains/ce-standard.chain.md +0 -28
- package/extensions/super-pi-extension/index.ts +0 -129
- package/extensions/super-pi-extension/model-sync.ts +0 -204
- package/skills/08-status/SKILL.md +0 -41
- package/skills/08-status/references/artifact-locations.md +0 -10
- package/skills/09-help/SKILL.md +0 -37
- package/skills/09-help/references/workflow-sequence.md +0 -9
- package/skills/10-rules/SKILL.md +0 -76
- package/skills/pi-subagents/SKILL.md +0 -566
|
@@ -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,77 +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
|
-
|
|
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
|
|
28
31
|
|
|
29
32
|
Code review is **technical evaluation**, not social performance:
|
|
30
|
-
- **Verify before implementing** any suggestion
|
|
31
|
-
- **YAGNI check
|
|
32
|
-
- **No performative agreement
|
|
33
|
-
- **Push back with reasoning
|
|
34
|
-
- **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
|
|
35
38
|
|
|
36
39
|
## Handling findings
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
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
|
|
44
46
|
|
|
45
47
|
## Workflow
|
|
46
48
|
|
|
47
|
-
1. Determine diff scope from
|
|
48
|
-
2. Collect
|
|
49
|
-
3. Read
|
|
50
|
-
4.
|
|
51
|
-
5. Apply each reviewer persona
|
|
52
|
-
6. Merge
|
|
53
|
-
7. Verify each finding against
|
|
54
|
-
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
|
|
55
57
|
|
|
56
58
|
## Optional: QA Test Mode
|
|
57
59
|
|
|
58
|
-
After
|
|
60
|
+
After code review complete, offer browser QA:
|
|
59
61
|
|
|
60
|
-
> Code review
|
|
61
|
-
>
|
|
62
|
-
> - **
|
|
63
|
-
> - **
|
|
64
|
-
> - **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
|
|
65
66
|
|
|
66
|
-
If
|
|
67
|
-
|
|
68
|
-
After QA:
|
|
69
|
-
1. Include QA findings in the review handoff alongside code review findings.
|
|
70
|
-
2. If bugs were fixed, note the fix commits.
|
|
71
|
-
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.
|
|
72
69
|
|
|
73
70
|
## Handoff
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
1. Summarize all findings (code review + QA if run).
|
|
77
|
-
2. Note fix commits if any were applied.
|
|
78
|
-
3. Recommend `05-learn` if learnings are worth capturing.
|
|
79
|
-
4. Recommend `03-work` if fixes need further implementation.
|
|
72
|
+
See `references/handoff.md` for format.
|
|
80
73
|
|
|
81
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
|
@@ -1,37 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 06-next
|
|
3
|
-
description: Inspect workflow state and recommend the single best next Compound Engineering skill.
|
|
3
|
+
description: "Inspect workflow state and recommend the single best next Compound Engineering skill. Use --verbose for a full status report."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Next
|
|
7
7
|
|
|
8
|
-
Use this skill when the user wants to know what to run next in the Compound Engineering workflow.
|
|
8
|
+
Use this skill when the user wants to know what to run next in the Compound Engineering workflow, or wants a full status report of the current project state.
|
|
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
|
|
|
20
|
-
|
|
21
|
-
2. Read the structured state: brainstorm count, plan count, solution count, run count, and latest artifact per category.
|
|
22
|
-
3. Apply the recommendation logic from `references/recommendation-logic.md`.
|
|
23
|
-
4. Return the recommended skill and why.
|
|
20
|
+
### Default mode: "what's next?"
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
When the user asks "what should I do next?", "continue", or runs `/skill:06-next`:
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
When the user asks "show status", "what's the current state", or uses `--verbose`:
|
|
31
|
+
|
|
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
|
|
35
|
+
|
|
36
|
+
## Artifact locations
|
|
37
|
+
|
|
38
|
+
See `references/recommendation-logic.md` for full recommendation rules and skill list.
|
|
39
|
+
|
|
40
|
+
**Quick reference:**
|
|
41
|
+
| Artifact | Path |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Brainstorm | `docs/brainstorms/` |
|
|
44
|
+
| Plan | `docs/plans/` |
|
|
45
|
+
| Solution | `docs/solutions/` |
|
|
46
|
+
| Runtime | `.context/compound-engineering/` |
|
|
47
|
+
|
|
48
|
+
**Available skills:** `01-brainstorm`, `02-plan`, `03-work`, `04-review`, `05-learn`, `07-worktree`
|
|
49
|
+
|
|
50
|
+
**Fallback:** If `workflow_state` is unavailable, use `bash ls/find` to check directories, then `read` recent artifacts.
|
|
51
|
+
|
|
52
|
+
Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
|
|
@@ -42,5 +42,50 @@ If brainstorm, plan, and solution all exist:
|
|
|
42
42
|
## Fallback
|
|
43
43
|
|
|
44
44
|
If no rule matches cleanly:
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Summarize the ambiguous state
|
|
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
|
|
@@ -3,33 +3,34 @@ name: 07-worktree
|
|
|
3
3
|
description: Create and manage git worktrees for isolated feature development.
|
|
4
4
|
---
|
|
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
|
-
- Never force operations — if
|
|
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)
|
|
17
18
|
|
|
18
19
|
## Workflow
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
2. **Detect**: Use `worktree_manager` with operation `detect` to check if already inside a worktree.
|
|
22
|
-
3. **Execute**: Run `03-work` inside the worktree directory.
|
|
23
|
-
4. **Merge**: Use `worktree_manager` with operation `merge` to merge the feature branch back to main.
|
|
24
|
-
5. **Cleanup**: 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.
|
|
25
22
|
|
|
26
|
-
|
|
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)
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
- Worktree path
|
|
30
|
-
- Branch name
|
|
31
|
-
- Instruction to run `03-work` in the worktree directory
|
|
30
|
+
## Branch naming
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
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).
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 08-help
|
|
3
|
+
description: Explain when to use each Compound Engineering Phase 1 skill and how they connect.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Help
|
|
7
|
+
|
|
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
|
+
|
|
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).
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Workflow Sequence
|
|
2
|
+
|
|
3
|
+
## Full CE pipeline
|
|
4
|
+
|
|
5
|
+
1. `01-brainstorm` → clarify the problem
|
|
6
|
+
2. `02-plan` → break into units (optionally + CEO Review / Strict Review)
|
|
7
|
+
3. `03-work` → execute the plan
|
|
8
|
+
4. `04-review` → inspect changes (optionally + Browser QA / QA + Regression Tests)
|
|
9
|
+
5. `05-learn` → save key learnings
|
|
10
|
+
|
|
11
|
+
Use `06-next` at any point to see where you are and what to do next.
|
|
12
|
+
Use `07-worktree` for isolated feature development on a separate branch.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Phase 1 skill guide
|
|
17
|
+
|
|
18
|
+
### 01-brainstorm
|
|
19
|
+
**Use when:** request is ambiguous, needs requirements discovery, or user has a new idea.
|
|
20
|
+
|
|
21
|
+
**Three modes:**
|
|
22
|
+
- **CE Brainstorm** — standard requirements discovery for feature additions
|
|
23
|
+
- **Startup Diagnostic** — YC-style forcing questions for founders/intrapreneurs
|
|
24
|
+
- **Builder Mode** — generative brainstorming for side projects/hackathons/learning
|
|
25
|
+
|
|
26
|
+
**Key outputs:**
|
|
27
|
+
- Requirements document in `docs/brainstorms/`
|
|
28
|
+
- Explicit user approval before handoff
|
|
29
|
+
|
|
30
|
+
### 02-plan
|
|
31
|
+
**Use when:** requirements are clear enough to turn into implementation units.
|
|
32
|
+
|
|
33
|
+
**Optional reviews after planning:**
|
|
34
|
+
- **CEO Review** — challenge premises, check dream-state alignment
|
|
35
|
+
- **Strict Review** — CEO Review + error maps, failure modes, test diagrams
|
|
36
|
+
|
|
37
|
+
**Key outputs:**
|
|
38
|
+
- Plan artifact in `docs/plans/`
|
|
39
|
+
- Implementation units following TDD RED→GREEN→REFACTOR
|
|
40
|
+
|
|
41
|
+
### 03-work
|
|
42
|
+
**Use when:** plan is ready or task is tightly scoped.
|
|
43
|
+
|
|
44
|
+
**Execution modes:**
|
|
45
|
+
- Inline execution for small units
|
|
46
|
+
- `ce_parallel_subagent` for independent CE skill units
|
|
47
|
+
- `ce_subagent` only for dependent serial chains
|
|
48
|
+
|
|
49
|
+
**Key outputs:**
|
|
50
|
+
- Completion report with verification evidence
|
|
51
|
+
- Checkpoint state for resume
|
|
52
|
+
|
|
53
|
+
### 04-review
|
|
54
|
+
**Use when:** after code changes to produce structured findings.
|
|
55
|
+
|
|
56
|
+
**Optional extensions:**
|
|
57
|
+
- **Browser QA** — find visual/functional bugs with agent-browser
|
|
58
|
+
- **Browser QA + Regression Tests** — also generate automated coverage
|
|
59
|
+
|
|
60
|
+
**Key outputs:**
|
|
61
|
+
- Structured findings per `references/findings-schema.md`
|
|
62
|
+
- Optional QA report with fix commits
|
|
63
|
+
|
|
64
|
+
### 05-learn
|
|
65
|
+
**Use when:** after solving a problem to capture reusable learning.
|
|
66
|
+
|
|
67
|
+
**Key outputs:**
|
|
68
|
+
- Solution artifact in `docs/solutions/` or global `~/.pi/agent/docs/solutions/`
|
|
69
|
+
- Handoff-lite for workflow closure
|
|
70
|
+
|
|
71
|
+
### 06-next
|
|
72
|
+
**Use when:** user wants to know what to run next, or wants full status.
|
|
73
|
+
|
|
74
|
+
**Two modes:**
|
|
75
|
+
- **Default** — recommend one next step with reason
|
|
76
|
+
- **Verbose** (`--verbose` or "show status") — full artifact details + recent history
|
|
77
|
+
|
|
78
|
+
### 07-worktree
|
|
79
|
+
**Use when:** need isolated git worktree development.
|
|
80
|
+
|
|
81
|
+
**Use for:** large, risky, or parallel feature work.
|
|
82
|
+
|
|
83
|
+
**Flow:** create → execute via 03-work → merge → cleanup
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Skill routing decision tree
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Is the request clear and specific?
|
|
91
|
+
├── No → 01-brainstorm (clarify requirements)
|
|
92
|
+
└── Yes → Is there a plan?
|
|
93
|
+
├── No → 02-plan (create implementation units)
|
|
94
|
+
└── Yes → Is work complete?
|
|
95
|
+
├── No → 03-work (execute)
|
|
96
|
+
└── Yes → Has it been reviewed?
|
|
97
|
+
├── No → 04-review (structured findings)
|
|
98
|
+
└── Yes → Is there a learning worth capturing?
|
|
99
|
+
├── Yes → 05-learn
|
|
100
|
+
└── No → Check status with 06-next
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Output format for help responses
|
|
106
|
+
|
|
107
|
+
When explaining skills to users, keep it concise:
|
|
108
|
+
|
|
109
|
+
**Short form** (one skill recommendation):
|
|
110
|
+
```
|
|
111
|
+
Next step: `/skill:02-plan`
|
|
112
|
+
|
|
113
|
+
Reason: You have a clear idea. Let's turn it into implementation units.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Medium form** (context + recommendation):
|
|
117
|
+
```
|
|
118
|
+
Status: Requirements captured in docs/brainstorms/2024-01-idea.md
|
|
119
|
+
|
|
120
|
+
Next step: `/skill:02-plan`
|
|
121
|
+
|
|
122
|
+
Why: Requirements exist but no implementation plan yet.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Verbose form** (full sequence):
|
|
126
|
+
```
|
|
127
|
+
Workflow sequence:
|
|
128
|
+
1. ✅ Brainstorm: requirements captured
|
|
129
|
+
2. ⏳ Plan: ready to create
|
|
130
|
+
3. ⏸ Work: waiting for plan
|
|
131
|
+
4. ⏸ Review: waiting for work
|
|
132
|
+
5. ⏸ Learn: waiting for review
|
|
133
|
+
|
|
134
|
+
Recommended: `/skill:02-plan` to turn requirements into implementation units.
|
|
135
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Language Detection
|
|
2
|
+
|
|
3
|
+
Detect the project's primary language by checking for these files in the repo root:
|
|
4
|
+
|
|
5
|
+
| File(s) | Language | Rules directory |
|
|
6
|
+
|---------|----------|----------------|
|
|
7
|
+
| `tsconfig.json` | TypeScript | `rules/typescript/` |
|
|
8
|
+
| `package.json` (without `tsconfig.json`) | JavaScript | `rules/typescript/` |
|
|
9
|
+
| `Cargo.toml` | Rust | `rules/rust/` |
|
|
10
|
+
| `go.mod` | Go | `rules/golang/` |
|
|
11
|
+
| `pubspec.yaml` | Dart | `rules/dart/` |
|
|
12
|
+
| `pom.xml` / `build.gradle` | Java | `rules/java/` |
|
|
13
|
+
| `*.sln` / `*.csproj` | C# | `rules/csharp/` |
|
|
14
|
+
| `Package.swift` | Swift | `rules/swift/` |
|
|
15
|
+
| `requirements.txt` / `pyproject.toml` / `setup.py` | Python | `rules/python/` |
|
|
16
|
+
| `composer.json` | PHP | `rules/php/` |
|
|
17
|
+
| `Makefile.PL` / `cpanfile` | Perl | `rules/perl/` |
|
|
18
|
+
| `build.gradle.kts` | Kotlin | `rules/kotlin/` |
|
|
19
|
+
|
|
20
|
+
## Rules loading strategy
|
|
21
|
+
|
|
22
|
+
Rules are loaded from two locations with priority:
|
|
23
|
+
|
|
24
|
+
1. **Project-level** `{repo-root}/rules/` — takes priority, survives `pi update`.
|
|
25
|
+
2. **Package-level** `rules/` in the super-pi package — built-in defaults.
|
|
26
|
+
|
|
27
|
+
Check project-level first. If a file exists there for the topic, use it. Otherwise fall back to package-level.
|
|
28
|
+
|
|
29
|
+
## Rule precedence
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
language-specific > web > common
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Override mapping by topic:
|
|
36
|
+
- `common/testing.md` ← `web/testing.md` ← `<lang>/testing.md`
|
|
37
|
+
- `common/coding-style.md` ← `web/coding-style.md` ← `<lang>/coding-style.md`
|
|
38
|
+
- `common/patterns.md` ← `web/patterns.md` ← `<lang>/patterns.md`
|
|
39
|
+
- `common/security.md` ← `web/security.md` ← `<lang>/security.md`
|
|
40
|
+
- `common/hooks.md` ← `web/hooks.md` ← `<lang>/hooks.md`
|
|
41
|
+
|
|
42
|
+
## Do not load all rules at once
|
|
43
|
+
|
|
44
|
+
Only load what the current task needs. See each skill's SKILL.md for phase-specific loading instructions.
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025-2026 leing2021
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|