impulso 0.19.1

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 (85) hide show
  1. package/README.md +425 -0
  2. package/agents/ImpulsoOrchestrator.md +112 -0
  3. package/agents/debugger.md +38 -0
  4. package/agents/generalist.md +26 -0
  5. package/agents/implementer-frontend.md +41 -0
  6. package/agents/implementer-infra.md +41 -0
  7. package/agents/implementer.md +35 -0
  8. package/agents/planner.md +52 -0
  9. package/agents/reviewer.md +40 -0
  10. package/agents/scout-writer.md +24 -0
  11. package/agents/scout.md +22 -0
  12. package/agents/shipper.md +64 -0
  13. package/commands/impulso-address-pr-comments.md +162 -0
  14. package/commands/impulso-brainstorm.md +54 -0
  15. package/commands/impulso-context-pack.md +55 -0
  16. package/commands/impulso-debug.md +50 -0
  17. package/commands/impulso-directspeech-compress.md +137 -0
  18. package/commands/impulso-directspeech-help.md +33 -0
  19. package/commands/impulso-directspeech-stats.md +16 -0
  20. package/commands/impulso-implement.md +86 -0
  21. package/commands/impulso-plan.md +92 -0
  22. package/commands/impulso-ship.md +46 -0
  23. package/commands/impulso-spec.md +106 -0
  24. package/commands/impulso-verify.md +99 -0
  25. package/commands/plannotator-annotate.md +47 -0
  26. package/commands/plannotator-last.md +45 -0
  27. package/commands/plannotator-review.md +46 -0
  28. package/harnesses/claude/README.md +109 -0
  29. package/harnesses/claude/hooks/bash-state-guard.cjs +84 -0
  30. package/harnesses/claude/hooks/directspeech-context.cjs +29 -0
  31. package/harnesses/claude/hooks/path-guard.cjs +106 -0
  32. package/harnesses/claude/hooks/preflight.cjs +39 -0
  33. package/harnesses/claude/hooks/pretooluse-bash.cjs +69 -0
  34. package/harnesses/claude/hooks/rtk.cjs +87 -0
  35. package/harnesses/claude/hooks/subagent-start.cjs +83 -0
  36. package/harnesses/claude/hooks/task-exit.cjs +189 -0
  37. package/harnesses/claude/hooks/tdd-observer.cjs +118 -0
  38. package/harnesses/claude/hooks/tokensave-stale.cjs +63 -0
  39. package/harnesses/claude/hooks/userpromptsubmit.cjs +42 -0
  40. package/harnesses/claude/install.sh +120 -0
  41. package/harnesses/claude/merge-settings.cjs +71 -0
  42. package/harnesses/claude/uninstall.sh +89 -0
  43. package/harnesses/opencode/bin/darwin-amd64/impulso-hub +0 -0
  44. package/harnesses/opencode/bin/darwin-arm64/impulso-hub +0 -0
  45. package/harnesses/opencode/bin/impulso-hub +0 -0
  46. package/harnesses/opencode/bin/linux-amd64/impulso-hub +0 -0
  47. package/harnesses/opencode/bin/linux-arm64/impulso-hub +0 -0
  48. package/harnesses/opencode/commands-loader.js +101 -0
  49. package/harnesses/opencode/compose.js +111 -0
  50. package/harnesses/opencode/directspeech/README.md +43 -0
  51. package/harnesses/opencode/directspeech/plugin.js +47 -0
  52. package/harnesses/opencode/frontmatter.js +60 -0
  53. package/harnesses/opencode/install.sh +121 -0
  54. package/harnesses/opencode/orchestration/index.js +362 -0
  55. package/harnesses/opencode/plugin.js +84 -0
  56. package/harnesses/opencode/rtk/README.md +100 -0
  57. package/harnesses/opencode/rtk/rtk.ts +41 -0
  58. package/harnesses/opencode/session-name/plugin.js +27 -0
  59. package/harnesses/opencode/sync-commands.js +98 -0
  60. package/harnesses/opencode/uninstall.sh +36 -0
  61. package/opencode/opencode.jsonc +35 -0
  62. package/package.json +95 -0
  63. package/scripts/bump-plugin-version.cjs +28 -0
  64. package/scripts/install-hub.js +78 -0
  65. package/scripts/sync-agents.cjs +167 -0
  66. package/shared/directspeech-config.cjs +18 -0
  67. package/shared/orchestration-config.cjs +281 -0
  68. package/shared/orchestration-data.json +48 -0
  69. package/shared/state-guard.cjs +56 -0
  70. package/shared/tokensave-freshness.cjs +62 -0
  71. package/skills/impulso-address-pr-comments/SKILL.md +159 -0
  72. package/skills/impulso-brainstorm/SKILL.md +51 -0
  73. package/skills/impulso-context-pack/SKILL.md +52 -0
  74. package/skills/impulso-debug/SKILL.md +47 -0
  75. package/skills/impulso-directspeech-compress/SKILL.md +134 -0
  76. package/skills/impulso-directspeech-help/SKILL.md +30 -0
  77. package/skills/impulso-directspeech-stats/SKILL.md +13 -0
  78. package/skills/impulso-implement/SKILL.md +83 -0
  79. package/skills/impulso-plan/SKILL.md +89 -0
  80. package/skills/impulso-ship/SKILL.md +43 -0
  81. package/skills/impulso-spec/SKILL.md +103 -0
  82. package/skills/impulso-verify/SKILL.md +96 -0
  83. package/skills/plannotator-annotate/SKILL.md +45 -0
  84. package/skills/plannotator-last/SKILL.md +43 -0
  85. package/skills/plannotator-review/SKILL.md +44 -0
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: impulso-context-pack
3
+ description: >
4
+ Invoke at task start to build shared codebase context for the current slug.
5
+ Dispatches scout-writer to explore and write .impulso/work/<slug>/context.md
6
+ (facts + path:line refs). Idempotent — skips if file exists. Advisory opt-in.
7
+ ---
8
+
9
+ # Impulso Context Pack
10
+
11
+ Build shared codebase context for the active workspace slug. One-time write;
12
+ downstream agents read `context.md` instead of re-exploring.
13
+
14
+ ## MUST
15
+
16
+ 1. Resolve slug + workspace:
17
+
18
+ ```bash
19
+ SLUG=$(impulso-hub status --json | grep '"slug"' | cut -d'"' -f4)
20
+ WORKSPACE="$PWD/.impulso/work/$SLUG"
21
+ CONTEXT_PATH="$WORKSPACE/context.md"
22
+ ```
23
+
24
+ 2. Check idempotency — if `$CONTEXT_PATH` already exists, report path and stop:
25
+
26
+ ```bash
27
+ test -f "$CONTEXT_PATH" && echo "context.md exists: $CONTEXT_PATH" && exit 0
28
+ ```
29
+
30
+ 3. Dispatch `scout-writer` (NOT `scout`) with this instruction:
31
+
32
+ - Read `$WORKSPACE/spec.md` and `$WORKSPACE/brainstorm.md` (whichever exists)
33
+ to understand the slug's scope.
34
+ - Explore the codebase for files, symbols, and constraints relevant to that
35
+ scope.
36
+ - Write `$CONTEXT_PATH` in this schema — facts only, `path:line` refs, no
37
+ recommendations:
38
+
39
+ ```
40
+ # Context — <slug>
41
+ scope: <one line from spec/brainstorm>
42
+ ## Relevant files
43
+ - path:line — fact
44
+ ## Constraints
45
+ - <AGENTS.md / spec constraint that bounds implementation>
46
+ ```
47
+
48
+ scout-writer's write guard allows `.impulso/` writes and denies source-tree
49
+ writes — no extra scoping needed.
50
+
51
+ 4. Report `$CONTEXT_PATH` + one-line fact count (number of `- path:line` entries
52
+ in `## Relevant files`).
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: impulso-debug
3
+ description: >
4
+ Standalone debug protocol: establish repro, generate hypotheses, confirm root
5
+ cause, write regression test, apply fix. No pipeline workspace required.
6
+ ---
7
+
8
+ # Impulso Debug
9
+
10
+ Standalone debugger protocol. No workspace phases. Repro-first investigation.
11
+
12
+ ## MUST
13
+
14
+ 1. **Repro gate** — do not proceed without a confirmed reproduction:
15
+
16
+ - Collect: symptom, environment, steps to reproduce, expected vs actual.
17
+ - Run repro. Can't reproduce → say so, stop.
18
+ - Confirm: "Reproduced: \<exact failure\>."
19
+
20
+ 2. **Hypotheses** — generate ≥3 plausible root causes ranked by probability. For
21
+ each: evidence for/against, cheapest falsification test.
22
+
23
+ 3. **Confirm root cause** — run cheapest falsification tests. Eliminate until
24
+ one confirmed. State: "Root cause: \<description\>."
25
+
26
+ 4. **Regression test** — write failing test capturing exact bug before fixing.
27
+ Run via:
28
+
29
+ ```bash
30
+ impulso-hub run-test
31
+ ```
32
+
33
+ Confirm red (non-zero exit). No workspace → run test suite directly.
34
+
35
+ 5. **Fix** — minimal change to pass regression test. No unrelated edits.
36
+
37
+ 6. **Confirm green** — run tests. Confirm all pass.
38
+
39
+ 7. **Report** — ≤15-line status block:
40
+
41
+ ```
42
+ STATUS: DONE|DONE_WITH_CONCERNS|BLOCKED
43
+ root-cause: <one sentence>
44
+ fix: <file:line — what changed>
45
+ regression-test: <file:line>
46
+ concerns: <none|description>
47
+ ```
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: impulso-directspeech-compress
3
+ description: >
4
+ Compress natural language memory files (CLAUDE.md, todos, preferences) into
5
+ Impulso-DirectSpeech format to save input tokens. Preserves all technical
6
+ substance, code, URLs, and structure. Compressed version overwrites the
7
+ original file. Human-readable backup saved as FILE.original.md. Trigger:
8
+ /impulso-directspeech-compress FILEPATH or "compress memory file"
9
+ ---
10
+
11
+ # Impulso-DirectSpeech Compress
12
+
13
+ ## Purpose
14
+
15
+ Compress natural language files into terse DirectSpeech to reduce input tokens.
16
+ Overwrites original. Backup: `<filename>.original.md`.
17
+
18
+ ## Trigger
19
+
20
+ `/impulso-directspeech-compress <filepath>` or when user asks to compress a
21
+ memory file.
22
+
23
+ ## Process
24
+
25
+ 1. Scripts in `scripts/` adjacent to this SKILL.md. If not found, search for
26
+ `scripts/__main__.py`.
27
+
28
+ 2. From the directory containing this SKILL.md, run:
29
+
30
+ python3 -m scripts <absolute_filepath>
31
+
32
+ 3. CLI will:
33
+
34
+ - detect file type
35
+ - call Claude to compress
36
+ - validate output
37
+ - errors: cherry-pick fix (targeted, no recompression), retry ≤2 times
38
+ - still failing after 2 retries: report error, leave original untouched
39
+
40
+ 4. Return result to user
41
+
42
+ ## Compression Rules
43
+
44
+ ### Remove
45
+
46
+ - Articles: a, an, the
47
+ - Filler: just, really, basically, actually, simply, essentially, generally
48
+ - Pleasantries: "sure", "certainly", "of course", "happy to", "I'd recommend"
49
+ - Hedging: "it might be worth", "you could consider", "it would be good to"
50
+ - Redundant phrasing: "in order to" → "to", "make sure to" → "ensure", "the
51
+ reason is because" → "because"
52
+ - Connective fluff: "however", "furthermore", "additionally", "in addition"
53
+
54
+ ### Preserve EXACTLY (never modify)
55
+
56
+ - Code blocks (fenced ``` and indented)
57
+ - Inline code (`backtick content`)
58
+ - URLs and links (full URLs, markdown links)
59
+ - File paths (`/src/components/...`, `./config.yaml`)
60
+ - Commands (`npm install`, `git commit`, `docker build`)
61
+ - Technical terms (library names, API names, protocols, algorithms)
62
+ - Proper nouns (project names, people, companies)
63
+ - Dates, version numbers, numeric values
64
+ - Environment variables (`$HOME`, `NODE_ENV`)
65
+
66
+ ### Preserve Structure
67
+
68
+ - All markdown headings (keep exact heading text, compress body below)
69
+ - Bullet point hierarchy (keep nesting level)
70
+ - Numbered lists (keep numbering)
71
+ - Tables (compress cell text, keep structure)
72
+ - Frontmatter/YAML headers in markdown files
73
+
74
+ ### Compress
75
+
76
+ - Use short synonyms: "big" not "extensive", "fix" not "implement a solution
77
+ for", "use" not "utilize"
78
+ - Fragments OK: "Run tests before commit" not "You should always run tests
79
+ before committing"
80
+ - Drop "you should", "make sure to", "remember to" — just state the action
81
+ - Merge redundant bullets that say the same thing differently
82
+ - Keep one example where multiple examples show the same pattern
83
+
84
+ CRITICAL RULE: Anything inside `...` must be copied EXACTLY. Do not:
85
+
86
+ - remove comments
87
+ - remove spacing
88
+ - reorder lines
89
+ - shorten commands
90
+ - simplify anything
91
+
92
+ Inline code (`...`) must be preserved EXACTLY. Do not modify anything inside
93
+ backticks.
94
+
95
+ If file contains code blocks:
96
+
97
+ - Treat code blocks as read-only regions
98
+ - Only compress text outside them
99
+ - Do not merge sections around code
100
+
101
+ ## Pattern
102
+
103
+ Original:
104
+
105
+ > You should always make sure to run the test suite before pushing any changes
106
+ > to the main branch. This is important because it helps catch bugs early and
107
+ > prevents broken builds from being deployed to production.
108
+
109
+ Compressed:
110
+
111
+ > Run tests before push to main. Catch bugs early, prevent broken prod deploys.
112
+
113
+ Original:
114
+
115
+ > The application uses a microservices architecture with the following
116
+ > components. The API gateway handles all incoming requests and routes them to
117
+ > the appropriate service. The authentication service is responsible for
118
+ > managing user sessions and JWT tokens.
119
+
120
+ Compressed:
121
+
122
+ > Microservices architecture. API gateway route all requests to services. Auth
123
+ > service manage user sessions + JWT tokens.
124
+
125
+ ## Boundaries
126
+
127
+ - ONLY compress natural language files (.md, .txt, .typ, .typst, .tex,
128
+ extensionless)
129
+ - NEVER modify: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css,
130
+ .html, .xml, .sql, .sh
131
+ - Mixed content (prose + code): compress prose sections only
132
+ - Unsure if code or prose → leave unchanged
133
+ - Backed up as FILE.original.md before overwriting
134
+ - Never compress FILE.original.md (skip it)
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: impulso-directspeech-help
3
+ description: >
4
+ Quick-reference card for Impulso-DirectSpeech skills and commands. One-shot
5
+ display, not a persistent mode. Trigger: /impulso-directspeech-help, "impulso
6
+ help", "what impulso commands".
7
+ ---
8
+
9
+ # Impulso-DirectSpeech Help
10
+
11
+ Display reference card when invoked. One-shot — do NOT persist. Output in
12
+ Impulso style.
13
+
14
+ ## Mode
15
+
16
+ Always active — harness-enforced, every turn. No activation, no off-switch.
17
+ Auto-Clarity drops terseness for security warnings + irreversible actions;
18
+ code/commits/PRs always normal.
19
+
20
+ ## Skills
21
+
22
+ | Skill | Trigger | What it do |
23
+ | --------------------------------- | --------------------------------------- | ----------------------------------------------------------- |
24
+ | **impulso-directspeech-compress** | `/impulso-directspeech-compress <file>` | Compress .md files to terse prose. Saves ~46% input tokens. |
25
+ | **impulso-directspeech-stats** | `/impulso-directspeech-stats` | Lifetime token-savings stats. |
26
+
27
+ ## Language
28
+
29
+ Keep user's language. Portuguese input → Portuguese DirectSpeech. Compress
30
+ style, not language.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: impulso-directspeech-stats
3
+ description: >
4
+ Show real token usage and estimated savings for the current session. Reads
5
+ from the session log — no AI estimation. Triggers on
6
+ /impulso-directspeech-stats.
7
+ ---
8
+
9
+ # Impulso-DirectSpeech Stats
10
+
11
+ On `/impulso-directspeech-stats`: output token savings in short table — total
12
+ saved, sessions, avg compression ratio. No session log → note stats tracking not
13
+ yet integrated.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: impulso-implement
3
+ description: >
4
+ Invoke when the pipeline enters the implement phase: loop every plan task in
5
+ order, dispatch the right implementer variant per brief, run per-task review,
6
+ and advance when all tasks are done.
7
+ ---
8
+
9
+ # Impulso Implement
10
+
11
+ Deterministic state/precondition validation and status `--json` schema v1 are
12
+ owned by `impulso-hub`; this skill retains human interview, dispatch, and
13
+ remediation policy.
14
+
15
+ Implement phase: sequential task loop (start → brief → dispatch → review) →
16
+ advance.
17
+
18
+ ## MUST
19
+
20
+ 1. Run `impulso-hub status --json`. Confirm `phase === "implement"`. Exit 2 =
21
+ read stderr, fix, retry.
22
+
23
+ 2. Extract workspace and task list:
24
+
25
+ ```bash
26
+ WORKSPACE=$(impulso-hub workspace-path)
27
+ TASK_IDS=$(impulso-hub task-ids)
28
+ ```
29
+
30
+ 3. For each task N in order (sequential — never parallel implementers):
31
+
32
+ a. Skip if `impulso-hub status --json` shows task N already
33
+ `"status":"done"`.
34
+
35
+ b. Run:
36
+
37
+ ```bash
38
+ impulso-hub task start <N>
39
+ BRIEF_PATH=$(impulso-hub brief <N>)
40
+ REPORT_PATH=$(impulso-hub workspace-path --report <N>)
41
+ ```
42
+
43
+ c. Get the agent variant from the brief and resolve:
44
+
45
+ ```bash
46
+ VARIANT=$(grep '^variant:' "$BRIEF_PATH" | awk '{print $2}')
47
+ AGENT=$(impulso-hub resolve-agent "$VARIANT")
48
+ MODEL=$(impulso-hub models --agent "$AGENT")
49
+ ```
50
+
51
+ d. Dispatch implementer (model: `$MODEL`):
52
+
53
+ - Brief path: `$BRIEF_PATH`
54
+ - Report path: `$REPORT_PATH`
55
+ - Instruction: "Read brief. Write report to report path. Return ≤15-line
56
+ status block with STATUS, commits, tests, concerns."
57
+ - On NEEDS_CONTEXT: surface to user, re-dispatch.
58
+ - On BLOCKED: assess, handle.
59
+
60
+ e. Loop: run `impulso-hub task done <N>`. On exit 2 → relay stderr back to
61
+ same implementer as a fix instruction, re-run until gate passes or BLOCKED.
62
+
63
+ f. Generate review package:
64
+
65
+ ```bash
66
+ START_SHA=$(impulso-hub status --field currentTask && impulso-hub status --json | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); process.stdout.write(d.tasks['<N>'].startSha)")
67
+ DIFF_PATH=$(impulso-hub review-package "$START_SHA" HEAD)
68
+ REVIEWER_MODEL=$(impulso-hub models --agent reviewer)
69
+ ```
70
+
71
+ g. Dispatch reviewer (model: `$REVIEWER_MODEL`):
72
+
73
+ - Brief path: `$BRIEF_PATH`
74
+ - Report path: `$REPORT_PATH`
75
+ - Diff path: `$DIFF_PATH`
76
+ - Instruction: "Review the diff. Return ≤15-line verdict."
77
+ - Critical/Important findings: dispatch implementer once, re-dispatch
78
+ reviewer. One fix cycle only.
79
+
80
+ h. Proceed to task N+1.
81
+
82
+ 4. After all tasks complete, run `impulso-hub advance`. Exit 2 = read stderr,
83
+ fix, retry.
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: impulso-plan
3
+ description: >
4
+ Invoke when the pipeline enters the plan phase: dispatch planner to draft
5
+ plan.md, run the plannotator-annotate gate, apply feedback, record the marker,
6
+ and advance.
7
+ ---
8
+
9
+ # Impulso Plan
10
+
11
+ Deterministic state/precondition validation and status `--json` schema v1 are
12
+ owned by `impulso-hub`; this skill retains human interview, dispatch, and
13
+ remediation policy.
14
+
15
+ Plan phase: planner drafts plan.md → plannotator annotate gate → record →
16
+ advance.
17
+
18
+ ## Plan task format (planner must follow exactly)
19
+
20
+ ```
21
+ ## Task N: <title>
22
+ variant: default|frontend|infra
23
+ model-hint: <haiku|sonnet|opus>
24
+ parallel-safe: yes|no
25
+
26
+ - [ ] write failing test for <behavior> — verify FAIL
27
+ - [ ] minimal implementation — verify PASS
28
+
29
+ Interfaces: <exact signatures>
30
+ ```
31
+
32
+ `tdd: false — <justification>` allowed only when no testable surface exists.
33
+
34
+ ## MUST
35
+
36
+ 1. Run `impulso-hub status --json`. Confirm `phase === "plan"`. Exit 2 = read
37
+ stderr, fix, retry if solvable; surface to user if not.
38
+
39
+ 2. Get planner model and workspace paths:
40
+
41
+ ```bash
42
+ MODEL=$(impulso-hub models --agent planner)
43
+ PLAN_PATH=$(impulso-hub workspace-path --plan)
44
+ WORKSPACE=$(impulso-hub workspace-path)
45
+ SPEC_PATH=$(impulso-hub workspace-path --spec)
46
+ ```
47
+
48
+ 3. Dispatch planner (model: `$MODEL`):
49
+
50
+ - Context paths: `$WORKSPACE/brainstorm.md`, `$SPEC_PATH`
51
+ - Output path: `$PLAN_PATH`
52
+ - Instruction: "Read brainstorm.md and spec.md. Draft plan.md at the output
53
+ path using the exact task format above. Return ≤15-line status block."
54
+ - On NEEDS_CONTEXT: surface to user, gather, re-dispatch.
55
+ - On BLOCKED: surface to user. Do not guess.
56
+
57
+ 4. Launch plannotator on the plan:
58
+
59
+ ```bash
60
+ impulso-hub plannotator launch annotate "$PLAN_PATH"
61
+ ```
62
+
63
+ 5. **IMMEDIATELY relay URL:** "Open Plannotator at \<URL\> (remote: \<Remote\>).
64
+ Annotate plan.md, then tell me when done." WAIT for user.
65
+
66
+ Launch timeout (exit 2) → STOP. Check stderr, ask whether to retry.
67
+
68
+ 6. After user confirms:
69
+
70
+ ```bash
71
+ impulso-hub plannotator wait
72
+ ```
73
+
74
+ 7. `annotated` → re-dispatch planner (model: `$MODEL`) with:
75
+
76
+ - Annotation text and plan.md path: `$PLAN_PATH`
77
+ - Instruction: "Apply these annotations to plan.md. Maintain task format
78
+ contract. Overwrite in place. Return ≤15-line status block."
79
+ - On NEEDS_CONTEXT: surface to user, gather, re-dispatch.
80
+
81
+ 8. Run:
82
+
83
+ ```bash
84
+ impulso-hub record-plannotator plan.md
85
+ ```
86
+
87
+ WARNING: editing plan.md after recording invalidates marker.
88
+
89
+ 9. Run `impulso-hub advance`. Exit 2 = read stderr, satisfy precondition, retry.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: impulso-ship
3
+ description: >
4
+ Invoke when the pipeline enters the ship phase: dispatch shipper to create the
5
+ PR, confirm the PR URL is recorded, and advance to complete the pipeline.
6
+ ---
7
+
8
+ # Impulso Ship
9
+
10
+ Deterministic state/precondition validation and status `--json` schema v1 are
11
+ owned by `impulso-hub`; this skill retains human interview, dispatch, and
12
+ remediation policy.
13
+
14
+ Ship phase: dispatch shipper → record PR → advance.
15
+
16
+ ## MUST
17
+
18
+ 1. Run `impulso-hub status --json`. Confirm `phase === "ship"`. Exit 2 = read
19
+ stderr, fix, retry.
20
+
21
+ 2. Get workspace paths and shipper model:
22
+
23
+ ```bash
24
+ SLUG=$(impulso-hub status --field slug)
25
+ WORKSPACE=$(impulso-hub workspace-path)
26
+ MODEL=$(impulso-hub models --agent shipper)
27
+ ```
28
+
29
+ 3. Dispatch shipper (model: `$MODEL`):
30
+
31
+ - Spec path: `$WORKSPACE/spec.md`
32
+ - Plan path: `$WORKSPACE/plan.md`
33
+ - Instruction: "Read spec.md and plan.md. Commit staged changes (conventional
34
+ format), push branch, open PR. Run `impulso-hub record-pr <url>` with the
35
+ resulting PR URL. Watch CI via
36
+ `impulso-hub ci-watch <url> [--timeout 600]`. Return ≤15-line status
37
+ block."
38
+ - On NEEDS_CONTEXT: surface to user, re-dispatch.
39
+ - On BLOCKED: surface to user. Do not guess.
40
+
41
+ 4. Confirm PR recorded: check `impulso-hub status --json | grep pr.url`.
42
+
43
+ 5. Run `impulso-hub advance`. Exit 2 = read stderr, satisfy precondition, retry.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: impulso-spec
3
+ description: >
4
+ Invoke when the pipeline enters the spec phase: dispatch planner to draft
5
+ spec.md, impulso-hub spec-review-mode determines route (confirm vs
6
+ plannotator), execute gate action, advance.
7
+ ---
8
+
9
+ # Impulso Spec
10
+
11
+ Deterministic state/precondition validation and status `--json` schema v1 are
12
+ owned by `impulso-hub`; this skill retains human interview, dispatch, and
13
+ remediation policy.
14
+
15
+ Spec phase: planner drafts spec.md → impulso-hub spec-review-mode determines
16
+ route (confirm vs plannotator) → execute the gate-specified action → advance.
17
+
18
+ ## MUST
19
+
20
+ 1. Run `impulso-hub status --json`. Confirm `phase === "spec"`. Exit 2 = read
21
+ stderr, fix, retry.
22
+
23
+ 2. Get planner model and spec path:
24
+
25
+ ```bash
26
+ MODEL=$(impulso-hub models --agent planner)
27
+ SPEC_PATH=$(impulso-hub workspace-path --spec)
28
+ WORKSPACE=$(impulso-hub workspace-path)
29
+ ```
30
+
31
+ 3. Dispatch planner (model: `$MODEL`):
32
+
33
+ - Context path: `$WORKSPACE/brainstorm.md`
34
+ - Output path: `$SPEC_PATH`
35
+ - Instruction: "Read brainstorm.md. Draft spec.md at the output path. Return
36
+ ≤15-line status block."
37
+ - On NEEDS_CONTEXT: surface to user, gather, re-dispatch.
38
+ - On BLOCKED: surface to user. Do not guess.
39
+
40
+ 4. Get review mode from gate:
41
+
42
+ ```bash
43
+ impulso-hub spec-review-mode
44
+ ```
45
+
46
+ Parse `mode:` and `lines:` from output.
47
+
48
+ ## Route A: mode=confirm — chat confirmation only
49
+
50
+ 5a. Present spec.md to user in chat. Ask: "Confirm this spec is correct?" On
51
+ confirmation:
52
+
53
+ ```bash
54
+ impulso-hub record-spec-confirmation
55
+ impulso-hub advance
56
+ ```
57
+
58
+ Done. No Plannotator session.
59
+
60
+ ## Route B: mode=plannotator — Plannotator annotate flow
61
+
62
+ 5b. Launch plannotator on the spec:
63
+
64
+ ```bash
65
+ impulso-hub plannotator launch annotate "$SPEC_PATH"
66
+ ```
67
+
68
+ Returns JSON with `url` and `remoteUrl`.
69
+
70
+ 6b. **IMMEDIATELY relay URL:** "Open Plannotator at \<URL\> (remote:
71
+ \<Remote\>). Annotate spec.md, then tell me when done." WAIT for user.
72
+
73
+ Launch timeout (exit 2) → STOP. Check stderr, ask whether to retry.
74
+
75
+ 7b. After user confirms:
76
+
77
+ ```bash
78
+ impulso-hub plannotator wait
79
+ ```
80
+
81
+ Returns `{"decision":"approved"|"dismissed"|"annotated","feedback":"..."}`.
82
+
83
+ 8b. `annotated` → re-dispatch planner with feedback:
84
+
85
+ - Annotation feedback text
86
+ - spec.md path: `$SPEC_PATH`
87
+ - Instruction: "Apply these annotations to spec.md. Overwrite in place.
88
+ Return ≤15-line status block."
89
+ - On NEEDS_CONTEXT: surface to user, gather, re-dispatch.
90
+
91
+ 9b. Run:
92
+
93
+ ```bash
94
+ impulso-hub record-plannotator spec.md
95
+ ```
96
+
97
+ WARNING: editing spec.md after recording invalidates marker. Re-run
98
+ plannotator session if file changes.
99
+
100
+ ## Advance
101
+
102
+ 10. Run `impulso-hub advance`. Exit 2 = read stderr, satisfy precondition,
103
+ retry.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: impulso-verify
3
+ description: >
4
+ Invoke when the pipeline enters the verify phase: run full test suite and
5
+ coverage, dispatch branch reviewer, run fix cycle if needed, run
6
+ plannotator-review gate, record, and advance.
7
+ ---
8
+
9
+ # Impulso Verify
10
+
11
+ Deterministic state/precondition validation and status `--json` schema v1 are
12
+ owned by `impulso-hub`; this skill retains human interview, dispatch, and
13
+ remediation policy.
14
+
15
+ Verify phase: tests → coverage → branch review → fix cycle → plannotator-review
16
+ gate → record → advance.
17
+
18
+ ## MUST
19
+
20
+ 1. Run `impulso-hub status --json`. Confirm `phase === "verify"`. Exit 2 = read
21
+ stderr, fix, retry.
22
+
23
+ 2. Extract workspace:
24
+
25
+ ```bash
26
+ WORKSPACE=$(impulso-hub workspace-path)
27
+ ```
28
+
29
+ 3. Run full test suite:
30
+
31
+ ```bash
32
+ impulso-hub run-test --full
33
+ ```
34
+
35
+ Non-zero = tests failing. Fix before continuing.
36
+
37
+ 4. Run coverage:
38
+
39
+ ```bash
40
+ impulso-hub run-test --coverage
41
+ ```
42
+
43
+ Non-zero = coverage failing. Fix before continuing.
44
+
45
+ 5. Generate branch review package:
46
+
47
+ ```bash
48
+ BASE=$(impulso-hub merge-base)
49
+ DIFF_PATH=$(impulso-hub review-package "$BASE" HEAD)
50
+ REVIEWER_MODEL=$(impulso-hub models --agent reviewer)
51
+ ```
52
+
53
+ 6. Dispatch reviewer (model: `$REVIEWER_MODEL`) for branch review:
54
+
55
+ - Diff path: `$DIFF_PATH`
56
+ - Instruction: "Branch review: review the full diff from main. Return
57
+ ≤15-line verdict."
58
+ - Critical/Important: dispatch implementer once with findings, re-run tests
59
+ (steps 3–4), re-dispatch reviewer. Once only.
60
+
61
+ 7. When reviewer has **no Critical or Important** findings:
62
+
63
+ ```bash
64
+ impulso-hub record-review-verdict clean
65
+ ```
66
+
67
+ Critical/Important remaining → `impulso-hub record-review-verdict findings`.
68
+
69
+ 8. Run plannotator review:
70
+
71
+ ```bash
72
+ impulso-hub plannotator launch review
73
+ ```
74
+
75
+ 9. **IMMEDIATELY relay URL:** "Open Plannotator at \<URL\> (remote: \<Remote\>).
76
+ Review the branch changes, then tell me when done." WAIT for user.
77
+
78
+ Launch timeout (exit 2) → STOP. Check stderr, ask whether to retry.
79
+
80
+ 10. After user confirms:
81
+
82
+ ```bash
83
+ impulso-hub plannotator wait
84
+ ```
85
+
86
+ 11. Feedback → apply fixes, re-run tests (steps 3–4), re-run plannotator review
87
+ (steps 8–10). LGTM → continue.
88
+
89
+ 12. Record and advance:
90
+
91
+ ```bash
92
+ impulso-hub record-plannotator --review
93
+ impulso-hub advance
94
+ ```
95
+
96
+ WARNING: committing after recording invalidates marker.