@leing2021/super-pi 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +38 -209
  2. package/extensions/ce-core/index.ts +190 -7
  3. package/extensions/ce-core/tools/parallel-subagent.ts +3 -3
  4. package/extensions/ce-core/tools/subagent.ts +2 -2
  5. package/package.json +4 -18
  6. package/rules/common/naming.md +154 -0
  7. package/skills/02-plan/SKILL.md +3 -2
  8. package/skills/03-work/SKILL.md +9 -6
  9. package/skills/04-review/SKILL.md +3 -2
  10. package/skills/06-next/SKILL.md +38 -10
  11. package/skills/06-next/references/recommendation-logic.md +2 -2
  12. package/skills/07-worktree/SKILL.md +9 -8
  13. package/skills/{09-help → 08-help}/SKILL.md +3 -3
  14. package/skills/{09-help → 08-help}/references/workflow-sequence.md +2 -1
  15. package/skills/references/language-detection.md +44 -0
  16. package/extensions/subagent/agent-management.ts +0 -595
  17. package/extensions/subagent/agent-manager-chain-detail.ts +0 -162
  18. package/extensions/subagent/agent-manager-detail.ts +0 -231
  19. package/extensions/subagent/agent-manager-edit.ts +0 -390
  20. package/extensions/subagent/agent-manager-list.ts +0 -278
  21. package/extensions/subagent/agent-manager-parallel.ts +0 -304
  22. package/extensions/subagent/agent-manager.ts +0 -705
  23. package/extensions/subagent/agent-scope.ts +0 -8
  24. package/extensions/subagent/agent-selection.ts +0 -25
  25. package/extensions/subagent/agent-serializer.ts +0 -123
  26. package/extensions/subagent/agent-templates.ts +0 -62
  27. package/extensions/subagent/agents/context-builder.md +0 -37
  28. package/extensions/subagent/agents/delegate.md +0 -9
  29. package/extensions/subagent/agents/oracle.md +0 -73
  30. package/extensions/subagent/agents/planner.md +0 -52
  31. package/extensions/subagent/agents/researcher.md +0 -50
  32. package/extensions/subagent/agents/reviewer.md +0 -38
  33. package/extensions/subagent/agents/scout.md +0 -48
  34. package/extensions/subagent/agents/worker.md +0 -52
  35. package/extensions/subagent/agents.ts +0 -761
  36. package/extensions/subagent/artifacts.ts +0 -100
  37. package/extensions/subagent/async-execution.ts +0 -520
  38. package/extensions/subagent/async-job-tracker.ts +0 -216
  39. package/extensions/subagent/async-status.ts +0 -241
  40. package/extensions/subagent/chain-clarify.ts +0 -1364
  41. package/extensions/subagent/chain-execution.ts +0 -853
  42. package/extensions/subagent/chain-serializer.ts +0 -126
  43. package/extensions/subagent/completion-dedupe.ts +0 -65
  44. package/extensions/subagent/doctor.ts +0 -200
  45. package/extensions/subagent/execution.ts +0 -738
  46. package/extensions/subagent/file-coalescer.ts +0 -42
  47. package/extensions/subagent/fork-context.ts +0 -63
  48. package/extensions/subagent/formatters.ts +0 -122
  49. package/extensions/subagent/frontmatter.ts +0 -31
  50. package/extensions/subagent/index.ts +0 -585
  51. package/extensions/subagent/intercom-bridge.ts +0 -240
  52. package/extensions/subagent/jsonl-writer.ts +0 -83
  53. package/extensions/subagent/model-fallback.ts +0 -108
  54. package/extensions/subagent/notify.ts +0 -110
  55. package/extensions/subagent/parallel-utils.ts +0 -108
  56. package/extensions/subagent/pi-args.ts +0 -138
  57. package/extensions/subagent/pi-spawn.ts +0 -100
  58. package/extensions/subagent/post-exit-stdio-guard.ts +0 -87
  59. package/extensions/subagent/prompt-template-bridge.ts +0 -399
  60. package/extensions/subagent/prompts/gather-context-and-clarify.md +0 -13
  61. package/extensions/subagent/prompts/parallel-cleanup.md +0 -42
  62. package/extensions/subagent/prompts/parallel-research.md +0 -50
  63. package/extensions/subagent/prompts/parallel-review.md +0 -40
  64. package/extensions/subagent/render-helpers.ts +0 -82
  65. package/extensions/subagent/render.ts +0 -836
  66. package/extensions/subagent/result-intercom.ts +0 -237
  67. package/extensions/subagent/result-watcher.ts +0 -171
  68. package/extensions/subagent/run-history.ts +0 -57
  69. package/extensions/subagent/run-status.ts +0 -136
  70. package/extensions/subagent/schemas.ts +0 -164
  71. package/extensions/subagent/session-tokens.ts +0 -50
  72. package/extensions/subagent/settings.ts +0 -367
  73. package/extensions/subagent/single-output.ts +0 -97
  74. package/extensions/subagent/skills.ts +0 -626
  75. package/extensions/subagent/slash-bridge.ts +0 -176
  76. package/extensions/subagent/slash-commands.ts +0 -303
  77. package/extensions/subagent/slash-live-state.ts +0 -294
  78. package/extensions/subagent/subagent-control.ts +0 -150
  79. package/extensions/subagent/subagent-executor.ts +0 -1899
  80. package/extensions/subagent/subagent-prompt-runtime.ts +0 -75
  81. package/extensions/subagent/subagent-runner.ts +0 -1470
  82. package/extensions/subagent/subagents-status.ts +0 -472
  83. package/extensions/subagent/text-editor.ts +0 -272
  84. package/extensions/subagent/top-level-async.ts +0 -15
  85. package/extensions/subagent/types.ts +0 -623
  86. package/extensions/subagent/utils.ts +0 -456
  87. package/extensions/subagent/worktree.ts +0 -579
  88. package/extensions/super-pi-extension/agents/ce-oracle.md +0 -109
  89. package/extensions/super-pi-extension/agents/ce-planner.md +0 -116
  90. package/extensions/super-pi-extension/agents/ce-reviewer.md +0 -99
  91. package/extensions/super-pi-extension/agents/ce-scout.md +0 -80
  92. package/extensions/super-pi-extension/agents/ce-worker.md +0 -78
  93. package/extensions/super-pi-extension/chains/ce-parallel-review.chain.md +0 -34
  94. package/extensions/super-pi-extension/chains/ce-review-only.chain.md +0 -12
  95. package/extensions/super-pi-extension/chains/ce-standard.chain.md +0 -28
  96. package/extensions/super-pi-extension/index.ts +0 -129
  97. package/extensions/super-pi-extension/model-sync.ts +0 -204
  98. package/skills/08-status/SKILL.md +0 -41
  99. package/skills/08-status/references/artifact-locations.md +0 -10
  100. package/skills/10-rules/SKILL.md +0 -76
  101. package/skills/pi-subagents/SKILL.md +0 -566
