workflow-toolkit 1.0.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 (142) hide show
  1. package/.agents/skills/ponytail/SKILL.md +111 -0
  2. package/.agents/skills/ponytail-audit/SKILL.md +37 -0
  3. package/.agents/skills/ponytail-debt/SKILL.md +41 -0
  4. package/.agents/skills/ponytail-gain/SKILL.md +47 -0
  5. package/.agents/skills/ponytail-help/SKILL.md +70 -0
  6. package/.agents/skills/ponytail-review/SKILL.md +52 -0
  7. package/.agents/skills/prompt-review/SKILL.md +60 -0
  8. package/.agents/skills/wtk/SKILL.md +64 -0
  9. package/.agents/skills/wtk/references/artifacts.md +82 -0
  10. package/.agents/skills/wtk/references/evidence.md +68 -0
  11. package/.agents/skills/wtk/references/git.md +75 -0
  12. package/.agents/skills/wtk/references/test-contract.md +76 -0
  13. package/.agents/skills/wtk/references/validation.md +127 -0
  14. package/.agents/skills/wtk-config/SKILL.md +102 -0
  15. package/.agents/skills/wtk-config/assets/agents/claude/deep-reviewer.md +40 -0
  16. package/.agents/skills/wtk-config/assets/agents/claude/designer.md +57 -0
  17. package/.agents/skills/wtk-config/assets/agents/claude/explorer.md +41 -0
  18. package/.agents/skills/wtk-config/assets/agents/claude/implementer.md +57 -0
  19. package/.agents/skills/wtk-config/assets/agents/claude/planner.md +68 -0
  20. package/.agents/skills/wtk-config/assets/agents/claude/verifier.md +80 -0
  21. package/.agents/skills/wtk-config/assets/agents/codex/deep-reviewer.toml +41 -0
  22. package/.agents/skills/wtk-config/assets/agents/codex/designer.toml +55 -0
  23. package/.agents/skills/wtk-config/assets/agents/codex/explorer.toml +35 -0
  24. package/.agents/skills/wtk-config/assets/agents/codex/implementer.toml +52 -0
  25. package/.agents/skills/wtk-config/assets/agents/codex/planner.toml +66 -0
  26. package/.agents/skills/wtk-config/assets/agents/codex/verifier.toml +78 -0
  27. package/.agents/skills/wtk-config/assets/agents/cursor/deep-reviewer.md +38 -0
  28. package/.agents/skills/wtk-config/assets/agents/cursor/designer.md +55 -0
  29. package/.agents/skills/wtk-config/assets/agents/cursor/explorer.md +39 -0
  30. package/.agents/skills/wtk-config/assets/agents/cursor/implementer.md +55 -0
  31. package/.agents/skills/wtk-config/assets/agents/cursor/planner.md +66 -0
  32. package/.agents/skills/wtk-config/assets/agents/cursor/verifier.md +79 -0
  33. package/.agents/skills/wtk-config/scripts/ad-index.py +123 -0
  34. package/.agents/skills/wtk-config/scripts/repository_intelligence.py +671 -0
  35. package/.agents/skills/wtk-config/scripts/workflow_config.py +972 -0
  36. package/.agents/skills/wtk-deep-review/SKILL.md +164 -0
  37. package/.agents/skills/wtk-deep-review/assets/PROMPT.md +56 -0
  38. package/.agents/skills/wtk-deep-review/assets/REVIEW_UI.html +1340 -0
  39. package/.agents/skills/wtk-deep-review/assets/findings.schema.json +113 -0
  40. package/.agents/skills/wtk-deep-review/references/context-pack.md +88 -0
  41. package/.agents/skills/wtk-deep-review/references/orchestration.md +164 -0
  42. package/.agents/skills/wtk-deep-review/references/output-contracts.md +149 -0
  43. package/.agents/skills/wtk-deep-review/references/publish-github.md +83 -0
  44. package/.agents/skills/wtk-deep-review/references/state-and-learnings.md +64 -0
  45. package/.agents/skills/wtk-deep-review/references/subagent-runtimes.md +33 -0
  46. package/.agents/skills/wtk-deep-review/references/taxonomy.md +70 -0
  47. package/.agents/skills/wtk-deep-review/scripts/_common.py +371 -0
  48. package/.agents/skills/wtk-deep-review/scripts/build_jobs.py +561 -0
  49. package/.agents/skills/wtk-deep-review/scripts/build_knowledge.py +349 -0
  50. package/.agents/skills/wtk-deep-review/scripts/build_manifest.py +479 -0
  51. package/.agents/skills/wtk-deep-review/scripts/graft_context.py +160 -0
  52. package/.agents/skills/wtk-deep-review/scripts/graphify_context.py +75 -0
  53. package/.agents/skills/wtk-deep-review/scripts/merge_findings.py +313 -0
  54. package/.agents/skills/wtk-deep-review/scripts/render_html.py +240 -0
  55. package/.agents/skills/wtk-deep-review/scripts/render_review.py +282 -0
  56. package/.agents/skills/wtk-deep-review/scripts/run_jobs.py +436 -0
  57. package/.agents/skills/wtk-deep-review/scripts/token_metrics.py +369 -0
  58. package/.agents/skills/wtk-discover/SKILL.md +270 -0
  59. package/.agents/skills/wtk-discover/references/document-format.md +149 -0
  60. package/.agents/skills/wtk-implement/SKILL.md +95 -0
  61. package/.agents/skills/wtk-implement/references/checklist-format.md +116 -0
  62. package/.agents/skills/wtk-implement/references/screens.md +129 -0
  63. package/.agents/skills/wtk-implement/references/test-policy.md +152 -0
  64. package/.agents/skills/wtk-implement/references/verify.md +297 -0
  65. package/.agents/skills/wtk-knowledge-check/SKILL.md +16 -0
  66. package/.agents/skills/wtk-knowledge-check/scripts/check.ts +502 -0
  67. package/.agents/skills/wtk-knowledge-check/scripts/cli.ts +32 -0
  68. package/.agents/skills/wtk-knowledge-check/scripts/frontmatter.ts +44 -0
  69. package/.agents/skills/wtk-lean/.skill-meta.json +6 -0
  70. package/.agents/skills/wtk-lean/NOTICE.md +18 -0
  71. package/.agents/skills/wtk-lean/SKILL.md +137 -0
  72. package/.agents/skills/wtk-lean/references/build.md +168 -0
  73. package/.agents/skills/wtk-lean/references/checks.md +253 -0
  74. package/.agents/skills/wtk-lean/references/memory.md +156 -0
  75. package/.agents/skills/wtk-lean/references/plan.md +514 -0
  76. package/.agents/skills/wtk-lean/references/verify.md +336 -0
  77. package/.agents/skills/wtk-lean/scripts/check_commit.py +121 -0
  78. package/.agents/skills/wtk-lean/scripts/fixtures/checks.md +98 -0
  79. package/.agents/skills/wtk-lean/scripts/fixtures/plan.md +119 -0
  80. package/.agents/skills/wtk-lean/scripts/fixtures/verification.md +41 -0
  81. package/.agents/skills/wtk-lean/scripts/lessons.py +412 -0
  82. package/.agents/skills/wtk-lean/scripts/selftest.py +401 -0
  83. package/.agents/skills/wtk-lean/scripts/validate_checks.py +417 -0
  84. package/.agents/skills/wtk-lean/scripts/validate_plan.py +580 -0
  85. package/.agents/skills/wtk-lean/scripts/validate_verification.py +357 -0
  86. package/.agents/skills/wtk-plan/SKILL.md +102 -0
  87. package/.agents/skills/wtk-plan/references/document-format.md +222 -0
  88. package/.agents/skills/wtk-qa/SKILL.md +14 -0
  89. package/.agents/skills/wtk-qa-execute/SKILL.md +115 -0
  90. package/.agents/skills/wtk-qa-execute/references/fix-loop.md +23 -0
  91. package/.agents/skills/wtk-qa-execute/references/session-protocol.md +25 -0
  92. package/.agents/skills/wtk-qa-plan/SKILL.md +111 -0
  93. package/.agents/skills/wtk-qa-plan/references/profile.md +35 -0
  94. package/.agents/skills/wtk-ship/SKILL.md +49 -0
  95. package/.agents/skills/wtk-ship/remediation.py +170 -0
  96. package/.agents/skills/wtk-ship/scripts/close_feature.py +83 -0
  97. package/.agents/skills/wtk-ship/scripts/review_convergence.py +373 -0
  98. package/.wtk.toml.example +93 -0
  99. package/AGENTS.md +129 -0
  100. package/NOTICE.md +12 -0
  101. package/README.md +440 -0
  102. package/bin/wtk.js +25 -0
  103. package/docs/toolkit/README.md +56 -0
  104. package/docs/toolkit/decisions.md +61 -0
  105. package/docs/toolkit/guidelines/CONTEXT-BUDGET.md +64 -0
  106. package/docs/toolkit/guidelines/DX.md +67 -0
  107. package/docs/toolkit/guidelines/FRONTEND.md +73 -0
  108. package/docs/toolkit/guidelines/KNOWLEDGE-WIKI.md +128 -0
  109. package/docs/toolkit/guidelines/MODELING.md +134 -0
  110. package/docs/toolkit/guidelines/QA-EXECUTION.md +46 -0
  111. package/docs/toolkit/guidelines/QA-SCENARIOS.md +165 -0
  112. package/docs/toolkit/guidelines/REVIEW-ROUNDS.md +160 -0
  113. package/docs/toolkit/guidelines/SECURITY.md +160 -0
  114. package/docs/toolkit/guidelines/UI-UX.md +117 -0
  115. package/docs/toolkit/guidelines/WORKFLOW-MEMORY.md +73 -0
  116. package/docs/toolkit/guidelines.md +50 -0
  117. package/docs/toolkit/loop.md +77 -0
  118. package/docs/toolkit/purpose.md +51 -0
  119. package/docs/toolkit/repository-intelligence.md +53 -0
  120. package/docs/toolkit/reviews.md +77 -0
  121. package/knowledge/AGENTS.md +316 -0
  122. package/knowledge/raw/README.md +17 -0
  123. package/package.json +74 -0
  124. package/scripts/install_security_skills.py +816 -0
  125. package/scripts/installer/engine.js +254 -0
  126. package/scripts/installer/knowledge.js +28 -0
  127. package/scripts/installer/packets.js +77 -0
  128. package/scripts/installer/terminal.js +98 -0
  129. package/scripts/installer/transaction.js +75 -0
  130. package/skills-lock.json +92 -0
  131. package/templates/adoption/agents/core.md +23 -0
  132. package/templates/adoption/agents/quality.md +3 -0
  133. package/templates/adoption/knowledge/wiki/architecture/index.md +3 -0
  134. package/templates/adoption/knowledge/wiki/decisions/index.md +3 -0
  135. package/templates/adoption/knowledge/wiki/design/index.md +3 -0
  136. package/templates/adoption/knowledge/wiki/domain/index.md +3 -0
  137. package/templates/adoption/knowledge/wiki/index.md +3 -0
  138. package/templates/adoption/knowledge/wiki/log.md +3 -0
  139. package/templates/adoption/knowledge/wiki/open-questions/index.md +3 -0
  140. package/templates/adoption/knowledge/wiki/product/index.md +3 -0
  141. package/templates/adoption/knowledge/wiki/research/index.md +3 -0
  142. package/templates/adoption/product/AGENT-CONTEXT.md +25 -0
