@leing2021/super-pi 0.27.0 → 0.28.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.
package/README.md CHANGED
@@ -114,7 +114,7 @@ Super Pi is not a fork or wrapper. It extracts useful methods from the projects
114
114
  | [superpowers](https://github.com/obra/superpowers) | Strict TDD gates, design checklists, review discipline, and the idea that agents need hard gates instead of gentle suggestions. |
115
115
  | [compound-engineering-plugin](https://github.com/EveryInc/compound-engineering-plugin) | The five-step think → plan → build → review → learn loop and the knowledge-compounding backbone. |
116
116
  | [gstack](https://github.com/garrytan/gstack) | YC-style forcing questions, CEO Review cognitive frameworks, browser QA patterns, failure maps, and evidence-first validation. |
117
- | [mattpocock/skills](https://github.com/mattpocock/skills) | Context glossary (`CONTEXT.md`) for cross-session term persistence, lightweight ADR with three-condition threshold, feedback-loop-first debug discipline (full diagnosis loop with completion criteria and post-mortem handoff), deep-module vocabulary, the review Spec axis (plan-vs-diff with traceback to original wording), and the out-of-scope knowledge base. Adopted as self-contained `skills/references/` — no external path deps, no issue-tracker deps. |
117
+ | [mattpocock/skills](https://github.com/mattpocock/skills) | Context glossary (`CONTEXT.md`), lightweight ADR (three-condition threshold + "What qualifies" catalog), feedback-loop-first debug discipline, deep-module vocabulary (module/interface/depth/seam/adapter/leverage/locality + internal seams + rejected framings), interview discipline (facts-vs-decisions, one-question-at-a-time), the review Spec axis, and the out-of-scope knowledge base. Absorbed as self-contained `skills/references/` content — no external path deps, no issue-tracker deps, no standalone skills grafted (super-pi's existing 01-brainstorm/domain-language/module-design already cover the active disciplines). |
118
118
 
119
119
  ---
120
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leing2021/super-pi",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Pi-native Compound Engineering package for iterative development workflows",
@@ -25,4 +25,10 @@ PREMISES:
25
25
  3. [statement] — agree/disagree?
26
26
  ```
27
27
 
28
- Use `ask_user_question` to confirm each premise. If the user disagrees, revise understanding and loop back.
28
+ Use `ask_user_question` to confirm each premise. **One question at a time** — asking multiple at once is bewildering. If the user disagrees, revise understanding and loop back.
29
+
30
+ ## Interview discipline (from grilling)
31
+
32
+ - **Distinguish facts from decisions.** If a *fact* can be found by exploring the environment (filesystem, existing code, tools, docs), look it up rather than asking. The *decisions* are the user's — put each one to them and wait.
33
+ - **Walk the decision tree one branch at a time**, resolving dependencies between decisions one by one. For each question, provide your recommended answer so the user can confirm or correct efficiently.
34
+ - **Do not act** until you and the user reach a shared understanding of all premises.
@@ -39,6 +39,26 @@ Only when **all three** are true:
39
39
 
40
40
  If any is missing, skip the ADR. Most decisions don't qualify.
41
41
 
42
+ ### Template
43
+
44
+ ```md
45
+ # {Short title of the decision}
46
+
47
+ {1-3 sentences: what's the context, what did we decide, and why.}
48
+ ```
49
+
50
+ An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections. Numbered: `0001-slug.md`, increment by scanning `docs/adr/`. Optional sections (Status / Considered Options / Consequences) only when they add genuine value.
51
+
52
+ ### What qualifies
53
+
54
+ - **Architectural shape** — "write model is event-sourced, read model projected into Postgres."
55
+ - **Integration patterns between contexts** — "Ordering and Billing communicate via domain events, not synchronous HTTP."
56
+ - **Technology choices that carry lock-in** — database, message bus, auth provider. Not every library — just the ones that would take a quarter to swap out.
57
+ - **Boundary and scope decisions** — "Customer data is owned by the Customer context; others reference it by ID only." Explicit no-s are as valuable as yes-s.
58
+ - **Deliberate deviations from the obvious path** — "manual SQL instead of an ORM because X." Stops the next engineer from "fixing" something deliberate.
59
+ - **Constraints not visible in code** — "can't use AWS because of compliance", "response times must be under 200ms."
60
+ - **Rejected alternatives when non-obvious** — considered GraphQL, picked REST for subtle reasons. Otherwise someone suggests GraphQL again in six months.
61
+
42
62
  ## Consumption rules (every skill)
43
63
 
44
64
  1. **Before broad project reads**, check if `CONTEXT.md` exists at the repo root (or the relevant context in a multi-context repo). If it exists, read it first so you use the project's vocabulary.
@@ -46,17 +46,55 @@ A shared vocabulary for designing module shapes. Use these terms wherever code i
46
46
 
47
47
  ## Principles
48
48
 
49
- - **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable parts — they just aren't part of the interface.
49
+ - **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.
50
50
  - **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
51
51
  - **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.
52
52
  - **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.
53
53
 
54
54
  ## Designing for testability
55
55
 
56
- 1. **Accept dependencies, don't create them.** `function processOrder(order, paymentGateway)` is testable; `function processOrder(order)` that news up its own gateway is not.
57
- 2. **Return results, don't produce side effects.** `function calculateDiscount(cart): Discount` is testable; `function applyDiscount(cart): void` that mutates is not.
56
+ Good interfaces make testing natural:
57
+
58
+ 1. **Accept dependencies, don't create them.**
59
+
60
+ ```typescript
61
+ // Testable
62
+ function processOrder(order, paymentGateway) {}
63
+
64
+ // Hard to test
65
+ function processOrder(order) {
66
+ const gateway = new StripeGateway();
67
+ }
68
+ ```
69
+
70
+ 2. **Return results, don't produce side effects.**
71
+
72
+ ```typescript
73
+ // Testable
74
+ function calculateDiscount(cart): Discount {}
75
+
76
+ // Hard to test
77
+ function applyDiscount(cart): void {
78
+ cart.total -= discount;
79
+ }
80
+ ```
81
+
58
82
  3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test setup.
59
83
 
84
+ ## Relationships
85
+
86
+ - A **Module** has exactly one **Interface** (the surface it presents to callers and tests).
87
+ - **Depth** is a property of a **Module**, measured against its **Interface**.
88
+ - A **Seam** is where a **Module**'s **Interface** lives.
89
+ - An **Adapter** sits at a **Seam** and satisfies the **Interface**.
90
+ - **Depth** produces **Leverage** for callers and **Locality** for maintainers.
91
+
92
+ ## Rejected framings
93
+
94
+ - **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
95
+ - **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.
96
+ - **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.
97
+
60
98
  ## Where this is used
61
99
 
62
100
  - **03-work** — when designing or restructuring a module, use these terms to evaluate depth and seam placement.