@@ -1,11 +1,11 @@
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
 
@@ -15,18 +15,43 @@ Use this skill when the user wants to know what to run next in the Compound Engi
15
15
  - Do not execute the recommended skill — only suggest it.
16
16
  - If the workflow state suggests multiple valid paths, pick the one closest to completing a full loop.
17
17
 
18
- ## Workflow
18
+ ## Two modes
19
+
20
+ ### Default mode: "what's next?"
21
+
22
+ When the user asks "what should I do next?", "continue", or runs `/skill:06-next`:
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)
30
+
31
+ ### Verbose mode: "full status"
32
+
33
+ When the user asks "show status", "what's the current state", or explicitly requests a detailed report:
19
34
 
20
35
  1. Call `workflow_state` with the repo root.
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.
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
24
44
 
25
- ## Output format
45
+ ## Artifact locations
26
46
 
27
- - Recommended skill name
28
- - Why this is the next step
29
- - Brief summary of current workflow state
47
+ | Artifact | Path |
48
+ |---|---|
49
+ | Brainstorm | `docs/brainstorms/` |
50
+ | Plan | `docs/plans/` |
51
+ | Solution | `docs/solutions/` |
52
+ | Runtime | `.context/compound-engineering/` |
53
+
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.
30
55
 
31
56
  ## Available skills
