Skip to content

docs: §13.36 TDD-for-Skills ARMED→RESOLVED (shipped as principle 15) - #113

Merged
artyhoo merged 1 commit into
mainfrom
docs/resolve-13.36-tdd-for-skills
May 21, 2026
Merged

docs: §13.36 TDD-for-Skills ARMED→RESOLVED (shipped as principle 15)#113
artyhoo merged 1 commit into
mainfrom
docs/resolve-13.36-tdd-for-skills

Conversation

@artyhoo

@artyhoo artyhoo commented May 21, 2026

Copy link
Copy Markdown
Owner

Что сделано

Принцип 15 (skill paired-negative, #112, SSOT #55) реализовал candidate mechanism A из §13.36 → помечаю §13.36 ARMED→RESOLVED и правлю ставшую ложной фразу «SKILL.md files currently have no equivalent enforcement».

Orchestrator follow-up, обещанный в #112.

Как проверить

Не §1.7-bearing: open-questions.md вне discipline-self-check path-фильтра. Не capability commit.

…s principle 15, #112)

Principle 15 (skill paired-negative, #112, SSOT #55) shipped candidate mechanism A —
each non-grandfathered SKILL.md carries a body-section paired-negative block. Marks
§13.36 RESOLVED and corrects the now-false claim that SKILL.md files have no
paired-negative enforcement. Orchestrator follow-up promised in #112.

Prior-art: skipped — docs status update only, no new capability or dependency.
@artyhoo
artyhoo merged commit d85d630 into main May 21, 2026
17 checks passed
@artyhoo
artyhoo deleted the docs/resolve-13.36-tdd-for-skills branch May 22, 2026 18:09
artyhoo added a commit that referenced this pull request May 25, 2026
… detection) (#220)

Run `bash .claude/skills/meta-orchestrator/helpers/plan-currency-check.sh`
(L2 Stage 3 detection shipped in #217) → 88 UNTRACKED-N entries surfaced
between the 2026-05-22 reconciliation and origin/staging tip (#217). Map
each to an existing §0 / Track row by adding the PR number to its evidence
cell, or to a new §0 row for two umbrellas that landed in full since the
prior snapshot. Re-run helper → 0 UNTRACKED remaining.

Key changes:

- Snapshot date 2026-05-22 → 2026-05-25 (header + §0).
- N8 row: A-phase 🔲 → 🟡 — C1 SSOT-existence (#170), C2 kickoff
  T-enumeration floor (#174), C3 principle 13 §1.7 substance (#178),
  C4 delivery-channel marker (#177), activation #180. C5 + cost-levers
  remain gated on §5.3 utilisation trigger.
- Track M.1 / M.4 → DONE: M.1 codified T20 via #212 (with NB note —
  recommendation-laziness took the T20 slot, mutation-equivalence
  T-bump 20→21 still pending); M.4 6 paired-negative bash-hook tests
  shipped #195/#196/#197/#198/#199/#200.
- Two new §0 rows: Meta-orchestrator skill (Track P) — BUILD #186 +
  audit rounds #192/#193/#194/#201/#202 + UX refactor #203/#204/#205
  + planner-completeness #213/#214/#217 + §1.7 PR-body mandate #216;
  Recommendation-laziness discipline — R-phase #206/#207, benchmark
  #210, I-phase Sub-waves A/C/D #211/#212/#215.
- N7 row: + dogfood research-patch #135 / §4 demotion #166 / live-trial
  verified #171. N4b row: + design #136 / record #118.
- Infra paragraph: PR refs for I.1 follow-ups (#121/#123/#124/#125/
  #128/#130/#131/#143/#145/#146/#147/#148/#149/#172/#187), I.2
  (#139/#142/#154/#175), I.3 DN-4 (#126/#132/#133/#138/#140/#152/
  #159/#161/#162/#167).
- Track 2.3 (channel-earliness audit) → DONE 2026-05-23 (#181); removed
  from "What actually remains".
- Footer subsection: standalone work (#191 satellite-arch / #189
  guard-liveness / #173 storm-readiness / #176 §10 port / #182 cleanup),
  Wave 10 follow-ups (#110/#112/#113), plan-revision history (#108/
  #109/#153/#155/#157/#160/#164/#165/#168/#179/#185).

Verification:
- `bash .claude/skills/meta-orchestrator/helpers/plan-currency-check.sh
  | grep -c '^UNTRACKED'` → 0 (down from 88).
- `npx markdownlint-cli docs/meta-factory/wave-sequencing-plan.md`
  → no violations.
- `npx vitest run packages/core/skills/plan-currency-check.test.ts`
  → 14/14 passed.

Prior-art: skipped — chore, doc reconciliation only, no new capability
or rule introduced.
artyhoo added a commit that referenced this pull request Jun 28, 2026
…s (§13.5 I-2 Layer 1) (#793)

Layer-1 DETECTION ONLY: produce a {dir->stack} map for a multi-stack monorepo so the
secondary stack is never silently dropped — the #780 nuance at the detection layer
(timeliner: apps/api -> ts-server + apps/mobile -> react-native). Layer-2 emission
(on-disk marker / per-workspace applies-to / ESLint files:) is OUT OF SCOPE here.

setup.d/lib.sh:
- Parameterize _detect_stack_from_pkg to accept an optional target dir (default
  $PROJECT_ROOT). No-arg form is unchanged — the I-1 install stack-pick and
  15-companions-stack.sh both call it no-arg (back-compat, proven by the new test).
- Add two node-free helpers (no yq/pnpm/turbo dep; install runs before consumer deps):
  * _workspace_pkg_dirs [root] — enumerate workspace package dirs (children WITH a
    package.json) under the 5-dir convention (apps packages services libs modules — the
    SAME set as the arch:check resolver at setup.d/70-deps.sh:37, so the two never drift).
  * _detect_stacks_per_workspace [root] — walk each x _detect_stack_from_pkg -> echo
    `dir<TAB>stack` per workspace. A per-workspace `unknown` is a re-checkable marker,
    KEPT in the map (never dropped, never exit 1 — the §13.5 fork-2 default).

tests/install-sh/workspace-stack-detect.test.sh (new, CI-wired): fixture monorepo
(apps/api->ts-server, apps/mobile->react-native, packages/config->unknown, apps/docs
without package.json) proves BOTH stacks land in the map (T-MSM-A); paired-negatives
prove root-only detect drops the secondary stack, no-package.json dirs aren't
enumerated, `unknown` is kept not silently concretized, a flat repo yields an empty
map, and the _detect_stack_from_pkg arg vs $PROJECT_ROOT parameterization.

tests/install-sh/layer-units.test.sh: register the 2 new helpers in the SSOT_FUNS
copy-paste guard (T15 — new lib helpers get the same layer-isolation protection).

.github/workflows/audit-self.yml: wire the new test into CI (deterministic bash, no LLM).

SSOT: appended #180 (Nx per-project inference, REFERENCE) + #181 (pnpm/Turborepo
workspace discovery, REFERENCE). Research draft IDs #111-#113 were stale — the live SSOT
highest is #179 (verified), so the real next IDs are #180/#181. #111 (ESLint files:) is
deferred to the Layer-2 commit.

Prior-art: prior-art-evaluations.md#180 (Nx per-project stack inference, REFERENCE — thin per-dir walk REUSES our node-free _detect_stack_from_pkg; Nx runtime ADOPT rejected per build-first-reuse-default.md §2).
Prior-art: prior-art-evaluations.md#181 (pnpm/Turborepo workspace discovery, REFERENCE — node-free reader of the 5-dir convention; no install-time pnpm/turbo dependency).
artyhoo added a commit that referenced this pull request Jul 24, 2026
…rcement column

Rewrites the §3 criterion and the mutation check so this document carries
only its own niche, per the ADOPT-as-base/thin-wrapper precedent already
recorded in the prior-art SSOT (#113) and the shipped companion-pointer
pattern in plugin/hooks/lang/en.sh:35.

- §3 authoring-time criterion: restated in this document's own words as a
  compact trap statement; the fuller authoring workflow now points at the
  `superpowers:test-driven-development` companion skill "where installed",
  with the trap standing on its own where it is not.
- Mirror-assertion example replaced with an original one (formatBytes)
  — the previous example was lifted verbatim from upstream and the prose
  n-gram probe could not see it, because it strips code fences.
- Mutation check: the five break classes reworded as the classic
  mutation-operator families they are, with a pointer to the companion's
  closing walk-through.
- Prior-art entry now states the division of labour explicitly (upstream
  owns the authoring workflow; this document owns trap -> enforcement
  layer) and records the companion's opt-in status.

Nothing here hard-depends on the companion: every pointer is conditional,
matching the shipped-axis rule in .claude/rules/build-first-reuse-default.md
§1.1 ("integrate, never hard-depend").

Acceptance: n-gram probe against the upstream file reports 0 shared
sequences at n=6 over prose and n=4 over fenced code (previous run: 6
prose sequences, longest 13 words, plus an undetected verbatim example).
make self-audit exit 0; snapshot compare 13 pass / 0 fail; the 8 npm-stack
fingerprints shift by exactly one hash line each.

Prior-art: skipped — documentation edit that REDUCES borrowed content in an existing shipped reference doc; no new dependency, no new module, no new capability. Applies the thin-wrapper shape from SSOT #113 (obra/superpowers writing-skills, ADOPT as base + project residue) to a sibling upstream file rather than introducing a new upstream relationship.
artyhoo added a commit that referenced this pull request Jul 24, 2026
…e, manual mutation check (#1121)

* docs(ai-traps): test-quality traps — change detectors, string-presence, manual mutation check

Extends the shipped AI-traps catalogue with four additions, keeping the
file's trap -> "Caught by" structure (the enforcement-layer column is what
this doc adds over prose-style guidance elsewhere).

1. §3 Tautological tests — adds the authoring-time criterion ("which
   production change would make this test fail, and is it a bug or a
   decision?") with its three outcomes, names the change-detector failure
   mode, and adds a mirror-assertion example where both sides are computed
   by the SUT.
2. §12 (new) String-presence assertions on scripts, skills, and prompts —
   grepping a .md/.sh for the text it should contain proves only that the
   source is the source. States the observable alternative per artifact
   kind, and is explicit that no deterministic layer catches this: the
   arms are the RED->GREEN liveness fixtures and AI judgment.
3. Manual mutation check — the five mutation classes (wrong constant or
   argument, wrong branch, missing side effect, empty/default return,
   missing validation) for surfaces Stryker does not reach. Framed as
   authoring-time discipline, not a gate; notes the repo's own on-demand
   bash mutator is a local dev tool, not part of the consumer install.
4. Prior-art section citing the two convergent external sources.

Both shipped copies updated: skills/ (source form, relative refs
transformed at install time) and plugin/skills/ (pre-rendered absolute
refs for the plugin + OpenCode channel). The two stay at their single
intended line-6 delta.

Install fingerprints regenerated — 8 npm-stack baselines shift by exactly
one hash line (.claude/skills/getff/references/ai-traps.md); python/cargo
baselines do not ship the skill and are unchanged.

Prior-art: skipped — documentation edit to an existing shipped reference doc; no new dependency, no new module, no new capability. External sources are cited as REFERENCE-class convergent confirmation (obra/superpowers writing-good-tests v6.2.0 MIT, paraphrased not copied; Google Testing Blog change-detector post). Nearest existing SSOT row is #55 (obra/superpowers TDD discipline, ADAPT) — same upstream project, adjacent but distinct file, so no new SSOT entry is warranted.

* docs(ai-traps): thin-wrapper the borrowed TDD material, keep the enforcement column

Rewrites the §3 criterion and the mutation check so this document carries
only its own niche, per the ADOPT-as-base/thin-wrapper precedent already
recorded in the prior-art SSOT (#113) and the shipped companion-pointer
pattern in plugin/hooks/lang/en.sh:35.

- §3 authoring-time criterion: restated in this document's own words as a
  compact trap statement; the fuller authoring workflow now points at the
  `superpowers:test-driven-development` companion skill "where installed",
  with the trap standing on its own where it is not.
- Mirror-assertion example replaced with an original one (formatBytes)
  — the previous example was lifted verbatim from upstream and the prose
  n-gram probe could not see it, because it strips code fences.
- Mutation check: the five break classes reworded as the classic
  mutation-operator families they are, with a pointer to the companion's
  closing walk-through.
- Prior-art entry now states the division of labour explicitly (upstream
  owns the authoring workflow; this document owns trap -> enforcement
  layer) and records the companion's opt-in status.

Nothing here hard-depends on the companion: every pointer is conditional,
matching the shipped-axis rule in .claude/rules/build-first-reuse-default.md
§1.1 ("integrate, never hard-depend").

Acceptance: n-gram probe against the upstream file reports 0 shared
sequences at n=6 over prose and n=4 over fenced code (previous run: 6
prose sequences, longest 13 words, plus an undetected verbatim example).
make self-audit exit 0; snapshot compare 13 pass / 0 fail; the 8 npm-stack
fingerprints shift by exactly one hash line each.

Prior-art: skipped — documentation edit that REDUCES borrowed content in an existing shipped reference doc; no new dependency, no new module, no new capability. Applies the thin-wrapper shape from SSOT #113 (obra/superpowers writing-skills, ADOPT as base + project residue) to a sibling upstream file rather than introducing a new upstream relationship.

* fix(audit-ai-docs): un-break D5 on the real repo and re-sync the two implementations

D5 ("every file carrying the canonical goal phrase is enrolled or exempt")
was red on a clean staging checkout, and the .sh and .ts implementations
had drifted apart. Neither was noticed because nothing runs the probe over
the real repository: pre-push (`auditAiDocsSection`) and audit-self.yml both
run `vitest audit-ai-docs.test.ts`, which exercises synthetic fixtures in
temp dirs only.

Three defects, all pre-existing on staging:

1. `plugin/hooks/inject-session-bootstrap` carried the phrase and matched no
   exemption, so D5 failed. It is a generated twin — the generator copied the
   phrase out of `.claude/hooks/inject-session-bootstrap.sh`, which is itself
   enrolled. New GENERATED_TWIN exemption added to both implementations,
   content-gated on the generator's own header rather than on the path,
   because `generate-plugin-twins.sh` also supports a `manual` mode whose
   twins are hand-maintained and do deserve independent tracking.
2. `AGENTS.md` was enrolled in DOWNSTREAM_DOCS by #867 in the .sh probe only;
   the .ts port (#120) never received it, so the .ts probe reported the repo's
   own AGENTS.md as an orphan.
3. `packages/core/hooks/inject-session-bootstrap.test.ts` was in the .sh
   TEST_INFRA set but not the .ts one; `.stryker-tmp/` + `.stryker/` were in
   the .ts GITIGNORED set but not the .sh one. Both directions re-synced.

Paired arms shipped for the new exemption: a twin carrying the generator
header is exempt, a hand-written `plugin/hooks/*` file with the phrase is
still flagged. Without the negative arm the exemption could silently widen
to the whole directory.

One existing test changed: the D1-warn case built its fixture by looping over
DOWNSTREAM_DOCS and relied on AGENTS.md being absent from that list to leave
the file uncreated. Enrolling AGENTS.md made that dependency explicit —
the loop now skips it deliberately, with the reason recorded inline.

`audit-ai-docs.sh` ships to consumers as `scripts/audit-ai-docs.sh`, so the
8 npm-stack install fingerprints shift by exactly one hash line each.

Verified: bash probe 4 PASS / 0 FAIL (was 3 PASS / 1 FAIL); .ts probeD5 over
the real repo returns 0 findings (was 3); audit-ai-docs.test.ts 202 passed;
make self-audit exit 0; snapshot compare 13 pass / 0 fail; twin generator
idempotent (no diff after re-run); shellcheck unchanged vs staging (rc=1,
same two pre-existing SC2001 style hits on untouched lines).

Also fixes the stale self-reference in the M2 fixture README header, which
named `agents/fixtures/shipped-agent-liveness` — a path that exists nowhere
else in the repo; every other reference already points at `tests/fixtures/`.

Prior-art: skipped — bug fix plus test coverage for an existing probe; no new dependency, no new module, no new capability. The GENERATED_TWIN exemption encodes an existing repo mechanism (scripts/generate-plugin-twins.sh) rather than introducing one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant