clinkx 1.1.1 → 1.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 (199) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +97 -13
  3. package/clinkx-workflows/dist/allowed-roots.js +2 -0
  4. package/clinkx-workflows/dist/allowed-roots.js.map +1 -1
  5. package/clinkx-workflows/dist/architecture-comparison/admission.d.ts +5 -0
  6. package/clinkx-workflows/dist/architecture-comparison/admission.js +50 -0
  7. package/clinkx-workflows/dist/architecture-comparison/admission.js.map +1 -0
  8. package/clinkx-workflows/dist/architecture-comparison/contract.d.ts +995 -0
  9. package/clinkx-workflows/dist/architecture-comparison/contract.js +149 -0
  10. package/clinkx-workflows/dist/architecture-comparison/contract.js.map +1 -0
  11. package/clinkx-workflows/dist/architecture-comparison/runtime.d.ts +29 -0
  12. package/clinkx-workflows/dist/architecture-comparison/runtime.js +387 -0
  13. package/clinkx-workflows/dist/architecture-comparison/runtime.js.map +1 -0
  14. package/clinkx-workflows/dist/child-env.d.ts +3 -1
  15. package/clinkx-workflows/dist/child-env.js +6 -2
  16. package/clinkx-workflows/dist/child-env.js.map +1 -1
  17. package/clinkx-workflows/dist/config.d.ts +28 -5
  18. package/clinkx-workflows/dist/config.js +137 -20
  19. package/clinkx-workflows/dist/config.js.map +1 -1
  20. package/clinkx-workflows/dist/contained-file.js +10 -1
  21. package/clinkx-workflows/dist/contained-file.js.map +1 -1
  22. package/clinkx-workflows/dist/council-execution-policy.d.ts +4 -2
  23. package/clinkx-workflows/dist/council-execution-policy.js +5 -1
  24. package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
  25. package/clinkx-workflows/dist/dashboard/activity-contract.d.ts +72 -72
  26. package/clinkx-workflows/dist/dashboard/contracts.d.ts +1564 -122
  27. package/clinkx-workflows/dist/dashboard/contracts.js +4 -0
  28. package/clinkx-workflows/dist/dashboard/contracts.js.map +1 -1
  29. package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +12 -12
  30. package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.d.ts +8 -8
  31. package/clinkx-workflows/dist/dashboard/scanner.d.ts +3 -0
  32. package/clinkx-workflows/dist/dashboard/scanner.js +27 -0
  33. package/clinkx-workflows/dist/dashboard/scanner.js.map +1 -1
  34. package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +48 -48
  35. package/clinkx-workflows/dist/dashboard/session-log-identity.js +2 -1
  36. package/clinkx-workflows/dist/dashboard/session-log-identity.js.map +1 -1
  37. package/clinkx-workflows/dist/dashboard/session-log-redaction.d.ts +2 -0
  38. package/clinkx-workflows/dist/dashboard/session-log-redaction.js +4 -0
  39. package/clinkx-workflows/dist/dashboard/session-log-redaction.js.map +1 -1
  40. package/clinkx-workflows/dist/dashboard/verified-repair-contract.d.ts +191 -0
  41. package/clinkx-workflows/dist/dashboard/verified-repair-contract.js +28 -0
  42. package/clinkx-workflows/dist/dashboard/verified-repair-contract.js.map +1 -0
  43. package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +115 -0
  44. package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +1 -0
  45. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  46. package/clinkx-workflows/dist/engine.d.ts +6 -0
  47. package/clinkx-workflows/dist/engine.js +78 -7
  48. package/clinkx-workflows/dist/engine.js.map +1 -1
  49. package/clinkx-workflows/dist/index.d.ts +3 -0
  50. package/clinkx-workflows/dist/index.js +3 -2
  51. package/clinkx-workflows/dist/index.js.map +1 -1
  52. package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
  53. package/clinkx-workflows/dist/reducers/index.js +22 -0
  54. package/clinkx-workflows/dist/reducers/index.js.map +1 -1
  55. package/clinkx-workflows/dist/root-path-validation.d.ts +12 -0
  56. package/clinkx-workflows/dist/root-path-validation.js +63 -0
  57. package/clinkx-workflows/dist/root-path-validation.js.map +1 -0
  58. package/clinkx-workflows/dist/rosters.d.ts +1 -0
  59. package/clinkx-workflows/dist/rosters.js +16 -6
  60. package/clinkx-workflows/dist/rosters.js.map +1 -1
  61. package/clinkx-workflows/dist/server.js +5 -2
  62. package/clinkx-workflows/dist/server.js.map +1 -1
  63. package/clinkx-workflows/dist/state-schema.d.ts +13 -0
  64. package/clinkx-workflows/dist/state.d.ts +7 -1
  65. package/clinkx-workflows/dist/state.js +90 -19
  66. package/clinkx-workflows/dist/state.js.map +1 -1
  67. package/clinkx-workflows/dist/validators/architecture-comparison.d.ts +2 -0
  68. package/clinkx-workflows/dist/validators/architecture-comparison.js +12 -0
  69. package/clinkx-workflows/dist/validators/architecture-comparison.js.map +1 -0
  70. package/clinkx-workflows/dist/validators/index.js +4 -0
  71. package/clinkx-workflows/dist/validators/index.js.map +1 -1
  72. package/clinkx-workflows/dist/validators/verified-repair.d.ts +2 -0
  73. package/clinkx-workflows/dist/validators/verified-repair.js +12 -0
  74. package/clinkx-workflows/dist/validators/verified-repair.js.map +1 -0
  75. package/clinkx-workflows/dist/verification-proof.d.ts +254 -0
  76. package/clinkx-workflows/dist/verification-proof.js +195 -0
  77. package/clinkx-workflows/dist/verification-proof.js.map +1 -0
  78. package/clinkx-workflows/dist/verified-repair/admission.d.ts +72 -0
  79. package/clinkx-workflows/dist/verified-repair/admission.js +63 -0
  80. package/clinkx-workflows/dist/verified-repair/admission.js.map +1 -0
  81. package/clinkx-workflows/dist/verified-repair/contract.d.ts +1910 -0
  82. package/clinkx-workflows/dist/verified-repair/contract.js +127 -0
  83. package/clinkx-workflows/dist/verified-repair/contract.js.map +1 -0
  84. package/clinkx-workflows/dist/verified-repair/host.d.ts +32 -0
  85. package/clinkx-workflows/dist/verified-repair/host.js +2 -0
  86. package/clinkx-workflows/dist/verified-repair/host.js.map +1 -0
  87. package/clinkx-workflows/dist/verified-repair/prompts.d.ts +12 -0
  88. package/clinkx-workflows/dist/verified-repair/prompts.js +58 -0
  89. package/clinkx-workflows/dist/verified-repair/prompts.js.map +1 -0
  90. package/clinkx-workflows/dist/verified-repair/result.d.ts +16 -0
  91. package/clinkx-workflows/dist/verified-repair/result.js +102 -0
  92. package/clinkx-workflows/dist/verified-repair/result.js.map +1 -0
  93. package/clinkx-workflows/dist/verified-repair/runtime.d.ts +28 -0
  94. package/clinkx-workflows/dist/verified-repair/runtime.js +186 -0
  95. package/clinkx-workflows/dist/verified-repair/runtime.js.map +1 -0
  96. package/clinkx-workflows/dist/workflow-completion.d.ts +83 -0
  97. package/clinkx-workflows/dist/workflow-completion.js +250 -0
  98. package/clinkx-workflows/dist/workflow-completion.js.map +1 -0
  99. package/clinkx-workflows/dist/workflow-tools.d.ts +7 -3
  100. package/clinkx-workflows/dist/workflow-tools.js +487 -46
  101. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  102. package/clinkx-workflows/dist/workflow-verification-contract.d.ts +539 -0
  103. package/clinkx-workflows/dist/workflow-verification-contract.js +52 -0
  104. package/clinkx-workflows/dist/workflow-verification-contract.js.map +1 -0
  105. package/clinkx-workflows/dist/workflow-verification.d.ts +15 -0
  106. package/clinkx-workflows/dist/workflow-verification.js +218 -0
  107. package/clinkx-workflows/dist/workflow-verification.js.map +1 -0
  108. package/clinkx-workflows/templates/architecture-comparison/candidate.txt +29 -0
  109. package/clinkx-workflows/templates/architecture-comparison/judge.txt +31 -0
  110. package/clinkx-workflows/templates/verified-repair/investigate.txt +20 -0
  111. package/clinkx-workflows/templates/verified-repair/repair.txt +11 -0
  112. package/clinkx-workflows/templates/verified-repair/review.txt +18 -0
  113. package/clinkx-workflows/workflows/architecture-comparison.yaml +133 -0
  114. package/clinkx-workflows/workflows/verified-repair.yaml +104 -0
  115. package/dist/allowed-roots.d.ts +1 -1
  116. package/dist/allowed-roots.js +128 -15
  117. package/dist/allowed-roots.js.map +1 -1
  118. package/dist/codex/app-server-client.d.ts +1 -0
  119. package/dist/codex/app-server-client.js +3 -2
  120. package/dist/codex/app-server-client.js.map +1 -1
  121. package/dist/context-builder/config.d.ts +1 -0
  122. package/dist/context-builder/config.js +21 -9
  123. package/dist/context-builder/config.js.map +1 -1
  124. package/dist/context-builder/diagnostics.d.ts +1 -0
  125. package/dist/context-builder/diagnostics.js +1 -1
  126. package/dist/context-builder/diagnostics.js.map +1 -1
  127. package/dist/context-builder/discovery.d.ts +18 -1
  128. package/dist/context-builder/discovery.js +69 -1
  129. package/dist/context-builder/discovery.js.map +1 -1
  130. package/dist/context-builder/handler.js +8 -1
  131. package/dist/context-builder/handler.js.map +1 -1
  132. package/dist/context-builder/lifecycle-contract.d.ts +24 -24
  133. package/dist/context-builder/mutation-lock.d.ts +4 -0
  134. package/dist/context-builder/mutation-lock.js +7 -1
  135. package/dist/context-builder/mutation-lock.js.map +1 -1
  136. package/dist/context-builder/refine-handler.js +16 -1
  137. package/dist/context-builder/refine-handler.js.map +1 -1
  138. package/dist/context-builder/secrets.d.ts +11 -0
  139. package/dist/context-builder/secrets.js +75 -0
  140. package/dist/context-builder/secrets.js.map +1 -1
  141. package/dist/context-builder/storage.d.ts +10 -2
  142. package/dist/context-builder/storage.js +213 -16
  143. package/dist/context-builder/storage.js.map +1 -1
  144. package/dist/context-builder/versions.d.ts +5 -2
  145. package/dist/context-builder/versions.js +5 -2
  146. package/dist/context-builder/versions.js.map +1 -1
  147. package/dist/dashboard-cli.d.ts +6 -0
  148. package/dist/dashboard-cli.js +18 -32
  149. package/dist/dashboard-cli.js.map +1 -1
  150. package/dist/dashboard-gateway/main.js +8 -3
  151. package/dist/dashboard-gateway/main.js.map +1 -1
  152. package/dist/index.d.ts +2 -0
  153. package/dist/index.js +8 -2
  154. package/dist/index.js.map +1 -1
  155. package/dist/project-verification/contract.d.ts +537 -0
  156. package/dist/project-verification/contract.js +40 -0
  157. package/dist/project-verification/contract.js.map +1 -0
  158. package/dist/project-verification/files.d.ts +23 -0
  159. package/dist/project-verification/files.js +80 -0
  160. package/dist/project-verification/files.js.map +1 -0
  161. package/dist/project-verification/process.d.ts +7 -0
  162. package/dist/project-verification/process.js +115 -0
  163. package/dist/project-verification/process.js.map +1 -0
  164. package/dist/project-verification/runner.d.ts +35 -0
  165. package/dist/project-verification/runner.js +185 -0
  166. package/dist/project-verification/runner.js.map +1 -0
  167. package/dist/project-verification/service.d.ts +37 -0
  168. package/dist/project-verification/service.js +151 -0
  169. package/dist/project-verification/service.js.map +1 -0
  170. package/dist/provider-doctor.d.ts +22 -0
  171. package/dist/provider-doctor.js +22 -0
  172. package/dist/provider-doctor.js.map +1 -0
  173. package/dist/registry.d.ts +1 -1
  174. package/dist/registry.js +5 -1
  175. package/dist/registry.js.map +1 -1
  176. package/dist/server.js +41 -6
  177. package/dist/server.js.map +1 -1
  178. package/dist/verification-tools.d.ts +90 -0
  179. package/dist/verification-tools.js +120 -0
  180. package/dist/verification-tools.js.map +1 -0
  181. package/dist/verified-repair/files.d.ts +22 -0
  182. package/dist/verified-repair/files.js +114 -0
  183. package/dist/verified-repair/files.js.map +1 -0
  184. package/dist/verified-repair/host.d.ts +14 -0
  185. package/dist/verified-repair/host.js +612 -0
  186. package/dist/verified-repair/host.js.map +1 -0
  187. package/docs/configuration.md +224 -12
  188. package/docs/engineering-recipes.md +415 -0
  189. package/docs/security.md +3 -0
  190. package/docs/verification/README.md +59 -0
  191. package/docs/verification/dashboard-real-disk.md +436 -0
  192. package/docs/verification/project-checks.example.json +14 -0
  193. package/docs/verification/project-checks.md +444 -0
  194. package/docs/verification/workflow-handoff.md +113 -0
  195. package/package.json +10 -2
  196. package/scripts/provider-doctor-core.mjs +380 -0
  197. package/scripts/provider-doctor-probe.mjs +34 -0
  198. package/clinkx-workflows/dist/dashboard-ui/assets/index-JPHQVtn9.js +0 -106
  199. package/clinkx-workflows/dist/dashboard-ui/assets/style-DOMHk-j6.css +0 -1