32
57
 
@@ -35,3 +60,6 @@ Use this skill when the user wants to know what to run next in the Compound Engi
35
60
  - `03-work` — execute the plan
36
61
  - `04-review` — review changes with structured findings
37
62
  - `05-learn` — capture learnings as solution artifacts
63
+ - `07-worktree` — isolated git worktree development
64
+
65
+ Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
@@ -42,5 +42,5 @@ If brainstorm, plan, and solution all exist:
42
42
  ## Fallback
43
43
 
44
44
  If no rule matches cleanly:
45
- - Recommend `08-status`
46
- - Reason: State is ambiguous. Get a detailed report before deciding.
45
+ - Summarize the ambiguous state
46
+ - Ask the user what they want to focus on
@@ -3,25 +3,26 @@ name: 07-worktree
3
3
  description: Create and manage git worktrees for isolated feature development.
4
4
  ---
5
5
 
6
- # 03-worktree
6
+ # Worktree
7
7
 
8
- Use this skill when you need to create an isolated git worktree for feature work, merge changes back, or clean up after completion.
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.
9
9
 
10
10
  ## Core rules
11
11
 
12
12
  - Use the `worktree_manager` tool for all git worktree operations.
13
- - Default behavior is to **automatically create** a worktree with a descriptive branch name derived from the plan or task.
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.
14
15
  - After creation, report the worktree path so that `03-work` can execute inside it.
15
- - On completion, merge back and clean up.
16
+ - On completion, offer to merge back and clean up; ask for confirmation before changing the main worktree or deleting branches.
16
17
  - Never force operations — if a worktree already exists, report its status instead of creating a duplicate.
17
18
 
18
19
  ## Workflow
19
20
 
20
- 1. **Create**: Use `worktree_manager` with operation `create` to spin up a new worktree with a feature branch.
21
- 2. **Detect**: Use `worktree_manager` with operation `detect` to check if already inside a worktree.
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.
22
23
  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.
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.
25
26
 
26
27
  ## Output
27
28
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: 09-help
2
+ name: 08-help
3
3
  description: Explain when to use each Compound Engineering Phase 1 skill and how they connect.
4
4
  ---
5
5
 
@@ -14,7 +14,7 @@ Use this skill when the user asks how to use the package, which workflow step co
14
14
  - `03-work` — use when there is a plan or a tightly scoped task ready for controlled execution.
15
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
16
  - `05-learn` — use after solving a problem so the repo gains a durable learning in `docs/solutions/`.
17
- - `08-status` — use when the user wants to know which artifact already exists and what the next workflow step should be.
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
18
 
19
19
  ## Recommended flow
20
20
 
@@ -30,7 +30,7 @@ Use this skill when the user asks how to use the package, which workflow step co
30
30
  - Optionally extend to **Browser QA** for visual and functional bug finding.
31
31
  - Or **Browser QA + Regression Tests** to also generate automated test coverage.
32
32
  5. Capture key learnings with `05-learn`.
33
- 6. Use `08-status` at any point to inspect repo-local workflow state.
33
+ 6. Use `06-next` at any point to check what to do next, or ask for a full status report.
34
34
 
35
35
  ## Output
36
36
 
@@ -6,4 +6,5 @@
6
6
  4. `04-review` → inspect the changes (optionally + Browser QA / QA + Regression Tests)
7
7
  5. `05-learn` → save key learnings
8
8
 
9
- Use `08-status` at any point to see where you are.
9
+ Use `06-next` at any point to see where you are and what to do next.
10
+ Use `07-worktree` for isolated feature development on a separate branch.
@@ -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.