@thebassclef/lite 0.0.1 → 0.1.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 (182) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +85 -4
  3. package/dist/cli.cjs +1610 -0
  4. package/dist/cli.js +1587 -0
  5. package/dist/index.cjs +4 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +4 -0
  8. package/package.json +51 -3
  9. package/substrate/.bassclef/lite-manifest.json +1794 -0
  10. package/substrate/.claude/agents/architect.md +70 -0
  11. package/substrate/.claude/agents/builder.md +114 -0
  12. package/substrate/.claude/agents/designer.md +156 -0
  13. package/substrate/.claude/agents/reviewer.md +88 -0
  14. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +357 -0
  15. package/substrate/.claude/hooks/assert-verify-steering.sh +77 -0
  16. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +215 -0
  17. package/substrate/.claude/hooks/bassclef-sync.sh +634 -0
  18. package/substrate/.claude/hooks/compound-noun-scrub.sh +292 -0
  19. package/substrate/.claude/hooks/kiss-expansion-inject.sh +69 -0
  20. package/substrate/.claude/hooks/plain-english-steering.sh +156 -0
  21. package/substrate/.claude/hooks/post-skill-friction-check.sh +177 -0
  22. package/substrate/.claude/hooks/post-skill-telemetry.sh +62 -0
  23. package/substrate/.claude/hooks/pre-build-gate.sh +511 -0
  24. package/substrate/.claude/hooks/pre-commit-gate.sh +452 -0
  25. package/substrate/.claude/hooks/session-end.sh +433 -0
  26. package/substrate/.claude/hooks/session-reflection.sh +303 -0
  27. package/substrate/.claude/hooks/skill-body-grade-gate.sh +219 -0
  28. package/substrate/.claude/hooks/skill-body-intent-drift.sh +107 -0
  29. package/substrate/.claude/hooks/skill-step-list-check.sh +171 -0
  30. package/substrate/.claude/hooks/state-validate.sh +271 -0
  31. package/substrate/.claude/hooks/substrate-clarity-gate.sh +1110 -0
  32. package/substrate/.claude/hooks/temperance-gate.sh +147 -0
  33. package/substrate/.claude/hooks/testing-tier-enforce.sh +233 -0
  34. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +219 -0
  35. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +434 -0
  36. package/substrate/.claude/hooks/vocabulary-migration-check.sh +171 -0
  37. package/substrate/.claude/hooks/whereami-utc-gate.sh +142 -0
  38. package/substrate/.claude/luminaries/alan-cooper.md +170 -0
  39. package/substrate/.claude/luminaries/alistair-cockburn.md +140 -0
  40. package/substrate/.claude/luminaries/amazon-pr-faq.md +34 -0
  41. package/substrate/.claude/luminaries/ash-maurya.md +121 -0
  42. package/substrate/.claude/luminaries/bill-buxton.md +210 -0
  43. package/substrate/.claude/luminaries/charles-sanders-peirce.md +150 -0
  44. package/substrate/.claude/luminaries/david-ogilvy.md +192 -0
  45. package/substrate/.claude/luminaries/don-norman.md +173 -0
  46. package/substrate/.claude/luminaries/edward-tufte.md +179 -0
  47. package/substrate/.claude/luminaries/eric-evans.md +160 -0
  48. package/substrate/.claude/luminaries/frederick-brooks.md +50 -0
  49. package/substrate/.claude/luminaries/gang-of-four.md +157 -0
  50. package/substrate/.claude/luminaries/jason-fried-dhh.md +46 -0
  51. package/substrate/.claude/luminaries/jesse-james-garrett.md +154 -0
  52. package/substrate/.claude/luminaries/john-ousterhout.md +94 -0
  53. package/substrate/.claude/luminaries/karl-popper.md +132 -0
  54. package/substrate/.claude/luminaries/kent-beck.md +168 -0
  55. package/substrate/.claude/luminaries/linus-torvalds.md +218 -0
  56. package/substrate/.claude/luminaries/martin-fowler.md +164 -0
  57. package/substrate/.claude/luminaries/michael-feathers.md +125 -0
  58. package/substrate/.claude/luminaries/michael-nygard.md +118 -0
  59. package/substrate/.claude/luminaries/robert-c-martin.md +164 -0
  60. package/substrate/.claude/luminaries/saltzer-schroeder.md +194 -0
  61. package/substrate/.claude/luminaries/sophia-prater.md +193 -0
  62. package/substrate/.claude/luminaries/stephen-toulmin.md +131 -0
  63. package/substrate/.claude/rules/artifact-ingestion.md +179 -0
  64. package/substrate/.claude/rules/assert-only-after-verify.md +137 -0
  65. package/substrate/.claude/rules/blocked-items.md +146 -0
  66. package/substrate/.claude/rules/branching.md +28 -0
  67. package/substrate/.claude/rules/commit-conventions.md +22 -0
  68. package/substrate/.claude/rules/context-engineering.md +202 -0
  69. package/substrate/.claude/rules/context-management.md +85 -0
  70. package/substrate/.claude/rules/destructive-operations.md +69 -0
  71. package/substrate/.claude/rules/diagnosis.md +38 -0
  72. package/substrate/.claude/rules/guardrails.md +73 -0
  73. package/substrate/.claude/rules/identifier-leak-prevention.md +104 -0
  74. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +98 -0
  75. package/substrate/.claude/rules/oo-ad-entry-point.md +117 -0
  76. package/substrate/.claude/rules/operator-facing-prose.md +196 -0
  77. package/substrate/.claude/rules/plain-english-discipline.md +154 -0
  78. package/substrate/.claude/rules/pr-body-shape.md +317 -0
  79. package/substrate/.claude/rules/pr-strategy.md +167 -0
  80. package/substrate/.claude/rules/sdlc-gates.md +149 -0
  81. package/substrate/.claude/rules/session-artifacts.md +236 -0
  82. package/substrate/.claude/rules/state-schema-validation.md +162 -0
  83. package/substrate/.claude/rules/whereami-load-bearing.md +202 -0
  84. package/substrate/.claude/rules/writing-craft-discipline.md +92 -0
  85. package/substrate/.claude/skills/build/SKILL.md +640 -0
  86. package/substrate/.claude/skills/decompose/SKILL.md +280 -0
  87. package/substrate/.claude/skills/diagnose/SKILL.md +297 -0
  88. package/substrate/.claude/skills/howdoi/SKILL.md +105 -0
  89. package/substrate/.claude/skills/ia-model/SKILL.md +108 -0
  90. package/substrate/.claude/skills/interaction-design/SKILL.md +112 -0
  91. package/substrate/.claude/skills/interpret-input/SKILL.md +180 -0
  92. package/substrate/.claude/skills/kiss/SKILL.md +449 -0
  93. package/substrate/.claude/skills/launch/SKILL.md +924 -0
  94. package/substrate/.claude/skills/lean-canvas/SKILL.md +332 -0
  95. package/substrate/.claude/skills/longrun/SKILL.md +426 -0
  96. package/substrate/.claude/skills/luminary/SKILL.md +481 -0
  97. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  98. package/substrate/.claude/skills/onboard-repo/SKILL.md +2190 -0
  99. package/substrate/.claude/skills/pattern-review/SKILL.md +99 -0
  100. package/substrate/.claude/skills/personas/SKILL.md +207 -0
  101. package/substrate/.claude/skills/promote/SKILL.md +283 -0
  102. package/substrate/.claude/skills/requirement/SKILL.md +98 -0
  103. package/substrate/.claude/skills/retro/SKILL.md +117 -0
  104. package/substrate/.claude/skills/riff/SKILL.md +114 -0
  105. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  106. package/substrate/.claude/skills/session-end/SKILL.md +309 -0
  107. package/substrate/.claude/skills/session-log/SKILL.md +299 -0
  108. package/substrate/.claude/skills/skills/SKILL.md +228 -0
  109. package/substrate/.claude/skills/spec/SKILL.md +105 -0
  110. package/substrate/.claude/skills/sprint/SKILL.md +392 -0
  111. package/substrate/.claude/skills/stage/SKILL.md +384 -0
  112. package/substrate/.claude/skills/state-a-problem/SKILL.md +185 -0
  113. package/substrate/.claude/skills/temperance/SKILL.md +108 -0
  114. package/substrate/.claude/skills/use-case/SKILL.md +417 -0
  115. package/substrate/.claude/skills/user-stories/SKILL.md +268 -0
  116. package/substrate/.claude/skills/value-prop/SKILL.md +251 -0
  117. package/substrate/.claude/skills/verify/SKILL.md +160 -0
  118. package/substrate/.claude/skills/whereami/SKILL.md +307 -0
  119. package/substrate/AGENTS.md +79 -0
  120. package/substrate/CLAUDE-lite.md +85 -0
  121. package/substrate/CODE_OF_CONDUCT.md +28 -0
  122. package/substrate/CONTRIBUTING.md +177 -0
  123. package/substrate/README.md +173 -0
  124. package/substrate/SECURITY.md +19 -0
  125. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  126. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  127. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  128. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  129. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  130. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  131. package/substrate/lib/clean-artifacts-sweep.sh +112 -0
  132. package/substrate/lib/code-comment-discipline.sh +144 -0
  133. package/substrate/lib/composer-preflight.sh +459 -0
  134. package/substrate/lib/hook-inject.sh +255 -0
  135. package/substrate/lib/luminary-pick.sh +96 -0
  136. package/substrate/lib/output-discipline.sh +143 -0
  137. package/substrate/lib/rewrite-check.sh +214 -0
  138. package/substrate/lib/state.sh +1372 -0
  139. package/substrate/lib/telemetry.sh +205 -0
  140. package/substrate/lib/tier-check.sh +138 -0
  141. package/substrate/lib/tier-dependency-audit.sh +933 -0
  142. package/substrate/presence/install/bassclef-hook-connect.sh +178 -0
  143. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  144. package/substrate/presence/install/bassclef-sync.template.sh +2076 -0
  145. package/substrate/presence/install/schedule-auto-save.cron.sh +88 -0
  146. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  147. package/substrate/scripts/aggregate-telemetry.sh +217 -0
  148. package/substrate/scripts/analyze-tier-dependencies.sh +239 -0
  149. package/substrate/scripts/generate-lite-manifest.sh +489 -0
  150. package/substrate/scripts/generate-tier-manifest.sh +28 -0
  151. package/substrate/scripts/intent-drift-check.sh +456 -0
  152. package/substrate/scripts/lite-manifest-drift-check.sh +146 -0
  153. package/substrate/scripts/render-lite-manifest-doc.sh +150 -0
  154. package/substrate/standards/bassclef-configs-schema.md +232 -0
  155. package/substrate/standards/bassclef-evolution.md +143 -0
  156. package/substrate/standards/bassclef-internal-jargon.md +244 -0
  157. package/substrate/standards/bassclef-managed-sentinel.md +96 -0
  158. package/substrate/standards/bassclef-source-config.md +228 -0
  159. package/substrate/standards/deferred-actions-schema.md +204 -0
  160. package/substrate/standards/docs-sync-allowlist.md +76 -0
  161. package/substrate/standards/graceful-exit.md +227 -0
  162. package/substrate/standards/hook-idempotency.md +102 -0
  163. package/substrate/standards/lite-manifest-schema-changes.md +75 -0
  164. package/substrate/standards/luminary-problem-patterns.md +481 -0
  165. package/substrate/standards/ogilvy-writing-rules.md +225 -0
  166. package/substrate/standards/opener-discipline.md +96 -0
  167. package/substrate/standards/operator-facing-prose-discipline.md +201 -0
  168. package/substrate/standards/project-directory-layout.md +276 -0
  169. package/substrate/standards/release-tagging.md +137 -0
  170. package/substrate/standards/sdlc-compliance.md +286 -0
  171. package/substrate/standards/secrets-lifecycle.md +210 -0
  172. package/substrate/standards/security-scanner-adapter.md +145 -0
  173. package/substrate/standards/skill-output-discipline.md +90 -0
  174. package/substrate/standards/state-spine.md +511 -0
  175. package/substrate/standards/tech-stack-config.md +109 -0
  176. package/substrate/standards/tier-dependency-analysis.md +167 -0
  177. package/substrate/standards/tier-runtime-deps/lite.md +57 -0
  178. package/substrate/standards/tier-tag-schema.md +155 -0
  179. package/substrate/standards/whereami-schema.md +301 -0
  180. package/substrate/standards/writing-guide.md +213 -0
  181. package/substrate/templates/deferred-action-template.md +45 -0
  182. package/substrate/templates/whereami-template.md +101 -0
