@thedecipherist/mdd 1.6.8 → 1.6.10

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.
@@ -113,6 +113,7 @@ Main writes a shard file and config file for each agent into the job folder **be
113
113
 
114
114
  ## Integration Contracts
115
115
  <!-- What each security/shared feature requires ALL callers to implement -->
116
+ <!-- "Caller source files" = look up each caller_feature name in "Feature Source Files" above and list those files -->
116
117
  ### <feature-name>
117
118
  - Contract: <description of what caller must call/implement>
118
119
  Caller features: <featureA>, <featureB>
@@ -153,11 +154,12 @@ Integration context: .mdd/jobs/audit-<date>/integration-context.md
153
154
  - `eval()` used anywhere — only `vm.runInNewContext` is permitted
154
155
  - Cloud metadata endpoints (169.254.169.254, 169.254.170.2, fd00:ec2::254, metadata.google.internal) reachable without block
155
156
  - Secrets, API keys, or credentials hardcoded in source
156
- - Security enforcement function exists in a dependency but is NOT called at this call site (check dependency docs for `integration_contracts`)
157
+ - Security enforcement function required by a dependency contract is absent from this file two-step check: (1) find this file under "Feature Source Files" in `integration-context.md` to identify its owning feature; (2) scan "Integration Contracts" for any contract where this file's owning feature appears under "Caller features" — those are contracts this file must satisfy. Verify each required call is present.
157
158
  - "Immutable" rule arrays exported as plain mutable arrays — not `Object.freeze()` + `readonly`
158
159
  - Untrusted MCP/API/CLI input used without validation or sanitization
159
160
  - Data cached or stored without masking applied first
160
- - `satisfies_contracts` entry is `status: pending` — contract was acknowledged but never wired
161
+
162
+ **Note:** `satisfies_contracts status: pending` is checked by main in Phase A1, not here — agents cannot read feature docs.
161
163
 
162
164
  ### P2 High
163
165
  - TypeScript `any` used — must use `unknown` with narrowing
@@ -219,9 +221,17 @@ PER-FILE LOOP:
219
221
  4. Append to agent-N-notes.md:
220
222
  ## src/handlers/auth.ts
221
223
  <findings, or "No issues found">
224
+ Contracts: <explicit result for every contract that applies to this file>
225
+ - [feature-name] contract: SATISFIED — [function name] called at line N
226
+ - [feature-name] contract: VIOLATION — required call absent (P1)
227
+ - (none) — no contracts apply to this file per integration-context.md
222
228
  5. Mark file as [x] or [!] in MANIFEST.md ← [!] = has findings
223
229
  6. Clear context ← every file, no exceptions
224
230
  7. On restart: run STARTUP above
231
+
232
+ The Contracts line is mandatory for every file. It allows Phase A6 to distinguish
233
+ "agent checked and confirmed satisfied" from "agent never checked." If integration-context.md
234
+ shows no contracts apply to this file, write "(none)" — never omit the line entirely.
225
235
  ```
226
236
 
227
237
  **Hard rules:**
@@ -264,7 +274,9 @@ Merge is in manifest order, not agent completion order. The job folder is not to
264
274
 
265
275
  ### Phase A6 — Analyze
266
276
 
267
- Read ONLY `audits/notes-<date>.md` (NOT source code again). Produce `audits/report-<date>.md` — include `mdd_version: <current from mdd.md frontmatter>` as the first line of frontmatter:
277
+ Read `audits/notes-<date>.md` as the primary source. Produce `audits/report-<date>.md` — include `mdd_version: <current from mdd.md frontmatter>` as the first line of frontmatter.
278
+
279
+ **Source code access in this phase:** Standard synthesis (items 1-8 below) uses only the notes file. The integration contract verification step that follows may re-read specific source files — that is the only exception, and it is mandatory.
268
280
 
269
281
  1. Executive summary
270
282
  2. Feature completeness matrix
@@ -286,11 +298,13 @@ This step runs independently of agent findings. It uses `integration-context.md`
286
298
 
287
299
  For each contract in `integration-context.md`:
288
300
  1. Identify all source files listed under "Caller source files" for that contract
289
- 2. For each such source file, check `audits/notes-<date>.md` for that file's entry:
290
- - If notes explicitly confirm the contract call is present: no action
291
- - If notes flag a contract violation: include in Contract Violations section
292
- - If notes say "No issues found" but the contract requires a specific function call: **re-read that source file now** and check whether the required call is actually present. Agents marked the file `[x]` without the contract context — verify independently.
293
- 3. Report each confirmed gap as P1 ("contract call absent — agent lacked context to detect this")
301
+ 2. For each such source file, check `audits/MANIFEST-<date>.md` (or the job folder MANIFEST.md if the permanent copy isn't written yet) — if the file is marked `[e]`, skip contract verification for it and note in the Contract Violations section: "Could not verify — file was unreadable during audit."
302
+ 3. For files not marked `[e]`, find the file's `## <filepath>` entry in `audits/notes-<date>.md` and read the `Contracts:` line:
303
+ - `SATISFIED` agent confirmed the call is present. No action.
304
+ - `VIOLATION` agent flagged it. Include as P1 in Contract Violations section.
305
+ - `(none)` written but this file IS a caller per integration-context.md — agent made an error. **Re-read that source file now** and check independently.
306
+ - `Contracts:` line is missing entirely — agent ran before this version of the workflow. **Re-read that source file now** and check independently.
307
+ 4. Report each confirmed gap as P1. Note whether it was caught by the agent or discovered by Phase A6.
294
308
 
295
309
  Additionally read all `.mdd/docs/*.md` to catch any cases the Phase A1 doc cross-check might have missed (e.g., docs added after Phase A1 ran, or pending contracts that weren't flagged):
296
310
  - Any `satisfies_contracts` with `status: pending` not already in doc-findings = P1
@@ -426,4 +440,6 @@ After the issue is opened, update the `Status` field of each logged entry in `md
426
440
 
427
441
  When running `/mdd audit <section>` with fewer than 10 resolved files, skip the shard/config/agent system. Main conversation runs the per-file loop directly — context clear between each file, writing to a single `agent-1-notes.md` in the job folder. The job folder structure and completion sequence are otherwise identical.
428
442
 
443
+ **Integration context still applies in this mode.** Before starting the per-file loop, build `integration-context.md` into the job folder using the same logic as Phase A2 (read all `.mdd/docs/*.md`, extract contracts and feature-to-file mappings). Read `integration-context.md` at the start of the per-file loop and after every context clear — identical to the multi-agent startup sequence. The mandatory `Contracts:` line in notes applies here too.
444
+
429
445
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thedecipherist/mdd",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "MDD — Manual-Driven Development workflow for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {