@thedecipherist/mdd 1.6.8 → 1.6.9
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.
- package/commands/mdd-audit.md +22 -8
- package/package.json +1 -1
package/commands/mdd-audit.md
CHANGED
|
@@ -153,11 +153,12 @@ Integration context: .mdd/jobs/audit-<date>/integration-context.md
|
|
|
153
153
|
- `eval()` used anywhere — only `vm.runInNewContext` is permitted
|
|
154
154
|
- Cloud metadata endpoints (169.254.169.254, 169.254.170.2, fd00:ec2::254, metadata.google.internal) reachable without block
|
|
155
155
|
- Secrets, API keys, or credentials hardcoded in source
|
|
156
|
-
- Security enforcement function exists in a dependency but is NOT called at this call site
|
|
156
|
+
- Security enforcement function exists in a dependency but is NOT called at this call site — check `integration-context.md` under "Integration Contracts" for the contract that applies to this file's feature, then verify the required call is present in this file
|
|
157
157
|
- "Immutable" rule arrays exported as plain mutable arrays — not `Object.freeze()` + `readonly`
|
|
158
158
|
- Untrusted MCP/API/CLI input used without validation or sanitization
|
|
159
159
|
- Data cached or stored without masking applied first
|
|
160
|
-
|
|
160
|
+
|
|
161
|
+
**Note:** `satisfies_contracts status: pending` is checked by main in Phase A1, not here — agents cannot read feature docs.
|
|
161
162
|
|
|
162
163
|
### P2 High
|
|
163
164
|
- TypeScript `any` used — must use `unknown` with narrowing
|
|
@@ -219,9 +220,17 @@ PER-FILE LOOP:
|
|
|
219
220
|
4. Append to agent-N-notes.md:
|
|
220
221
|
## src/handlers/auth.ts
|
|
221
222
|
<findings, or "No issues found">
|
|
223
|
+
Contracts: <explicit result for every contract that applies to this file>
|
|
224
|
+
- [feature-name] contract: SATISFIED — [function name] called at line N
|
|
225
|
+
- [feature-name] contract: VIOLATION — required call absent (P1)
|
|
226
|
+
- (none) — no contracts apply to this file per integration-context.md
|
|
222
227
|
5. Mark file as [x] or [!] in MANIFEST.md ← [!] = has findings
|
|
223
228
|
6. Clear context ← every file, no exceptions
|
|
224
229
|
7. On restart: run STARTUP above
|
|
230
|
+
|
|
231
|
+
The Contracts line is mandatory for every file. It allows Phase A6 to distinguish
|
|
232
|
+
"agent checked and confirmed satisfied" from "agent never checked." If integration-context.md
|
|
233
|
+
shows no contracts apply to this file, write "(none)" — never omit the line entirely.
|
|
225
234
|
```
|
|
226
235
|
|
|
227
236
|
**Hard rules:**
|
|
@@ -264,7 +273,9 @@ Merge is in manifest order, not agent completion order. The job folder is not to
|
|
|
264
273
|
|
|
265
274
|
### Phase A6 — Analyze
|
|
266
275
|
|
|
267
|
-
Read
|
|
276
|
+
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.
|
|
277
|
+
|
|
278
|
+
**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
279
|
|
|
269
280
|
1. Executive summary
|
|
270
281
|
2. Feature completeness matrix
|
|
@@ -286,11 +297,12 @@ This step runs independently of agent findings. It uses `integration-context.md`
|
|
|
286
297
|
|
|
287
298
|
For each contract in `integration-context.md`:
|
|
288
299
|
1. Identify all source files listed under "Caller source files" for that contract
|
|
289
|
-
2. For each such source file,
|
|
290
|
-
-
|
|
291
|
-
-
|
|
292
|
-
-
|
|
293
|
-
|
|
300
|
+
2. For each such source file, find its `## <filepath>` entry in `audits/notes-<date>.md` and read the `Contracts:` line:
|
|
301
|
+
- `SATISFIED` — agent confirmed the call is present. No action.
|
|
302
|
+
- `VIOLATION` — agent flagged it. Include as P1 in Contract Violations section.
|
|
303
|
+
- `(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.
|
|
304
|
+
- `Contracts:` line is missing entirely — agent ran before this version of the workflow. **Re-read that source file now** and check independently.
|
|
305
|
+
3. Report each confirmed gap as P1. Note whether it was caught by the agent or discovered by Phase A6.
|
|
294
306
|
|
|
295
307
|
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
308
|
- Any `satisfies_contracts` with `status: pending` not already in doc-findings = P1
|
|
@@ -426,4 +438,6 @@ After the issue is opened, update the `Status` field of each logged entry in `md
|
|
|
426
438
|
|
|
427
439
|
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
440
|
|
|
441
|
+
**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.
|
|
442
|
+
|
|
429
443
|
---
|