@leing2021/super-pi 0.23.4 → 0.23.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -89,7 +89,7 @@ New conversation overhead: **~2,600 tokens** (1.3% of 200K context).
89
89
 
90
90
  Progressive loading: only needed skills loaded on-demand.
91
91
 
92
- Full evaluation → [`docs/token-cost-evaluation.md`](docs/token-cost-evaluation.md)
92
+ Full evaluation → see Token Cost section above.
93
93
 
94
94
  ---
95
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leing2021/super-pi",
3
- "version": "0.23.4",
3
+ "version": "0.23.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Pi-native Compound Engineering package for iterative development workflows",
@@ -13,6 +13,7 @@ The Feature Implementation Workflow describes the development pipeline: research
13
13
  - **Check package registries:** Search npm, PyPI, crates.io, and other registries before writing utility code. Prefer battle-tested libraries over hand-rolled solutions.
14
14
  - **Search for adaptable implementations:** Look for open-source projects that solve 80%+ of the problem and can be forked, ported, or wrapped.
15
15
  - Prefer adopting or porting a proven approach over writing net-new code when it meets the requirement.
16
+ - **Source-driven trigger:** When implementation depends on a framework/library API, version-specific behavior, or a recommended pattern, verify against official documentation and cite key sources in the output. Pure logic, renaming, or in-project pattern reuse does not require external citation.
16
17
 
17
18
  1. **Plan First**
18
19
  - Use **planner** agent to create implementation plan
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 01-brainstorm
3
- description: "Brainstorm requirements with three modes: CE discovery, Startup Diagnostic, Builder Mode."
3
+ description: "Discover requirements through structured multi-round dialog. Use when the request is ambiguous, needs discovery, or describes a new idea/product."
4
4
  ---
5
5
 
6
6
  # Brainstorm
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 02-plan
3
- description: "Turn requirements into a plan. Optional CEO-style strategic review after."
3
+ description: "Turn requirements into an execution-ready plan with TDD-gated implementation units. Use when a brainstorm artifact exists and is ready for planning."
4
4
  ---
5
5
 
6
6
  # Plan
@@ -43,7 +43,8 @@ Every unit follows **RED → GREEN → REFACTOR**:
43
43
  2. Read relevant brainstorm from `docs/brainstorms/`
44
44
  3. Run solution search (keywords → grep frontmatter → read top 3)
45
45
  4. Gather repository context
46
- 5. If plan exists: use `plan_diff` `compare` review with user `patch`
46
+ 5. **Source-driven check:** For each unit that involves framework/library APIs, add a note: "Verify against official docs before implementing."
47
+ 6. If plan exists: use `plan_diff` `compare` → review with user → `patch`
47
48
  6. If no plan: write new plan under `docs/plans/` using `references/plan-template.md`
48
49
  7. Structure work using `references/implementation-unit-template.md`
49
50
  8. Verify every unit follows TDD gates
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 03-work
3
- description: Execute plan-driven work in a controlled Phase 1 workflow.
3
+ description: "Execute plan units with parallel subagents, TDD enforcement, and checkpoint resume. Use when a plan path is ready for implementation."
4
4
  ---
5
5
 
6
6
  # Work
@@ -39,6 +39,24 @@ Every step follows **RED → GREEN → REFACTOR**:
39
39
  - Missing evidence test passed after implementation
40
40
  - Tests added only after code
41
41
 
42
+ ## Stop-the-line rule (Hard gate)
43
+
44
+ When any unexpected failure occurs during execution:
45
+
46
+ 1. **STOP** adding features or making changes
47
+ 2. **PRESERVE** evidence (error output, repro steps)
48
+ 3. **DIAGNOSE** root cause — reproduce, localize, reduce
49
+ 4. **FIX** the root cause, not the symptom
50
+ 5. **GUARD** with a regression test
51
+ 6. **RESUME** only after verification passes
52
+
53
+ Anti-rationalization — when a gate fails or evidence is missing:
54
+ - Do not rationalize, downgrade, or explain away the failure.
55
+ - Stop, report the blocker with evidence, and either fix the root cause or ask for direction.
56
+ - Do not continue unrelated implementation after failed verification.
57
+
58
+ This is a hard gate — do not push past a failing test or broken build to continue implementation. Errors compound.
59
+
42
60
  ## Workflow
