hstack 0.7.1 → 0.17.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 (131) hide show
  1. package/CHANGELOG.md +308 -0
  2. package/README.md +90 -154
  3. package/VERSION +1 -1
  4. package/dist/commands/doctor.js +69 -9
  5. package/dist/commands/doctor.js.map +1 -1
  6. package/dist/commands/init.js +7 -3
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.js +17 -4
  9. package/dist/commands/update.js.map +1 -1
  10. package/dist/lib/descriptions.js +160 -0
  11. package/dist/lib/descriptions.js.map +1 -0
  12. package/dist/lib/diff.js +1 -1
  13. package/dist/lib/git.js +16 -0
  14. package/dist/lib/git.js.map +1 -1
  15. package/dist/lib/wire.js +274 -142
  16. package/dist/lib/wire.js.map +1 -1
  17. package/dist/manifest.js +49 -22
  18. package/dist/manifest.js.map +1 -1
  19. package/package.json +4 -3
  20. package/template/.claude/agents/adversarial-reviewer.md +42 -98
  21. package/template/.claude/agents/app-architect.md +44 -133
  22. package/template/.claude/agents/data-architect.md +46 -127
  23. package/template/.claude/agents/test-strategist.md +39 -109
  24. package/template/.claude/skills/hstack-adr-new/SKILL.md +23 -100
  25. package/template/.claude/skills/hstack-adversarial-review/SKILL.md +47 -174
  26. package/template/.claude/skills/hstack-adversarial-review/references/finding-categories.md +134 -0
  27. package/template/.claude/skills/hstack-app-architecture/SKILL.md +43 -95
  28. package/template/.claude/skills/hstack-commit/SKILL.md +28 -97
  29. package/template/.claude/skills/hstack-data-architecture/SKILL.md +34 -82
  30. package/template/.claude/skills/hstack-promote/SKILL.md +55 -0
  31. package/template/.claude/skills/hstack-story/SKILL.md +58 -0
  32. package/template/.claude/skills/hstack-test-audit/SKILL.md +64 -0
  33. package/template/.claude/skills/hstack-wrap/SKILL.md +48 -0
  34. package/template/.claude/skills/hstack-wrap/references/pr-description.md +45 -0
  35. package/template/KERNEL.md +167 -0
  36. package/template/templates/adr.md +9 -18
  37. package/template/templates/app-architecture.md +38 -50
  38. package/template/templates/data-architecture.md +39 -93
  39. package/template/templates/infrastructure.md +54 -148
  40. package/template/templates/roadmap.md +35 -0
  41. package/template/templates/story.md +7 -13
  42. package/template/templates/tech-debt.md +2 -37
  43. package/template/templates/tech-stack.md +2 -12
  44. package/template/.claude/agents/data-specialist.md +0 -126
  45. package/template/.claude/agents/implementer.md +0 -154
  46. package/template/.claude/agents/kernel-fit-analyst.md +0 -190
  47. package/template/.claude/agents/planner.md +0 -110
  48. package/template/.claude/agents/product-discovery.md +0 -165
  49. package/template/.claude/agents/product-manager.md +0 -111
  50. package/template/.claude/agents/researcher.md +0 -123
  51. package/template/.claude/agents/security-reviewer.md +0 -123
  52. package/template/.claude/agents/spec-author.md +0 -123
  53. package/template/.claude/agents/stack-architect.md +0 -137
  54. package/template/.claude/agents/ui-ux-briefer.md +0 -105
  55. package/template/.claude/agents/verifier.md +0 -113
  56. package/template/.claude/skills/hstack-branch/SKILL.md +0 -103
  57. package/template/.claude/skills/hstack-brownfield-init/SKILL.md +0 -158
  58. package/template/.claude/skills/hstack-change-new/SKILL.md +0 -111
  59. package/template/.claude/skills/hstack-change-plan/SKILL.md +0 -119
  60. package/template/.claude/skills/hstack-configure/SKILL.md +0 -126
  61. package/template/.claude/skills/hstack-coord/SKILL.md +0 -131
  62. package/template/.claude/skills/hstack-data-review/SKILL.md +0 -132
  63. package/template/.claude/skills/hstack-finalize/SKILL.md +0 -159
  64. package/template/.claude/skills/hstack-flag/SKILL.md +0 -138
  65. package/template/.claude/skills/hstack-greenfield-init/SKILL.md +0 -175
  66. package/template/.claude/skills/hstack-help/SKILL.md +0 -179
  67. package/template/.claude/skills/hstack-implement/SKILL.md +0 -185
  68. package/template/.claude/skills/hstack-kernel-fit-promote/SKILL.md +0 -164
  69. package/template/.claude/skills/hstack-kernel-fit-scan/SKILL.md +0 -197
  70. package/template/.claude/skills/hstack-kernel-fit-triage/SKILL.md +0 -159
  71. package/template/.claude/skills/hstack-module-spec/SKILL.md +0 -105
  72. package/template/.claude/skills/hstack-product-discovery/SKILL.md +0 -101
  73. package/template/.claude/skills/hstack-research/SKILL.md +0 -145
  74. package/template/.claude/skills/hstack-scaffold/SKILL.md +0 -140
  75. package/template/.claude/skills/hstack-security-review/SKILL.md +0 -133
  76. package/template/.claude/skills/hstack-ship/SKILL.md +0 -129
  77. package/template/.claude/skills/hstack-stack-decide/SKILL.md +0 -108
  78. package/template/.claude/skills/hstack-story-draft/SKILL.md +0 -119
  79. package/template/.claude/skills/hstack-tech-debt-new/SKILL.md +0 -122
  80. package/template/.claude/skills/hstack-tech-debt-resolve/SKILL.md +0 -158
  81. package/template/.claude/skills/hstack-tech-debt-stale/SKILL.md +0 -113
  82. package/template/.claude/skills/hstack-tech-debt-wontfix/SKILL.md +0 -104
  83. package/template/.claude/skills/hstack-telemetry/SKILL.md +0 -98
  84. package/template/.claude/skills/hstack-test-plan/SKILL.md +0 -182
  85. package/template/.claude/skills/hstack-ui-brief/SKILL.md +0 -108
  86. package/template/.claude/skills/hstack-verify/SKILL.md +0 -150
  87. package/template/CLAUDE.md +0 -443
  88. package/template/scripts/coord/coord_scan.py +0 -681
  89. package/template/scripts/telemetry/__init__.py +0 -6
  90. package/template/scripts/telemetry/insights/__init__.py +0 -0
  91. package/template/scripts/telemetry/insights/contract_drift.py +0 -137
  92. package/template/scripts/telemetry/insights/kernel_fit.py +0 -438
  93. package/template/scripts/telemetry/insights/overengineering.py +0 -115
  94. package/template/scripts/telemetry/insights/quality_outcomes.py +0 -131
  95. package/template/scripts/telemetry/insights/token_economics.py +0 -129
  96. package/template/scripts/telemetry/insights/workflow_shape.py +0 -198
  97. package/template/scripts/telemetry/parsers/__init__.py +0 -0
  98. package/template/scripts/telemetry/parsers/bodies.py +0 -87
  99. package/template/scripts/telemetry/parsers/commits.py +0 -219
  100. package/template/scripts/telemetry/parsers/frontmatter.py +0 -322
  101. package/template/scripts/telemetry/parsers/transcripts.py +0 -181
  102. package/template/scripts/telemetry/render.py +0 -395
  103. package/template/scripts/telemetry/report.py +0 -138
  104. package/template/scripts/telemetry/run_kernel_fit.py +0 -91
  105. package/template/templates/adversarial-review.md +0 -54
  106. package/template/templates/bootstrap.md +0 -105
  107. package/template/templates/change-spec.md +0 -82
  108. package/template/templates/ci-cd.md +0 -27
  109. package/template/templates/coord-message.md +0 -55
  110. package/template/templates/data-review.md +0 -54
  111. package/template/templates/discovery/brainstorm.md +0 -69
  112. package/template/templates/discovery/forcing-questions.md +0 -76
  113. package/template/templates/discovery/project-brief.md +0 -53
  114. package/template/templates/figma-handoff.md +0 -38
  115. package/template/templates/glossary.md +0 -20
  116. package/template/templates/hardening-checklist.md +0 -73
  117. package/template/templates/incident-runbook.md +0 -57
  118. package/template/templates/kernel-fit-finding.md +0 -63
  119. package/template/templates/kernel-fit-flag.md +0 -52
  120. package/template/templates/module-spec.md +0 -49
  121. package/template/templates/mvp-scope.md +0 -34
  122. package/template/templates/persona.md +0 -38
  123. package/template/templates/plan.md +0 -49
  124. package/template/templates/product-brief.md +0 -56
  125. package/template/templates/security-review.md +0 -63
  126. package/template/templates/telemetry-sidecar.md +0 -184
  127. package/template/templates/test-plan.md +0 -119
  128. package/template/templates/threat-model.md +0 -54
  129. package/template/templates/ui-brief.md +0 -49
  130. package/template/templates/verification.md +0 -63
  131. package/template/templates/vision.md +0 -34
