@iceinvein/agent-skills 0.1.39 → 0.2.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 (148) hide show
  1. package/README.md +18 -2
  2. package/dist/cli/index.js +105 -28
  3. package/package.json +1 -1
  4. package/skills/index.json +14 -2
  5. package/skills/magpie/README.md +2 -1
  6. package/skills/magpie/SKILL.md +138 -45
  7. package/skills/magpie/bin/magpie.ts +43 -0
  8. package/skills/magpie/fixtures/example-pr/brief.json +18 -0
  9. package/skills/magpie/fixtures/fake-gh-nodiff.sh +38 -0
  10. package/skills/magpie/fixtures/fake-gh.sh +14 -0
  11. package/skills/magpie/package.json +1 -1
  12. package/skills/magpie/references/peer-review.md +7 -2
  13. package/skills/magpie/references/scout.md +90 -0
  14. package/skills/magpie/references/specialists.md +117 -6
  15. package/skills/magpie/scripts/__tests__/cli.test.ts +101 -1
  16. package/skills/magpie/scripts/__tests__/dedupe-cmd.test.ts +187 -0
  17. package/skills/magpie/scripts/__tests__/diff-chunks.test.ts +51 -0
  18. package/skills/magpie/scripts/__tests__/filter-diff-preservation.test.ts +54 -0
  19. package/skills/magpie/scripts/__tests__/findings-files.test.ts +35 -0
  20. package/skills/magpie/scripts/__tests__/gh.test.ts +90 -0
  21. package/skills/magpie/scripts/__tests__/git-diff.test.ts +83 -0
  22. package/skills/magpie/scripts/__tests__/helpers/git-fixture.ts +47 -0
  23. package/skills/magpie/scripts/__tests__/path-filter.test.ts +27 -0
  24. package/skills/magpie/scripts/__tests__/preview-cmd.test.ts +16 -0
  25. package/skills/magpie/scripts/__tests__/refresh.test.ts +45 -0
  26. package/skills/magpie/scripts/__tests__/render-cmd.test.ts +173 -1
  27. package/skills/magpie/scripts/__tests__/render-findings.test.ts +151 -1
  28. package/skills/magpie/scripts/__tests__/render-progress.test.ts +42 -0
  29. package/skills/magpie/scripts/__tests__/setup-cmd.test.ts +83 -1
  30. package/skills/magpie/scripts/__tests__/shard.test.ts +165 -0
  31. package/skills/magpie/scripts/__tests__/skill-lint.test.ts +207 -7
  32. package/skills/magpie/scripts/__tests__/types.test.ts +47 -0
  33. package/skills/magpie/scripts/dedupe-cmd.ts +58 -3
  34. package/skills/magpie/scripts/diff-chunks.ts +28 -0
  35. package/skills/magpie/scripts/findings-files.ts +32 -0
  36. package/skills/magpie/scripts/gh.ts +68 -14
  37. package/skills/magpie/scripts/git-diff.ts +111 -0
  38. package/skills/magpie/scripts/path-filter.ts +9 -5
  39. package/skills/magpie/scripts/preview-cmd.ts +11 -1
  40. package/skills/magpie/scripts/refresh.ts +32 -3
  41. package/skills/magpie/scripts/render-cmd.ts +35 -11
  42. package/skills/magpie/scripts/render-findings.ts +78 -2
  43. package/skills/magpie/scripts/render-progress.ts +6 -1
  44. package/skills/magpie/scripts/setup-cmd.ts +38 -1
  45. package/skills/magpie/scripts/shard.ts +171 -0
  46. package/skills/magpie/scripts/status-cmd.ts +7 -4
  47. package/skills/magpie/scripts/types.ts +50 -0
  48. package/skills/magpie/skill.json +2 -2
  49. package/skills/magpie/templates/styles.css +66 -0
  50. package/skills/migrate/README.md +194 -0
  51. package/skills/migrate/SKILL.md +197 -0
  52. package/skills/migrate/bin/migrate +15 -0
  53. package/skills/migrate/bin/migrate.ts +309 -0
  54. package/skills/migrate/biome.json +35 -0
  55. package/skills/migrate/bun.lock +24 -0
  56. package/skills/migrate/docs/architecture.md +294 -0
  57. package/skills/migrate/docs/reference.md +590 -0
  58. package/skills/migrate/fixtures/tiny-express/GROUND-TRUTH.md +39 -0
  59. package/skills/migrate/fixtures/tiny-express/app.js +29 -0
  60. package/skills/migrate/fixtures/tiny-express/cron.js +6 -0
  61. package/skills/migrate/fixtures/tiny-express/reports/daily-users.json +6 -0
  62. package/skills/migrate/fixtures/tiny-express/schema.sql +12 -0
  63. package/skills/migrate/fixtures/tiny-express/settings.json +4 -0
  64. package/skills/migrate/fixtures/tiny-express/views/users.html +9 -0
  65. package/skills/migrate/fixtures/tiny-webforms/Controllers/UsersController.cs +68 -0
  66. package/skills/migrate/fixtures/tiny-webforms/Default.aspx +7 -0
  67. package/skills/migrate/fixtures/tiny-webforms/Default.aspx.cs +14 -0
  68. package/skills/migrate/fixtures/tiny-webforms/GROUND-TRUTH.md +50 -0
  69. package/skills/migrate/fixtures/tiny-webforms/Integrations/BillingClient.cs +16 -0
  70. package/skills/migrate/fixtures/tiny-webforms/Jobs/NightlyDigestJob.cs +33 -0
  71. package/skills/migrate/fixtures/tiny-webforms/Reports/DailyUsers.rdl +11 -0
  72. package/skills/migrate/fixtures/tiny-webforms/Schema.sql +12 -0
  73. package/skills/migrate/fixtures/tiny-webforms/Site.master +16 -0
  74. package/skills/migrate/fixtures/tiny-webforms/Users.aspx +8 -0
  75. package/skills/migrate/fixtures/tiny-webforms/Users.aspx.cs +14 -0
  76. package/skills/migrate/fixtures/tiny-webforms/web.config +10 -0
  77. package/skills/migrate/install.sh +68 -0
  78. package/skills/migrate/package.json +17 -0
  79. package/skills/migrate/references/phases/enumerate.md +291 -0
  80. package/skills/migrate/references/phases/extract.md +652 -0
  81. package/skills/migrate/references/phases/parity.md +275 -0
  82. package/skills/migrate/references/phases/probe.md +135 -0
  83. package/skills/migrate/references/phases/queue.md +242 -0
  84. package/skills/migrate/references/phases/seam.md +416 -0
  85. package/skills/migrate/references/recipes/README.md +116 -0
  86. package/skills/migrate/references/recipes/aspnet.md +287 -0
  87. package/skills/migrate/references/run-ops.md +280 -0
  88. package/skills/migrate/scripts/__tests__/census.test.ts +775 -0
  89. package/skills/migrate/scripts/__tests__/check.test.ts +458 -0
  90. package/skills/migrate/scripts/__tests__/citations.test.ts +156 -0
  91. package/skills/migrate/scripts/__tests__/cli.test.ts +183 -0
  92. package/skills/migrate/scripts/__tests__/concurrency.test.ts +164 -0
  93. package/skills/migrate/scripts/__tests__/config.test.ts +112 -0
  94. package/skills/migrate/scripts/__tests__/e2e-express.test.ts +1093 -0
  95. package/skills/migrate/scripts/__tests__/e2e-webforms.test.ts +1276 -0
  96. package/skills/migrate/scripts/__tests__/e2e.test.ts +320 -0
  97. package/skills/migrate/scripts/__tests__/ids.test.ts +38 -0
  98. package/skills/migrate/scripts/__tests__/import.test.ts +155 -0
  99. package/skills/migrate/scripts/__tests__/init.test.ts +192 -0
  100. package/skills/migrate/scripts/__tests__/leaks.test.ts +176 -0
  101. package/skills/migrate/scripts/__tests__/lock.test.ts +183 -0
  102. package/skills/migrate/scripts/__tests__/paths.test.ts +129 -0
  103. package/skills/migrate/scripts/__tests__/phase-cmd.test.ts +151 -0
  104. package/skills/migrate/scripts/__tests__/phases.test.ts +70 -0
  105. package/skills/migrate/scripts/__tests__/queue.test.ts +475 -0
  106. package/skills/migrate/scripts/__tests__/report.test.ts +150 -0
  107. package/skills/migrate/scripts/__tests__/run-state.test.ts +136 -0
  108. package/skills/migrate/scripts/__tests__/status-reset.test.ts +318 -0
  109. package/skills/migrate/scripts/__tests__/store.test.ts +132 -0
  110. package/skills/migrate/scripts/__tests__/validate.test.ts +54 -0
  111. package/skills/migrate/scripts/census-cmd.ts +109 -0
  112. package/skills/migrate/scripts/census.ts +342 -0
  113. package/skills/migrate/scripts/check-cmd.ts +24 -0
  114. package/skills/migrate/scripts/check.ts +376 -0
  115. package/skills/migrate/scripts/citations.ts +92 -0
  116. package/skills/migrate/scripts/config.ts +237 -0
  117. package/skills/migrate/scripts/ids.ts +31 -0
  118. package/skills/migrate/scripts/import-cmd.ts +141 -0
  119. package/skills/migrate/scripts/init-cmd.ts +118 -0
  120. package/skills/migrate/scripts/leaks.ts +184 -0
  121. package/skills/migrate/scripts/lock.ts +188 -0
  122. package/skills/migrate/scripts/paths.ts +103 -0
  123. package/skills/migrate/scripts/phase-cmd.ts +63 -0
  124. package/skills/migrate/scripts/phases.ts +113 -0
  125. package/skills/migrate/scripts/queue-cmd.ts +98 -0
  126. package/skills/migrate/scripts/queue.ts +258 -0
  127. package/skills/migrate/scripts/report-cmd.ts +47 -0
  128. package/skills/migrate/scripts/report.ts +131 -0
  129. package/skills/migrate/scripts/reset-cmd.ts +120 -0
  130. package/skills/migrate/scripts/status-cmd.ts +52 -0
  131. package/skills/migrate/scripts/store.ts +159 -0
  132. package/skills/migrate/scripts/types.ts +137 -0
  133. package/skills/migrate/scripts/validate.ts +221 -0
  134. package/skills/migrate/skill.json +33 -0
  135. package/skills/migrate/templates/config.toml +27 -0
  136. package/skills/migrate/templates/queue-item.md +17 -0
  137. package/skills/migrate/tsconfig.json +18 -0
  138. package/skills/migrate/uninstall.sh +31 -0
  139. package/skills/sluice/SKILL.md +82 -0
  140. package/skills/sluice/references/deep-channel.md +94 -0
  141. package/skills/sluice/references/finish.md +35 -0
  142. package/skills/sluice/references/intent.md +29 -0
  143. package/skills/sluice/references/review.md +42 -0
  144. package/skills/sluice/references/root-cause.md +38 -0
  145. package/skills/sluice/references/show-or-say.md +36 -0
  146. package/skills/sluice/references/test-first.md +35 -0
  147. package/skills/sluice/references/verify.md +26 -0
  148. package/skills/sluice/skill.json +32 -0
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Run by agent-skills as a postremove step before the migrate skill bundle is
5
+ # deleted. Reads the path recorded by install.sh and removes the PATH symlink
6
+ # if it still points back into this bundle.
7
+
8
+ SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ STATE_FILE="$SOURCE_DIR/.installed-cli-path"
10
+
11
+ if [ ! -f "$STATE_FILE" ]; then
12
+ exit 0
13
+ fi
14
+
15
+ CLI_PATH="$(head -n 1 "$STATE_FILE")"
16
+ [ -z "$CLI_PATH" ] && exit 0
17
+
18
+ if [ -L "$CLI_PATH" ]; then
19
+ TARGET="$(readlink "$CLI_PATH")"
20
+ case "$TARGET" in
21
+ "$SOURCE_DIR"/*)
22
+ rm -f "$CLI_PATH"
23
+ echo "Removed migrate CLI symlink at $CLI_PATH"
24
+ ;;
25
+ *)
26
+ echo "migrate uninstall: leaving $CLI_PATH alone (points to $TARGET, not this bundle)"
27
+ ;;
28
+ esac
29
+ fi
30
+
31
+ rm -f "$STATE_FILE"
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: sluice
3
+ description: Use at the start of any request that changes code. Routes the work into one of four channels (bypass, fast, main, deep) by change shape, and applies only the rules that channel needs. Also use when asked to work faster or with less process.
4
+ ---
5
+
6
+ # Sluice
7
+
8
+ A sluice sorts material by size into channels and meters what flows through.
9
+ Same here: pick the channel the change needs, pay for nothing else.
10
+
11
+ ## Route first
12
+
13
+ Pick a channel from the change's shape, state it in one line, then proceed. The
14
+ announcement is how your partner redirects you without being asked.
15
+
16
+ | Channel | Signal | Rules | Say |
17
+ |---------|--------|-------|-----|
18
+ | `bypass` | No code change: a question, an explanation, a read | none | nothing, just answer |
19
+ | `fast` | Existing interfaces, one subsystem (a new flag on an existing command still counts as existing) | test-first, verify | "Fast channel, existing interfaces. Test first, then implement." |
20
+ | `main` | Adds an interface, or crosses subsystems | + agree intent, review before merge | "Main channel, new interface. Agreeing the shape first." |
21
+ | `deep` | Several subsystems, or a plan was asked for | + written design and plan | "Deep channel, several subsystems. Design before code." |
22
+
23
+ `bypass`, `fast`, and `main` proceed without stopping for approval; only
24
+ `deep` stops, for design sign-off before code.
25
+
26
+ Name the channel and the signal that actually routed you there. The strings above
27
+ are examples, not fixed copy, and a channel with a two-part signal should say
28
+ which part applied. `bypass` says nothing at all, because a question that gets
29
+ announced stops being a question.
30
+
31
+ **`root-cause` and `finish` are not channel-assigned.** The code misbehaving
32
+ triggers the first: a bug report, a red test, behaviour you cannot account
33
+ for. An integration event, merging, pushing, or opening a PR, triggers the
34
+ second. Both fire in every channel, `bypass` included.
35
+
36
+ ## The rules
37
+
38
+ One line each. Read the reference only on friction: the moment you notice
39
+ yourself wanting to skip the rule, or arguing that this one is the exception.
40
+
41
+ - **Agree intent** before building. One question at a time. Propose approaches
42
+ with a recommendation, not a survey. `main` agrees in a message, `deep` writes
43
+ it down. `references/intent.md`
44
+ - **Test first.** The test comes before the code; run it while it should
45
+ still be failing, then write the least code that turns it green. Skip that
46
+ watching step and a green result is only an unchecked guess.
47
+ `references/test-first.md`
48
+ - **Root cause** before fix. A fix that only hides the symptom has not fixed
49
+ anything. Three failed fixes point at the design, not your guesswork.
50
+ `references/root-cause.md`
51
+ - **Verify** before claiming. Run the command in this turn and read its
52
+ output; the claim comes after that, never before. How sure you feel is not
53
+ something anyone else can check. `references/verify.md`
54
+ - **Review** before merge. Dispatch a reviewer with fresh context and put the
55
+ diff on disk for it to read, so those bytes fill their context instead of
56
+ yours. `references/review.md`
57
+ - **Finish** deliberately. Green suite first, then let your partner pick
58
+ merge, PR, or leave it. Never pick for them. `references/finish.md`
59
+
60
+ ## Changing channel
61
+
62
+ Escalate out loud. A `fast` task that turns out to need a new interface becomes
63
+ `main`, and you say so. Finishing quietly in the wrong channel is the failure
64
+ this prevents; the same goes for dropping to a shallower one. Explicit
65
+ instruction wins: "just do it" collapses to `fast`.
66
+
67
+ ## Deep channel
68
+
69
+ Design to `docs/specs/YYYY-MM-DD-<topic>.md`, plan to
70
+ `docs/plans/YYYY-MM-DD-<topic>.md`, unless the repo has a convention or
71
+ your partner states a preference. Get the design signed off before code.
72
+
73
+ Then read `references/deep-channel.md` for the plan format, the dispatch rules,
74
+ and when a task actually needs a reviewer. Two that catch people out: never run
75
+ two implementers at once, and review is tiered, not automatic.
76
+
77
+ ## Conflicts
78
+
79
+ Sluice cannot run alongside the superpowers plugin. Superpowers requires its
80
+ own fixed pipeline up front for anything that adds to or changes what the
81
+ software does, not just code edits, and that pipeline overrides this router
82
+ outright, so the two cannot be installed together.
@@ -0,0 +1,94 @@
1
+ # Deep channel
2
+
3
+ ## Plan format
4
+
5
+ - A plan opens with **Goal**, **Architecture** and **Ground Rules**. The ground
6
+ rules are the limits the whole plan answers to, each recorded at its literal
7
+ value, and each one binds every task without being repeated in it.
8
+ - No implementer sees a neighbouring task, so each task carries a
9
+ **Contract**, not optional: a symbol absent from it does not exist for
10
+ whoever builds the task. `Needs` names what this task calls but another
11
+ task defines; `Offers` names what later tasks will call. Both sides are
12
+ spelled out whole, argument lists and return shapes.
13
+ - A **Touches** line lists the exact paths the task creates, edits and tests.
14
+ - A **Review** field may name why the task needs the stronger tier (auth,
15
+ data, money, concurrency); the table below decides otherwise.
16
+ - Steps are checkboxes: an action, and the proof it worked. Skip the
17
+ test-first ritual per step; `references/test-first.md` owns it.
18
+ - Code goes in only where exact characters matter and paraphrase breaks
19
+ something: a signature, a literal the code must match, a command, a test
20
+ body. Prose deliverables get their claims and their length, not a draft.
21
+ - A step a stranger could not carry out from its own text is unfinished.
22
+ "Same as Task 3" is one such step: tasks get read out of order, so write
23
+ the instruction out again in full. "TBD" is another. So is naming a type
24
+ or a function that no task in the plan ever creates.
25
+
26
+ ```
27
+ # Plan: <topic>
28
+ ## Ground Rules
29
+ - <exact value>
30
+ ### Task N: <name>
31
+ **Contract:** Needs: <sig> | Offers: <sig>
32
+ **Touches:** <path> (new) | <path> (edit) | <path> (test)
33
+ **Review:** <reason, or omit>
34
+ - [ ] <action> -> <proof>
35
+ ```
36
+
37
+ ## Dispatch rules
38
+
39
+ - One `TaskCreate` per task, marked in progress then complete. That state
40
+ outlives compaction; your memory doesn't.
41
+ - Each task goes to a fresh agent with that task's text and nothing else.
42
+ What this session accumulated is yours to hold, not theirs.
43
+ - **Never run two implementers at once.** They collide in the same files.
44
+ - Fan out for work that doesn't write: investigations or searches, one
45
+ agent per question, all dispatched in one message so they run at once.
46
+ The test: could two agents touch the same file?
47
+ - Isolate the workspace before a multi-task plan: the harness's worktree
48
+ tool, not `git worktree` yourself. Implementing straight onto main or
49
+ master needs your partner's say-so.
50
+ - Match model to task: cheap for mechanical work, stronger for judgment
51
+ and final review.
52
+
53
+ ## Review policy
54
+
55
+ A review costs about what the implementation cost, so reviewing every task
56
+ doubles the plan. Confirming Offers landed and nothing outside Touches moved
57
+ is free, one `git diff --stat`; only quality judgment needs a dispatch.
58
+
59
+ | Task shape | Review |
60
+ |------------|--------|
61
+ | Created files only, executable tests exist and pass, Contract matches | No dispatch. Read the diff stat yourself. |
62
+ | Modified existing code, or later tasks build on it | One reviewer dispatch |
63
+ | Auth, data, money, concurrency, or the plan flags it | One reviewer dispatch, stronger model |
64
+ | No executable test covers it: prose, config, docs | One reviewer dispatch; a diff stat can't confirm the words are right |
65
+
66
+ A task that matches more than one row takes the strongest review of them.
67
+
68
+ The diff goes to disk and the reviewer gets its path: `git diff <base>
69
+ <head> > <file>`. Base means where that task began, which is why `HEAD~1` is
70
+ wrong: on a five-commit task it shows the fifth and buries the rest.
71
+ Findings return to whoever wrote the code.
72
+
73
+ **Most fixes are too small to earn a second review.** Read the fix diff
74
+ yourself and check the test it names ran; dispatch again only for
75
+ substantial logic changes. Three rounds is the cap either way: a finding
76
+ still open then is structural, so escalate it to your partner.
77
+
78
+ **A finding surviving two rounds may be a defect in the criterion, not the
79
+ work.** Before a third round, ask whether any output could satisfy it. A
80
+ criterion that rejects every attempt the same way never converges, and the
81
+ work degrades each round as it contorts toward an unpassable test. Fixing
82
+ the criterion is your partner's call.
83
+
84
+ Never hand yourself a finding to fix while you are the one coordinating.
85
+ Coordination and repair are separate jobs, and doing both leaves your own
86
+ patch as the one nobody reviewed, bought with context the later tasks are
87
+ going to need. A finding has two destinations: fixed now by the agent that
88
+ wrote it, or recorded in the task's `TaskCreate` entry for the final review.
89
+ A reviewer may describe severity in words; a third disposition is not
90
+ available, and neither is a step that adjudicates findings and sorts them
91
+ into one.
92
+
93
+ The final review covers cross-task integration and anything deferred, not
94
+ lines a per-task review cleared.
@@ -0,0 +1,35 @@
1
+ # Finish
2
+
3
+ `finish` fires at an integration event, merging, pushing, or opening a PR,
4
+ in every channel. A commit made in passing during `fast` channel work is
5
+ not one of those: the branch as a whole has to be about to leave your
6
+ hands.
7
+
8
+ Start here: run every test the project has, not a sample of them. A red
9
+ result stops the process; there is no menu after a failure. A pass from
10
+ earlier in the session doesn't count: the tree has changed since, and
11
+ only a run against what's here now proves anything.
12
+
13
+ Confirm the base branch instead of assuming it; untangling a wrong merge
14
+ costs far more than asking would have.
15
+
16
+ With the suite green and the base confirmed, put exactly three options to
17
+ your partner: merge it locally, push it and open a PR, or leave the branch
18
+ as it stands. Those three exhaust what you may offer. Your partner may still
19
+ ask for something off the list, most notably scrapping the branch, but the
20
+ request has to originate with them and be unmistakable. Then stop. Which of
21
+ the three it is belongs to them, however obvious the choice looks from where
22
+ you are standing, so nothing moves until they say.
23
+
24
+ After a local merge, run the whole suite again over the merged tree before
25
+ deleting anything. A failure there stops the cleanup; you haven't pushed
26
+ anything yet, so you can still walk it back.
27
+
28
+ While a PR is open, the workspace survives: it is where the review
29
+ comments get answered, and tearing it down means rebuilding it the moment
30
+ the first one arrives. Discarding needs an explicit, confirmed ask from
31
+ your partner. This tooling removes only the workspaces it created;
32
+ anything else stays put.
33
+
34
+ The friction line: "picking for them saves everyone a turn." Saving a
35
+ turn is not the same as having their answer. Wait for it.
@@ -0,0 +1,29 @@
1
+ # Agree intent
2
+
3
+ Ask one question at a time. Use multiple choice when the answer set is
4
+ bounded.
5
+
6
+ Offer two or three approaches, never a survey. Put your top pick first
7
+ and explain what makes it the better bet. Cut every feature YAGNI would
8
+ cut before you present any of them; a lean option judged against a
9
+ padded one is not a fair comparison.
10
+
11
+ Size the request before you start refining it. "A CLI, a web dashboard and a
12
+ sync daemon" is three projects wearing one sentence, and a question about the
13
+ internals of any one of them comes too early. Say so the moment you notice, cut
14
+ the work at its seams into pieces that could each ship alone, agree the order
15
+ they go in, and take only the first into the channel. The rest wait their turn,
16
+ each with a design and a plan of its own. One design covering four subsystems
17
+ produces a plan wrong in four places, found only once tasks are dispatched
18
+ against it.
19
+
20
+ Scale with channel. `main` agrees in one message and writes nothing. `deep`
21
+ writes the design and gets sign-off before code. `fast` and `bypass` never
22
+ reach this rule.
23
+
24
+ Some questions are better shown than told; `references/show-or-say.md`
25
+ decides which. Do not restate it here.
26
+
27
+ The friction line: "I already know what they want." You know the goal,
28
+ not the constraints, and the shape in your head rarely matches theirs. One
29
+ question costs a turn. A wrong build costs the task.
@@ -0,0 +1,42 @@
1
+ # Review
2
+
3
+ `main` and `deep` both take a review before anything merges. What routed the
4
+ work there, a new interface or a second subsystem, is what makes one reader
5
+ insufficient.
6
+
7
+ Write the diff out and send the path: `git diff <base> <head> > <file>`. A
8
+ pasted diff fills your context; a file fills the reviewer's, which is what
9
+ you dispatched one for. Get the base right: `HEAD~1` is the standing
10
+ mistake, showing the last of five commits and burying the rest. Send what
11
+ you built and what it is meant to do alongside the path, and nothing about
12
+ how you got there.
13
+
14
+ Leave every finding open to the reviewer; steering them away from an issue
15
+ first is the same mistake as reviewing it yourself. A finding that looks
16
+ wrong still gets raised, then argued.
17
+
18
+ Every finding has one of two destinations. Either it blocks, and the work
19
+ stays where it is until the fix lands, or it goes onto the task's record,
20
+ which is what the final review reads. Reviewers grade findings Critical,
21
+ Important or Minor, and the grade picks between the two: only Minor may wait
22
+ for the record, and anything graded above it blocks. A third destination is
23
+ not on offer, so neither is the adjudication step that would sort findings
24
+ into it; that sorting costs more than the findings are worth.
25
+
26
+ Send findings back to the agent that wrote the code: it already holds the
27
+ task and its reasoning, memory you would otherwise rebuild. Three rounds is
28
+ the cap, and a finding still open when the third one ends is structural, not
29
+ local, so stop there and hand it to your partner.
30
+
31
+ Receiving a finding: check it against the codebase before acting, and argue
32
+ back with specifics when it is wrong. Agreeing just to move things along is
33
+ not engagement.
34
+
35
+ For a small fix, read the diff and confirm the covering test ran; re-review
36
+ only for substantial logic changes. While you are the one coordinating,
37
+ findings are not yours to fix: your patch would be the single patch nobody
38
+ reviews, and it spends context the plan still needs.
39
+
40
+ The friction line: "dispatching a reviewer for this is overkill." Skipping
41
+ the dispatch doesn't skip the cost, it just moves the cost onto you, and
42
+ self-review is not review.
@@ -0,0 +1,38 @@
1
+ # Root cause
2
+
3
+ This rule is trigger-based, not channel-assigned. Anything the code does that
4
+ nobody intended fires it, in every channel, `bypass` included: a crash, a
5
+ test that has just turned red, output no one can account for.
6
+
7
+ It rules out patching first and understanding later. A change aimed at the
8
+ symptom buys quiet, and the quiet ends: the defect comes back, usually
9
+ worse.
10
+
11
+ **Reproduce it first.** A fault you cannot trigger on demand is not something
12
+ you can fix, only guess at. Then read the error to the end, stack trace and
13
+ all; the part you skim is often the part naming the cause.
14
+
15
+ **Find the origin, not the blast site.** Follow the bad value back to
16
+ whatever produced it and repair it there. Two things shorten the walk. One is
17
+ whatever moved recently, a commit or a dependency bump. The other is a nearby
18
+ case that still works: set it beside the broken one and list every way the
19
+ two diverge, including the ones you are certain cannot matter, since that is
20
+ usually where it hides.
21
+
22
+ **One hypothesis, written down.** Alter two things at once and a green
23
+ result cannot say which earned it, so state the theory plainly, pick the
24
+ smallest change that would confirm or kill it, and change exactly that.
25
+
26
+ **The fix travels with a test that would have caught it.** Write it, see it
27
+ fail, make the single change your hypothesis called for, then run it again.
28
+ With the cause dead, put validation on the layers that let the bad value
29
+ pass, so its next variant trips something loud instead of slipping by.
30
+
31
+ Three failed fixes point at the design, not your guesswork. Stop and raise
32
+ it rather than trying a fourth.
33
+
34
+ A test that waits by sleeping a fixed duration will flake eventually. Poll
35
+ for the condition it is really waiting on and fail on a timeout.
36
+
37
+ The friction line: "I have seen this exact error before, I know the fix."
38
+ Recognising the pattern skips the step where you check it still applies here.
@@ -0,0 +1,36 @@
1
+ # Show or say
2
+
3
+ This is never offered at the start. What triggers it is a specific moment in
4
+ the conversation: a question arrives that turns on how something looks rather
5
+ than on what it means. Offer then, in a message carrying nothing else, and
6
+ wait. Plenty of conversations never raise such a question, and in those the
7
+ offer is simply never made.
8
+
9
+ Apply the test to each question rather than deciding once: could you settle
10
+ this in a sentence, or do the candidates have to sit side by side where an
11
+ eye can compare them? Being about the interface does not settle it. "Should
12
+ deleting a record ask for confirmation first?" is a policy call, so argue it
13
+ in words. "Should the confirm button be red and set apart, or match the row
14
+ it belongs to?" has to be looked at.
15
+
16
+ Appearance is the dividing line, not subject matter. A screen layout, a
17
+ colour pairing, a diagram of how the pieces connect, a state machine,
18
+ anything with a spatial arrangement: show it. Anything you could write down
19
+ as a sentence, what's in scope, which architecture to use, what a term means:
20
+ say it.
21
+
22
+ Delivery: write the page to a file and publish it with the `Artifact` tool.
23
+ To iterate, edit that same file and republish it; the URL stays the same. If
24
+ `artifact-design` or `artifact-diagramming` guidance is available, follow it
25
+ instead of restating page-design rules here.
26
+
27
+ Two to four options per screen, no more, and print the question on the screen
28
+ itself rather than leaving it behind in chat. Fidelity follows the kind of
29
+ question being asked: a question about layout wants rough wireframes, and
30
+ real detail is worth drawing only when polish is the thing being decided.
31
+
32
+ Answers come back in chat. The page puts the options up; it does not collect
33
+ the reply.
34
+
35
+ If `Artifact` is unavailable, write a self-contained HTML file instead and
36
+ hand your partner the path.
@@ -0,0 +1,35 @@
1
+ # Test first
2
+
3
+ Write one test for the smallest slice of behaviour you intend to add. Run it
4
+ and watch it fail before you write anything else. Then write the minimal code
5
+ that makes it pass, and watch it pass.
6
+
7
+ The watching is the point, not a formality. A test you never saw fail might be
8
+ broken, aimed at the wrong behaviour, or not running at all; a green result
9
+ alone cannot tell you which. A test that passes the first time you run it is
10
+ not testing your change, it is testing behaviour that already existed. When
11
+ that happens, fix the test, not the code.
12
+
13
+ A test is only a test if some change to the implementation would turn it red.
14
+ Work out which change before you write the body; if there isn't one, what you
15
+ have is an assertion that stays green whatever you build.
16
+
17
+ Assertions belong on what the run actually produced: the value returned, the
18
+ state left behind, the output written. Never point one at a mock: a green
19
+ result then proves only that you called the mock the way you meant to, which
20
+ you knew already. Before a mock stands in for a dependency, learn what the real
21
+ one does on the paths your test never exercises; one that quietly drops a side
22
+ effect will hold a broken change green.
23
+
24
+ Keep helpers that exist only for tests inside the test files. If a production
25
+ class grows a method whose only caller is a test reaching inside it, the test
26
+ has started reshaping your design.
27
+
28
+ Three cases are worth asking to skip: generated or scaffolded code, a config
29
+ file with no logic in it, and a prototype headed for the bin before anyone
30
+ sees it. Ask rather than assume, and treat that list as closed.
31
+
32
+ The friction line: "this case is obvious enough to skip straight to the
33
+ code." A test written once the code already works can only confirm what you
34
+ already believe about it. By that point you have stopped hunting for the cases
35
+ you never thought of, so the test does not find them either.
@@ -0,0 +1,26 @@
1
+ # Verify
2
+
3
+ Claiming that something works has a fixed sequence in front of it: pick the
4
+ command that proves the claim rather than the one that would make it feel
5
+ true, run that command in full during this turn, read its output and its exit
6
+ code, and write the sentence only once you have. What you remember from an
7
+ earlier run is no substitute for reading this one, however convincing it was
8
+ at the time.
9
+
10
+ | Evidence in hand | What it lets you say |
11
+ |---|---|
12
+ | the original symptom, retested and gone | "bug fixed" |
13
+ | the actual diff, not its own status report | "subagent finished" |
14
+ | a fresh full run, zero failures, exit code checked | "tests pass" |
15
+ | a real build command at exit 0, not a clean linter | "build succeeds" |
16
+
17
+ A regression test counts only once you have seen it go both ways: red with
18
+ the fix backed out, green with the fix back in. A test that has only ever
19
+ passed proves nothing about what it would catch.
20
+
21
+ Wording is not a loophole. "Looks right", "should be good" and "that's
22
+ sorted" are completion claims in other clothes. So is pleasure at your own
23
+ work: "beautiful", "there we go", "nailed it" each announce that the thing
24
+ landed, and each needs the same command run beforehand as "it passes" does.
25
+
26
+ The friction line: "the change was too small to need a full run." Run it.
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "sluice",
3
+ "version": "1.0.0",
4
+ "description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries six rules as one-liners in the router and the full treatment in references read only on friction. Claude Code only; conflicts with the superpowers plugin.",
5
+ "author": "iceinvein",
6
+ "type": "prompt",
7
+ "tools": [
8
+ "claude"
9
+ ],
10
+ "files": {
11
+ "prompt": "SKILL.md"
12
+ },
13
+ "bundle": {
14
+ "include": [
15
+ "references"
16
+ ]
17
+ },
18
+ "install": {
19
+ "claude": {
20
+ "prompt": ".claude/skills/sluice/SKILL.md",
21
+ "bundleRoot": ".claude/skills/sluice"
22
+ }
23
+ },
24
+ "activation": {
25
+ "modes": [
26
+ "session",
27
+ "global"
28
+ ],
29
+ "default": "global",
30
+ "claudeHookDirective": "Before acting on a request that changes code, pick a sluice channel and state which one."
31
+ }
32
+ }