@@ -0,0 +1,73 @@
1
+ # Workflow Memory
2
+
3
+ **Read when:** starting any task in a multi-task feature.
4
+
5
+ **Why this exists:** Atomic slices make review cheap and ramp-up expensive: every task is a fresh
6
+ agent that rebuilds the system from zero, then throws that reasoning away. Shared memory is how
7
+ constraints survive the boundary without becoming a second spec.
8
+
9
+ ## The two files
10
+
11
+ Both live at `.specs/features/<feature>/memory/`.
12
+
13
+ | File | Scope | Owner |
14
+ | --- | --- | --- |
15
+ | `MEMORY.md` | Durable, cross-task | Every task promotes into it |
16
+ | `task_NN.md` | Local, operational | The task that is running |
17
+
18
+ ## Timing
19
+
20
+ **Read both before the first code edit. Update before any completion claim or commit.**
21
+
22
+ That order is the whole mechanism. Memory read after implementation has already failed to prevent the
23
+ rediscovery it exists to prevent.
24
+
25
+ ## What goes in shared memory
26
+
27
+ A constraint, decision or risk earns promotion only when all three are true:
28
+
29
+ 1. Another task needs it to avoid a mistake or a rediscovery.
30
+ 2. It is durable across runs, not just this execution.
31
+ 3. It is **not** already obvious from the spec, the task file, or the repository.
32
+
33
+ If any answer is no, it stays in task memory.
34
+
35
+ Belongs in `MEMORY.md`:
36
+
37
+ - A constraint discovered during implementation that affects later tasks — "the repository serializes
38
+ writes per region; batch inserts must chunk by region"
39
+ - A cross-cutting decision made while coding, not at design time — "chose a discriminated union over
40
+ a status enum because the public contract rejects bare strings"
41
+ - An open risk later tasks must account for — "the onboarding migration assumes the accounts backfill
42
+ has run; it has not in this checkout"
43
+
44
+ Belongs in `task_NN.md`:
45
+
46
+ - Files touched during this task
47
+ - Debugging steps taken to resolve a task-specific failure
48
+ - This task's objective and acceptance-criteria snapshot
49
+ - A workaround scoped to this task only
50
+
51
+ ## Hard rules
52
+
53
+ - **Never invent history**, decisions, or status that did not happen.
54
+ - **Never copy** code blocks, stack traces, or spec text into memory. Reference them by path.
55
+ - **Never duplicate** what the repository, the diff, the task file or the spec already says.
56
+ - **Never read another task's memory file** unless `MEMORY.md` points at it.
57
+ - When memory conflicts with the repository, **the repository wins** — then correct the memory file.
58
+
59
+ ## Compaction
60
+
61
+ When a file grows noisy, compact it in place. Shared memory first, then task memory — the shared file
62
+ sets the context the task file must not duplicate.
63
+
64
+ - **Keep:** current state, durable decisions, reusable learnings, open risks, handoff notes.
65
+ - **Cut:** repetition, stale notes, command transcripts, anything derivable from the repo or spec.
66
+ - **Rewrite** what remains as short factual bullets. Never a chronological log.
67
+
68
+ ## Lifecycle
69
+
70
+ Memory is scratch. It lives and dies with the feature branch and is not a durable artifact — see
71
+ `.agents/skills/wtk/references/artifacts.md`. Anything that must outlive the feature is promoted to a real
72
+ home before the pull request: a project decision to `.specs/STATE.md` as `AD-NNN`, a durable lesson to
73
+ the lessons layer, a product promise to `docs/qa/scenarios/`.
@@ -0,0 +1,50 @@
1
+ # Guidelines
2
+
3
+ Shared execution contracts live in `.agents/skills/wtk/references/`; the remaining surface-specific
4
+ guidelines stay in `docs/toolkit/guidelines/`. Each is loaded by its condition. `AGENTS.md` and `wtk`
5
+ dispatch to the owner; this page is the catalog, not a second copy of the rules.
6
+
7
+ ## Instruction cost
8
+
9
+ | File | Why it exists |
10
+ | --- | --- |
11
+ | [CONTEXT-BUDGET.md](guidelines/CONTEXT-BUDGET.md) | Instruction files load into prompts. A previous arrangement dumped more than a thousand mandatory lines before any task. Growing a file with restated prose is a defect. Dispatch by condition. |
12
+
13
+ ## How work is cut and kept
14
+
15
+ | File | Why it exists |
16
+ | --- | --- |
17
+ | [git.md](../../.agents/skills/wtk/references/git.md) | `type/slug` names the behaviour, never `main`, delete after merge. Isolated checkouts must not share a runtime. |
18
+ | [artifacts.md](../../.agents/skills/wtk/references/artifacts.md) | Planning artifacts are finished when the code exists. Durable store is code, `AD-NNN`, `docs/qa/`, product/architecture/design. The inverted arrangement gated drift on documents nobody read. |
19
+ | [WORKFLOW-MEMORY.md](guidelines/WORKFLOW-MEMORY.md) | Small slices are cheap to review and expensive to ramp. Shared memory is how reasoning survives the task boundary without becoming a second spec. |
20
+ | [validation.md](../../.agents/skills/wtk/references/validation.md) | Proportional scoped gates; full gate only when selected. It also owns the credential-free declarative agent-tool configuration path. Never skip a test to go green. Cached evidence only for the exact tree. |
21
+
22
+ ## Proof
23
+
24
+ | File | Why it exists |
25
+ | --- | --- |
26
+ | [test-contract.md](../../.agents/skills/wtk/references/test-contract.md) | “All branches covered” cannot be audited. `UT-001` assigned to one task can. Cases come from the spec; tests assert the contracted outcome. Coverage-only tests are forbidden. |
27
+ | [evidence.md](../../.agents/skills/wtk/references/evidence.md) | Completion without a fresh command is a false report. Scope binds. Secrets in a diff are an absolute stop. |
28
+ | [REVIEW-ROUNDS.md](guidelines/REVIEW-ROUNDS.md) | See [reviews.md](reviews.md). Caps, monotonic findings, filed issues. |
29
+ | [SECURITY.md](guidelines/SECURITY.md) | Security that lives only in a review at the end is theatre. Eleven surfaces, declared at Specify, become `SEC-` cases. Review looks for what the table missed. The lock icon on this filename is an editor convention, not extra secrecy. |
30
+
31
+ ## Surfaces people meet
32
+
33
+ | File | Why it exists |
34
+ | --- | --- |
35
+ | [UI-UX.md](guidelines/UI-UX.md) | Internals designed first get redesigned when the screen moves. `uiux.md` enumerates states so a design agent can execute, and so QA knows the feature is UI-bearing. |
36
+ | [DX.md](guidelines/DX.md) | Same idea one layer down: routes, config, CLI, exports — written as if already shipped, failures enumerated, then internals serve that contract. |
37
+ | [FRONTEND.md](guidelines/FRONTEND.md) | Feature folders own capability; shared UI owns reuse. Routes compose, they do not draw layout. Keeps front-end organization portable (no framework names). |
38
+ | [MODELING.md](guidelines/MODELING.md) | The domain must outlive the web, API, and persistence frameworks. One aggregate, one module; invariants in the transition, not only in SQL. |
39
+ | [QA-SCENARIOS.md](guidelines/QA-SCENARIOS.md) | Feature verification dies with the feature. A scenario holds a verdict that survives, and goes stale when a diff invalidates it. Content-addressed ids so parallel branches do not collide. |
40
+ | [QA-EXECUTION.md](guidelines/QA-EXECUTION.md) | A green automated suite can still fail its user. Persona, independent confirmation, dated report. Auto-fix only when the change is contained, unambiguous, and regression-tested. |
41
+
42
+ ## Durable understanding
43
+
44
+ | File | Why it exists |
45
+ | --- | --- |
46
+ | [KNOWLEDGE-WIKI.md](guidelines/KNOWLEDGE-WIKI.md) | Source documents cannot see each other. The wiki holds the graph and the contradictions. Source always wins. Harvest is explicit and per finished feature, never part of `make check`. |
47
+
48
+ ## How to add a guideline
49
+
50
+ Do not. Extend an existing file, or justify why both must exist, in [CONTEXT-BUDGET.md](guidelines/CONTEXT-BUDGET.md). A rule earns lines by preventing a defect that occurred, or by resolving an ambiguity an agent actually hit.
@@ -0,0 +1,77 @@
1
+ # The loop
2
+
3
+ `wtk` routes discovery, integrated Lean, and distinct modular entries. Auto-size still holds:
4
+ a one-line change gets no feature artifacts; a multi-component feature gets full planning.
5
+
6
+ Workflow work starts with `ponytail` at `full`; `AGENTS.md` carries the activation and session
7
+ persistence rule, while the [Ponytail skill](../../.agents/skills/ponytail/SKILL.md) owns its
8
+ explicit stop commands. The same instinct as “delete rather than bridge” and “no test without an
9
+ invariant”.
10
+
11
+ Public hierarchy: `Feature -> Slice -> Check`. Resolve cadence with `wtk-config` before dispatch.
12
+
13
+ ## Stages
14
+
15
+ Walk these in order. The imperative detail lives in `AGENTS.md` and the guideline named in the
16
+ last column.
17
+
18
+ | # | Stage | What it is for | Skip when | Rule |
19
+ | --- | --- | --- | --- | --- |
20
+ | 1 | **Plan / Checks** | Freeze `plan.md`, `checks.md`, and proof selectors | Auto-sized skip (tiny, obvious change) | `wtk-lean` |
21
+ | 2 | **Slice** | One observable behaviour plus the checks that prove it | — | `AGENTS.md` |
22
+ | 3 | **Build** | The cheapest code that makes the slice true | — | `ponytail` |
23
+ | 4 | **Scoped gate** | Prove *this* diff, not the whole product | Escalate if the selector cannot scope it | [validation.md](../../.agents/skills/wtk/references/validation.md) |
24
+ | 5 | **Atomic commit** | One Conventional Commit after the applicable Lean check state is current | — | `AGENTS.md` |
25
+ | 6 | **Technical Verifier** | One fresh independent pass proves every check over the complete feature range; mutants must die at the approved profile | Filed-issue path; no product code in final QA session | [REVIEW-ROUNDS.md](guidelines/REVIEW-ROUNDS.md) |
26
+ | 7 | **Deep-review** | Correct, safe, maintainable — resolved groups, blocking findings only | Cadence `skip` (no groups; human runs `wtk-deep-review` later), or proportional classifier selects scoped validation | [REVIEW-ROUNDS.md](guidelines/REVIEW-ROUNDS.md) |
27
+ | 8 | **QA session** | The finished feature, as a person meets it: one `wtk-qa-plan` and one `wtk-qa-execute` packet | Feature has no public, UI, API, CLI, or adoption change | [QA-EXECUTION.md](guidelines/QA-EXECUTION.md) |
28
+ | 9 | **Full gate** | The product gate, once, when the proportional classifier selects it | Scoped gate is sufficient | [validation.md](../../.agents/skills/wtk/references/validation.md) |
29
+ | 10 | **Remote delivery** | `wtk-ship` authorizes the feature-branch push, one pull request, and merge after readiness is rechecked | Readiness is evidence, not authorization for deploy/release, production mutations, force-push, direct `main` push, and unrelated remote actions; those need explicit instruction | [evidence.md](../../.agents/skills/wtk/references/evidence.md) |
30
+
31
+ The feature-closing step is the QA session when the proportional classifier selects a public walk;
32
+ no slice runs QA. Implementation slices remain vertical and independently committed; the Technical Verifier reads the
33
+ complete feature after implementation; wtk-deep-review follows resolved
34
+ groups when selected, then QA and the full/scoped gate follow the route rather than file count or feature wording.
35
+
36
+ The selected route records its gate and limitation in the handoff.
37
+
38
+ ## Why slices, not “the whole feature”
39
+
40
+ Review cost explodes with diff size. Every round re-reads the whole change; every fix moves what
41
+ the next round reads. Three rounds over one behaviour is a signal about that behaviour. Twenty
42
+ over a finished feature is the size talking.
43
+
44
+ One pull request still. The slice is how much each reading has to hold.
45
+
46
+ A slice that is not observable or not complete is not a slice. Tests are never a separate task.
47
+ e2e is only for a journey nothing else already walks; a second slice in the same journey proves
48
+ itself at integration.
49
+
50
+ ## Work classes
51
+
52
+ | Work | Path |
53
+ | --- | --- |
54
+ | **Feature** — a capability the product lacks | The full table above |
55
+ | **Direct correction** — one exact, unambiguous invariant | The narrowest applicable check in [validation.md](../../.agents/skills/wtk/references/validation.md) |
56
+ | **Filed issue** — already reviewed, then parked | `implement → scoped gate → one commit` |
57
+ | **Credential-free declarative agent-tool configuration** | The local light path in [validation.md](../../.agents/skills/wtk/references/validation.md) |
58
+
59
+ A defect nobody filed is a feature at auto-sized depth. A “one-line fix” that opens a schema or a
60
+ design question stopped being a filed issue; say so and take the feature path.
61
+
62
+ ## Seven rules that hold at every size
63
+
64
+ Copied as orientation; `AGENTS.md` is canonical:
65
+
66
+ 1. The gate decides done, not self-assessment.
67
+ 2. One atomic commit per task.
68
+ 3. The Verifier is a different actor than the author.
69
+ 4. A round contains only findings not already raised.
70
+ 5. Only Critical and Major trigger a remediation check.
71
+ 6. Stages never loop into each other; review caps and post-fix escalation follow `REVIEW-ROUNDS.md`.
72
+ 7. Every count or measurement cites the command that produced it.
73
+
74
+ ## Isolated checkouts
75
+
76
+ If the project isolates checkouts, each owns its runtime. Never `reuseExistingServer: true` across
77
+ siblings — a gate in one checkout must not silently test another’s application.
@@ -0,0 +1,51 @@
1
+ # Purpose
2
+
3
+ This workflow exists to **keep shipping without pretending the product is safer than it is**.
4
+
5
+ Two failure modes showed up in the same kind of work:
6
+
7
+ - **Delivery without a floor.** A green linter, a coverage number, a paraphrase of the spec. The
8
+ feature merges. Users hit a journey nobody walked. Security is “we thought about it”.
9
+ - **Reliability without an end.** Every nitpick is remediating in the same iteration. Each fix
10
+ changes the diff. The next round finds new nits. Thirty rounds is not thoroughness; it is a loop
11
+ that cannot converge.
12
+
13
+ The pack is the floor plus the end condition.
14
+
15
+ ## What “balance” means here
16
+
17
+ **Delivery** is: a change small enough to implement by vertical slice, a gate cheap enough to run
18
+ per slice, one fresh independent Verifier over the complete feature, review cadence selected by
19
+ wtk-config, and merge authority that stays with the human.
20
+
21
+ **Reliability** is: tests derived from acceptance criteria, security surfaces named and given
22
+ `SEC-` cases, one Verifier that is not the author over the complete feature, a persona walk for
23
+ anything a user can see when the classifier selects it, and a full gate once when the classifier selects it.
24
+
25
+ Neither side is optional for features. A feature that skips the final Verifier is not this
26
+ workflow; neither is one that re-reviews Trivials until the diff stops moving. Credential-free
27
+ declarative agent-tool configuration is a separate maintenance path defined by
28
+ [`validation.md`](../../.agents/skills/wtk/references/validation.md).
29
+
30
+ ## What the caps buy
31
+
32
+ | Cap | Protects |
33
+ | --- | --- |
34
+ | One fresh full-feature Verifier | Stops self-certified or incomplete proof from reaching delivery |
35
+ | Deep-review once, remediation check per batch, Critical/Major only | Stops nitpick churn from being called “quality” |
36
+ | Stages do not loop into each other | Review groups bound repeated reading, then a human |
37
+ | Proportional gate selection | Stops low-risk maintenance from paying for unrelated product checks |
38
+ | Approval is local-only | Stops an agent from pushing, merging, or deploying on a spec yes |
39
+
40
+ Escalate is a result after the required post-cap remediation and gate. Shipping past a cap with a
41
+ reproducible blocker is not.
42
+
43
+ The review ledger counts failed remediation cumulatively per immutable finding fingerprint while
44
+ the live remediation bound counts consecutive stalls; see
45
+ [`REVIEW-ROUNDS.md`](guidelines/REVIEW-ROUNDS.md) for the accounting rule.
46
+
47
+ ## What this pack is not
48
+
49
+ It is not a product, a stack, or a starter app. The consuming project fills one paragraph in
50
+ `AGENTS.md` and owns `make check`. Reliability rules here are process: they do not name a
51
+ framework.
@@ -0,0 +1,53 @@
1
+ # Repository intelligence
2
+
3
+ Graphify and Graft are standard development tools, not application dependencies. Specs and current
4
+ checkout source remain authoritative; generated context is bounded evidence.
5
+
6
+ ## Routing
7
+
8
+ 1. Existing file, symbol, API, caller, and callee pointers: retrieve nothing.
9
+ 2. Architectural trigger (module or domain boundary, responsibility transfer, shared abstraction,
10
+ central flow, or unresolved architectural risk): query Graphify first.
11
+ 3. Unknown implementation location or call relationship: query Graft before broad native search.
12
+ 4. Exact-text question: use exact native search.
13
+
14
+ Graphify output can feed a bounded Graft query. Deep Review always prepares fresh Graft context when
15
+ selected; it prepares one Graphify context only for an explicit architectural question. It does not
16
+ run Graphify for local review work.
17
+
18
+ ## Setup and freshness
19
+
20
+ The installer reports remediation but does not execute package managers:
21
+
22
+ ```bash
23
+ npm install --save-dev --save-exact @nanonets/graft@0.10.1
24
+ uv tool install graphifyy==0.9.14
25
+ python3 .agents/skills/wtk-config/scripts/repository_intelligence.py \
26
+ graphify-setup --root . --backend <backend> --mode deep
27
+ ```
28
+
29
+ Semantic Graphify extraction requires an explicit backend. Setup discloses the backend, source root,
30
+ indexed file count, and ignored roots before extraction; credentials stay environment-owned.
31
+
32
+ Queries validate the exact supported version, active checkout, indexed-source manifest, and current
33
+ working-tree fingerprint. Tool-native refresh runs before a result is returned. Missing, failed,
34
+ stale, partial, insufficient, interrupted, or incompatible state reports one degraded reason and
35
+ continues through targeted native inspection. It never silently presents stale context as ready.
36
+
37
+ Generated graphs, caches, backend metadata, and benchmark scratch records stay checkout-local and
38
+ ignored under `graft/`, `graphify-out/`, and `.repository-intelligence/`. They never become runtime
39
+ dependencies or committed product artifacts.
40
+
41
+ ## Retention pilot
42
+
43
+ Record one JSONL event per controlled terminal task in ignored
44
+ `.repository-intelligence/benchmark.jsonl`. Each record carries task ID and category, configuration
45
+ (`baseline`, `graft`, or `routed`), repository snapshot, prompt and acceptance hashes, provider,
46
+ model, effort, input/output/total tokens, repository-intelligence and native-search calls, files read,
47
+ wall-clock time, gate result, Verifier result, review findings, rework count, and terminal outcome.
48
+
49
+ Compare baseline→Graft and Graft→routed runs only when snapshot, prompt, provider, model, effort, and
50
+ acceptance contract match. A report requires 10–20 distinct terminal tasks, groups comparisons by
51
+ category, and rejects missing controls or independent gate/Verifier evidence. The result is
52
+ directional, not statistically conclusive. Removing routing requires a later explicit project
53
+ decision covering provisioning, configuration, generated state, and QA promises together.
@@ -0,0 +1,77 @@
1
+ # Reviews
2
+
3
+ Review is how reliability gets a **second reader** without getting an infinite loop.
4
+
5
+ An unbounded loop was measured at 30 rounds on one feature. The rule that caused it sounded
6
+ responsible: remediate every confirmed finding **and every nitpick** in the same iteration. Each
7
+ nit changes the diff; the next round finds new nits. The loop is unbounded by construction.
8
+
9
+ [REVIEW-ROUNDS.md](guidelines/REVIEW-ROUNDS.md) is the protocol. This page is the choice.
10
+
11
+ The public hierarchy is `Feature -> Slice -> Check`. Before dispatch, read
12
+ `.agents/skills/wtk-config/SKILL.md`; it resolves the feature's review groups.
13
+
14
+ ## One Verifier role, several phases
15
+
16
+ The provider `verifier` executes one phase per packet. Deep-review is a separate stage, not a Verifier phase.
17
+ Remediation identity, independent counters, and halt behavior follow `REVIEW-ROUNDS.md`; the fingerprint is requirement + root cause + failure path.
18
+
19
+ | Reviewer | Question only it can answer | Cap |
20
+ | --- | --- | --- |
21
+ | **Technical Verifier** (feature close) | Does one fresh independent pass prove every check over the complete feature range? | One full-feature pass after the last code-changing slice |
22
+ | **Deep-review** (resolved groups; none under cadence `skip`) | Is the code correct, safe, maintainable? | Discovery once; remediation checks until no Critical/Major is open or `stall_attempts` halts |
23
+ | **QA session** (feature closing step when the public surface changes) | Does the finished feature feel right, through the declared adapter? | One `wtk-qa-plan` and one `wtk-qa-execute` session; no slice runs QA |
24
+
25
+ A documentation-only slice follows the proportional classifier in [validation.md](../../.agents/skills/wtk/references/validation.md):
26
+ accuracy and affected-link checks close pure maintenance, while mixed changes run canonical tests for
27
+ changed executable behavior. Deep-review and QA require named concrete risk or changed public promise;
28
+ file count and the word "feature" do not escalate them.
29
+
30
+ Technical Verifier reads the integrated final tree over the complete feature range. Deep-review reads the integrated
31
+ commit range, and the closing session's fresh QA Plan/Execute packets read the integrated final tree. The coordinator records
32
+ distinct author and proof identities; the last implementer supplies a handoff and never certifies
33
+ the integrated result.
34
+
35
+ They do not send work back to each other. A wtk-deep-review finding never restarts the Verifier. A
36
+ Critical/Major finding is fixed under the approved loop and its scoped gate, then proven by a one-job
37
+ remediation check (incremental wtk-deep-review); batch and check repeat until none is open or
38
+ `stall_attempts` halts. Remediation follows the stall bound: each attempt runs the scoped gate, a smaller failing
39
+ test set resets the counter, and an equal-size or larger set increments it. An unavailable gate
40
+ halts immediately; a reached nonzero threshold halts with the normalized signature, attempt count,
41
+ and fixes tried. If a wtk-deep-review fix changes user-visible behaviour, re-walk **the affected scenario
42
+ rows only**.
43
+
44
+ ## What blocks, what files
45
+
46
+ | Severity | Remediation check? | Feature delivery |
47
+ | --- | --- | --- |
48
+ | `Critical` | Yes | Fix now |
49
+ | `Major` | Yes | Fix now |
50
+ | `Minor` | No | Fix in one current-run batch, scoped gate, one commit |
51
+ | `Trivial` | No | File an issue |
52
+
53
+ Every wtk-deep-review defect is fixed inside the feature run. Minor fixes start no new proof round.
54
+ Filed Trivial issues are real backlog, not a disposal bin; they do **not** re-enter Verifier + QA +
55
+ wtk-deep-review because that ceremony already happened.
56
+
57
+ A user-visible fix still flags and walks its scenario. A fix that grows into a design or schema
58
+ change is a feature.
59
+
60
+ ## Why the Verifier is not the author
61
+
62
+ A model that implemented the change will defend it. The Verifier re-derives coverage from `plan.md` and
63
+ `checks.md` and injects behavioural mutants. Enumerated cases in `checks.md` prove coverage *exists*; mutants
64
+ prove it is *real*.
65
+
66
+ A green gate is not a met requirement. Reviewers compare the deliverable to `plan.md`, `checks.md`,
67
+ `verification.md`, and `uiux.md` / `dx.md` field by field. Paraphrase is not parity.
68
+
69
+ ## Evidence
70
+
71
+ [evidence.md](../../.agents/skills/wtk/references/evidence.md): no completion claim without a
72
+ fresh command. Scope binds — unit tests do not justify “feature complete”. A passing review over a
73
+ red gate is void.
74
+
75
+ Escalate when the scoped gate is unavailable or the configured stall threshold is reached. An
76
+ open Critical alone does not halt while remediation is making measurable progress. A halt report is
77
+ a result.