@@ -1,69 +0,0 @@
1
- ---
2
- id: discovery-brainstorm
3
- type: discovery-technique
4
- technique: brainstorm
5
- applies-to: product-brief
6
- schema-version: 1
7
- ---
8
-
9
- # Brainstorm — technique script
10
-
11
- This is the prompt sequence `product-discovery` runs in Brainstorm mode. Use this when the engineer has a problem domain but no concrete concept. The mode is **facilitated ideation** — the agent acts as coach pulling ideas out via structured exercises, not generating ideas for the engineer.
12
-
13
- ## Pre-flight check
14
-
15
- Before entering the script, the agent confirms:
16
-
17
- - The engineer can name the problem domain in one sentence ("CS teams losing follow-up context") even if the solution is undefined.
18
- - The engineer has 60+ minutes available. Brainstorm runs multi-round; cutting it short produces shallow output.
19
-
20
- ## Round 1 — SCAMPER pass on the problem statement
21
-
22
- For each SCAMPER lens, ask the engineer one question and write their answer:
23
-
24
- - **Substitute** — "What current workflow could be substituted away?"
25
- - **Combine** — "What two things, combined, would create new value here?"
26
- - **Adapt** — "What other industry has solved a similar pain — what did they do?"
27
- - **Modify** — "What single behavior, if amplified, would solve most of the pain?"
28
- - **Put to another use** — "What's a non-obvious user who has this same pain?"
29
- - **Eliminate** — "What part of the current workflow could disappear entirely?"
30
- - **Reverse** — "What if the user did the opposite of what they do today?"
31
-
32
- Answers land as raw text in a scratch section. Do NOT synthesize yet.
33
-
34
- ## Round 2 — Reverse brainstorming
35
-
36
- Ask: "How would you make this problem **worse** for the user? List five ways."
37
-
38
- The engineer's answers reveal the load-bearing failure modes — the things the product must NOT do. These directly seed the **Explicitly NOT** section of the brief.
39
-
40
- ## Round 3 — Six Thinking Hats on the strongest thread
41
-
42
- The agent picks the strongest 1–2 threads from Rounds 1 and 2 (the threads with the most concrete user actions named) and proposes them back. For each thread, walk the hats:
43
-
44
- - **White hat (facts)** — "What do we observably know about this user's workflow today?"
45
- - **Red hat (intuition)** — "What feels right or wrong about this thread, gut-check?"
46
- - **Black hat (caution)** — "What's the strongest case against this thread?"
47
- - **Yellow hat (optimism)** — "What's the strongest case for this thread?"
48
- - **Green hat (creativity)** — "What's the wildest version of this thread?"
49
- - **Blue hat (process)** — "Is this the right thread to deepen, or should we drop it?"
50
-
51
- After the Six Hats run, the engineer either commits to a thread or returns to Round 1 with a sharper problem statement.
52
-
53
- ## Round 4 — Synthesis
54
-
55
- The agent proposes a one-paragraph synthesis of the strongest thread, framed as: "Here is what I heard you converge on. Concept: X. Underlying pain: Y. Target user: Z." The engineer confirms or revises.
56
-
57
- On confirmation, the agent transitions to the **product-brief.md** template and walks the sections, using the synthesis as the seed for Underlying Pain, Target User, and Value Proposition.
58
-
59
- ## Required reframes (mandatory before brief lands)
60
-
61
- These run during the section walk of `product-brief.md`, regardless of which Brainstorm round produced the synthesis:
62
-
63
- - "Who specifically pays for this?" — concrete persona required.
64
- - "What's the smallest useful wedge?" — minimum shippable surface required.
65
- - "What would you have to believe to be wrong about this?" — falsifiability required.
66
-
67
- ## Park-and-resume
68
-
69
- The agent surfaces a parking offer after each Round commits. If the engineer parks, the round's output is persisted in `hstack/.session-state/<session-id>.yaml`. Resume picks up at the next round.
@@ -1,76 +0,0 @@
1
- ---
2
- id: discovery-forcing-questions
3
- type: discovery-technique
4
- technique: forcing-questions
5
- applies-to: product-brief
6
- schema-version: 1
7
- ---
8
-
9
- # Forcing-questions — technique script
10
-
11
- This is the prompt sequence `product-discovery` runs in Forcing-Questions mode. Use this when the engineer has a concept but it's vague or oversold — the technique probes claims and reframes the underlying pain. Pattern derived from YC-partner forcing questions and the Gstack approach.
12
-
13
- The agent's operating mode in this technique is **reframe-driven probing**: every claim the engineer makes triggers a reframe. The engineer's job is to defend the claim or accept the reframe. The brief converges only when the claims survive the probes.
14
-
15
- ## Pre-flight check
16
-
17
- Before entering the script, the agent confirms:
18
-
19
- - The engineer has a concept they can state in one or two sentences.
20
- - The engineer is open to being wrong about their concept. The technique surfaces reframes that may invalidate the founder's first articulation; founders who can't tolerate that should pick Project-Brief mode instead.
21
-
22
- ## Probe 1 — The 10-star reframe
23
-
24
- Ask: "What's the 10-star product hiding inside this request? What you described is 5-star; what's the 10-star version that solves the actual underlying pain?"
25
-
26
- The engineer's first answer is often a feature embellishment ("...with AI"). Re-ask: "That's a feature. What's the **underlying** pain — what does the user fail to do today that the 10-star product would make trivial?"
27
-
28
- The reframe sticks when the engineer names a pain that is one level deeper than the original concept. The brief's **Underlying Pain** section seeds from this answer.
29
-
30
- ## Probe 2 — The smallest useful wedge
31
-
32
- Ask: "What's the smallest useful wedge? If you shipped one slice of the 10-star product and nothing else, what's the one slice that would still get a real user to pay?"
33
-
34
- The engineer's first answer is usually too large. Re-ask: "Cut it in half. What's left when you remove every feature that isn't load-bearing for the slice you just described?"
35
-
36
- The reframe sticks when the engineer names a wedge that can be built by one engineer in a quarter and that, alone, would justify a real user's payment. The brief's **Smallest Useful Wedge** section seeds from this answer.
37
-
38
- ## Probe 3 — The named user
39
-
40
- Ask: "Who specifically pays for this? Name a real person — first name, role, company-size band, and the workflow this product enters on a Tuesday morning."
41
-
42
- The engineer's first answer is often a role abstraction ("Directors of CS"). Re-ask: "Pick one specific Director of CS you've talked to. What's her name, what's her company's name, and what does she do on a Tuesday morning that this product changes?"
43
-
44
- If the engineer cannot name a specific person, halt and surface: "The named-user constraint isn't met. We can either (a) park here and you go talk to three real users this week, or (b) acknowledge in the brief that this is anchored on a hypothetical user, which makes everything downstream a gamble." Founders sometimes choose (b); the brief records the choice in **Open Risks**.
45
-
46
- The brief's **Target User** section seeds from this answer.
47
-
48
- ## Probe 4 — The falsification probe
49
-
50
- Ask: "What would you have to believe to be wrong about this concept? Name the belief and the evidence that would falsify it."
51
-
52
- The engineer's first answer is often "users won't like it" — too vague. Re-ask: "Be specific. What's a load-bearing assumption about the user, the market, or the technology that, if wrong, kills the product? And what experiment would tell you if it's wrong?"
53
-
54
- The reframe sticks when the engineer names a falsifiable belief plus an experiment that would resolve it within weeks. The brief's **Open Risks** section seeds from this answer.
55
-
56
- ## Probe 5 — The scope-reduction question
57
-
58
- Ask: "If you had to ship in 8 weeks with one engineer, what would you cut? Walk me through the cut list."
59
-
60
- The engineer's cuts reveal what they think is load-bearing vs. embellishment. The brief's **Explicitly NOT** section seeds from the cut list — the things the engineer would cut are exactly the things v1 explicitly does NOT do.
61
-
62
- ## Probe 6 — The reframe-staleness check
63
-
64
- After Probes 1–5, the agent surfaces: "The brief is converging on [X]. Your starting concept was [Y]. Any external documents (Notion pages, pitch deck, README) still naming [Y]? Those are now stale. Cleanup checklist:"
65
-
66
- The engineer either confirms the docs are stale and lists them for cleanup, or pushes back ("no, Y is still the framing") — in which case the agent re-runs Probe 1 to reconcile.
67
-
68
- ## Synthesis
69
-
70
- After all six probes, the agent proposes a one-paragraph synthesis: "Here is what survived the probes. Concept: [refined X]. Underlying pain: [Probe 1 answer]. Smallest wedge: [Probe 2 answer]. Named user: [Probe 3 answer]. Falsification: [Probe 4 answer]." The engineer confirms or revises.
71
-
72
- On confirmation, the agent transitions to the **product-brief.md** template and walks the sections. The probe answers seed the corresponding brief sections; the Forcing-Prompt Answers section records the probes verbatim as evidence the technique ran.
73
-
74
- ## Park-and-resume
75
-
76
- The agent surfaces a parking offer after each probe commits. If the engineer parks, the probe's output is persisted in `hstack/.session-state/<session-id>.yaml`. Resume picks up at the next probe.
@@ -1,53 +0,0 @@
1
- ---
2
- id: discovery-project-brief
3
- type: discovery-technique
4
- technique: project-brief
5
- applies-to: product-brief
6
- schema-version: 1
7
- ---
8
-
9
- # Project-brief — technique script
10
-
11
- This is the prompt sequence `product-discovery` runs in Project-Brief mode. Use this when the engineer is already concrete about the product and just needs structure to land the brief artifact. This is the **lightest-touch** technique — collaborative, structured, no heavy reframes — but the three required forcing prompts still fire.
12
-
13
- The agent's operating mode in this technique is **structured walk**: the engineer's existing thinking is the proposal layer; the agent prompts section by section, confirms or revises, lands the brief.
14
-
15
- ## Pre-flight check
16
-
17
- Before entering the script, the agent confirms:
18
-
19
- - The engineer can state the concept in two or three sentences without hedging.
20
- - The engineer can name a specific real user (not a role abstraction).
21
- - The engineer can name a concrete success metric.
22
-
23
- If any of the three fails the concreteness floor, the agent halts and suggests switching to Forcing-Questions mode — the engineer's thinking is too vague for Project-Brief mode, which assumes concreteness.
24
-
25
- ## Section walk
26
-
27
- The agent walks `product-brief.md` section by section. For each section, the agent asks one open question, accepts the engineer's answer, surfaces one clarifying re-ask if the answer is vague, then commits the section.
28
-
29
- 1. **Underlying Pain** — "Describe what the user struggles with today, in concrete terms. A Tuesday-morning workflow vignette is the unit of clarity."
30
- 2. **Target User** — "Name a specific real user. First name, role, company-size band, the tools they use, the workflow this product enters."
31
- 3. **Value Proposition** — "What outcome does this product deliver to the named user? Outcome, not features."
32
- 4. **Smallest Useful Wedge** — "What's the minimum shippable surface that delivers real value? Would the named user still pay for the wedge alone?"
33
- 5. **Success Criteria** — "What measurable, time-bound outcome tells you v1 worked? Concrete number, concrete window."
34
- 6. **Explicitly NOT** — "What is this product NOT? Two bullets minimum. What population it does NOT serve, what workflows it does NOT enter, what features it does NOT include."
35
- 7. **Open Risks** — "What could make this product fail? Name at least one belief that, if wrong, kills the product."
36
-
37
- ## Required forcing prompts
38
-
39
- Even in this lightest-touch mode, the three required forcing prompts MUST run before the brief can land. They run after the section walk completes:
40
-
41
- - "Who specifically pays for this?" — re-prompt the engineer to defend the Target User against the buyer question. The Target User and the buyer may be different (Maya the Director of CS uses it; her CFO pays for it). Both must be named.
42
- - "What's the smallest useful wedge?" — re-prompt the engineer to defend the wedge against the "would the user pay for the wedge alone?" question. Yes required.
43
- - "What would you have to believe to be wrong about this?" — re-prompt for a falsifiable belief + experiment to resolve it. Names the load-bearing risk.
44
-
45
- These three answers are logged in the brief's **Forcing-Prompt Answers** section as evidence the probes ran. The engineer cannot skip them; the technique downgrades to Forcing-Questions mode mid-session if the engineer refuses any of the three.
46
-
47
- ## Synthesis
48
-
49
- There is no explicit synthesis step in Project-Brief mode — the section walk IS the synthesis. The brief lands at `status: current` when the last section commits and the three forcing prompts are answered.
50
-
51
- ## Park-and-resume
52
-
53
- The agent surfaces a parking offer after each section commits. If the engineer parks, the section's output is on disk and `hstack/.session-state/<session-id>.yaml` records the next-section pointer. Resume picks up at the next section.
@@ -1,38 +0,0 @@
1
- ---
2
- id: <parent-change-id>-figma
3
- type: figma-handoff
4
- status: draft # draft | ready | superseded
5
- owner: <cofounder-handle>
6
- parent-change: <change-spec-id>
7
- figma-frame-urls: [] # list of Figma frame URLs
8
- design-system-version: <version> # must match parent ui-brief.design-system-version
9
- created: <YYYY-MM-DD>
10
- updated: <YYYY-MM-DD>
11
- schema-version: 1
12
- ---
13
-
14
- ## Frame Index
15
-
16
- _Table of frame URLs with state descriptions. Three columns max._
17
-
18
- | state | frame URL | notes |
19
- | --- | --- | --- |
20
- | | | |
21
-
22
- ## Implementation Notes
23
-
24
- _Anything the engineer needs to know that Figma cannot encode: animation timings, conditional rendering, copy fallbacks._
25
-
26
- ## Open Questions
27
-
28
- _Anything the cofounder is uncertain about. Resolve before status: ready._
29
-
30
- ## Tokens Used
31
-
32
- _Design tokens consumed. Flag any new tokens introduced — they belong in the design system, not in this change._
33
-
34
- -
35
-
36
- ## Sign-off
37
-
38
- _Cofounder confirms screens are final. Initials + date._
@@ -1,20 +0,0 @@
1
- ---
2
- id: glossary
3
- type: glossary
4
- status: drafted # drafted | current | needs-refresh | archived
5
- owner: <git-handle>
6
- term-count: 0 # must match the number of term subsections in the body
7
- created: <YYYY-MM-DD>
8
- updated: <YYYY-MM-DD>
9
- schema-version: 1
10
- ---
11
-
12
- _Terms with non-obvious meaning in the product. One subsection per term, alphabetical order. Each term: one-paragraph definition, one or more examples, cross-references to other terms or modules. Length cap: two paragraphs per term. Update `term-count` whenever a term is added or removed (validator rule GL-01)._
13
-
14
- ## <Term>
15
-
16
- **Definition.**
17
-
18
- **Example.**
19
-
20
- **See also.**
@@ -1,73 +0,0 @@
1
- ---
2
- id: hardening-checklist
3
- type: hardening-checklist
4
- status: drafted # drafted | current | needs-refresh | archived
5
- owner: <git-handle>
6
- last-quarterly-review: <YYYY-MM-DD>
7
- layer-count: 10
8
- created: <YYYY-MM-DD>
9
- updated: <YYYY-MM-DD>
10
- schema-version: 1
11
- ---
12
-
13
- _One section per layer. Each layer enumerates items with: item id, what it asserts, evidence required, not-applicable conditions. This is the artifact `security-review.md` scores against item-by-item. Validator rule HC-01: every layer that appears in a security-review `scores` map must exist as a section here._
14
-
15
- ## data-at-rest
16
-
17
- ### Item HC-DAR-01: <assertion>
18
- **Evidence required.**
19
- **Not-applicable when.**
20
-
21
- ## data-in-transit
22
-
23
- ### Item HC-DIT-01: <assertion>
24
- **Evidence required.**
25
- **Not-applicable when.**
26
-
27
- ## authn
28
-
29
- ### Item HC-AN-01: <assertion>
30
- **Evidence required.**
31
- **Not-applicable when.**
32
-
33
- ## authz-rls
34
-
35
- ### Item HC-AZ-01: <assertion>
36
- **Evidence required.**
37
- **Not-applicable when.**
38
-
39
- ## tenant-isolation
40
-
41
- ### Item HC-TI-01: <assertion>
42
- **Evidence required.**
43
- **Not-applicable when.**
44
-
45
- ## input-validation
46
-
47
- ### Item HC-IV-01: <assertion>
48
- **Evidence required.**
49
- **Not-applicable when.**
50
-
51
- ## output-encoding
52
-
53
- ### Item HC-OE-01: <assertion>
54
- **Evidence required.**
55
- **Not-applicable when.**
56
-
57
- ## secrets-handling
58
-
59
- ### Item HC-SH-01: <assertion>
60
- **Evidence required.**
61
- **Not-applicable when.**
62
-
63
- ## agent-prompt-injection
64
-
65
- ### Item HC-API-01: <assertion>
66
- **Evidence required.**
67
- **Not-applicable when.**
68
-
69
- ## audit-logging
70
-
71
- ### Item HC-AL-01: <assertion>
72
- **Evidence required.**
73
- **Not-applicable when.**
@@ -1,57 +0,0 @@
1
- ---
2
- id: incident-runbook
3
- type: incident-runbook
4
- status: drafted # drafted | current | needs-refresh | archived
5
- owner: <git-handle>
6
- git-ignored: true # this file MUST be gitignored; sensitive content
7
- last-quarterly-review: <YYYY-MM-DD>
8
- created: <YYYY-MM-DD>
9
- updated: <YYYY-MM-DD>
10
- schema-version: 1
11
- ---
12
-
13
- <!--
14
- WARNING: This file contains sensitive operational content (auth provider details, revocation endpoints,
15
- customer communication templates, phone tree). It MUST be gitignored. Per architecture amendment A7,
16
- the file lives locally and is synced to an out-of-band destination configured in hstack/config.yaml as
17
- `incident-runbook.sync-target`. Auto-commit does not apply to this file. The init Skill must add the
18
- entry to .gitignore as part of bootstrap.
19
- -->
20
-
21
- ## Kill switches
22
-
23
- _Feature flags and how to flip them, ordered by blast radius. Most-dangerous-first._
24
-
25
- -
26
-
27
- ## Revocation flows
28
-
29
- _Per third-party: Stripe, Supabase, Pipedream, MCPs. Steps to revoke a session, an OAuth token, an API key._
30
-
31
- ### Stripe
32
-
33
- ### Supabase
34
-
35
- ### Pipedream
36
-
37
- ### MCPs
38
-
39
- ## Customer communication
40
-
41
- _Copy templates per severity (P0 / P1 / P2). Channels (in-app, email, status page)._
42
-
43
- ### P0 template
44
-
45
- ### P1 template
46
-
47
- ### P2 template
48
-
49
- ## Escalation contacts
50
-
51
- _Owner phone tree. Mark each entry with privacy boundary (work-hours OK / 24-7 OK)._
52
-
53
- -
54
-
55
- ## Post-incident
56
-
57
- _Runbook for the followup ADR or tech-debt write-up. Pointer to ADR template._
@@ -1,63 +0,0 @@
1
- ---
2
- id: KF-<NNNN>-<slug>
3
- type: kernel-fit-finding
4
- status: open # open | acknowledged | dismissed | promoted | superseded | archived
5
- owner: null # git-handle of the triager; null until first triage
6
- pattern: <KF-P1 | KF-P2 | KF-P3 | …> # detector pattern that fired; enumerated in scripts/telemetry/insights/kernel_fit.py
7
- confidence: medium # high | medium | low
8
- detected-by: kernel-fit-analyst
9
- detected-via: detector # detector | flag — `detector` (default) when the finding came from kernel_fit.py pattern matching; `flag` when the finding originated from a /hstack:flag pin (ADR-0005). For folded-in findings (flag signal merged into an existing detector-finding), `detected-via` remains `detector` because the originating signal was the detector pattern.
10
- detected-at: <ISO-8601 timestamp>
11
- evidence-row-count: 0 # integer; must equal len(evidence-rows) per KF-01
12
- evidence-rows: [] # YAML array of {change|adr|td, signal} dicts; one entry per row counted above
13
- related-findings: [] # KF ids — prior or adjacent findings on the same kernel surface
14
- promoted-to: null # `adr:<ADR-NNNN-slug>` | `tech-debt:<TD-NNNN-slug>` | null; reciprocal with the target artifact's `promoted-from-kernel-fit`; required when status: promoted
15
- dismissed-reason: null # ≥50 chars of prose; required when status: dismissed (per KF-05)
16
- superseded-by: null # KF id when status: superseded
17
- created: <YYYY-MM-DD>
18
- updated: <YYYY-MM-DD>
19
- schema-version: 1
20
- ---
21
-
22
- ## Title
23
-
24
- _Short noun phrase naming the kernel-fit gap. Example: "Category-A claim spans production paths — engineer likely meant Category B."_
25
-
26
- ## Pattern fired
27
-
28
- _Name the detector pattern (KF-P1 / KF-P2 / KF-P3 / …) and one paragraph describing what the detector found. Quote the pattern's defining condition from `kernel_fit.py` if helpful._
29
-
30
- ## Evidence
31
-
32
- _Per evidence row, a 2–3 sentence prose summary with at least one inline citation (change-id, ADR-id, TD-id, commit-sha, kernel section). KF-01 requires `len(evidence-rows)` in frontmatter to equal `evidence-row-count`; the prose here must cite each row at least once. No prose without a citation._
33
-
34
- 1. ...
35
- 2. ...
36
-
37
- ## Kernel surface implicated
38
-
39
- _Single-sentence pointer to the kernel section, template, validator rule, or Skill flow that the finding suggests revising. Examples: "`template/CLAUDE.md § Frontmatter contract` — the `internal-tooling` field"; "`template/templates/change-spec.md` frontmatter — `surfaces` enum"; "`/hstack:adversarial-review` precondition check at SKILL.md line 61"._
40
-
41
- ## Proposed direction
42
-
43
- _One paragraph. Name a direction the kernel revision could take — split a flag, add an enum case, add a Skill precondition, amend a section. This is NOT a full ADR — that work is done by `spec-author` if and when the engineer invokes `/hstack:kernel-fit-promote`. Keep this as a sketch, not a specification._
44
-
45
- ## Counter-explanations (challenge prompt — mandatory)
46
-
47
- _Two reasons this finding might NOT warrant a kernel change. If you cannot produce two, the analyst auto-downgrades `confidence` to `low` per KF-03. The challenge defends against false-positives the same way `## Consequences` § "name two consequences that look bad" defends ADRs._
48
-
49
- 1. ...
50
- 2. ...
51
-
52
- ## Confidence rationale
53
-
54
- _One paragraph defending the `confidence` enum value against the validator rules. `high` requires `evidence-row-count >= 3` AND ≥2 distinct change-specs cited (KF-02). `medium` is the conservative default. `low` carries no notification and is appropriate when evidence is thin or the challenge prompts substantially weaken the finding._
55
-
56
- ## Triage Log
57
-
58
- _Populated by `/hstack:kernel-fit-triage` and `/hstack:kernel-fit-promote` as the finding's status transitions. Section is empty until the first transition out of `open`._
59
-
60
- - `status: open → acknowledged` on `<YYYY-MM-DD>` by `<owner>`. Triggered by `/hstack:kernel-fit-triage <id> --action acknowledge`.
61
- - `status: open → dismissed` on `<YYYY-MM-DD>` by `<owner>`. Reason: `<dismissed-reason>`.
62
- - `status: acknowledged → promoted` on `<YYYY-MM-DD>` by `<owner>`. Promoted to: `<promoted-to>`. Triggered by `/hstack:kernel-fit-promote <id> --slug <adr-slug>`.
63
- - `status: open → superseded` on `<YYYY-MM-DD>` by the next `kernel-fit-analyst` run. Superseded by: `<superseded-by>`.
@@ -1,52 +0,0 @@
1
- ---
2
- id: flag-<YYYYMMDD>T<HHMMSS>-<session-id-short>
3
- type: kernel-fit-flag
4
- status: pending # pending | processed
5
- session-id: <claude-code-session-uuid> # FL-01: non-null at pin-time
6
- session-transcript-path: <abs-path-to-jsonl> # FL-01: non-null at pin-time
7
- branch: <current-branch> # FL-01: non-null at pin-time
8
- head: <current-HEAD-sha> # FL-01: non-null at pin-time
9
- workspace: <abs-path-to-cwd> # FL-01: non-null at pin-time
10
- timestamp: <ISO-8601 timestamp at pin> # FL-01: non-null at pin-time
11
- pre-compaction-message-count: <integer> # FL-01: non-null at pin-time; analyst uses this to detect truncation between pin and scan
12
- hint: null # one-word string from --hint arg; null when no arg given
13
- classification: null # FL-02: non-null when status: processed; one of friction | missing-guardrail | kernel-vs-practice-mismatch | not-actionable | transcript-truncated
14
- classification-rationale: null # FL-02: non-null when status: processed; one-line analyst note
15
- folded-into: null # KF-NNNN-<slug> when the analyst folded the signal into an existing finding
16
- emitted-as: null # KF-NNNN-<slug> when the analyst emitted a fresh finding from this pin
17
- created: <YYYY-MM-DD>
18
- updated: <YYYY-MM-DD>
19
- schema-version: 1
20
- ---
21
-
22
- <!--
23
- A kernel-fit-flag is a frontmatter-only pin. There is no body. Engineer
24
- interpretation of the friction is deliberately excluded — the analyst reads
25
- the transcript window and forms its own classification at processing time.
26
-
27
- Validator rules (enforced by the proposed-diff preview in v1; validate-spec.ts
28
- is still a {{TODO-SCRIPT}} placeholder):
29
-
30
- - FL-01: at pin-time (status: pending) every field marked above as
31
- "non-null at pin-time" must be populated. `hint` may be null; the four
32
- analyst-owned fields (classification, classification-rationale,
33
- folded-into, emitted-as) must remain null until processing.
34
-
35
- - FL-02: at processing-time (status: processed) `classification` and
36
- `classification-rationale` must both be non-null. When the classification
37
- produced a finding, exactly one of `folded-into` or `emitted-as` is non-null
38
- (never both). When the classification did not produce a finding (closed as
39
- `not-actionable` or `transcript-truncated`), both remain null.
40
-
41
- Pins are immutable from the engineer's perspective. The only legal writes
42
- after creation are by the kernel-fit-analyst at processing time, setting the
43
- four analyst-owned fields and flipping status to processed. The engineer
44
- cannot edit a pin to add commentary — that would re-open the contamination
45
- surface the analyst guards against. To add context, re-flag in a follow-up
46
- turn (a new pin with a different timestamp).
47
-
48
- Pins live at hstack/kernel-fit/flags/pending/ before processing and at
49
- hstack/kernel-fit/flags/processed/ after. The directory is gitignored in
50
- the consuming repo — see ADR-0005 for the rationale and the trade-off
51
- (provenance gap unique to this artifact type).
52
- -->
@@ -1,49 +0,0 @@
1
- ---
2
- id: <module-key> # equals the module key in hstack/config.yaml
3
- type: module-spec
4
- status: drafted # drafted | current | needs-refresh | archived
5
- owner: <git-handle>
6
- paths: [] # required; canonical module-to-paths mapping (globs)
7
- last-refreshed: <YYYY-MM-DD>
8
- created: <YYYY-MM-DD>
9
- updated: <YYYY-MM-DD>
10
- schema-version: 1
11
- ---
12
-
13
- ## Purpose
14
-
15
- _What this module is responsible for. 2–4 sentences. Author may grep `paths` to verify._
16
-
17
- ## Public Surface
18
-
19
- _Exports, routes, RPCs the module exposes outward. Bullets._
20
-
21
- -
22
-
23
- ## Data Owned
24
-
25
- _Tables, columns, and indexes this module is the canonical owner of. Bullets._
26
-
27
- -
28
-
29
- ## External Dependencies
30
-
31
- _Other modules, third-party services, MCPs this module depends on. Bullets._
32
-
33
- -
34
-
35
- ## Invariants
36
-
37
- _Challenge prompt: what would a careless refactor in this module break that the tests would not catch? Minimum 3 bullets (validator rule MS-03)._
38
-
39
- -
40
- -
41
- -
42
-
43
- ## Known Tech-Debt and ADRs
44
-
45
- _Pointers._
46
-
47
- ## Refresh Policy
48
-
49
- _What triggers a refresh and what the refresh entails. One paragraph. The 60-day `needs-refresh` cron flags this spec if untouched._
@@ -1,34 +0,0 @@
1
- ---
2
- id: mvp-scope
3
- type: mvp-scope
4
- status: drafted # drafted | current | needs-refresh | archived
5
- owner: <git-handle>
6
- mvp-target-date: <YYYY-MM-DD>
7
- created: <YYYY-MM-DD>
8
- updated: <YYYY-MM-DD>
9
- schema-version: 1
10
- ---
11
-
12
- ## In MVP
13
-
14
- _Bullets. One feature or story per line. Each entry must be either a story id or a feature-cluster name (validator rule MS-01)._
15
-
16
- -
17
-
18
- ## v2
19
-
20
- _The next-up list. Bullets._
21
-
22
- -
23
-
24
- ## Deferred
25
-
26
- _Things we decided not to do yet, with the reason. Bullets._
27
-
28
- -
29
-
30
- ## MVP success criteria
31
-
32
- _Concrete observable indicators that we are out of MVP. Bullets._
33
-
34
- -
@@ -1,38 +0,0 @@
1
- ---
2
- id: persona-<slug>
3
- type: persona
4
- status: drafted # drafted | current | needs-refresh | archived
5
- owner: <git-handle>
6
- anchored-on: <design-partner-slug>
7
- created: <YYYY-MM-DD>
8
- updated: <YYYY-MM-DD>
9
- schema-version: 1
10
- ---
11
-
12
- ## Role
13
-
14
- _Title and seniority._
15
-
16
- ## Context
17
-
18
- _Tools they use today. Team size. KPI they are measured against._
19
-
20
- ## Jobs-to-be-done
21
-
22
- _Bullets._
23
-
24
- -
25
-
26
- ## Edge constraints
27
-
28
- _Anything unusual: compliance, time zone, locale, accessibility, device class._
29
-
30
- -
31
-
32
- ## Anti-pattern
33
-
34
- _What this persona explicitly is not. Helps prevent persona drift on future stories._
35
-
36
- ## Anchored design partner
37
-
38
- _Name and contact rhythm. Private — keep this section out of any export. When persona store is in repo, the file housing this section should be in `.gitignore` (see hstack/config.yaml personas-location)._