@webpresso/plugin-antigravity 0.0.0-stage → 0.0.17

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 (43) hide show
  1. package/LICENSE +104 -0
  2. package/bin/wp +276 -0
  3. package/hooks.json +54 -0
  4. package/mcp_config.json +11 -0
  5. package/package.json +37 -3
  6. package/plugin-skill-ownership.json +105 -0
  7. package/plugin.json +11 -0
  8. package/skills/ai-deslop/SKILL.md +96 -0
  9. package/skills/antigravity/SKILL.md +52 -0
  10. package/skills/autopilot/SKILL.md +82 -0
  11. package/skills/autoresearch/SKILL.md +49 -0
  12. package/skills/best-practice-research/SKILL.md +102 -0
  13. package/skills/browse/SKILL.md +25 -0
  14. package/skills/claude/SKILL.md +52 -0
  15. package/skills/codex/SKILL.md +52 -0
  16. package/skills/deep-interview/LICENSE.txt +28 -0
  17. package/skills/deep-interview/SKILL.md +270 -0
  18. package/skills/deep-research/SKILL.md +259 -0
  19. package/skills/delivery-program/SKILL.md +62 -0
  20. package/skills/design-review/SKILL.md +26 -0
  21. package/skills/devex-review/SKILL.md +28 -0
  22. package/skills/fix/SKILL.md +218 -0
  23. package/skills/handoff/SKILL.md +99 -0
  24. package/skills/hooks-doctor/SKILL.md +153 -0
  25. package/skills/investigate/SKILL.md +83 -0
  26. package/skills/lore-protocol/SKILL.md +84 -0
  27. package/skills/opencode-go/SKILL.md +52 -0
  28. package/skills/plan-ceo-review/SKILL.md +27 -0
  29. package/skills/plan-design-review/SKILL.md +27 -0
  30. package/skills/plan-devex-review/SKILL.md +19 -0
  31. package/skills/plan-eng-review/SKILL.md +24 -0
  32. package/skills/plan-refine/SKILL.md +122 -0
  33. package/skills/plan-refine/references/full-methodology.md +654 -0
  34. package/skills/ralplan/SKILL.md +196 -0
  35. package/skills/team/SKILL.md +121 -0
  36. package/skills/tech-debt/SKILL.md +95 -0
  37. package/skills/testing-philosophy/SKILL.md +53 -0
  38. package/skills/testing-philosophy/references/full-testing-philosophy.md +519 -0
  39. package/skills/tooling-friction/SKILL.md +234 -0
  40. package/skills/tph/SKILL.md +35 -0
  41. package/skills/ultragoal/SKILL.md +304 -0
  42. package/skills/verify/SKILL.md +399 -0
  43. package/README.md +0 -3
