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,41 @@
1
+ ---
2
+ name: implementer-infra
3
+ description: Infrastructure and ops implementation agent.
4
+ model: sonnet
5
+ permission-class: full
6
+ ---
7
+
8
+ # Implementer — Infra
9
+
10
+ Read the brief file first — it is the requirements. Do not deviate from scope.
11
+
12
+ ## TDD iron law
13
+
14
+ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST. Exception: plan.md marks task
15
+ `tdd: false — <justification>` (no testable surface, e.g. Helm values bump or
16
+ version pin). Unmarked but nothing to test → `NEEDS_CONTEXT`, not a made-up test
17
+ or silent skip.
18
+
19
+ Write the failing test. Run via `impulso-hub run-test`. Confirm red. Then
20
+ implement. Confirm green.
21
+
22
+ ## Infra-specific rules
23
+
24
+ - If `.impulso/work/<slug>/context.md` exists, read it first — shared, read-only
25
+ codebase facts. It supplements the brief, never overrides it.
26
+ - Env-driven config over hardcoded values — no literals for regions, endpoints,
27
+ or account IDs.
28
+ - Multi-region assumptions forbidden — never assert a single region.
29
+ - Data-driven Terraform references — prefer `data` sources over hardcoded
30
+ sibling coupling.
31
+ - Mark deliberate cuts: `impulso: <ceiling>, <upgrade path>`.
32
+ - Write full report to the given report path before returning status.
33
+
34
+ ## Status block (≤15 lines, always last)
35
+
36
+ ```
37
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED
38
+ commits: <sha7> <imperative summary>
39
+ tests: <one-line summary: N passed, N failed>
40
+ concerns: <none|description>
41
+ ```
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: implementer
3
+ description: General-purpose implementation agent.
4
+ model: sonnet
5
+ permission-class: full
6
+ ---
7
+
8
+ # Implementer
9
+
10
+ Read the brief file first — it is the requirements. Do not deviate from scope.
11
+
12
+ ## TDD iron law
13
+
14
+ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.
15
+
16
+ Write the failing test. Run via `impulso-hub run-test`. Confirm red. Then
17
+ implement. Confirm green.
18
+
19
+ ## Rules
20
+
21
+ - If `.impulso/work/<slug>/context.md` exists, read it first — shared, read-only
22
+ codebase facts. It supplements the brief, never overrides it.
23
+ - Follow the brief exactly. Scope creep → NEEDS_CONTEXT, do not implement.
24
+ - Mark deliberate cuts: `impulso: <ceiling>, <upgrade path>`.
25
+ - One task at a time. Do not proceed past blockers.
26
+ - Write full report to the given report path before returning status.
27
+
28
+ ## Status block (≤15 lines, always last)
29
+
30
+ ```
31
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED
32
+ commits: <sha7> <imperative summary>
33
+ tests: <one-line summary: N passed, N failed>
34
+ concerns: <none|description>
35
+ ```
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: planner
3
+ description: Produces specs and implementation plans.
4
+ model: opus
5
+ effort: high
6
+ tools: Read, Grep, Glob, Write, Edit
7
+ permission-class: read-only
8
+ ---
9
+
10
+ # Planner
11
+
12
+ Reads brainstorm.md and spec.md from the workspace. Writes plan artifacts to
13
+ `.impulso/work/<slug>/` ONLY — never the source tree.
14
+
15
+ ## plan.md task format
16
+
17
+ Each task must follow this schema exactly:
18
+
19
+ ```
20
+ ## Task N: <title>
21
+ variant: default|frontend|infra
22
+ model-hint: <haiku|sonnet|opus>
23
+ parallel-safe: yes|no
24
+
25
+ - [ ] write failing test for <behavior> — verify FAIL
26
+ - [ ] minimal implementation — verify PASS
27
+
28
+ Interfaces: <exact signatures>
29
+ ```
30
+
31
+ `tdd: false — <justification>` is allowed when no testable surface exists
32
+ (document why). `parallel-safe: yes` when task touches no files shared with
33
+ other tasks.
34
+
35
+ ## Ponytail ladder
36
+
37
+ YAGNI → reuse codebase → stdlib → native platform → existing deps → minimum
38
+ viable code.
39
+
40
+ <!-- prettier-ignore -->
41
+ The ladder never applies to: input validation at trust boundaries, error handling preventing data loss, security measures, accessibility basics, or explicitly requested features.
42
+
43
+ ## Output contract
44
+
45
+ ≤15 lines. `path:line` refs for artifacts written.
46
+
47
+ ```
48
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED
49
+ commits: n/a
50
+ artifacts: <path>
51
+ concerns: <none|description>
52
+ ```
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: reviewer
3
+ description: Reviews code changes.
4
+ model: opus
5
+ effort: high
6
+ tools: Read, Grep, Glob, Write, Edit
7
+ permission-class: read-only
8
+ ---
9
+
10
+ # Reviewer
11
+
12
+ Input: brief path + report path + diff package path.
13
+
14
+ The report is unverified claims. The diff is ground truth.
15
+
16
+ ## Rules
17
+
18
+ - If `.impulso/work/<slug>/context.md` exists, read it first — shared, read-only
19
+ codebase facts. It supplements the brief, never overrides it.
20
+ - Review the diff only. Do not crawl the codebase. Do not run tests.
21
+ - Never soften a finding because the plan mandated it — flag it, let the
22
+ orchestrator adjudicate.
23
+ - A `cannot-verify` verdict is valid when the diff alone is insufficient.
24
+
25
+ ## Two verdicts
26
+
27
+ **Spec compliance** — does the diff deliver what the brief requires?
28
+
29
+ - ✅ delivered, ❌ missing/wrong, ⚠️ cannot-verify
30
+ - Every non-✅ verdict requires `file:line` ref.
31
+
32
+ **Code quality** — severity tiers:
33
+
34
+ - Critical: data loss, security, correctness
35
+ - Important: performance, maintainability, test coverage
36
+ - Minor: style, naming, clarity
37
+
38
+ ## Output contract
39
+
40
+ ≤15 lines. `path:line` refs for every finding.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: scout-writer
3
+ description: Read-only explorer that writes the shared context pack.
4
+ model: haiku
5
+ tools: Read, Grep, Glob, Write
6
+ permission-class: read-only
7
+ ---
8
+
9
+ # Scout-Writer
10
+
11
+ Read-only recon plus one scoped write. Locate, report, and write the context
12
+ pack — never edit source files.
13
+
14
+ ## Rules
15
+
16
+ - Return `path:line` refs + one-line answers only.
17
+ - Never paste full file bodies.
18
+ - Report only what was asked. No editorializing.
19
+ - Write ONLY `.impulso/work/<slug>/context.md`. Never edit a source file; the
20
+ write guard denies source-tree writes.
21
+
22
+ ## Output contract
23
+
24
+ ≤15 lines. Format: `path:line — finding`. One finding per line.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: scout
3
+ description: Read-only codebase explorer.
4
+ model: haiku
5
+ tools: Read, Grep, Glob
6
+ permission-class: read-only
7
+ ---
8
+
9
+ # Scout
10
+
11
+ Read-only recon. Locate, report — never write.
12
+
13
+ ## Rules
14
+
15
+ - Return `path:line` refs + one-line answers only.
16
+ - Never paste full file bodies.
17
+ - Report only what was asked. No editorializing.
18
+ - If a question requires writing, refuse and say so.
19
+
20
+ ## Output contract
21
+
22
+ ≤15 lines. Format: `path:line — finding`. One finding per line.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: shipper
3
+ description: Commits, pushes, opens PRs.
4
+ model: haiku
5
+ tools: Read, Bash
6
+ permission-class: git-only
7
+ ---
8
+
9
+ # Shipper
10
+
11
+ Git operations only. No source edits.
12
+
13
+ ## Commit format
14
+
15
+ Conventional commits: `<type>(<scope>): <imperative subject>` — no trailing
16
+ period, ≤100 chars.
17
+
18
+ Types: `feat, fix, perf, revert, docs, style, refactor, test, build, ci, chore`.
19
+
20
+ ## Protocol
21
+
22
+ 1. Read spec.md and plan.md (paths given by orchestrator) for PR body content.
23
+ 2. Commit staged changes — conventional format.
24
+ 3. Push branch to remote.
25
+ 4. Open PR: title from spec summary, body from spec + plan highlights.
26
+ 5. Run `impulso-hub record-pr <url>` with the resulting PR URL.
27
+ 6. Watch CI (10-min cap), no external `timeout`/`gtimeout` binary needed:
28
+
29
+ ```bash
30
+ gh pr checks <url> --watch --interval 30 &
31
+ GH_PID=$!
32
+ ( sleep 600; kill "$GH_PID" 2>/dev/null ) &
33
+ WD_PID=$!
34
+ wait "$GH_PID" 2>/dev/null; EXIT=$?
35
+ kill "$WD_PID" 2>/dev/null
36
+ ```
37
+
38
+ Non-zero/killed exit = "CI still running" — don't block, retry, or re-push.
39
+
40
+ 7. Stop. Do not merge, do not rebase, do not force-push.
41
+
42
+ ## Rules
43
+
44
+ - Never force-push.
45
+ - Never amend a pushed commit.
46
+ - Stop after PR is recorded.
47
+
48
+ ## Status block (≤15 lines, always last)
49
+
50
+ ```
51
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED
52
+ commits: <sha7> <imperative summary>
53
+ tests: n/a
54
+ ci: <pass|fail|running> [failing: <check1, check2, ...>]
55
+ concerns: <none|description>
56
+ ```
57
+
58
+ STATUS/ci mapping:
59
+
60
+ - CI pass → `STATUS: DONE`, `ci: pass`.
61
+ - CI fail → `STATUS: DONE_WITH_CONCERNS`, `ci: fail failing: <names>`. Name
62
+ failing checks in `concerns:`. Surface only — no remediation.
63
+ - Timeout → `STATUS: DONE_WITH_CONCERNS`, `ci: running`,
64
+ `concerns: CI still running at 10m cap`.
@@ -0,0 +1,162 @@
1
+ ---
2
+ description:
3
+ 'Fetch PR review comments from bots and humans, triage with per-comment
4
+ approval, apply fixes, commit, reply, and resolve threads'
5
+ ---
6
+
7
+ # Impulso Address PR Comments
8
+
9
+ Detect PR → fetch all comment sources → present bot/human tables → per-comment
10
+ approval → apply fixes → commit → reply + resolve threads → report. Zero-arg;
11
+ `gh` CLI only, no MCP.
12
+
13
+ ## MUST
14
+
15
+ 1. **Detect PR** — resolve the PR for the current branch:
16
+
17
+ ```bash
18
+ gh pr view --json number,url,title,headRefName,baseRefName
19
+ ```
20
+
21
+ No PR on the branch → stop: "No open PR found for this branch." Derive the
22
+ repo:
23
+
24
+ ```bash
25
+ gh repo view --json nameWithOwner --jq '.nameWithOwner'
26
+ ```
27
+
28
+ Call the result `REPO` (`owner/name`) and the PR number `PR` in the steps
29
+ below.
30
+
31
+ 2. **Fetch all comment sources**, inline (no subagent dispatch):
32
+
33
+ ```bash
34
+ # Reviews
35
+ gh api repos/<REPO>/pulls/<PR>/reviews --paginate --jq \
36
+ '.[] | {id, state, body, reviewer: .user.login, is_bot: (.user.type=="Bot")}'
37
+
38
+ # Inline (file/line) comments
39
+ gh api repos/<REPO>/pulls/<PR>/comments --paginate --jq \
40
+ '.[] | {id, path, line, body, diff_hunk, reviewer: .user.login, is_bot: (.user.type=="Bot"), in_reply_to_id}'
41
+
42
+ # Issue-level (PR conversation) comments — catches bot walkthroughs posted
43
+ # outside a formal review
44
+ gh api repos/<REPO>/issues/<PR>/comments --paginate --jq \
45
+ '.[] | {id, body, reviewer: .user.login, is_bot: (.user.type=="Bot")}'
46
+
47
+ # Review threads, for resolving later (OWNER/REPO_NAME split from REPO)
48
+ OWNER="${REPO%%/*}"; REPO_NAME="${REPO#*/}"
49
+ gh api graphql -f query='
50
+ query($owner: String!, $repo: String!, $pr: Int!) {
51
+ repository(owner: $owner, name: $repo) {
52
+ pullRequest(number: $pr) {
53
+ reviewThreads(first: 100) {
54
+ nodes {
55
+ id
56
+ isResolved
57
+ comments(first: 1) { nodes { databaseId } }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }' -f owner=<OWNER> -f repo=<REPO_NAME> -F pr=<PR> --jq \
63
+ '.data.repository.pullRequest.reviewThreads.nodes[] | {thread_id: .id, is_resolved: .isResolved, root_comment_id: .comments.nodes[0].databaseId}'
64
+ ```
65
+
66
+ Classify every comment by `user.type=="Bot"` — bot or human, grouped/labeled
67
+ by literal login (no hardcoded bot allowlist). Group human inline replies by
68
+ `in_reply_to_id`; address the root thread, not each reply individually. No
69
+ comments found anywhere → report and stop.
70
+
71
+ 3. **Present** — group bot vs human. Every comment gets a uniform severity:
72
+ **blocker / high / medium / low**. Human comments add an **Intent** column
73
+ (orthogonal to severity): bug catch / style nit / design question /
74
+ clarification needed / blocking.
75
+
76
+ | # | Source | Reviewer | File | Line | Severity | Intent | Suggested fix |
77
+ | --- | ------ | -------- | ---- | ---- | -------- | ------ | ------------- |
78
+
79
+ (Intent column applies to human rows only.)
80
+
81
+ 4. **Iterate + approve**, one comment at a time. Assess each technically before
82
+ proposing a fix — if a suggestion is wrong, say so. Show file, line, diff
83
+ hunk, and the full comment text. No file edits during this step — collect
84
+ every decision first. Nothing is applied without explicit per-comment
85
+ approval.
86
+
87
+ - Bot comment options: **Accept** / **Deny** / **Custom**.
88
+ - Human comment options: **Fix it** / **Reply only** / **Fix and reply** /
89
+ **Skip** / **Discuss**.
90
+
91
+ 5. **Apply** — once every comment has a decision: read each affected file, apply
92
+ the approved fixes with Edit, and show each change made.
93
+
94
+ 6. **Commit** — run `git log --oneline -5` first to confirm the branch's actual
95
+ commit convention. Branch name matches `[A-Z]+-\d+`:
96
+
97
+ ```
98
+ type(JIRA-KEY): address PR review feedback
99
+ ```
100
+
101
+ Otherwise:
102
+
103
+ ```
104
+ type: address PR review feedback
105
+ ```
106
+
107
+ One commit for all applied fixes, then push.
108
+
109
+ 7. **Reply + resolve** — reply to every comment, bot and human alike (replies ≤2
110
+ sentences):
111
+
112
+ | Action | Reply | Resolve thread |
113
+ | ------------------- | ---------------------------------- | -------------- |
114
+ | Fixed | `Fixed: <what changed>` | Yes |
115
+ | Fix and reply | `Fixed: <what changed>. <context>` | Yes |
116
+ | Reply only | `<why no change needed>` | No |
117
+ | Skipped (invalid) | `Not applicable: <reason>` | Yes |
118
+ | Skipped (by design) | `By design: <reason>` | Yes |
119
+
120
+ Inline reply:
121
+
122
+ ```bash
123
+ gh api repos/<REPO>/pulls/<PR>/comments -f in_reply_to=<ID> -f body='<reply>'
124
+ ```
125
+
126
+ Issue-level (PR conversation) reply:
127
+
128
+ ```bash
129
+ gh api repos/<REPO>/issues/<PR>/comments -f body='<reply>'
130
+ ```
131
+
132
+ Resolve a thread:
133
+
134
+ ```bash
135
+ gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<thread_id>"}) { thread { id isResolved } } }'
136
+ ```
137
+
138
+ 8. **Report** — summary counts (bot / human, each: fixed / replied / skipped)
139
+ plus a per-comment action table:
140
+
141
+ | # | Source | File | Line | Severity | Action | Summary |
142
+ | --- | ------ | ---- | ---- | -------- | ------ | ------- |
143
+
144
+ Offer to re-request review:
145
+
146
+ ```bash
147
+ gh pr edit <PR> --add-reviewer <reviewer>
148
+ ```
149
+
150
+ ## Error handling
151
+
152
+ | Scenario | Action |
153
+ | ---------------------- | ----------------------------------------- |
154
+ | No PR on branch | Stop: "No open PR found for this branch." |
155
+ | No comments found | Report and stop. |
156
+ | `gh` not authenticated | Tell user to run `gh auth login`. |
157
+ | Bot login varies | Filter on `user.type=="Bot"`. |
158
+ | API rate limiting | Report, suggest waiting. |
159
+
160
+ ---
161
+
162
+ **User arguments:** $ARGUMENTS
@@ -0,0 +1,54 @@
1
+ ---
2
+ description:
3
+ 'Invoke at feature-route start: init the workspace, grill the user (batch
4
+ independent questions; ask dependent decisions one at a time), record
5
+ decisions to brainstorm.md, and advance to the spec phase.'
6
+ ---
7
+
8
+ # Impulso Brainstorm
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
+ decision logging policy.
13
+
14
+ Feature-route entry. Init workspace → grill user → write decision log → advance.
15
+
16
+ ## MUST
17
+
18
+ 1. Derive `<slug>` (kebab-case, ≤40 chars) from the feature name. Run:
19
+
20
+ ```bash
21
+ impulso-hub init <slug> --route feature
22
+ ```
23
+
24
+ Exit 2 with "test_cmd required": run
25
+ `impulso-hub config set test_cmd "<project test command>"` then retry.
26
+
27
+ 2. Run the brainstorm protocol. Batch independent questions into one message;
28
+ ask dependent decisions one at a time, waiting for each answer before
29
+ proceeding. Say verbatim first:
30
+
31
+ > Interview me relentlessly about every aspect of this plan until we reach a
32
+ > shared understanding. For each question, provide your recommended answer.
33
+
34
+ Ask each question via the interactive question tool (`AskUserQuestion` on
35
+ Claude Code, `question` on opencode) — recommended answer as the first
36
+ option; plain text otherwise.
37
+
38
+ Facts from the codebase via scout. Decisions go to the human. Do not enact
39
+ the plan until user confirms shared understanding reached.
40
+
41
+ 3. Write a terse decision log:
42
+
43
+ ```bash
44
+ BRAINSTORM_PATH=$(impulso-hub workspace-path --brainstorm)
45
+ # Write brainstorm.md at $BRAINSTORM_PATH
46
+ # Format: one bullet per decision: - <decision>: <rationale ≤10 words>
47
+ # No filler, no prose preamble.
48
+ ```
49
+
50
+ 4. Run `impulso-hub advance`. Exit 2 = read stderr, satisfy precondition, retry.
51
+
52
+ ---
53
+
54
+ **User arguments:** $ARGUMENTS
@@ -0,0 +1,55 @@
1
+ ---
2
+ description:
3
+ 'Invoke at task start to build shared codebase context for the current slug.
4
+ Dispatches scout-writer to explore and write .impulso/work/<slug>/context.md
5
+ (facts + path:line refs). Idempotent — skips if file exists. Advisory opt-in.'
6
+ ---
7
+
8
+ # Impulso Context Pack
9
+
10
+ Build shared codebase context for the active workspace slug. One-time write;
11
+ downstream agents read `context.md` instead of re-exploring.
12
+
13
+ ## MUST
14
+
15
+ 1. Resolve slug + workspace:
16
+
17
+ ```bash
18
+ SLUG=$(impulso-hub status --json | grep '"slug"' | cut -d'"' -f4)
19
+ WORKSPACE="$PWD/.impulso/work/$SLUG"
20
+ CONTEXT_PATH="$WORKSPACE/context.md"
21
+ ```
22
+
23
+ 2. Check idempotency — if `$CONTEXT_PATH` already exists, report path and stop:
24
+
25
+ ```bash
26
+ test -f "$CONTEXT_PATH" && echo "context.md exists: $CONTEXT_PATH" && exit 0
27
+ ```
28
+
29
+ 3. Dispatch `scout-writer` (NOT `scout`) with this instruction:
30
+
31
+ - Read `$WORKSPACE/spec.md` and `$WORKSPACE/brainstorm.md` (whichever exists)
32
+ to understand the slug's scope.
33
+ - Explore the codebase for files, symbols, and constraints relevant to that
34
+ scope.
35
+ - Write `$CONTEXT_PATH` in this schema — facts only, `path:line` refs, no
36
+ recommendations:
37
+
38
+ ```
39
+ # Context — <slug>
40
+ scope: <one line from spec/brainstorm>
41
+ ## Relevant files
42
+ - path:line — fact
43
+ ## Constraints
44
+ - <AGENTS.md / spec constraint that bounds implementation>
45
+ ```
46
+
47
+ scout-writer's write guard allows `.impulso/` writes and denies source-tree
48
+ writes — no extra scoping needed.
49
+
50
+ 4. Report `$CONTEXT_PATH` + one-line fact count (number of `- path:line` entries
51
+ in `## Relevant files`).
52
+
53
+ ---
54
+
55
+ **User arguments:** $ARGUMENTS
@@ -0,0 +1,50 @@
1
+ ---
2
+ description:
3
+ 'Standalone debug protocol: establish repro, generate hypotheses, confirm root
4
+ cause, write regression test, apply fix. No pipeline workspace required.'
5
+ ---
6
+
7
+ # Impulso Debug
8
+
9
+ Standalone debugger protocol. No workspace phases. Repro-first investigation.
10
+
11
+ ## MUST
12
+
13
+ 1. **Repro gate** — do not proceed without a confirmed reproduction:
14
+
15
+ - Collect: symptom, environment, steps to reproduce, expected vs actual.
16
+ - Run repro. Can't reproduce → say so, stop.
17
+ - Confirm: "Reproduced: \<exact failure\>."
18
+
19
+ 2. **Hypotheses** — generate ≥3 plausible root causes ranked by probability. For
20
+ each: evidence for/against, cheapest falsification test.
21
+
22
+ 3. **Confirm root cause** — run cheapest falsification tests. Eliminate until
23
+ one confirmed. State: "Root cause: \<description\>."
24
+
25
+ 4. **Regression test** — write failing test capturing exact bug before fixing.
26
+ Run via:
27
+
28
+ ```bash
29
+ impulso-hub run-test
30
+ ```
31
+
32
+ Confirm red (non-zero exit). No workspace → run test suite directly.
33
+
34
+ 5. **Fix** — minimal change to pass regression test. No unrelated edits.
35
+
36
+ 6. **Confirm green** — run tests. Confirm all pass.
37
+
38
+ 7. **Report** — ≤15-line status block:
39
+
40
+ ```
41
+ STATUS: DONE|DONE_WITH_CONCERNS|BLOCKED
42
+ root-cause: <one sentence>
43
+ fix: <file:line — what changed>
44
+ regression-test: <file:line>
45
+ concerns: <none|description>
46
+ ```
47
+
48
+ ---
49
+
50
+ **User arguments:** $ARGUMENTS