@iceinvein/agent-skills 0.13.0 → 0.14.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iceinvein/agent-skills",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Install agent skills into AI coding tools",
5
5
  "author": "iceinvein",
6
6
  "license": "MIT",
package/skills/index.json CHANGED
@@ -283,7 +283,7 @@
283
283
  "name": "sluice",
284
284
  "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 seven rules as one-liners in the router and the full treatment in references read only on friction. Checks the finished plan with plan.sh validate rather than trusting it to memory, seeds the run state from it, keeps a deep run's task breakdown in .sluice/run.json so a statusline segment and one status command can answer where the run is, and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what each dispatched agent cost where the transcript recorded it. Claude Code only; stands down where the superpowers pipeline governs the repo.",
285
285
  "type": "prompt",
286
- "version": "0.14.0"
286
+ "version": "0.15.0"
287
287
  },
288
288
  {
289
289
  "name": "temporal-coupling-detector",
@@ -56,8 +56,8 @@ yourself wanting to skip the rule, or arguing that this one is the exception.
56
56
  it down. `references/intent.md`
57
57
  - **Test first.** The test comes before the code; run it while it should
58
58
  still be failing, then write the least code that turns it green. Skip that
59
- watching step and a green result is only an unchecked guess.
60
- `references/test-first.md`
59
+ watching step and a green result is only an unchecked guess. A test no
60
+ plausible change could turn red is not one you owe. `references/test-first.md`
61
61
  - **Root cause** before fix. A fix that only hides the symptom has not fixed
62
62
  anything. Three failed fixes point at the design, not your guesswork.
63
63
  `references/root-cause.md`
@@ -353,7 +353,7 @@ and it fails by printing success rather than by erroring.
353
353
 
354
354
  | Tier | Task shape | Review |
355
355
  |------|------------|--------|
356
- | 0 | Created files only, executable tests exist and pass, Contract matches | No dispatch. Read the commit stat yourself. |
356
+ | 0 | Created files only, tests that meet `references/test-first.md` exist and pass, Contract matches | No dispatch. Read the commit stat yourself. |
357
357
  | 1 | Modified existing code, or later tasks build on it | One reviewer dispatch |
358
358
  | 2 | No executable test covers it: prose, config, docs | One reviewer dispatch; a stat cannot confirm the words are right |
359
359
  | 3 | Auth, data, money, concurrency, or the plan flags it | One reviewer dispatch; the task may not be downshifted |
@@ -382,6 +382,13 @@ number, not the row order and not which shape sounds more serious. A task that
382
382
  only creates files but ships prose is tier 2, and a suite re-bless paired with
383
383
  an ADR is tier 2 rather than the free row it resembles.
384
384
 
385
+ **A test written to earn tier 0 does not earn it.** The row is a discount on
386
+ review, and a task whose only executable test fails
387
+ `references/test-first.md`'s question, that some plausible change to the code
388
+ turns it red, is a tier 2 task carrying a green line rather than a covered
389
+ one. Price it as tier 2. Buying this table's savings with the one kind of test the rest of the
390
+ skill argues against is the cheapest way to lose them.
391
+
385
392
  Ordering inert tasks first is what keeps this affordable. An inert task that
386
393
  only creates files takes tier 0, so a nine-task plan usually buys three
387
394
  or four dispatches rather than nine. If most of your plan qualifies for a
@@ -10,26 +10,64 @@ alone cannot tell you which. A test that passes the first time you run it is
10
10
  not testing your change, it is testing behaviour that already existed. When
11
11
  that happens, fix the test, not the code.
12
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.
13
+ **Name the change that would turn it red.** A test is only a test if some
14
+ change to the implementation makes it fail, so work out which change before you
15
+ write the body, and hold the answer to being one a person would plausibly make
16
+ to this code later. An answer nobody would ever write, or one the type checker,
17
+ the linter or the framework already rejects on your behalf, means there is no
18
+ test to write here. Write nothing and move on. What you were reaching for is an
19
+ assertion that stays green whatever you build, and it bills a run on every
20
+ commit from now on to keep saying so.
21
+
22
+ **Some shapes never survive that question.** A getter, a constant, a
23
+ framework's own behaviour, a mock's call log. Coverage is a smoke detector,
24
+ not a target, and a test added to move the number is the purest case of the
25
+ thing this rule refuses.
26
+
27
+ **Skipping is a judgement, not a list.** Generated or scaffolded code, a config
28
+ file with no logic in it, and a prototype headed for the bin are the usual
29
+ cases that fail the question outright, but they are instances of the criterion
30
+ rather than the whole of it. What you owe in exchange for the judgement is one
31
+ sentence in your reply naming the behaviour you left untested and why: a skip
32
+ nobody hears about cannot be told apart from an oversight.
33
+
34
+ **Assertions belong on what the run actually produced**: the value returned,
35
+ the state left behind, the output written. Never point one at a mock, because
36
+ a green result then proves only that you called the mock the way you meant to,
37
+ which you knew already. Before a mock stands in for a dependency, learn what
38
+ the real one does on the paths your test never exercises; one that quietly
39
+ drops a side effect will hold a broken change green. Where the wiring is what
40
+ breaks, one real integration test is worth five mocked unit ones.
41
+
42
+ **Expected values are written by hand or taken from the spec.** Never produce
43
+ one by running the code under test and keeping what came back: a blessed
44
+ snapshot checks the implementation against itself, so it stays green whatever
45
+ that implementation does, which is the same as having no test at all. The
46
+ re-bless is where this goes wrong at scale, the diff too large to read and
47
+ every value in it exactly as authoritative as the bug you are freezing.
48
+
49
+ **One behaviour per test**, named for the behaviour it pins rather than for the
50
+ function it calls. Keep helpers that exist only for tests inside the test
51
+ files. If a production class grows a method whose only caller is a test
52
+ reaching inside it, the test has started reshaping your design.
53
+
54
+ **A test goes when the behaviour it pinned is gone.** Delete it alongside the
55
+ code, in the same commit, like anything else the change orphaned. Two tests
56
+ pinning one behaviour are a test and a maintenance bill, so keep the clearer.
57
+ None of that reaches a red test. A failure is the suite claiming your change
58
+ broke something, and deleting it, skipping it, loosening the assertion or
59
+ special-casing the input it feeds answers the claim by silencing the witness.
60
+ Believe the test itself is wrong and you say so and get agreement first.
61
+
62
+ Two friction lines, one in each direction:
63
+
64
+ "This case is obvious enough to skip straight to the code." A test written
65
+ once the code already works can only confirm what you already believe about
66
+ it. By that point you have stopped hunting for the cases you never thought of,
67
+ so the test does not find them either.
68
+
69
+ "Better add a test here to be safe." Safe against what? You are one sentence
70
+ away from the answer, so finish it and name the change this would catch. If
71
+ the sentence will not finish, what moved you was diligence rather than
72
+ evidence, and what it buys is a permanently green line nobody later dares
73
+ delete.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sluice",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
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 seven rules as one-liners in the router and the full treatment in references read only on friction. Checks the finished plan with plan.sh validate rather than trusting it to memory, seeds the run state from it, keeps a deep run's task breakdown in .sluice/run.json so a statusline segment and one status command can answer where the run is, and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what each dispatched agent cost where the transcript recorded it. Claude Code only; stands down where the superpowers pipeline governs the repo.",
5
5
  "author": "iceinvein",
6
6
  "type": "prompt",