@@ -0,0 +1,415 @@
1
+ # Engineering Recipes (ClinkX wiring)
2
+
3
+ ClinkX ships explicitly invoked `architecture-comparison` and `verified-repair` workflows through MCP.
4
+ Grounded investigation and the manual verified bug fix remain companion recipes;
5
+ the manual architecture recipe remains available. This guide describes invocation, bounds,
6
+ failure behavior and evidence. Comparison and inspected verification records are
7
+ advisory; the owner and independent verifier retain acceptance authority.
8
+
9
+ ## Compatible skill revision
10
+
11
+ The recipes are defined in `skills/chief-of-staff/references/engineering-recipes.md` in `jim380/agent-skills`.
12
+
13
+ - Status: **merged.** [jim380/agent-skills#3](https://github.com/jim380/agent-skills/pull/3) merged as `c1dd3b4959c7cfa1156070ae5aa772eb5b855f67` on 2026-10-09. The compatible revision for all three recipes and the current packet-secret rule is [`097a2fa7a636aeecfb34a60617ec9bd9c5cd7369`](https://github.com/jim380/agent-skills/commit/097a2fa7a636aeecfb34a60617ec9bd9c5cd7369), verified through the owning GitHub API on 2026-10-10.
14
+ - Use that revision of the companion checkout and its `scripts/sync-skills.sh`. Check the installed `chief-of-staff/references/engineering-recipes.md` against the pinned source before relying on it; a repository merge alone does not establish local installation. The reference includes grounded investigation, architecture comparison, and verified bug fix.
15
+
16
+ ## Installation and distribution
17
+
18
+ This invocation guide, the [verification overview](verification/README.md), and the
19
+ [project-check guide](verification/project-checks.md) ship in the npm package.
20
+ Installed MCP clients can call `provider_doctor`, `verification_run`, and
21
+ `verification_inspect` without cloning ClinkX or needing shell access.
22
+ Install the companion `chief-of-staff` skill separately as described above; the
23
+ npm package does not include or install its recipe instructions.
24
+
25
+ The built-in `architecture-comparison` workflow includes its own templates,
26
+ validators and deterministic handoffs. It needs no companion skill or ClinkX
27
+ checkout. Provider CLIs and their configured authentication must be available on
28
+ the MCP server's host, as for any `clink` call.
29
+
30
+ ## Built-in architecture comparison
31
+
32
+ Call `list_workflows` for the installed input declarations, then explicitly select
33
+ the workflow:
34
+
35
+ ```json
36
+ {
37
+ "name": "run_workflow",
38
+ "arguments": {
39
+ "workflow": "architecture-comparison",
40
+ "run_id": "architecture-001",
41
+ "variables": {
42
+ "user_request": "Compare two designs for the requested change. State caller usage, signatures, ownership, failures and rejected alternatives.",
43
+ "source_identity": "my-project at reviewed revision; declared attached files only",
44
+ "context_files": ["/absolute/path/to/project/design-context.md"],
45
+ "candidate_a_cli": "codex",
46
+ "candidate_b_cli": "claude",
47
+ "judge_cli": "codex"
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ Paths refer to the MCP host and must satisfy workflow source/path admission.
54
+ Both authors receive the same requirements and frozen context bytes. Existing
55
+ context preflight runs according to the server's configuration; its costs and
56
+ coverage signals remain part of the run. Explicit context overrides do not
57
+ change the installed defaults or establish secret protection.
58
+
59
+ The workflow freezes a versioned shared-input artifact, runs two fresh authors,
60
+ constructs a separate judge view, runs one fresh judge, and deterministically
61
+ publishes an `architecture-comparison-record-v1` owner record. The judge receives
62
+ only shared context and semantic candidate bodies under `candidate_A` and
63
+ `candidate_B`; author routes remain in the owner record. Structured source
64
+ references and aliases are checked against delivered artifacts. Identity metadata
65
+ is excluded and explicit self-attribution is rejected, but arbitrary prose can
66
+ still reveal authorship. This is structural blinding, not a guarantee of semantic
67
+ anonymity.
68
+
69
+ Both author and judge templates explicitly require read-only review of delivered
70
+ inputs: no command, sketch or test execution, edits, networking tools or
71
+ delegation. Only the CLI's designated response artifact may be written. These
72
+ are provider instructions, not a tool sandbox guarantee. Independently verify
73
+ the proposed design and inspect provider activity when execution scope matters.
74
+
75
+ Candidate and judge routes accept optional declared `_model` and `_effort`
76
+ variables only when the actual adapter supports them. The judge is an independent
77
+ fresh invocation with no author continuation; it may use the same provider as an
78
+ author. There is no route substitution or fallback. Missing or invalid candidates,
79
+ an unavailable judge, mismatched digests or invalid references leave the
80
+ comparison incomplete. A final record may be available while workflow health is
81
+ degraded; inspect the record's own status rather than treating run success as
82
+ comparison completeness.
83
+
84
+ Requirements, shared context, candidate outputs and full judge fan-in have byte
85
+ ceilings. Candidates are never silently dropped or truncated to fit. Byte
86
+ admission does not establish a provider's token capacity; inspect the workflow's
87
+ capacity declaration/limitations and use a smaller packet when capacity is
88
+ unknown. Resume retains the original frozen input and validates its recorded
89
+ artifact identities; changed or corrupt retained evidence cannot be reused as a
90
+ fresh candidate.
91
+
92
+ | Artifact or input | UTF-8 byte ceiling |
93
+ | --- | --- |
94
+ | Requirements | 16 KiB |
95
+ | Frozen shared JSON, including at most 32 source files | 48 KiB |
96
+ | Each candidate JSON | 16 KiB |
97
+ | Complete judge view JSON | 96 KiB |
98
+ | Judge JSON | 12 KiB |
99
+ | Owner comparison record JSON | 128 KiB |
100
+
101
+ Optional `judge_prompt_token_limit` declares an independently known input
102
+ capacity. Admission uses a conservative byte-token upper bound for the full
103
+ view, prompt and response reserve; an insufficient declaration fails before
104
+ dispatch. When omitted, the owner record explicitly reports capacity as unknown.
105
+
106
+ For async execution, set `async:true`, poll `workflow_run_status`, and fetch with
107
+ `include_result:true`. The same existing `cancel_workflow` and `resume_workflow`
108
+ controls apply. Complete comparison grants no acceptance: the owner records the
109
+ selected/rejected ideas, synthesizes the design and runs any required prototype
110
+ or implementation verification.
111
+
112
+ Read the owner record's `judge.recommendation` as advice. Its `status:complete`
113
+ establishes delivery and validated artifact identity/reference structure.
114
+ It does not validate the semantics of the proposed design. Independent source
115
+ review and executable prototype checks remain separate; attached inspected
116
+ verification records cover only their pinned checks at inspection time.
117
+ `owner_acceptance:not_recorded` stays unchanged until the owner records a decision
118
+ outside this comparison contract. A model grade cannot substitute for any of
119
+ these steps: the stricter targeted GLM evaluation found three material defects
120
+ in five designs that its calibrated graders accepted.
121
+
122
+ ClinkX's own dashboard and workflow-handoff regression procedures still require a
123
+ source checkout. The dashboard procedure uses
124
+ `clinkx-workflows/dashboard-ui/e2e/real-disk-doctor.mjs` with `preflight`, `classify`,
125
+ and `identity` subcommands, documented in `docs/verification/dashboard-real-disk.md`.
126
+ The workflow-handoff procedure uses `scripts/verify-workflow-handoff.mjs run` and
127
+ `inspect`, documented in `docs/verification/workflow-handoff.md`. Those fixtures
128
+ qualify ClinkX; use the installed project-check control for your own project's
129
+ commands through the same MCP connection. `npx clinkx` starts the MCP server;
130
+ readiness and verification are tools on that server.
131
+
132
+ ## Companion recipe invocation
133
+
134
+ The [GLM-only efficacy pilot in PR68](https://github.com/jim380/clink-mcp/pull/68)
135
+ does not establish a general productivity or quality gain. Across four new
136
+ architecture tasks repeated twice, the frozen semantic gate accepted single-author
137
+ practice 7/8, manual comparison 5/8 and native comparison 6/8; execution medians were
138
+ 211.533s/322.310s/308.147s. Native comparison reduced core caller requests from
139
+ three to one versus manual, while using the same three provider invocations.
140
+ One native malformed judge output remained incomplete with no retry. Monetary
141
+ cost and human correction time are unknown. Keep comparison opt-in.
142
+
143
+ The same pilot found no textual proof-interpretation advantage (plain 8/12 exact
144
+ versus projection 6/12; absent-field canonicalization was underspecified), and no
145
+ recipe investigation advantage (practice 3/4 versus recipe 2/4). All eight seeded
146
+ fixes passed causal functional checks and fresh verifier reruns, but generic
147
+ outside-workspace temporary writes and host temporary fixtures prevent full
148
+ procedure/scope qualification. Reference guidance was tested; the full skill
149
+ orchestration and human dashboard usability were not measured. Prior unfavorable
150
+ studies below remain relevant. Read the report's limits before applying these
151
+ counts as a recommendation.
152
+
153
+ Recipes apply only when the caller asks. Example requests to chief-of-staff:
154
+
155
+ - "Apply the grounded-investigation recipe to: <one answerable question>. Source: <repo@commit, dirty state>."
156
+ - "Run the architecture-comparison recipe for <change>: two candidates, independent judge."
157
+
158
+ ClinkX tools used:
159
+
160
+ - `clink` runs each candidate author and the independent judge, one seat per call. Parallel calls are fine for independent candidates.
161
+ - `context_builder` builds the shared source packet that is attached to those calls (`recommended_clink.absolute_file_paths` hands the bundle over).
162
+ - `provider_doctor` checks seat readiness; request `probes` explicitly to establish authentication.
163
+ - `verification_run` executes a reviewed project-check manifest; retain its `expectations_sha256` independently and pass it to `verification_inspect` when reassessing the evidence. Neither tool accepts a recipe, workflow, or change on behalf of its owner.
164
+
165
+ Judge input is a separate alias-only view (e.g. `candidate_A`/`candidate_B`, no author, seat, model, or route names). The parent keeps the alias-to-identity map privately; it is not published or shown to the judge. See the skill reference for the full input and output contracts.
166
+
167
+ ## Unavailable-tool behavior
168
+
169
+ - A missing or unusable ClinkX `clink` seat for a candidate, or for the independent judge, leaves the comparison **incomplete**. Name the missing part. Do not substitute the parent's own verdict as the judge, and never silently drop or truncate a candidate. Local investigation can still be useful.
170
+ - Configuration is not authentication. An adapter that resolves has not proven its CLI is logged in; a seat is usable only after it actually runs.
171
+ - Workflow context preflight (default on) needs a curator (`CLINKX_WORKFLOWS_CONTEXT_DEFAULT_CURATOR`, default `codex`) and a Codex `json` finalizer configured, or startup fails with `ConfigError`. See [configuration](configuration.md). `CLINKX_WORKFLOWS_CONTEXT_PREFLIGHT_ENABLED=false` bypasses preflight but gives no secret protection.
172
+ - Secrets: sanitize what you author. The user settled report §8.1 on 2026-10-09: keep the engine default `allow_secrets:true` and the chief-of-staff rule to omit rather than pin `allow_secrets` / `cb_allow_secrets` to `false`. The companion `runtime-routing.md` rule at the compatible revision is grounded in the recorded measurement: on that build, `false` shifted selection but performed no redactions, and a planted in-file key reached delivered context in both modes. Neither mode establishes secret protection. Keep secrets out of packets and prompts; secret scrubbing is a separate work item. This integration adds no secret-policy defaults.
173
+ - Judge-input bounds: see the skill reference ("Architecture comparison", "Bounds before dispatch").
174
+
175
+ ## Worked example: output ownership (task 1-4)
176
+
177
+ A real run of both recipes on this repo (source `d0a55b1`, Playwright 1.61.1).
178
+
179
+ - **Question:** how should each real-disk dashboard Playwright invocation own its output (artifacts dir, JSON report, bootstrap file) so two concurrent invocations keep separate results?
180
+ - **Grounded brief:** question, exact source identity, code anchors, constraints, and the decision (native CLI/env options vs. a small `playwright.real-disk.config.ts` change), with cited observations, hypotheses, unknowns, and one discriminating experiment.
181
+ - **Candidates:** aliases `X` (native flags and env only; `judge-view/candidate-X.md`) and `Y` (small config change; `judge-view/candidate-Y.md`), authored from identical requirements and packet.
182
+ - **Independent judge:** a separate seat given only the alias view. It cited only delivered aliases, so alias resolution passed. It selected Y conditionally and noted X suffices if the documented procedure is the supported caller.
183
+ - **Owner synthesis:** selected X, diverging from the judge for a stated scope reason. The plan's contract is that a fresh caller can repeat the *documented* procedure, and the rule is to change config only when native options cannot meet it. Y stays as the ready fallback if overlap evidence (task 2-5) shows native options fail. The comparison was recorded as complete.
184
+
185
+ Local-only evidence (this machine; not remote downloads, not in the repo): `${XDG_STATE_HOME:-~/.local/state}/clinkx-pstack-evidence/1-4/` with `brief.md`, `judge-view/candidate-X.md`, `judge-view/candidate-Y.md`, and `comparison-record.md`. A parent-only alias map exists beside them and is intentionally not described here.
186
+
187
+ ## Built-in native verified repair
188
+
189
+ Choose `verified-repair` explicitly when the host has the project, reviewed
190
+ commands and a separate authorized verification-copy parent. It edits existing
191
+ UTF-8 files in the selected working tree through host-applied full replacements.
192
+ Providers return proposals; they do not receive workflow authority to edit.
193
+ See [project setup and contract](verification/project-checks.md#native-verified-repair).
194
+ The workflow ships with the installed package and reuses `run_workflow`; no
195
+ ClinkX checkout or additional binary is required. The caller needs access to
196
+ the selected project to prepare the contract and manifests. Confirm the
197
+ connected server lists `verified-repair` through `list_workflows` and that the
198
+ selected provider CLIs are configured and authenticated on the MCP host.
199
+
200
+ ```json
201
+ {
202
+ "name": "run_workflow",
203
+ "arguments": {
204
+ "workflow": "verified-repair",
205
+ "run_id": "repair-001",
206
+ "async": true,
207
+ "variables": {
208
+ "repair_contract_path": "/absolute/private-evidence/repair-contract.json",
209
+ "investigator_cli": "codex",
210
+ "repair_author_cli": "claude",
211
+ "verifier_cli": "codex"
212
+ }
213
+ }
214
+ }
215
+ ```
216
+
217
+ All three routes are explicit. Optional `investigator_model` /
218
+ `investigator_effort`, `repair_author_model` / `repair_author_effort`, and
219
+ `verifier_model` / `verifier_effort` use each configured adapter's supported
220
+ invocation overrides. Unsupported routes or overrides fail admission; no
221
+ provider fallback is selected. The independent verifier receives fresh context.
222
+
223
+ Use `workflow_run_status` with the run ID and `include_result:true` to read the
224
+ terminal `clinkx-verified-repair-record-v1`. The record preserves applied paths,
225
+ original pins, reproduction, fixed-tree checks, independent findings and the
226
+ copy's pass → fail without fix → pass after restoration experiment. `verified`
227
+ requires every gate; a provider's approval alone cannot qualify it.
228
+
229
+ ```json
230
+ {
231
+ "name": "workflow_run_status",
232
+ "arguments": {"run_id": "repair-001", "include_result": true}
233
+ }
234
+ ```
235
+
236
+ These examples are MCP `tools/call` payloads. A client may expose the same tool
237
+ as `mcp__clinkx__run_workflow`; pass the shown `arguments` to that tool. Use a
238
+ fresh run ID, poll until terminal, and inspect result availability, the repair
239
+ record's `repair_status` and gaps. Execution completion alone is insufficient.
240
+
241
+ The dashboard shows historical repair facts at publication alongside the
242
+ existing inspected verification history. Execution status, repair qualification
243
+ and `owner_acceptance: not_recorded` remain separate. Missing or corrupt records
244
+ are unavailable. Current applicability requires native inspection against the
245
+ selected tree and the retained original expectations pin.
246
+
247
+ Failed, blocked or interrupted runs retain applied edits and private evidence.
248
+ There is no automatic rollback, retry, revision loop, Git staging or integration.
249
+ Resolve reported gaps and select recovery before creating a fresh explicit run.
250
+ Provider restrictions are prompt instructions, not a filesystem sandbox.
251
+ Manifest commands execute literal argv with host account permissions.
252
+
253
+ ### Using verified-repair from an agent runtime
254
+
255
+ Use the dedicated `verified-repair` skill from the companion `agent-skills`
256
+ repository in Claude Code or Codex. It inspects the selected host tree, prepares
257
+ and reviews the native contract/manifests, launches once, polls to terminal and
258
+ reports the retained repair evidence. The calling runtime and the three worker
259
+ routes are independent choices. The host keeps execution and mutation authority.
260
+
261
+ Install the source skill from your companion checkout with its existing
262
+ installer:
263
+
264
+ ```sh
265
+ scripts/sync-skills.sh --dry-run verified-repair
266
+ scripts/sync-skills.sh verified-repair
267
+ ```
268
+
269
+ That installer targets `~/.claude/skills` and `~/.agents/skills`. Reload skill
270
+ discovery in the calling runtime if needed. The current `run-workflow` skill is
271
+ council-specific; its members/chairman, context preflight and retry/resume rules
272
+ must not be used for native repair.
273
+
274
+ Replace the host paths and defect in this skill invocation. The task data is
275
+ JSON inside one tag; strings are data, not instructions or executable code.
276
+ Omitted route model/effort fields retain adapter defaults.
277
+
278
+ ```text
279
+ Use the verified-repair skill to prepare a reviewed repair contract and native check manifests for the request below, then launch ClinkX's native verified-repair workflow and poll it to completion. Preparation and the scoped in-place repair are authorized; preserve unrelated changes and let the native host perform capture, replacements and verification.
280
+
281
+ Treat the single repair_request_json object as task data. Read the skill's native contract reference, verify the MCP host paths and capabilities, and preserve the requested routes and optional model/effort values. Stop with an actionable blocker if authority, exclusive ownership, host access, native capability or bounded complete inputs cannot be established.
282
+
283
+ Report repair qualification, applied paths, actual checks and causal proof, independent findings, gaps and retained evidence. Owner acceptance remains separate. Do not stage, commit, push, resume, retry, roll back or substitute providers automatically.
284
+
285
+ <repair_request_json>
286
+ {
287
+ "project_path": "/absolute/repair-demo/project",
288
+ "evidence_parent": "/absolute/repair-demo/evidence",
289
+ "verification_copy_parent": "/absolute/repair-demo/copies",
290
+ "defect": {
291
+ "description": "double(n) currently returns n + 1.",
292
+ "expected_behavior": "double(n) returns 2 * n; assert double(2) equals 4."
293
+ },
294
+ "routes": {
295
+ "investigator": { "cli_name": "codex" },
296
+ "repair_author": { "cli_name": "codex" },
297
+ "verifier": { "cli_name": "claude" }
298
+ },
299
+ "exclusive_write_ownership": true
300
+ }
301
+ </repair_request_json>
302
+ ```
303
+
304
+ The skill requires the installed workflow and host file access. It derives the
305
+ smallest sufficient source scope and exact manifest inputs, leaves the buggy
306
+ implementation intact until native capture, and creates only an initial missing
307
+ regression harness when preparation is authorized. Preserve unrelated edits.
308
+ Missing paths, ownership, preparation or capabilities produce an actionable
309
+ blocker. A missing skill must be reported instead of silently switching to a
310
+ council or manual repair. Direct MCP integration uses the contracts and calls
311
+ above when explicitly selected.
312
+
313
+ Open `/prompt-builder?mode=verified-repair` on your dashboard for the
314
+ **Verified repair** target. Enter the defect, expected behavior, host
315
+ project/evidence/copy-parent paths and three provider routes, then acknowledge
316
+ scoped preparation/repair and exclusive write ownership. The builder emits
317
+ this skill invocation with `repair_request_json`, just as the other targets
318
+ invoke their respective skills. Its vendored template is pinned in tests;
319
+ the source lives in `agent-skills/skills/verified-repair/VERIFIED-REPAIR-PROMPT.md`.
320
+
321
+ Copy is the builder's only action: the browser does not execute workflows,
322
+ prepare contracts, grant host access or establish actual ownership. It blocks
323
+ copy for absent/stale workflow or adapter catalogs, providers without a JSON
324
+ role, missing/overlapping paths, or an unchecked ownership acknowledgment. The
325
+ skill and native admission validate the actual host prerequisites. Drafts remain
326
+ isolated from the council and chief-of-staff targets. Council/context-builder
327
+ variables are omitted; model/effort use adapter defaults.
328
+
329
+ ## Verified bug fix
330
+
331
+ The recipe is the "Verified bug fix" section of the same skill reference, present in the compatible merged revision above. The three-arm evaluation completed on 2026-10-09 (36/36 governing runs); its installation freeze is historical. The recipe remains explicitly invoked, and its independent-verifier contract still applies.
332
+
333
+ Example request: "Apply the verified-bug-fix recipe to: <defect>. Source: <repo@commit, diff or file-hash identity>. Checks: <commands>. Procedure: <doc path or none>."
334
+
335
+ ClinkX tools used:
336
+
337
+ - `clink` runs the implementation worker under the `runtime-routing.md` direct-write conditions (confirmed workspace, exclusive and disjoint paths), otherwise as a patch the parent applies; `clink` has no `cwd`, so the child runs in the server's cwd. A separate `clink` seat with fresh context is the verifier, run against the absolute path of the exact fixed state. It gets that state, the commands, and the recorded outputs, never the implementer's status or verdict. It reruns the regression test read-only and repeats the undo-the-fix check in a disposable copy (`git worktree add --detach` at the same commit plus the same diff and untracked files, or a clone), never in the implementer's tree, after confirming the copy's commit, diff digest, and untracked file hashes equal the fixed state. The copy and any attempt directories are its only writes; it removes the copy afterwards and keeps its attempt directories as evidence.
338
+ - `context_builder` optionally builds the shared source packet, as above.
339
+ - For a dashboard defect the procedure is [verification/dashboard-real-disk.md](verification/dashboard-real-disk.md). On the attempt counted as evidence: `real-disk-doctor.mjs preflight` prints `{"verdict":"ready"}`; `identity.json` `head`, `dirty`, `diff_sha256`, and untracked hashes match the fixed state; the [Checking The Result](verification/dashboard-real-disk.md#checking-the-result) command block exits 0 for that attempt directory (its exit status is `result_check`); and `classify` prints `passed`. A zero `exit.txt` or a `passed` classification alone is not a pass, because Playwright ignores the web server's exit status, a stop failure shows only as a missing `fixture stopped (ok)` line, and `classify` only triages: it does not check the observation, identity, report shape, or cleanup. The procedure does not accept a dirty attempt as acceptance evidence, so for an uncommitted fix run it from [Clean Checkout](verification/dashboard-real-disk.md#clean-checkout) at the fixed commit (`dirty=false`); until then `procedure_evidence` is incomplete. The verifier reruns the result check over the retained attempt directory from the same checkout path (recreate the clean checkout at that path and commit if it was removed), or reruns the procedure. On any other outcome `classify` names the failure.
340
+
341
+ Unavailable-tool behavior:
342
+
343
+ - No usable verifier seat: the fix stays `implemented-unverified` and the recipe status is `incomplete`. The parent and the implementer do not stand in.
344
+ - Preflight `blocked`, no `identity.json`, an identity that does not match the fixed state, or a result check that does not exit 0: the procedure evidence is missing and the status is `incomplete`. Repair the prerequisite as the procedure says; do not substitute another run.
345
+ - Report `verified` only after the verifier's ACCEPT is recorded. Report `incomplete` as a `log_append` entry with `kind: "warn"` naming the missing item.
346
+
347
+ ### Worked example: double-SIGTERM false pass (`a01c4c4`, `463e30e`)
348
+
349
+ - **False pass:** Playwright's `webServer` `gracefulShutdown` signals the whole process group, and the fixture sent the dashboard CLI a second `SIGTERM` about 0.26 ms later. The CLI registered `SIGTERM` with `process.once`, so the second signal killed it mid-close, and the fixture's classifier logged `fixture stopped (ok)` for any death by a signal it had sent. A council review (`code-review-20261005-134849`) found it; every earlier ACCEPT was invalidated.
350
+ - **Regression tests:** repeated-`SIGTERM` tests for each entry point (`tests/shutdown.test.ts`, `tests/dashboard-cli.test.ts`, `tests/dashboard-gateway/gateway.test.ts`, `clinkx-workflows/tests/shutdown.test.ts`), plus a real-CLI fixture test that reproduces the process-group signal and fails against a `once` handler (`tests/dashboard-real-disk-fixture.test.ts`).
351
+ - **Fix:** `a01c4c4` moves `SIGTERM` to `process.on` behind the existing re-entry guards and makes the dashboard CLI exit explicitly once close settles; `463e30e` makes `stopped (ok)` require exit code 0 after a requested stop.
352
+ - **Independent verification:** review-loop round 4 on state `542c59b9c07f6b72` (the committed code) signed off with two native reviewer seats at 9/10 and no blockers; the full gate exited 0 and the concurrent procedure passed on macOS and Linux Docker arm64. Recorded in `.ai/plans/2026-10-04-clinkx-pstack-integration-implementation-plan.md`.
353
+ - **Gap against this recipe:** that run predates it. Whether fail-before output (commit, command, output) and an undo-the-fix check were recorded on the exact states is not established in these records; the evaluation protocol's P2 later saw the five repeated-`SIGTERM` tests from `a01c4c4` (dashboard CLI ×2, gateway, root, workflows) fail on the unfixed `d0a55b1`; the fixture test was not in that gate. Under this recipe the record stays `incomplete` until fail-before on `d0a55b1` and an undo check on the fixed state are attached.
354
+
355
+ ## Reporting outcomes through existing progress-report tools
356
+
357
+ Use the existing `progress_report_update` append fields for owner decisions and
358
+ caller-reported counts. Inspected project proof has a separate versioned workflow
359
+ attachment described in [the project-check guide](verification/project-checks.md).
360
+ Neither surface grants acceptance; report counts are not inspected proof.
361
+
362
+ Procedure for dashboard checks: [verification/dashboard-real-disk.md](verification/dashboard-real-disk.md) (follow it there, not here).
363
+
364
+ Rules:
365
+
366
+ - Record the authoritative disposition (the verifier's accept/reject) **before** reporting. The report mirrors the decision; it never makes it.
367
+ - A reporting failure or `revision_conflict` never changes acceptance and never releases dependencies. Re-read with `progress_report_get`, then retry with the new `expected_revision`. Blindly re-sending the same `log_append` after a `revision_conflict` can append twice, so re-read first.
368
+ - `tests_set` counts are caller-supplied. They are not collector-verified.
369
+ - Evidence paths in messages are local to the machine that produced them, not remote downloads.
370
+ - `log_append` entries are `{agent, kind, msg}` with `kind` one of `info|success|warn|error`; `decisions_append` entries are `{by, msg}`. Each `msg` is at most 300 code points, so name source, attempt, evidence type, result, and what is unavailable tersely. Use a fresh `request_id` per intended write; replaying it with identical content writes nothing.
371
+
372
+ Example, direct dashboard-procedure evidence (placeholders in angle brackets; `expected_revision` is an integer, at least 1, taken from the last receipt or `progress_report_get`, so `3` here is illustrative):
373
+
374
+ ```json
375
+ {
376
+ "report_id": "<SESSION-id from progress_report_start>",
377
+ "request_id": "<fresh uuid>",
378
+ "expected_revision": 3,
379
+ "changes": {
380
+ "log_append": [
381
+ {
382
+ "agent": "verifier",
383
+ "kind": "success",
384
+ "msg": "real-disk dashboard check, src <commit>, attempt <n>: exit 0, JSON report present, assertions passed, fixture stopped (ok). Evidence local: <attempt dir>"
385
+ }
386
+ ]
387
+ }
388
+ }
389
+ ```
390
+
391
+ Example, recipe outcome (comparison, owner decision):
392
+
393
+ ```json
394
+ {
395
+ "report_id": "<SESSION-id>",
396
+ "request_id": "<fresh uuid>",
397
+ "expected_revision": 4,
398
+ "changes": {
399
+ "decisions_append": [
400
+ {
401
+ "by": "chief-of-staff",
402
+ "msg": "Comparison complete (2 candidates + independent judge). Judge chose Y; owner chose X (documented procedure is the supported caller). Local evidence: <evidence dir>"
403
+ }
404
+ ]
405
+ }
406
+ }
407
+ ```
408
+
409
+ Report an incomplete comparison as a `log_append` entry with `kind: "warn"` naming the missing candidate or judge (optionally also a `decisions_append` entry, which has no `kind`).
410
+
411
+ If recording verification counts, `tests_set` takes `{passed, failed, skipped, failing: []}`; label them in the accompanying `log_append` as caller-supplied.
412
+
413
+ ### Optional helper proof (B1)
414
+
415
+ Dashboard helper-produced proof through these append fields remains **conditional and not implemented**. The 2026-10-10 follow-up selects a separate core workflow-handoff procedure with an internal coverage evaluator and retained run/inspect evidence; it does not implement the broader dashboard B1 helper or add a reporting schema. See the [follow-up scope](../.ai/reports/2026-10-10-pr68-implementation-follow-up.md). Direct procedure reporting needs no helper or typed manifest.
package/docs/security.md CHANGED
@@ -12,6 +12,9 @@ ClinkX validates and constrains the *inputs* it accepts — file paths, argument
12
12
 
13
13
  - `CLINKX_ALLOWED_ROOTS` (comma-separated, default: `process.cwd()`) defines which filesystem paths the tool will accept as `absolute_file_paths` or `images` inputs.
14
14
  - All paths are resolved via `realpath` — symlink escapes are blocked.
15
+ - A directory entry admits that directory and its descendants. An existing regular-file entry is an exact-file grant: it resolves to the canonical file and admits only that path, never siblings, name prefixes such as `file.bak`, or child paths.
16
+ - An entry that is a dangling symlink, inaccessible (`EACCES`, `EPERM`, `ENOTDIR`, `ELOOP`), or neither a directory nor a regular file fails startup (`-32602` on tool paths) with `CLINKX_ALLOWED_ROOTS entry "<entry>" is unusable: <reason>. Fix or remove this entry from CLINKX_ALLOWED_ROOTS.` A nonexistent entry is still accepted.
17
+ - The server also admits its workflow state and artifact roots as artifact-only, directory-only entries. A state or artifacts override equal to the home directory or one of its ancestors is accepted with a startup warning, because any file in that tree can then be passed as a direct file reference that subprocess CLIs read, and ClinkX child processes may write anywhere in it; a filesystem root is rejected, including a TMPDIR-derived artifacts default that resolves to one. See [Durable storage roots](configuration.md#durable-storage-roots).
15
18
  - Startup refuses to run from filesystem root (`/` or drive root) unless `CLINKX_ALLOWED_ROOTS` is explicitly set.
16
19
 
17
20
  ### Context builder validation
@@ -0,0 +1,59 @@
1
+ # Verification Procedures
2
+
3
+ The npm-installed ClinkX MCP server exposes provider readiness and project
4
+ verification tools. An MCP client can use them without shell access, a ClinkX
5
+ checkout, Git, a browser, or ClinkX development dependencies. Node 24 or newer
6
+ and the tools required by your own project checks must be installed on the MCP
7
+ server's host.
8
+
9
+ | MCP tool | Purpose | Guide |
10
+ | --- | --- | --- |
11
+ | `provider_doctor` | Separate provider configuration, executable, authentication, and startup readiness; authentication probes are explicit | [Provider readiness](../configuration.md#provider-readiness-doctor) |
12
+ | `verification_run` | Execute a reviewed project manifest and retain private evidence for the identified state | [Project checks](project-checks.md), [example manifest](project-checks.example.json) |
13
+ | `run_workflow` with `verified-repair` | Explicit scoped in-place repair with native and independent causal checks; owner acceptance stays separate | [Native repair setup](project-checks.md#native-verified-repair), [invocation](../engineering-recipes.md#built-in-native-verified-repair) |
14
+ | `verification_inspect` | Inspect retained evidence with the owner's original expectations digest; execute no project commands | [Project checks](project-checks.md) |
15
+
16
+ These guides and the example manifest ship in the npm package. The engineering
17
+ recipe invocation guide also ships; the built-in native workflows require no companion checkout. Manual recipe instructions use
18
+ the separately installed companion skill described in
19
+ [engineering recipes](../engineering-recipes.md).
20
+
21
+ ## ClinkX source-checkout procedures
22
+
23
+ The following regression procedures exercise ClinkX's own runtime with controlled
24
+ fixtures. Their scripts and fixtures require a source checkout; their guides are
25
+ also included in the package. They do not replace the canonical check
26
+ (`npm run build:all && npm test`).
27
+
28
+ Each source procedure names one feature and states its prerequisites, exact commands,
29
+ the assertions it proves, the evidence to keep, cleanup, and known limits.
30
+
31
+ | Procedure | Feature | Surface exercised |
32
+ | --- | --- | --- |
33
+ | [dashboard-real-disk.md](dashboard-real-disk.md) | Dashboard serves persisted run history and refreshes a same-generation state replacement | Real dashboard CLI, HTTP API, Chromium, files on disk |
34
+ | [workflow-handoff.md](workflow-handoff.md) | Workflow producers deliver the correct persisted bytes to a final consumer; absent producer evidence remains missing | Real YAML loader, MCP STDIO child, workflow engine, validators, artifact store, host coverage evaluator |
35
+
36
+ General rules:
37
+
38
+ - Build once, then run invocations that do not build.
39
+ - Give every invocation its own attempt directory under a private evidence
40
+ root outside the checkout (`chmod 700`).
41
+ - A zero exit status is not proof. Check the retained report for the exact
42
+ required test and its status.
43
+ - Raw reports, traces, and logs can contain credentials. Keep them private;
44
+ share only checked, token-free summaries.
45
+
46
+ ## Maintaining the feature map
47
+
48
+ Each row above maps one feature to one procedure. When a procedure stops
49
+ passing, classify the cause before repairing it:
50
+
51
+ | Class | Meaning | Example | Repair in |
52
+ | --- | --- | --- | --- |
53
+ | Documentation drift | The product changed on purpose; the procedure or its selectors did not follow. | A UI redesign moved labels the spec asserted. | The procedure and spec. Keep the assertion's intent; record any check that can no longer be observed. |
54
+ | Harness defect | The fixture, config, or runner misreports the result. | A fixture that treats an unsolicited exit as a clean shutdown; a runner that kills the fixture before its cleanup. | The fixture or config, with a subprocess test or a repeated procedure run that fails without the repair. |
55
+ | Product regression | The feature itself no longer behaves as intended. | The inspector stops refreshing after a state replacement. | The product code, not the procedure. |
56
+
57
+ After any repair, repeat the affected procedure and keep the new attempt's
58
+ evidence. Do not weaken an assertion to make drift pass. Add a row here when a
59
+ new procedure is added, and remove a row only when its feature is removed.