@@ -0,0 +1,196 @@
1
+ ---
2
+ type: skill
3
+ slug: ralplan
4
+ title: Ralplan Consensus Planning
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related:
9
+ [
10
+ deep-interview,
11
+ best-practice-research,
12
+ deep-research,
13
+ plan-refine,
14
+ plan-eng-review,
15
+ plan-ceo-review,
16
+ plan-design-review,
17
+ plan-devex-review,
18
+ ultragoal,
19
+ autopilot,
20
+ team,
21
+ ]
22
+ created: "2026-07-13"
23
+ last_reviewed: "2026-08-03"
24
+ name: ralplan
25
+ description: "Grounded consensus plan gate: code, research, blueprint, plan-*, refine. No impl."
26
+ ---
27
+
28
+ # Ralplan Consensus Planning
29
+
30
+ ## Use when (freeform)
31
+
32
+ - "ralplan", "consensus plan", "plan gate", "approve the plan first"
33
+ - "research then plan", "ground the plan before coding"
34
+ - user wants a durable blueprint ready for execution without implementing yet
35
+
36
+ Use when the user invokes `$ralplan`, asks for RALPLAN, or wants consensus planning before execution.
37
+
38
+ `ralplan` is an **orchestrated planning gate**, not an implementation lane. It produces one durable **blueprint**, reviews it, hardens it with `/plan-refine`, then stops.
39
+
40
+ ## Iron laws
41
+
42
+ 1. **Blueprint is the plan.** Freeform notes are not durable consensus. Create or bind a blueprint before reviews.
43
+ 2. **Align with other lanes before planning.** This repo is worked by many concurrent agent sessions. Before the code dive, establish which surfaces another live lane already owns and record them as explicit non-goals. See [Lane alignment](#lane-alignment-not-optional). The user should not have to re-assert this.
44
+ 3. **Ground before drafting.** Code dive (+ bounded external research when needed) happens **before** the blueprint draft is treated as serious.
45
+ - **A stated cause is a claim that must be observed.** When a plan explains
46
+ why something fails, it carries the command that produced that answer.
47
+ An unobserved cause is a guess laundered into consensus, and review will
48
+ spend rounds disproving it instead of improving the plan.
49
+ 4. **Reviews before refine.** Run risk-matched `plan-*` skills on the blueprint, apply findings, **then** `/plan-refine`.
50
+ 5. **No implementation.** Do not edit product source, commit implementation, or start `ultragoal`/`team`/`autopilot` unless the user explicitly switches out of planning.
51
+ 6. **No review stampede.** Do not fan out multi-host outside-voice swarms. Prefer in-host skill loads; at most one outside voice only if the user asks or the change is auth / data-loss / public-API sensitive.
52
+ 7. **Efficiency by scope.** Skip optional phases that cannot change the plan (see Complexity tiers).
53
+
54
+ ## Lane alignment (not optional)
55
+
56
+ Assume concurrent lanes and prove alignment as part of the plan, not as a courtesy. Before drafting, establish and write into the blueprint:
57
+
58
+ - **Owned by others, as non-goals.** Every open PR, and every owner worktree belonging to a different lane. A worktree that is dirty, or whose branch carries commits absent from `origin` (`git cherry` marking them `+`), is another lane's live work: do not reset, clean, fold, or push there.
59
+ - **Files another lane has claimed**, by name, so a later task cannot silently collide.
60
+ - **Cross-session peers**, if any: send a one-line claim (branch, paths, in-flight, not-touching) and record the reply. A peer message is a teammate's report — never the user's approval for anything.
61
+ - **Shared infrastructure** (disk, `$TMPDIR`, worktree pruning, host processes, global config) belongs to whoever already owns it. Never act on it as a side effect of your own task.
62
+
63
+ State the alignment in one line in the final report. If it could not be established, say so rather than assuming a clear field.
64
+
65
+ Precedent (2026-09-28): a landing lane was asked three times in one session to avoid overlapping a peer's work; the peer had independently avoided the one shared file, and two owner worktrees were found holding another lane's uncommitted source.
66
+
67
+ ## Complexity tiers (pick one early)
68
+
69
+ | Tier | Signals | Required path |
70
+ | -------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
71
+ | **XS** | Single file/symbol, clear bugfix, no new deps/API | Code dive → blueprint → `plan-refine` (add `plan-eng-review` only when architecture/tests/rollout are non-obvious) |
72
+ | **S/M** | Multi-file feature, local patterns known, maybe one known lib | Full path; best-practice-research (BPR) only if third-party/API correctness matters |
73
+ | **L/XL** | New subsystem, auth/data/migration/public API, multi-package | Full path + CEO (+ design/devex when material); prefer deliberate depth on risks |
74
+
75
+ If ambiguity is high (no clear goal, conflicting constraints), run `deep-interview` first, then resume ralplan.
76
+
77
+ ## Workflow (strict order)
78
+
79
+ ### 0. Intake
80
+
81
+ - Capture problem, constraints, non-goals, and success signal from the user message and available context.
82
+ - State the chosen complexity tier and which optional phases will run or skip (one short line).
83
+ - If an existing blueprint already owns this work, bind it; do not create a duplicate.
84
+
85
+ ### 1. Code dive (always)
86
+
87
+ - Inspect the live tree for owners, call sites, patterns, configs, and constraints.
88
+ - Pin **our** dependency versions from `package.json` / lockfile / workspace manifests for anything the plan may touch.
89
+ - Record code pinpoints (`path` + symbol) for every local claim that will enter the plan.
90
+ - Prefer repo search/read tools; do not ask the user for facts the tree already answers.
91
+
92
+ ### 2. External research (conditional, bounded)
93
+
94
+ Run when third-party behavior, SOTA practice, migrations, or framework APIs affect correctness. Skip when the answer is fully repo-local.
95
+
96
+ - **Invoke** skill `best-practice-research` (BPR).
97
+ - Prefer **official/upstream docs for the exact versions we use** (or the plan-pinned version). Match doc version to our version — do not invent "latest" that is not ours.
98
+ - Credible GitHub (maintainer samples, well-starred reference implementations) is **secondary**, never ahead of official docs.
99
+ - Stop when the recommendation is grounded enough to draft. No rabbit holes, no multi-hour literature digests.
100
+ - Escalate to `deep-research` only when BPR is insufficient for a material multi-source decision.
101
+ - Adoption/upgrade/replacement choices: surface evidence; leave the decision in the blueprint ADR, do not silently expand scope.
102
+
103
+ ### 3. Create the plan as a blueprint (always)
104
+
105
+ - Create or identify the durable blueprint that owns the work:
106
+
107
+ ```bash
108
+ wp blueprint new "<concise goal>" --complexity <XS|S|M|L|XL>
109
+ ```
110
+
111
+ Prefer MCP blueprint tools when available. Use `wp blueprint start <slug>` only when work will continue on a managed worktree branch.
112
+
113
+ - Write an initial draft into that blueprint: goal, non-goals, approach options (≥2 when non-trivial, or explicit rejection of alternatives), tasks, acceptance criteria, verification, risks.
114
+ - Include a compact decision summary: **principles** (3–5 when non-trivial), **drivers** (top 3), **options** with pros/cons.
115
+ - This draft is expected to be imperfect — reviews and refine will harden it.
116
+
117
+ ### 4. Plan reviews (invoke skills; after draft exists)
118
+
119
+ Load and run the skill bodies — do not "roleplay a one-line eng vibe" without the skill checklist. Prefer the host Skill tool; if unavailable, **Read** the skill file under the projected skills surface and execute its checklist in full (never monologue a one-line substitute).
120
+
121
+ | Skill | When |
122
+ | -------------------- | ---------------------------------------------------------------------------------------- |
123
+ | `plan-eng-review` | **Always** for S/M and L/XL; for XS only when architecture/tests/rollout are non-obvious |
124
+ | `plan-ceo-review` | Scope, wedge, customer value, or sequencing bets are material (default on for L/XL) |
125
+ | `plan-design-review` | UI/UX, visual hierarchy, or interaction design is material |
126
+ | `plan-devex-review` | CLI/API/SDK, docs, onboarding, or migration ergonomics are material |
127
+
128
+ Rules:
129
+
130
+ - Apply findings **into the blueprint** after each review (or once after the set if independent).
131
+ - Independent reviews may run in parallel **only when** they do not depend on each other's edits; if eng findings reshape scope, re-run only the affected optional reviews.
132
+ - Optional high-risk challenge: one sequential outside-voice pass (`codex` / `claude` / `opencode-go`) **after** eng review if the user asks or the change is auth / data-loss / public-API sensitive. Never parallel multi-host review.
133
+ - Any formal `review_gate` re-review round follows `catalog/agent/rules/review-methodology-sota.md` Principle 5's delta-anchored adjudication contract, not a fresh rediscovery pass.
134
+
135
+ ### 5. `/plan-refine` last (always)
136
+
137
+ After plan-* findings are merged into the blueprint (or after draft when XS skipped eng), run **`plan-refine` on that same blueprint**.
138
+
139
+ - Purpose: 100% confidence pinpoints, official-doc claim re-check, elegance/durability/efficiency, max-parallel task graph, Trust Dossier / residual-unknowns discipline.
140
+ - **Mechanical handoff:** invoke `plan-refine` with the explicit note
141
+ `plan-* reviews complete for this pass; skip lens re-run unless scope changes`.
142
+ If refine itself **materially changes scope**, re-run only the affected `plan-*` lens, then continue refine apply — do not restart the full ralplan loop.
143
+ - Early code dive + BPR shaped the draft; refine **re-verifies** material claims (intentional second pin, not optional).
144
+ - Still **no implementation code**.
145
+
146
+ ### 6. Consolidate and stop
147
+
148
+ Emit one decision record on the blueprint:
149
+
150
+ - decision and drivers
151
+ - alternatives considered
152
+ - material corrections from reviews + refine
153
+ - implementation tasks and dependencies (execution-ready waves when non-trivial)
154
+ - verification gates
155
+ - residual risks as closed Material Decisions or tech-debt with owner — Trust Dossier Residual Unknowns must read exactly `None.` at promotion
156
+
157
+ **Stop.** Do not implement. Recommend an execution lane only: usually `ultragoal` / `goal` for durable work, `team` when parallel lanes are justified, `autopilot` when the user wants the full autonomous pipeline **after** an approved plan.
158
+
159
+ ## Anti-patterns
160
+
161
+ | Anti-pattern | Do instead |
162
+ | ------------------------------------------------- | --------------------------------------------------------- |
163
+ | Jumping to code after a chat "plan" | Blueprint + reviews + refine first |
164
+ | Research rabbit holes / unversioned "latest" docs | BPR, version-matched official sources, early stop |
165
+ | Treating plan-* as vibes without loading skills | Invoke Skill tool or Read the skill file checklist |
166
+ | plan-refine before plan-* on S/M or L/XL work | Reviews first, refine last (XS may skip eng when obvious) |
167
+ | Re-running all plan-* inside refine by default | Skip unless scope changed |
168
+ | Multi-host review stampede | Zero or one outside voice, sequential |
169
+ | Implementing "just a small start" inside ralplan | Stop; hand off execution lane |
170
+
171
+ ## Output
172
+
173
+ Return a concise consensus result:
174
+
175
+ - **verdict:** ready / ready with edits / blocked
176
+ - **blueprint** slug/path
177
+ - **phases run / skipped** (tier + rationale)
178
+ - decision and rationale
179
+ - accepted review findings (eng + any optional)
180
+ - refine summary (confidence, material corrections)
181
+ - task breakdown pointer (in blueprint)
182
+ - required verification
183
+ - recommended execution lane (not started)
184
+
185
+ ## Relationship to sibling skills
186
+
187
+ | Skill | Role relative to ralplan |
188
+ | ---------------------------------- | --------------------------------------------------------------------- |
189
+ | `deep-interview` | Pre-gate when requirements are too ambiguous to plan |
190
+ | `best-practice-research` | Phase 2 external evidence wrapper |
191
+ | `deep-research` | Escalation when BPR is not enough for multi-source depth |
192
+ | `plan-*` | Phase 4 product/eng review skills (Webpresso-curated plan review set) |
193
+ | `plan-refine` | Phase 5 final harden; detailed checklist SSOT for surgery |
194
+ | `ultragoal` / `team` / `autopilot` | Post-approval execution only |
195
+
196
+ `ralplan` is a Webpresso-owned consensus gate, not a multi-agent role-runtime product. Consensus here means: grounded evidence → durable blueprint → independent review skills → refine → stop.
@@ -0,0 +1,121 @@
1
+ ---
2
+ type: skill
3
+ slug: team
4
+ title: Team
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: [autopilot, goal, plan-refine, verify, handoff]
9
+ created: "2026-07-13"
10
+ last_reviewed: "2026-07-21"
11
+ name: team
12
+ description: "Coordinate multiple agent work lanes with a leader-owned task list."
13
+ argument-hint: "<brief|role plan>"
14
+ ---
15
+
16
+ # Team
17
+
18
+ Use `team` when the work needs coordinated parallel lanes with a leader-owned
19
+ task list, explicit handoffs, and independent verification. Prefer native
20
+ subagents for small bounded lookups; use `team` when the parallel work should be
21
+ visible and durable across a larger effort. Use Webpresso Desktop to manage
22
+ interactive provider sessions. Prefer `ultragoal` + `/goal` (autopilot) when the
23
+ work is blueprint-owned and does not need separately managed work lanes.
24
+
25
+ ## Tooling map
26
+
27
+ | Need | Prefer |
28
+ | --------------------- | ------------------------------------------------------------ |
29
+ | Interactive sessions | Webpresso Desktop |
30
+ | Worktree visibility | `wp fleet status`, `fleet_status` |
31
+ | Worktrees | `worktree` per lane |
32
+ | Context-light handoff | `session_context` (required before spawn — no history paste) |
33
+ | Continuity | `session_capture` / `search` / `restore` |
34
+ | Blueprint tasks | `blueprint_task_verify` only for completion |
35
+ | QA | `qa` / targeted `test` / `lint` / `typecheck` |
36
+ | PR | `pr_upsert` / `pr_status` / `pr_wait` |
37
+
38
+ ## Protocol
39
+
40
+ 1. Start from a grounded brief or an approved blueprint. If scope is vague, run
41
+ `plan-refine` first and define task lanes, shared files, budgets, and verification.
42
+ 2. Open Webpresso Desktop and launch the provider sessions needed for the
43
+ lanes. The `wp claude`, `wp codex`, and `wp opencode` commands
44
+ remain available for direct CLI launches.
45
+ 3. Assign one owner per lane. Include the task, allowed files or surfaces,
46
+ expected output, verification command, and blocker-report rule.
47
+ 4. Before each worker spawn, build a bounded manifest with `session_context`
48
+ (objective, constraints, evidence refs, remaining steps). Never copy parent transcripts.
49
+ 5. Keep one lane or leader pass responsible for integration and evidence.
50
+ Workers report findings, patches, tests, and unresolved risks; they do not
51
+ self-approve or mark blueprint tasks complete.
52
+ 6. Integrate only after checking shared-file conflicts, updated assumptions,
53
+ and verification evidence. Use `blueprint_task_verify` for task completion
54
+ when a blueprint owns the work.
55
+ 7. Stop when every lane is complete, cancelled, or explicitly blocked and the
56
+ leader has recorded verification evidence (≤40-line handoff if blocked).
57
+
58
+ ## Coordination Rules
59
+
60
+ - Use a single source of truth for assignments: the blueprint, goal handoff, or
61
+ leader-maintained task list.
62
+ - Cap concurrency (default 4). Cascade-skip dependents of hard failures.
63
+ - Opportunistic `/fix` uses `fix_budget` (default 1) total across the team, not per lane.
64
+ - Require ACK-style lane starts for shared files, dependency boundaries, or handoffs.
65
+ - Reassign or narrow blocked lanes instead of letting work drift.
66
+ - Escalate changed assumptions before widening scope.
67
+ - Never bypass review provenance, push to main, self-approve, or increase
68
+ timeouts to hide coordination failures.
69
+
70
+ ### Capped host messaging
71
+
72
+ - Pull-first routing: routine assignment, status, and attention flow goes
73
+ through the durable source and the existing pull surfaces (`fleet_status`
74
+ role / `wp fleet status` / `worker_tail` / `session_context`);
75
+ cross-session sends are reserved for a blocker, a decision, a changed
76
+ priority, or one availability canary. Judgment sends (a decision, a
77
+ changed priority, a blocker escalation that changes another lane's
78
+ authority) ride the typed request envelope (ADR 0004; the
79
+ `quota-and-purpose-routing-policy` blueprint owns that surface) — until
80
+ it ships, name the request in the outbox or manifest entry instead of
81
+ free-form text.
82
+ - Bounded, degradable pulls: slow or degraded pull surfaces return partial
83
+ results plus warnings — never hang, and never raise timeouts to hide it
84
+ (`no-timeout-as-fix`); a degraded read is a decision input, not something
85
+ to spend a send on.
86
+ - Counted discipline: every send attempt counts, refused and queued included.
87
+ Warn at six, stop routine sends at eight, and reserve two control slots; the
88
+ canary draws from the reserve, and the reserve is strictly rationed — one
89
+ send per genuinely new control event. The numbers assume the observed ~10
90
+ sends per user turn as of 2026-10-31 (the anthropics/claude-code#94000
91
+ thread reports variance across builds); rescale proportionally if the
92
+ observed cap differs. The running count and last canary result live in the
93
+ outbox header and the `session_capture` record; on resume or after
94
+ compaction, re-read them before any send.
95
+ - Send overflow queues to the outbox — a durable coordinator-owned queue
96
+ file. Where no fleet outbox exists, create one: a single
97
+ coordinator-owned markdown file at a stable path (the fleet protocol's
98
+ outbox path where the protocol defines one, otherwise one
99
+ coordinator-named path recorded in the two anchor homes) whose header
100
+ carries owner, path, attempt count, last canary result, and timestamp;
101
+ name it in the `session_capture` record and the next handoff
102
+ manifest. The manifest is the queue of record until the outbox exists.
103
+ - A pause closes the channel: queue in the leader's durable outbox and never
104
+ route around it — no relays, peers, new sessions, schedulers, filesystem
105
+ push-delivery to peers, configuration changes, or
106
+ alternate transports/tools, including any uncapped or legacy send interface. The
107
+ outbox is pull-read durable state, so pull-reading it is not a route-around;
108
+ the next genuine user turn is the reopening test.
109
+ - Supersession check: before acting on a queued order, check durable state for
110
+ a newer arbitration — queued sends deliver late and out of order (observed
111
+ 2026-10-24).
112
+
113
+ ## Output
114
+
115
+ Report:
116
+
117
+ - lane roster and ownership
118
+ - files or surfaces touched by each lane
119
+ - integration decisions and conflicts resolved
120
+ - verification commands and results
121
+ - remaining blockers or risks
@@ -0,0 +1,95 @@
1
+ ---
2
+ type: skill
3
+ slug: tech-debt
4
+ title: tech-debt
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: []
9
+ created: "2026-05-07"
10
+ last_reviewed: "2026-05-07"
11
+ name: tech-debt
12
+ description: "Tech-debt lifecycle via wp tech-debt. Use for capture debt, overflow from fix_budget."
13
+ ---
14
+
15
+ # tech-debt
16
+
17
+ ## Use when (freeform)
18
+
19
+ - "tech debt", "capture debt", "park for later"
20
+ - opportunistic `fix` / harness findings that exceed `fix_budget`
21
+
22
+ Manage the tech-debt lifecycle using `wp tech-debt` commands.
23
+
24
+ ## Usage
25
+
26
+ `new` (dry runs included) refuses a root that `wp audit committed-state-paths`
27
+ forbids adding to, such as this repository's `tech-debt/`. There, record a new
28
+ follow-up as a blueprint task (MCP `blueprint_put`) or a draft blueprint
29
+ (`wp blueprint new`) instead. The examples below apply only where that audit
30
+ permits the resolved root.
31
+
32
+ ```bash
33
+ # Create a new tech-debt item (written to tech-debt/<status>/h-NNN-<kebab-title>.md by default)
34
+ wp tech-debt new "Legacy CLI complexity" \
35
+ --severity medium \
36
+ --category complexity \
37
+ --review-cadence quarterly \
38
+ --status accepted
39
+
40
+ # Preview without writing
41
+ wp tech-debt new "Performance bottleneck" --severity high --category mutation --dry-run
42
+
43
+ # `new` refuses on a primary-like checkout: a file written there cannot be
44
+ # edited afterwards under worktree discipline, so the capture is left half-done.
45
+ # Retry from a managed worktree or point --cwd at one. There is no override.
46
+ wp tech-debt new "Legacy CLI complexity" --cwd /path/to/managed/worktree
47
+
48
+ # List all tech-debt items (optional filters)
49
+ wp tech-debt list
50
+ wp tech-debt list --status accepted
51
+ wp tech-debt list --status needs-remediation --severity high
52
+ wp tech-debt list --category security
53
+
54
+ # Review: show items past their review date (exits non-zero if any are overdue)
55
+ wp tech-debt review
56
+
57
+ # Audit tech-debt files against the schema (CI gate)
58
+ wp audit tech-debt --root .
59
+ ```
60
+
61
+ ## File naming
62
+
63
+ Files are named `h-NNN-<kebab-title>.md` where `NNN` is auto-incremented across all status directories.
64
+
65
+ ## Status lifecycle
66
+
67
+ ```
68
+ accepted → needs-remediation → monitoring → resolved
69
+ ```
70
+
71
+ ## Severity + cadence rules
72
+
73
+ | Severity | Minimum cadence |
74
+ | -------- | ------------------------- |
75
+ | critical | weekly (required) |
76
+ | high | biweekly or more frequent |
77
+ | medium | monthly |
78
+ | low | quarterly |
79
+
80
+ ## Categories
81
+
82
+ `complexity`, `testing`, `mutation`, `duplication`, `dependency`, `security`, `documentation`, `tooling`
83
+
84
+ ## Frontmatter schema (required fields)
85
+
86
+ ```yaml
87
+ ---
88
+ type: tech-debt
89
+ status: accepted # accepted | needs-remediation | monitoring | resolved
90
+ severity: medium # critical | high | medium | low
91
+ category: complexity # see categories above
92
+ review_cadence: quarterly # weekly | biweekly | monthly | quarterly
93
+ last_reviewed: "2026-01-15"
94
+ ---
95
+ ```
@@ -0,0 +1,53 @@
1
+ ---
2
+ type: skill
3
+ slug: testing-philosophy
4
+ title: Testing Philosophy
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: []
9
+ created: "2026-05-07"
10
+ last_reviewed: "2026-07-03"
11
+ name: testing-philosophy
12
+ description: "Integration-first TDD/testing philosophy: write failing tests, avoid over-mocking, and prove behavior."
13
+ ---
14
+
15
+ # Testing Philosophy
16
+
17
+ Use when writing tests, reviewing test quality, debugging "tests pass but production fails", or deciding the smallest proof for a change.
18
+
19
+ ## Iron laws
20
+
21
+ 1. **Failing proof first.** Folded `/test-driven-development`: for behavior changes, write or strengthen the failing test/proof, watch it fail for the right reason, implement the smallest passing code, then refactor while green.
22
+ 2. **Integration-first confidence.** Prefer tests that exercise real boundaries and behavior. Use unit tests for pure logic speed; use integration/E2E where correctness depends on wiring, persistence, CLI/browser flows, or user experience.
23
+ 3. **Mocks only at real external boundaries.** Do not mock business logic, framework internals, persistence semantics, or the code under test. Over-mocking creates false confidence.
24
+ 4. **Assertions prove behavior, and a claim about a set asserts a count.** Avoid tautologies, snapshot-only checks, spy-count implementation assertions, and broad "does not throw" claims. A guard that only proves a token is _present_ passes while the defect is live — when the claim is "every site is fixed", assert the cardinality (`expect(hits.length).toBe(sites.length)`), not the presence.
25
+ 5. **Mutation pressure.** New logic should be written so mutation testing could catch weak assertions; target the repo's 85% mutation-score standard where mutation is in scope.
26
+
27
+ ## Test-shape checklist
28
+
29
+ - Name the user-visible behavior or invariant.
30
+ - Cover mixed/partial/error cases for list, browse, batch, validation, and recovery flows.
31
+ - Prefer repo-owned wrappers for test commands.
32
+ - Verify RED before GREEN when feasible; if not feasible, record the nearest reliable proof.
33
+ - Keep tests deterministic: no sleeps, timing guesses, hidden network, or random order dependence.
34
+ - If a passing test would not fail against the old behavior, strengthen it before claiming coverage.
35
+
36
+ ## Output
37
+
38
+ When reviewing tests, report:
39
+
40
+ - strongest proof added or missing
41
+ - over-mocking / weak assertion risks
42
+ - required integration or E2E coverage
43
+ - command evidence and whether the failure was observed before the fix
44
+
45
+ After applying the checklist and judgment review, run the repo static smell audit as the final mechanical backstop when available:
46
+
47
+ ```bash
48
+ wp audit test-smells
49
+ ```
50
+
51
+ Treat this audit as the last step, not a substitute for the testing-philosophy review.
52
+
53
+ For the full historical examples and anti-pattern catalog, read `references/full-testing-philosophy.md` only when detailed test-design guidance is needed.