@@ -0,0 +1,105 @@
1
+ ---
2
+ tier: lite
3
+ name: howdoi
4
+ description: Run an LLM-assisted intent search over bassclef skills and rules for an adopter goal. Two modes — search (top matches) and compose (matches plus suggested chains). Ranks by semantic fit; cites what each match does.
5
+ problem: "Adopters know what they want to do but not which bassclef skill or rule fits."
6
+ value: "One question in. A short list of the skills and rules that match your goal."
7
+ inputs: [A one-sentence goal in plain English]
8
+ outputs: [Ranked list of matching skills and rules, One-line reason per match]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ modes: [search, compose]
12
+ composes_baseline: [ash-maurya, alan-cooper]
13
+ ---
14
+
15
+ # /howdoi
16
+
17
+ ## What you get
18
+
19
+ Ask "how do I add auth?" or "how do I test my API?" or "which skill drafts a value prop?". I grep bassclef's skills, rules, and standards for your keywords, use Claude to rank the top 3 matches, and explain what each returns and why it matches. In `compose` mode, I also suggest 1-3 skill chains when your goal spans multiple skills.
20
+
21
+ Modeled on the Python `howdoi` CLI (github.com/gleitz/howdoi) which searches Stack Overflow from the terminal — same shape, adapted to bassclef.
22
+
23
+ ## When to use it
24
+
25
+ Any time you know what you want but have not identified the skill yet. New adopters use it for signup-time questions ("how do I add auth?"). Returning adopters use it to recall a skill name ("which skill drafts a value prop again?"). Mid-flow, run it when you finish one skill and need to pick the next ("I just ran /decompose — what's next?").
26
+
27
+ Skip it when the intent is obvious. If you already know the skill name, run the skill directly. `/howdoi` earns its cost on ambiguous intents.
28
+
29
+ ## FAQ
30
+
31
+ ### What's the difference between search and compose?
32
+
33
+ `search` (default) returns the top 3 matches with a one-line explanation of what each does. `compose` returns the same top 3 plus 1-3 suggested chains when the goal spans multiple skills. Use `search` when you want a single skill; use `compose` when you're planning a workflow.
34
+
35
+ ### How does the ranking work?
36
+
37
+ Two stages. Stage 1 greps `.claude/skills/*/SKILL.md`, `.claude/rules/*.md`, and `standards/*.md` for keywords Claude extracts from your intent (3-5 keywords). Grep returns up to 20 candidates. Stage 2 asks Claude to score each candidate 0-10 for semantic fit against your intent. Top 3 come back with a one-line why-it-matched.
38
+
39
+ Grep is the fast filter; Claude is the semantic ranker.
40
+
41
+ ### What if the top match is wrong?
42
+
43
+ Read the top 3, not just #1. Each match carries a one-line what-it-does + why-it-matched. If none fit, rerun `/howdoi` with a different intent phrasing — the ranking is sensitive to how you frame the goal.
44
+
45
+ If you keep missing, file a ticket. The gap probably means either a skill description is too vague or a skill does not yet exist for the goal.
46
+
47
+ ### Does compose mode always suggest chains?
48
+
49
+ No. Compose mode asks Claude "does this intent span multiple skills?" and returns chains only if the answer is yes. Single-skill goals return just the top 3 matches, same shape as search mode.
50
+
51
+ ### Can /howdoi call other skills for me?
52
+
53
+ No. `/howdoi` surfaces matches; you decide what to run. The value is discovery, not dispatch.
54
+
55
+ ## Details below the fold
56
+
57
+ ### Procedure
58
+
59
+ 1. Ask for the intent — one sentence or a paragraph.
60
+ 2. Claude extracts 3-5 keywords (auth, schema, test, deploy, etc.).
61
+ 3. Grep runs across `.claude/skills/*/SKILL.md`, `.claude/rules/*.md`, `standards/*.md`. Up to 20 candidates.
62
+ 4. Claude scores each candidate 0-10 for semantic fit. Returns top 3.
63
+ 5. Format output — match name, path, one-line what-it-does, why-it-matched score.
64
+ 6. In `compose` mode only — Claude checks whether the intent spans multiple skills. If yes, propose 1-3 chains with rationale.
65
+
66
+ ### Output shape
67
+
68
+ ```markdown
69
+ # /howdoi — matches for "<your intent>"
70
+
71
+ ## Top matches
72
+
73
+ 1. **`/skill-name`** (`.claude/skills/skill-name/`) — description. Match: N/10. Why: <why it matched>.
74
+ 2. ...
75
+ 3. ...
76
+
77
+ ## Suggested chains (compose mode only)
78
+
79
+ **Chain A — <name>:**
80
+ `/X` → `/Y` → `/Z`
81
+
82
+ Rationale: <why this sequence fits the goal>.
83
+ ```
84
+
85
+ ### Anti-patterns this skill prevents
86
+
87
+ - Adopter gives up on discovery — grep alone misses semantic matches ("add auth" will not grep-match `/security-review` reliably). INSTEAD: LLM rank surfaces the fit.
88
+ - Wrong-skill invocation — adopter picks a skill that looks close but does something else. INSTEAD: top 3 with what-it-does explanations lets adopter pick with context.
89
+ - Missing composition — adopter picks one skill when the goal needs a chain. INSTEAD: `compose` mode surfaces the chain shape.
90
+ - Over-fitting to grep — grep is a fast filter, not the final answer. INSTEAD: LLM rank considers what each skill actually does.
91
+
92
+ ### Refs
93
+
94
+ - Ticket #654 — this skill's filing (renamed from `/i-want-to` to `/howdoi` 2026-07-07)
95
+ - Ticket #660 — CI/TDD nudge (split from this skill's original scope)
96
+ - Bet 2026-07-07a — this skill's ship vehicle
97
+ - Python `howdoi` CLI — github.com/gleitz/howdoi (naming precedent)
98
+ - `.claude/rules/skill-composition-declarations.md` — the composability discipline this skill surfaces
99
+ - `/skills` — browse-mode alternative to search
100
+ - `.claude/luminaries/ash-maurya.md` — adopter voice framing
101
+ - `.claude/luminaries/alan-cooper.md` — persona-goal anchor
102
+
103
+ ## Output discipline
104
+
105
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -0,0 +1,108 @@
1
+ ---
2
+ tier: lite
3
+ name: ia-model
4
+ description: Build information architecture from entity inventory + task flows. Derives nav structure, labeling, and screen map from objects.
5
+ problem: "Screens get designed before the nouns behind them are named. Nav drifts across pages."
6
+ value: "One entity map that drives every downstream screen. Nav stays clean because the model is clean."
7
+ inputs: [Task flows from spec, Entity inventory from decompose]
8
+ outputs: [Entity model diagram, Navigation shape, Screen inventory]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ ---
12
+
13
+ # Information Architecture — Entity-Driven
14
+
15
+ Build the IA from entities and their relationships. For data-heavy operator tools,
16
+ the IA is entity-driven — screens derive from objects, not content hierarchies.
17
+
18
+ ## When to Use
19
+
20
+ - After `/jtbd-tasks` and `/task-scenarios` — you have task flows and stories
21
+ - When navigation feels wrong or pages overlap in purpose
22
+ - When adding a new entity (new database model, new concept)
23
+ - When the user says "I don't know where to find X" or "these pages feel redundant"
24
+ - UX fitness review flags drift (new entities without UI surface, nav doesn't match)
25
+
26
+ ## Method: Object-Oriented UX (OOUX)
27
+
28
+ ### Step 1: Entity Inventory
29
+
30
+ List every object the system represents:
31
+
32
+ | Entity | Attributes | Relationships | UI Surface |
33
+ |--------|-----------|---------------|------------|
34
+ | ... | ... | ... | /path |
35
+
36
+ ### Step 2: Entity Relationship Map
37
+
38
+ Draw the relationships (Mermaid ERD or graph).
39
+
40
+ ### Step 3: Screen Derivation
41
+
42
+ **Each primary entity gets a list view and a detail view.** Secondary entities appear within their parent's views. This is the core OOUX principle.
43
+
44
+ | Entity | List View | Detail View | Appears In |
45
+ |--------|-----------|-------------|------------|
46
+ | ... | /path | /path/[id] | ... |
47
+
48
+ ### Step 4: Navigation Structure
49
+
50
+ Derive nav from the screen map. Apply Peter Morville's IA framework:
51
+ - **Organization**: How are screens grouped?
52
+ - **Labeling**: What do we call each nav item? Match the user's mental model.
53
+ - **Navigation**: Primary nav (always visible) vs secondary (contextual).
54
+ - **Search**: When is filtering better than browsing?
55
+
56
+ ### Step 5: Apply LATCH
57
+
58
+ 5 ways to organize information — pick the right one per context:
59
+ - **L**ocation: geographic grouping
60
+ - **A**lphabet: alphabetical (rarely useful)
61
+ - **T**ime: chronological (recent first)
62
+ - **C**ategory: by type or classification
63
+ - **H**ierarchy: by importance or score
64
+
65
+ ## Output Format
66
+
67
+ ```markdown
68
+ ## Entity Inventory
69
+ [table]
70
+
71
+ ## Entity Map
72
+ [Mermaid diagram]
73
+
74
+ ## Screen Map
75
+ [table: entity → list view, detail view, appears in]
76
+
77
+ ## Navigation Structure
78
+ [primary nav, contextual nav, future nav]
79
+
80
+ ## LATCH Analysis
81
+ [which organization scheme for which context]
82
+
83
+ ## Gap Analysis
84
+ - Entities without UI surfaces
85
+ - Screens without clear entity ownership
86
+ - Nav items that don't map to entities or jobs
87
+ ```
88
+
89
+ ## Component Naming Convention
90
+
91
+ UI components should be **named after domain objects**, not generic UI concepts:
92
+ - `DealCard` not `Card`
93
+ - `ScorePills` not `BadgeGroup`
94
+ - `ThesisFilter` not `TabGroup`
95
+
96
+ ## Next Step
97
+
98
+ Feeds into `/interaction-design` (state diagrams, sequence diagrams).
99
+
100
+ ## References
101
+
102
+ - Sophia Prater, OOUX methodology (ooux.com)
103
+ - Peter Morville & Louis Rosenfeld, *Information Architecture for the World Wide Web*
104
+ - Abby Covert, *How to Make Sense of Any Mess*
105
+
106
+ ## Output discipline
107
+
108
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -0,0 +1,112 @@
1
+ ---
2
+ tier: lite
3
+ name: interaction-design
4
+ description: IA + task flows → interaction design — state diagrams, sequence diagrams, user flows. Final step in the UX translation chain.
5
+ problem: "Nav and entities are drawn but the flow between screens is not. Devs invent transitions."
6
+ value: "State diagrams and sequence diagrams that name every screen transition and API call."
7
+ inputs: [IA model plus task flows]
8
+ outputs: [State diagrams, Sequence diagrams, User flow overview]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ ---
12
+
13
+ # Interaction Design — State + Sequence + Flows
14
+
15
+ Translate IA and task flows into formal interaction specifications.
16
+ Final layer: JTBD → HTA → IA → **Interaction Design**.
17
+
18
+ ## When to Use
19
+
20
+ - After `/ia-model` — entity map and screen map exist
21
+ - Before building UI — need to specify states, transitions, edge cases
22
+ - When a flow feels "off" — formalize it to find the gap
23
+ - When handing off to implementation — engineers need state machines, not wireframes
24
+
25
+ ## Method 1: UML State Diagrams
26
+
27
+ **The most rigorous tool.** Each screen or component mode is a state;
28
+ user actions and system events are transitions.
29
+
30
+ Use when:
31
+ - Components with distinct modes (idle → expanded → editing)
32
+ - Pages with conditional rendering (loading → empty → populated → filtered)
33
+ - Async flows (idle → running → success/error)
34
+ - Auth states (anonymous → authenticating → authenticated → expired)
35
+
36
+ ### Edge case checklist
37
+ For every state diagram, ask:
38
+ - What happens if the user **goes back** (browser back button)?
39
+ - What happens if the user **refreshes** in this state?
40
+ - What happens if the **session expires** while in this state?
41
+ - What happens if **data changes** while the user is viewing it?
42
+ - What happens on a **slow connection** (loading states)?
43
+ - What happens on **error** (API fails, DB down)?
44
+
45
+ ## Method 2: UML Sequence Diagrams
46
+
47
+ **Show temporal interaction** between actors: User, UI, Backend, External APIs.
48
+
49
+ Use when:
50
+ - API call chains (auth flows, multi-step wizards)
51
+ - Async job flows (trigger → queue → worker → result)
52
+ - Data display (page load → server component → DB → render)
53
+
54
+ ## Method 3: User Flows
55
+
56
+ **Less formal, more communicative.** Good for stakeholder alignment.
57
+ Flowcharts showing decision points and paths through the UI.
58
+
59
+ ## Method 4: Service Blueprints
60
+
61
+ **Extend user flows to include backstage processes.**
62
+
63
+ ```
64
+ FRONTSTAGE (user sees): Browse → Filter → Detail → Act
65
+ ↕ ↕ ↕
66
+ BACKSTAGE (system does): Score → Index → Enrich → Notify
67
+ ↕ ↕
68
+ SUPPORT PROCESSES: Ingest → Classify → Deduplicate
69
+ ```
70
+
71
+ ## Output Format
72
+
73
+ For each interaction flow:
74
+
75
+ ```markdown
76
+ ## Flow: [name]
77
+
78
+ ### State Diagram
79
+ [Mermaid stateDiagram-v2]
80
+
81
+ ### Sequence Diagram (if async/multi-actor)
82
+ [Mermaid sequenceDiagram]
83
+
84
+ ### Edge Cases
85
+ - Back button: [behavior]
86
+ - Refresh: [behavior]
87
+ - Session expiry: [behavior]
88
+ - Error: [behavior]
89
+ - Slow connection: [behavior]
90
+
91
+ ### Traceability
92
+ | State/Transition | HTA Task | JTBD |
93
+ |-----------------|----------|------|
94
+ | ... | ... | ... |
95
+ ```
96
+
97
+ ## The Anchoring Standard
98
+
99
+ The full stack: **JTBD → HTA → UML State Diagrams → UML Sequence Diagrams**,
100
+ with IA falling out of entity modeling in between.
101
+
102
+ ## References
103
+
104
+ - Alan Cooper, *About Face* — Goal-Directed Design
105
+ - Craig Larman, *Applying UML and Patterns*
106
+ - Don Norman, *The Design of Everyday Things*
107
+ - Jenifer Tidwell, *Designing Interfaces*
108
+ - Jim Kalbach, *The Jobs to Be Done Playbook*
109
+
110
+ ## Output discipline
111
+
112
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -0,0 +1,180 @@
1
+ ---
2
+ tier: lite
3
+ name: interpret-input
4
+ description: "Produce a schema-validated InputArtifact from any input (text/URL/image/repo/transcript/napkin/mixed). text + repo modes work today. Other modes return schema-valid stubs (see #1427). First step of the cameo pipeline. Read-only on disk except --persist mode."
5
+ problem: "Different sessions start with different input shapes \u2014 text or URL or image or repo or transcript."
6
+ value: "One schema-validated artifact from any input. Downstream skills read one shape not seven."
7
+ inputs: [Any input — text or URL or image or repo ref or transcript]
8
+ outputs: [A schema-validated InputArtifact with kind and content]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ modes: [text, url, image, repo, transcript, napkin, mixed]
12
+ ---
13
+
14
+ # /interpret-input — Input Handler Skill
15
+
16
+ First-step skill of the cameo pipeline. It takes operator input (text from phone, URLs, screenshots, repos) and returns schema-valid `InputArtifact` JSON. Downstream skills read it via the typed accessor library.
17
+
18
+ This is the bassclef-side interface for the cameo fanout pipeline. Every input type maps to the same downstream payload.
19
+
20
+ ## When to invoke
21
+
22
+ - Composer chain — `/stage <tier> "<input>"` calls this first. Operators rarely run it directly.
23
+ - Manual fixture — `/interpret-input "<text>" --persist --slug=<custom>` saves a reference InputArtifact for tests.
24
+ - Spot-check — see what the extractor returns for a given input before running the full chain.
25
+
26
+ ## What this skill is NOT
27
+
28
+ <!-- FKGL-EXEMPT: technical reference table -->
29
+ | Skill | Altitude | Output |
30
+ |-------|----------|--------|
31
+ | `/interpret-input` | **Input normalization** | Schema-validated InputArtifact JSON |
32
+ | `/objectory-decompose` | OOA/D extraction | BCE matrix + actor list (consumes InputArtifact) |
33
+ | `/stage` | Pipeline composer | End-to-end chain (dispatches /interpret-input) |
34
+ | `/state get reference input-artifact <slug>` | Inspection | Reads existing InputArtifact via accessor |
35
+ <!-- /FKGL-EXEMPT -->
36
+
37
+ ## Procedure
38
+
39
+ The skill dispatches `scripts/interpret-input.sh <source> [args]`. It writes JSON to stdout, or persists to `docs/input-artifacts/<slug>.json` with `--persist`.
40
+
41
+ ### Usage
42
+
43
+ <!-- FKGL-EXEMPT: CLI reference -->
44
+ ```bash
45
+ bash scripts/interpret-input.sh "<source>" [--type=auto|text|url|image|repo|transcript|napkin|mixed] [--persist] [--slug=<slug>]
46
+ ```
47
+
48
+ | Flag | Default | Meaning |
49
+ |---|---|---|
50
+ | `--type=<type>` | `auto` | Override auto-detection |
51
+ | `--persist` | off | Write to `docs/input-artifacts/<slug>.json` (validated by state-validate.sh) |
52
+ | `--slug=<slug>` | auto-generated | Override slug; useful for memorable fixtures |
53
+ <!-- /FKGL-EXEMPT -->
54
+
55
+ ### Examples
56
+
57
+ <!-- FKGL-EXEMPT: CLI examples -->
58
+ ```bash
59
+ # Text from mobile paragraph (auto-detected as text):
60
+ bash scripts/interpret-input.sh "Dramatically simplify and delightfully surface deals..." --persist --slug=2026-04-27-your-app-rework
61
+
62
+ # URL (auto-detected):
63
+ bash scripts/interpret-input.sh "https://example.com/spec.html"
64
+
65
+ # Local repo (auto-detected via .git/ presence):
66
+ bash scripts/interpret-input.sh /path/to/local/repo
67
+
68
+ # GitHub URL as repo (must override; URL prefix wins auto-detect):
69
+ bash scripts/interpret-input.sh https://github.com/your-org/your-app --type=repo
70
+
71
+ # Stub mode for image (image extraction not yet implemented):
72
+ bash scripts/interpret-input.sh "/path/to/screenshot.png" --type=image
73
+
74
+ # Force transcript mode (auto-detection cannot tell):
75
+ bash scripts/interpret-input.sh "speaker-tagged-prose..." --type=transcript
76
+ ```
77
+ <!-- /FKGL-EXEMPT -->
78
+
79
+ ### Auto-detection
80
+
81
+ With `--type=auto` (default), the wrapper inspects the source:
82
+
83
+ <!-- FKGL-EXEMPT: regex reference list -->
84
+ - `^https?://` → `url` (use `--type=repo` for github.com URLs you want walked as a repo)
85
+ - `\.(png|jpg|jpeg|gif|webp|svg)$` → `image`
86
+ - `\.git$` → `repo`
87
+ - Local directory containing `.git/` → `repo` (walks the repo)
88
+ - else → `text`
89
+ <!-- /FKGL-EXEMPT -->
90
+
91
+ Override auto-detection when it guesses wrong. Common cases: a transcript that looks like prose. A napkin the wrapper reads as a regular image. A github URL you want walked as a repo, not fetched as a page.
92
+
93
+ ### Intent paragraph (optional)
94
+
95
+ If the source carries an intent, put it on the InputArtifact `intent` field. Plain text. Downstream composers (`/launch`, `/stage`, `/riff-prototypes`) call `/pick-luminaries` to match the intent against the luminary catalog. Adopters who load `/extract-intent` via `additionalDirectories` get richer signal. Bassclef core stays unaware of that override.
96
+
97
+ ### Output
98
+
99
+ Without `--persist` (default): pretty-printed JSON to stdout. Exit 0 on success.
100
+
101
+ With `--persist`: JSON written to `docs/input-artifacts/<slug>.json`. Stdout prints the path. The state-validate.sh PreToolUse hook checks the file against `standards/state-spine/schemas/input-artifact.schema.json` on write.
102
+
103
+ ## Mode status
104
+
105
+ Two modes work today. Five return schema-valid stubs pending #1427.
106
+
107
+ <!-- FKGL-EXEMPT: mode reference table -->
108
+ | Mode | Status | Behavior |
109
+ |---|---|---|
110
+ | `text` | works | Identity — `extracted_text = source`; URL regex for `external_urls` |
111
+ | `repo` | works | Walks local git dir or clones URL; populates `entities_seen`, `actor_candidates`, `boundary_objects`, `readme_excerpt`, `title`. Falls back to a stub if the path cannot be resolved. |
112
+ | `url` | not yet | Target — fetch + readable text scrape (see #1427) |
113
+ | `image` | not yet | Target — vision-based UI extraction (see #1427) |
114
+ | `transcript` | not yet | Target — speaker-tagged actor mapping (see #1427) |
115
+ | `napkin` | not yet | Target — hand-drawn diagram extraction (see #1427) |
116
+ | `mixed` | not yet | Target — compose multiple extractors (see #1427) |
117
+ <!-- /FKGL-EXEMPT -->
118
+
119
+ Stubs are still schema-valid InputArtifacts. The current stub value is `extracted_text: "deferred to Phase C"` — a legacy marker string that #1427 will update. Downstream consumers should not crash on it. They may surface a warning that BCE extraction will be empty.
120
+
121
+ ### Repo extractor heuristics
122
+
123
+ The repo extractor walks the directory. It populates `structural_hints`:
124
+
125
+ <!-- FKGL-EXEMPT: extractor field reference -->
126
+ - **`title`**: first H1 in README, or repo dirname
127
+ - **`readme_excerpt`**: first 30 lines of README.md (or .MD/.rst/.txt)
128
+ - **`entities_seen`**: Prisma model names + directory-pattern heuristic (a directory with ≥3 children whose name is plural-ish — e.g. `skills/` → `skill`, `discoveries/` → `discovery`, `canvases/` → `canvas`)
129
+ - **`actor_candidates`**: role/auth keywords grep across source (admin, owner, operator, viewer, editor, member, customer, etc.)
130
+ - **`boundary_objects`**: Next.js routes (`app/**/page.{ts,tsx}` and `pages/**/*.{ts,tsx}`) + API endpoints (`app/api/**`, `pages/api/**`)
131
+ <!-- /FKGL-EXEMPT -->
132
+
133
+ Output ships even when extraction is partial. Empty arrays mean no signal found. Downstream agents decide whether partial is enough.
134
+
135
+ ### Repo extractor: source resolution
136
+
137
+ <!-- FKGL-EXEMPT: source resolution table -->
138
+ | Source | Resolution |
139
+ |---|---|
140
+ | Local directory containing `.git/` | Use directly |
141
+ | `<path>` passed with `--type=repo` and exists | Use directly |
142
+ | `https://github.com/...` URL with `--type=repo` | `git clone --depth=1` to temp dir; cleanup after |
143
+ | Source cannot be resolved (path missing, clone failed) | Returns a stub artifact |
144
+ <!-- /FKGL-EXEMPT -->
145
+
146
+ ## Rules
147
+
148
+ - **Read-only by default** (no `--persist`); side effect is opt-in.
149
+ - **Schema validation is the gate** — `--persist` writes go through state-validate.sh. Invalid InputArtifacts BLOCK the write.
150
+ - **No raw input in downstream skills** — `/objectory-decompose` MUST receive a path to an InputArtifact, not raw text.
151
+ - **Slug uniqueness** — operator slugs override auto-generated. Do not overwrite existing fixtures. The wrapper errors if `--persist` would overwrite.
152
+ - **Stub artifacts are valid** — downstream must handle the marker string (`extracted_text == "deferred to Phase C"`) as empty extraction + a warning.
153
+
154
+ ## Skipping / Aborting
155
+
156
+ - Empty source: exit 2.
157
+ - Unknown type: exit 2 (not in the type enum).
158
+ - Schema validation failure on `--persist`: state-validate.sh BLOCKs. Surface to operator.
159
+ - Existing slug + `--persist` would overwrite: exit 4. Operator must pass `--slug=<new>`.
160
+
161
+ ## Relationship to other skills + standards
162
+
163
+ - `standards/input-handler-interface.md` — the interface contract this skill implements.
164
+ - `standards/state-spine/schemas/input-artifact.schema.json` — the schema this skill produces.
165
+ - `standards/state-spine.md` §"Storage format" — InputArtifact is a pure-JSON entity (`Shape C`).
166
+ - `.claude/skills/objectory-decompose/SKILL.md` — primary downstream consumer.
167
+ - `.claude/skills/preview/SKILL.md` — composer that calls this first.
168
+ - `.claude/skills/state/SKILL.md` — `/state get reference input-artifact <slug>` reads back via accessor.
169
+
170
+ ## Reserved-names check
171
+
172
+ `interpret-input` is NOT on `standards/reserved-skill-names.md` list.
173
+
174
+ ## Enforcement
175
+
176
+ Methodology-level. The skill registers via bassclef-sync symlink. state-validate.sh enforces schema on `--persist` writes.
177
+
178
+ ## Output discipline
179
+
180
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.