43
61
 
44
62
  1. **Load context**: consume latest handoff before any broad file reads — `context_handoff load` or read `.context/compound-engineering/handoffs/latest.md`. If found, use `activeFiles`, `blocker`, `verification`, `activeRules` as starting point. If not found, proceed normally.
@@ -48,7 +66,8 @@ Every step follows **RED → GREEN → REFACTOR**:
48
66
  5. Use `task_splitter` for dependency analysis
49
67
  6. Execute: **inline mode** by default, `ce_parallel_subagent` for independent units
50
68
  7. Follow TDD per unit: RED → minimal code → GREEN → refactor → unit-level **verification**
51
- 8. Record progress via `references/progress-update-format.md`
69
+ 8. **Source-driven gate:** Before implementing framework/library-specific code, verify the API or pattern against official documentation. Flag unverified patterns as UNVERIFIED in output.
70
+ 9. Record progress via `references/progress-update-format.md`
52
71
  9. Save `session_checkpoint` after each unit
53
72
  10. On failure: `session_checkpoint` `fail` → `retry` → follow strategy
54
73
  11. Provide completion report (see `references/completion-report.md`)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 04-review
3
- description: "Review code with structured findings. Optional browser QA and regression tests."
3
+ description: "Review code changes across five axes with evidence-first findings. Use after implementation is complete and before committing."
4
4
  ---
5
5
 
6
6
  # Review
@@ -10,6 +10,8 @@ Use the `review_router` tool to determine which reviewers to apply based on diff
10
10
 
11
11
  ## Reviewer personas
12
12
 
13
+ All reviewers evaluate changes across five axes: correctness, readability, architecture, security, performance. Base reviewers cover axes 1–3 by default; conditional reviewers add depth on specific axes.
14
+
13
15
  ### Base reviewers (always active)
14
16
 
15
17
  - **correctness-reviewer**: Logical correctness, intended behavior, edge cases.
@@ -19,6 +21,6 @@ Use the `review_router` tool to determine which reviewers to apply based on diff
19
21
  ### Conditional reviewers (routed by `review_router`)
20
22
 
21
23
  - **security-reviewer**: Triggered when auth, permissions, tokens, sessions, or crypto files change. Reviews for injection, auth bypass, credential leakage.
22
- - **performan04-reviewer**: Triggered when query, cache, database, or streaming files change. Reviews for N+1, unnecessary allocation, missing indexes.
24
+ - **performance-reviewer**: Triggered when query, cache, database, or streaming files change. Reviews for N+1, unnecessary allocation, missing indexes.
23
25
  - **integration-reviewer**: Triggered when CI/CD, Docker, package.json, or config files change. Reviews for dependency conflicts, build breakage, deployment issues.
24
26
  - **thoroughness-reviewer**: Triggered for large diffs (5+ files or 300+ lines). Reviews for incomplete refactors, missed callers, inconsistent changes.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 05-learn
3
- description: Capture solved problems as reusable solution artifacts.
3
+ description: "Capture solved problems as searchable solution artifacts. Use after a workflow loop completes or a non-trivial problem is solved."
4
4
  ---
5
5
 
6
6
  # Learn
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 06-next
3
- description: "Inspect workflow state and recommend the single best next Compound Engineering skill. Use --verbose for a full status report."
3
+ description: "Inspect workflow artifacts and recommend the single best next skill. Use when unsure what to run next."
4
4
  ---
5
5
 
6
6
  # Next
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 07-worktree
3
- description: Create and manage git worktrees for isolated feature development.
3
+ description: "Create and manage git worktrees for isolated feature development. Use when starting a feature that needs branch isolation."
4
4
  ---
5
5
 
6
6
  # Worktree
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 08-help
3
- description: Explain when to use each Compound Engineering Phase 1 skill and how they connect.
3
+ description: "Explain Phase 1 skills and their connections. Use when learning the workflow or deciding which skill applies."
4
4
  ---
5
5
 
6
6
  # Help