mapify-cli 3.35.0__py3-none-any.whl → 3.35.2__py3-none-any.whl
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.
- mapify_cli/__init__.py +1 -1
- mapify_cli/schemas.py +8 -0
- mapify_cli/templates/codex/agents/review-reader.toml +3 -0
- mapify_cli/templates/codex/skills/map-auto/SKILL.md +3 -3
- mapify_cli/templates/codex/skills/map-auto/auto-reference.md +6 -4
- mapify_cli/templates/codex/skills/map-release/SKILL.md +1 -1
- mapify_cli/templates/codex/skills/map-release/release-reference.md +11 -2
- mapify_cli/templates/codex/skills/map-review/SKILL.md +39 -125
- mapify_cli/templates/codex/skills/map-review/adversarial-reference.md +13 -95
- mapify_cli/templates/codex/skills/map-review/review-reference.md +22 -2
- mapify_cli/templates/map/scripts/codex_review_host.py +381 -0
- mapify_cli/templates/map/scripts/codex_review_runner.py +335 -0
- mapify_cli/templates/map/scripts/map_step_runner.py +271 -52
- mapify_cli/templates/skills/map-auto/SKILL.md +3 -3
- mapify_cli/templates/skills/map-auto/auto-reference.md +6 -4
- mapify_cli/templates/skills/map-release/SKILL.md +1 -1
- mapify_cli/templates/skills/map-release/release-reference.md +11 -2
- mapify_cli/templates/skills/map-review/review-reference.md +10 -2
- mapify_cli/templates_src/codex/agents/review-reader.toml.jinja +3 -0
- mapify_cli/templates_src/map/scripts/codex_review_host.py.jinja +381 -0
- mapify_cli/templates_src/map/scripts/codex_review_runner.py.jinja +313 -0
- mapify_cli/templates_src/map/scripts/map_step_runner.py.jinja +271 -52
- mapify_cli/templates_src/skills/map-auto/SKILL.md.jinja +3 -3
- mapify_cli/templates_src/skills/map-auto/auto-reference.md.jinja +6 -4
- mapify_cli/templates_src/skills/map-release/SKILL.md.jinja +1 -1
- mapify_cli/templates_src/skills/map-release/release-reference.md.jinja +11 -2
- mapify_cli/templates_src/skills/map-review/SKILL.md.jinja +59 -9
- mapify_cli/templates_src/skills/map-review/adversarial-reference.md.jinja +24 -0
- mapify_cli/templates_src/skills/map-review/review-reference.md.jinja +26 -2
- {mapify_cli-3.35.0.dist-info → mapify_cli-3.35.2.dist-info}/METADATA +4 -2
- {mapify_cli-3.35.0.dist-info → mapify_cli-3.35.2.dist-info}/RECORD +34 -30
- {mapify_cli-3.35.0.dist-info → mapify_cli-3.35.2.dist-info}/WHEEL +0 -0
- {mapify_cli-3.35.0.dist-info → mapify_cli-3.35.2.dist-info}/entry_points.txt +0 -0
- {mapify_cli-3.35.0.dist-info → mapify_cli-3.35.2.dist-info}/licenses/LICENSE +0 -0
mapify_cli/__init__.py
CHANGED
|
@@ -23,7 +23,7 @@ Or install globally:
|
|
|
23
23
|
mapify check
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
__version__ = "3.35.
|
|
26
|
+
__version__ = "3.35.2"
|
|
27
27
|
|
|
28
28
|
# MUST stay the first import: it turns "this interpreter is older than 3.11" into
|
|
29
29
|
# a message that says so, instead of the ImportError raised by `from datetime
|
mapify_cli/schemas.py
CHANGED
|
@@ -1426,6 +1426,14 @@ REVIEW_BUNDLE_SCHEMA = {
|
|
|
1426
1426
|
"files": {"type": "array", "items": {"type": "object"}},
|
|
1427
1427
|
}, "required": ["status", "files"], "additionalProperties": True,
|
|
1428
1428
|
},
|
|
1429
|
+
"context_artifacts": {
|
|
1430
|
+
"type": "object", "additionalProperties": {
|
|
1431
|
+
"type": "array", "items": {
|
|
1432
|
+
"type": "object", "properties": {"path": {"type": "string"}, "content": {"type": "string"}},
|
|
1433
|
+
"required": ["path", "content"], "additionalProperties": False,
|
|
1434
|
+
},
|
|
1435
|
+
},
|
|
1436
|
+
},
|
|
1429
1437
|
"generated_at": {"type": "string"},
|
|
1430
1438
|
"artifacts": {
|
|
1431
1439
|
"type": "object",
|
|
@@ -3,6 +3,9 @@ description = "Shell-free MAP reviewer using runner-supplied source evidence"
|
|
|
3
3
|
sandbox_mode = "read-only"
|
|
4
4
|
|
|
5
5
|
developer_instructions = """
|
|
6
|
+
Dispatch status: optional legacy native reader; unverified and unable to approve.
|
|
7
|
+
The supported /map-review path uses codex_review_runner.py environment-free threads.
|
|
8
|
+
|
|
6
9
|
You are an independent reviewer, never an executor or editor. Follow the role,
|
|
7
10
|
quality rubric, evidence requirements and output schema in the generated prompt
|
|
8
11
|
exactly: Monitor correctness/security/testing, Predictor integration/reachability,
|
|
@@ -72,7 +72,7 @@ python3 .map/scripts/map_step_runner.py record_auto_phase "<phase>" "<status>" \
|
|
|
72
72
|
--reason "<why this status>"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
`<phase>` is the workflow name being entered/exited (`map-plan`, `map-efficient`, `map-check`, or `map-review`). `<status>` follows the phase's own vocabulary -- use `completed` on a clean phase close and `aborted`/`failed` on a phase you cannot recover; anything else leaves the chain `in_progress`. Pass every hold id that `auto_decide_holds` auto-approved for this phase in `--evidence-refs`, so the approval is recorded twice: once in the hold's own audit note, once in the phase ledger.
|
|
75
|
+
`<phase>` is the workflow name being entered/exited (`map-plan`, `map-efficient`, `map-check`, or `map-review`). `<status>` follows the phase's own vocabulary -- use `completed` on a clean phase close and `aborted`/`failed` on a phase you cannot recover; anything else leaves the chain `in_progress`. Phase completion and route completion are separate: a `completed` phase closes the chain only when it is the last phase of the selected route -- `map-review` for the multi-phase `map-plan` and `map-efficient` routes, or the route's only phase for the single-phase `map-resume`, `map-check`, and `map-fast` routes. Any earlier `completed` leaves the chain `in_progress` so the next phase is accepted. Pass every hold id that `auto_decide_holds` auto-approved for this phase in `--evidence-refs`, so the approval is recorded twice: once in the hold's own audit note, once in the phase ledger.
|
|
76
76
|
|
|
77
77
|
**At most one re-entry per phase (HC-2):** `record_auto_phase` mechanically enforces this -- the first record of a phase name is `attempt: 1`, a re-entry is `attempt: 2`, and a third call for the SAME phase name is refused and force-aborts the chain (`chain_status: "aborted"`). Before spending the single permitted re-entry, inspect ground truth -- `git status`/`git diff` and the phase's own `step_state.json` (or equivalent phase artifacts, test output, Monitor verdict) -- to confirm the phase genuinely needs a fresh attempt rather than a partial success being misread as a failure. A second failure of the same phase means STOP and hand off to `$map-resume` -- never attempt a third call for that phase. A chain already `chain_status: "aborted"` or `"blocked"` refuses every further `record_auto_phase` call regardless of phase name; a new `route_task` call is the ONLY legitimate way to continue.
|
|
78
78
|
|
|
@@ -84,8 +84,8 @@ Once routed, drive the selected chain by invoking the existing slash workflows e
|
|
|
84
84
|
route_task -> [map-plan] -> [map-efficient] -> [map-check] -> [map-review]
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
- `map-resume`, `map-check`, and `map-fast` routes are single-phase: run the one workflow, record its result with `record_auto_phase`, and finish.
|
|
88
|
-
- `map-plan` and `map-efficient` routes continue the chain: `map-plan` produces the task plan that `map-efficient` consumes, `map-efficient` implements it, and the chain then continues to `map-check` and `map-review` to close the loop.
|
|
87
|
+
- `map-resume`, `map-check`, and `map-fast` routes are single-phase: run the one workflow, record its result with `record_auto_phase`, and finish -- the route's only phase closes the chain.
|
|
88
|
+
- `map-plan` and `map-efficient` routes continue the chain: `map-plan` produces the task plan that `map-efficient` consumes, `map-efficient` implements it, and the chain then continues to `map-check` and `map-review` to close the loop. The route stays `chain_status: in_progress` after each intermediate phase completes and closes only when `map-review` completes.
|
|
89
89
|
- Invoke each phase by reading and following its own `SKILL.md` in full, exactly as if the user had typed the corresponding slash command -- do not summarize, skip, or reimplement its internal steps. `$map-auto` never shells out to a separate Claude process, a new Python execution engine, or any other new phase-driving mechanism to do this -- phases are driven ONLY by invoking the existing slash workflows above and the three runner subcommands from Steps 1-3.
|
|
90
90
|
- A `valid=false` Monitor verdict INSIDE a phase is that phase's own hard stop: its owning workflow's existing retry/escalation rules apply unchanged. `$map-auto` never overrides, suppresses, or re-runs past a Monitor rejection on the phase's behalf -- a phase that cannot get past Monitor is a failed phase for the purposes of Step 3's re-entry bound.
|
|
91
91
|
- The autopilot run ends at a committed feature branch. `$map-auto` never opens a pull request, never merges, and never polls CI -- report the committed branch, the phases recorded, and stop.
|
|
@@ -15,7 +15,7 @@ python3 .map/scripts/map_step_runner.py record_auto_phase <phase> <status> [--br
|
|
|
15
15
|
|
|
16
16
|
- `route_task <task>` -- `<task>` is the free-text task description (quote it). `--branch` defaults to the current branch. `--dry-run` recommends a route without marking the chain `in_progress` (see Dry-run usage below).
|
|
17
17
|
- `auto_decide_holds` -- no positional arguments; only `--branch` (defaults to current branch).
|
|
18
|
-
- `record_auto_phase <phase> <status>` -- `<phase>` is the workflow name (`map-plan`, `map-efficient`, `map-check`, `map-review`); `<status>` is the phase's own outcome word (`completed`, `failed`, `aborted`, or any other phase-specific status, which leaves `chain_status` at `in_progress`). `--evidence-refs` takes a comma-separated list of ids (auto-approved hold ids from the surrounding `auto_decide_holds` calls); `--reason` is a free-text note stored on the ledger entry.
|
|
18
|
+
- `record_auto_phase <phase> <status>` -- `<phase>` is the workflow name (`map-plan`, `map-efficient`, `map-check`, `map-review`); `<status>` is the phase's own outcome word (`completed`, `failed`, `aborted`, or any other phase-specific status, which leaves `chain_status` at `in_progress`). A `completed` status closes the chain (`chain_status: "completed"`) only on the LAST phase of the selected route -- `map-review` for multi-phase `map-plan`/`map-efficient` routes, or the single phase of `map-resume`/`map-check`/`map-fast`; a `completed` intermediate phase keeps the chain `in_progress`. `--evidence-refs` takes a comma-separated list of ids (auto-approved hold ids from the surrounding `auto_decide_holds` calls); `--reason` is a free-text note stored on the ledger entry.
|
|
19
19
|
|
|
20
20
|
## Chain Walkthrough Example
|
|
21
21
|
|
|
@@ -35,10 +35,12 @@ $ python3 .map/scripts/map_step_runner.py auto_decide_holds
|
|
|
35
35
|
|
|
36
36
|
$ python3 .map/scripts/map_step_runner.py record_auto_phase "map-efficient" "completed" \
|
|
37
37
|
--evidence-refs "hold-1" --reason "all subtasks closed, make check green"
|
|
38
|
-
{"status": "success", "chain_status": "
|
|
38
|
+
{"status": "success", "chain_status": "in_progress", "phase": "map-efficient", "attempt": 1, ...}
|
|
39
39
|
|
|
40
|
-
# --
|
|
41
|
-
#
|
|
40
|
+
# -- map-efficient is not the last phase of this route: the chain stays
|
|
41
|
+
# in_progress and continues to map-check, then map-review, each following the
|
|
42
|
+
# same poll -> drive -> poll -> record loop. Only map-review completing closes
|
|
43
|
+
# the route (chain_status: "completed") --
|
|
42
44
|
```
|
|
43
45
|
|
|
44
46
|
The run ends there: a committed feature branch, `phases[]` in `auto-route.json` holding one entry per phase attempt, and no PR/merge/CI step of any kind.
|
|
@@ -71,7 +71,7 @@ Execute all 12 gates. Read the full gate scripts in [release-reference.md § Pha
|
|
|
71
71
|
**Gate summary (full commands in reference):**
|
|
72
72
|
- **Gates 1–4:** `make check` — tests, ruff, mypy, pyright, rendered-template parity
|
|
73
73
|
- **Gates 5–6:** Build + twine check
|
|
74
|
-
- **Gate 7:** Security audit (`pip-audit`)
|
|
74
|
+
- **Gate 7:** Security audit of the project's resolved requirements (`uv export` + `pip-audit -r`)
|
|
75
75
|
- **Gates 8–10:** Git state — main branch, clean working directory, up-to-date with origin
|
|
76
76
|
- **Gate 11:** CI run for `git merge-base HEAD origin/main` must have `conclusion: "success"`; unpushed commits may touch only release metadata
|
|
77
77
|
- **Gate 12:** CHANGELOG.md completeness (Unreleased section exists and has content; commit/entry gap check)
|
|
@@ -35,11 +35,20 @@ uv run --with twine twine check dist/*
|
|
|
35
35
|
### Gate 7: Security Audit
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
# Audit the project's resolved dependency set, not the runner interpreter.
|
|
40
|
+
REQS_FILE=$(mktemp "${TMPDIR:-/tmp}/mapify-release-reqs.XXXXXX")
|
|
41
|
+
trap 'rm -f "$REQS_FILE"' EXIT
|
|
42
|
+
uv export --all-extras --all-groups --no-hashes --no-emit-project \
|
|
43
|
+
--format requirements-txt > "$REQS_FILE"
|
|
44
|
+
# --no-deps audits exactly the exported pins; --disable-pip stops pip from
|
|
45
|
+
# resolving or mutating the runner environment.
|
|
46
|
+
uvx pip-audit -r "$REQS_FILE" --disable-pip --no-deps
|
|
40
47
|
```
|
|
41
48
|
|
|
42
49
|
**Expected Results:**
|
|
50
|
+
- ✅ `uv export` resolves the project's dependencies (all extras and groups)
|
|
51
|
+
- ✅ `pip-audit` audits the exported pinned requirements, not the runner environment
|
|
43
52
|
- ✅ No known security vulnerabilities in dependencies
|
|
44
53
|
|
|
45
54
|
**If vulnerabilities found:** Assess severity; update dependencies if critical.
|
|
@@ -25,7 +25,7 @@ parallel_tool_policy: single_review_fanout
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
- Use deeper reasoning for verdicts, risk ranking, section tradeoffs, and contradictory reviewer evidence.
|
|
28
|
-
- Use
|
|
28
|
+
- Use one runner invocation after bundle preparation; it collects independent reviewer threads in order and owns recovery. Do not launch an additional native fan-out.
|
|
29
29
|
- Wait for all reviewer agents before section presentation. Do not parallelize interactive decisions, ordering comparisons that share state, or review-bundle writes.
|
|
30
30
|
|
|
31
31
|
## Flags
|
|
@@ -52,7 +52,9 @@ parallel_tool_policy: single_review_fanout
|
|
|
52
52
|
7. **Monitor `valid=false` requires verification, not immediate publication** — Step A.3 verifies evidence and bug-introduced-here BEFORE Phase B. Bare claims become `needs_investigation`, not published issues.
|
|
53
53
|
8. Present options neutrally as A/B/C. Append `(Recommended)` after the option label, not by position.
|
|
54
54
|
|
|
55
|
-
**Codex
|
|
55
|
+
**Codex collection:** the supported driver owns captures and continuation; the skill
|
|
56
|
+
has no shell-expanded capture targets. Normal workflow-state and snapshot gates
|
|
57
|
+
remain authoritative. Do not bypass a host or workflow denial.
|
|
56
58
|
|
|
57
59
|
## Review Preferences (Customize per project)
|
|
58
60
|
|
|
@@ -337,129 +339,47 @@ if [ "$DETACHED_FLAG" = "true" ]; then
|
|
|
337
339
|
fi
|
|
338
340
|
```
|
|
339
341
|
|
|
340
|
-
If `DETACHED_STATUS` is `success`,
|
|
342
|
+
If `DETACHED_STATUS` is `success`, retain the detached tree for operator inspection; the driver still serves only the admitted immutable resources. If status is `unavailable` or `error`, announce `$DETACHED_REASON` and continue in place. Do not mutate the source branch.
|
|
341
343
|
|
|
342
344
|
### Step A.1d: Prepare compare-mode ordering (optional, `--compare-orderings` only)
|
|
343
345
|
|
|
344
346
|
When compare mode is active, run two review collections with `ordering_label='default'` and `ordering_label='reverse'`, then call `compare-review-runs` and `record-review-ordering` to stage the drift summary. See [review-reference.md](review-reference.md#compare-orderings) for the detailed loop.
|
|
345
347
|
|
|
346
|
-
On Codex,
|
|
348
|
+
On Codex, one driver invocation collects both orderings with separate persisted native threads. Rerunning it resumes unfinished threads and reuses intact completed captures.
|
|
347
349
|
|
|
348
|
-
### Step A.2:
|
|
349
|
-
Before launching agents, build the reviewer prompts with `build_review_prompts`. Evidence is NOT truncated. The admitted immutable bundle backs a compact initial prompt and parent-served resources; large original prompts, full file inventory and permitted base/current sources arrive in chunks through Step A.2a. `MAP_REVIEW_PROMPT_BUDGET_TOKENS` is informational and clips nothing. The 512 KiB limit still applies to each initial prompt and serialized context response. On a builder error, stop dispatch and report the reason; never bypass admission or remove evidence to fit.
|
|
350
|
+
### Step A.2: Collect reviewer reports
|
|
350
351
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("status") == "success" else json.dumps(d, indent=2))' || exit 1
|
|
355
|
-
MONITOR_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin)["prompts"]["monitor"]["prompt"])')
|
|
356
|
-
PREDICTOR_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin)["prompts"]["predictor"]["prompt"])')
|
|
357
|
-
EVALUATOR_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin)["prompts"]["evaluator"]["prompt"])')
|
|
358
|
-
COMPLEXITY_LENS_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; data=json.load(sys.stdin); print(data.get("prompts",{}).get("complexity_lens",{}).get("prompt", ""))')
|
|
359
|
-
COMPLEXITY_LENS_ENABLED=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; data=json.load(sys.stdin); print("true" if data.get("prompts",{}).get("complexity_lens") else "false")')
|
|
360
|
-
USER_EXPERIENCE_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin)["prompts"]["user_experience"]["prompt"])')
|
|
361
|
-
SECURITY_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin).get("prompts", {}).get("security", {}).get("prompt", ""))')
|
|
362
|
-
MAINTAINER_PROMPT=$(printf '%s' "$REVIEW_PROMPTS_JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin)["prompts"]["maintainer"]["prompt"])')
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
Use the extracted prompt variables as the spawn_agent messages. Keep reviewer spawn calls below the bundle and prompt-builder commands.
|
|
366
|
-
|
|
367
|
-
```text
|
|
368
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_monitor_<n>", message=MONITOR_PROMPT)
|
|
369
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_predictor_<n>", message=PREDICTOR_PROMPT)
|
|
370
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_evaluator_<n>", message=EVALUATOR_PROMPT)
|
|
371
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_user_experience_<n>", message=USER_EXPERIENCE_PROMPT)
|
|
372
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_maintainer_<n>", message=MAINTAINER_PROMPT)
|
|
373
|
-
If security is in admitted roster: spawn_agent(agent_type="review-reader", task_name="map_review_security_<n>", message=SECURITY_PROMPT)
|
|
374
|
-
If COMPLEXITY_LENS_ENABLED=true: spawn_agent(agent_type="review-reader", task_name="map_review_complexity_lens_<n>", message=COMPLEXITY_LENS_PROMPT)
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
Codex dispatch rules:
|
|
378
|
-
|
|
379
|
-
- `<n>` increments on every dispatch in the run (including the Step A.2b truncation retry and the second `--compare-orderings` collection), so every call gets a unique `task_name`.
|
|
380
|
-
- Each call sends its generated prompt as `message`, plus a reminder that the reviewer is read-only and may return intermediate `context_request` JSON before its required final output.
|
|
381
|
-
- Wait for all dispatched reviewers and map each final JSON back to its role variable (`MONITOR_OUTPUT`, `PREDICTOR_OUTPUT`, `EVALUATOR_OUTPUT`, `USER_EXPERIENCE_OUTPUT`, `MAINTAINER_OUTPUT`, `SECURITY_OUTPUT`, and `COMPLEXITY_LENS_OUTPUT` when enabled).
|
|
382
|
-
- If concurrency is unavailable, make the same calls sequentially.
|
|
383
|
-
- Never replace independent review with parent-session personas.
|
|
384
|
-
- Every reviewer uses `review-reader`; the generated role prompt supplies its complete role protocol, rubric and schema. Do not route through general-purpose or execution-capable profiles.
|
|
385
|
-
- `capability_enforcement=unverified`: shell/delegation disabling settings and read-only sandbox are defense in depth, not runtime proof of no writes/native read-search. Continue review and finding publication from source content in the runner bundle; the result is INCOMPLETE and cannot approve. Never disable the whole Codex review or silently restore shell (#526).
|
|
386
|
-
|
|
387
|
-
Role reviewers remain isolated; follow the access and attribution rules in [Parent-served context loop](review-reference.md#parent-served-context-loop-step-a2a).
|
|
388
|
-
|
|
389
|
-
Reviewer prompts reference `review-bundle.json`, `review-bundle.md`, the raw diff as secondary context, and the expected output schema.
|
|
390
|
-
|
|
391
|
-
When enabled (`minimality != off`), the complexity lens is advisory only. It lists over-engineering as `delete:`, `stdlib:`, `native:`, `yagni:`, or `shrink:` findings, ends with `net: -<N> lines possible.` or `Lean already. Ship.`, samples `map:simplification:` marker claims, and never feeds Actor retries or verdict gates.
|
|
392
|
-
|
|
393
|
-
### Step A.2a: Deliver requested context to the same reviewer (MANDATORY)
|
|
394
|
-
|
|
395
|
-
Before final JSON validation, follow [Parent-served context loop](review-reference.md#parent-served-context-loop-step-a2a): run `serve_review_context` for every response, including retries, adversarial roles and the complexity lens. Continue the same agent for `context_response`; responses to the post-delivery finalization request proceed to Step A.2b even with missing or invalid receipts. Discard queued early finals; context requests never consume final-response retries or become captured reviews. Denied/stale context leaves collection incomplete.
|
|
396
|
-
|
|
397
|
-
### Step A.2b: Truncated-response gate (MANDATORY — post-fan-out, pre-verification)
|
|
398
|
-
|
|
399
|
-
After Step A.2a identifies a final response, pipe it on stdin (a bare call returns
|
|
400
|
-
`status:"no_input"`, not a pass):
|
|
401
|
-
`printf '%s' "$RESPONSE" | python3 .map/scripts/map_step_runner.py detect_truncated_agent_output --agent <kind>`
|
|
402
|
-
using the role-specific kind shown below. On truncation or missing/invalid finalization `context_receipt`: log via
|
|
403
|
-
`log_agent_failure --agent <role> --phase post-invoke --failure-label truncated --reasons '<reasons>'`
|
|
404
|
-
and re-invoke that reviewer ONCE using the prompt from
|
|
405
|
-
`build_json_retry_prompt --agent <role> --errors '<reasons>'`; if still
|
|
406
|
-
malformed, stop with CLARIFICATION_NEEDED.
|
|
407
|
-
Include the original generated prompt and context protocol with retry instructions; process intermediate requests through Step A.2a.
|
|
408
|
-
|
|
409
|
-
On Codex, the re-invocation is a new `spawn_agent` call: `<n>` keeps incrementing, so the retry gets a fresh `task_name`.
|
|
410
|
-
|
|
411
|
-
Role → `--agent` kind for the truncation check:
|
|
412
|
-
- monitor reviewer → `--agent review-monitor` (enforces the full review schema:
|
|
413
|
-
evidence/valid/summary/verdict/issues/passed_checks/failed_checks)
|
|
414
|
-
- predictor reviewer → `--agent predictor`
|
|
415
|
-
- evaluator reviewer → `--agent evaluator`
|
|
416
|
-
- role reviewers → `--agent user_experience` / `--agent maintainer` / `--agent security`
|
|
417
|
-
|
|
418
|
-
The optional complexity lens returns plain text, not JSON. Do not run the JSON truncation gate on it; if it is empty or visibly cut off, rerun only that lens prompt once.
|
|
419
|
-
|
|
420
|
-
### Step A.2c: Capture reviewer envelopes (MANDATORY — the ledger reads these)
|
|
421
|
-
|
|
422
|
-
Once a reviewer clears the truncation gate, write its JSON envelope verbatim to
|
|
423
|
-
`.map/<branch>/review-agent-<role>.json` (`monitor`, `predictor`, `evaluator`,
|
|
424
|
-
`user_experience`, `maintainer`; include `security` only when it is in the
|
|
425
|
-
admitted roster, plus `adversarial` in adversarial/compare-orderings mode). The verdict ledger is
|
|
426
|
-
computed from these files — a role whose file is missing is recorded as an
|
|
427
|
-
unobserved review, not as a clean one.
|
|
352
|
+
Use the runner-owned Codex app-server transport. Do not launch native review-reader
|
|
353
|
+
subagents or relay context through the main conversation. For adversarial mode,
|
|
354
|
+
use the corresponding command in adversarial-reference.md instead of this section.
|
|
428
355
|
|
|
429
356
|
```bash
|
|
430
|
-
|
|
431
|
-
BRANCH_DIR=".map/$BRANCH"
|
|
432
|
-
# For compare-orderings set ORDERING_LABEL=default or reverse in this call.
|
|
433
|
-
# Preserve both collections; do not call begin_review_run between them.
|
|
434
|
-
if [ -n "${ORDERING_LABEL:-}" ]; then BRANCH_DIR="$BRANCH_DIR/review-collections/$ORDERING_LABEL"; fi
|
|
435
|
-
mkdir -p "$BRANCH_DIR"
|
|
436
|
-
|
|
437
|
-
REVIEW_ROUND_ID="${REVIEW_ROUND_ID:-$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["round_id"])' ".map/$BRANCH/review-mode.json")}"
|
|
438
|
-
python3 .map/scripts/map_step_runner.py capture_review_output \
|
|
439
|
-
--reviewer monitor --round-id "$REVIEW_ROUND_ID" --ordering "${ORDERING_LABEL:-}" <<'MONITOR_EOF'
|
|
440
|
-
<paste the Monitor JSON envelope verbatim>
|
|
441
|
-
MONITOR_EOF
|
|
357
|
+
python3 .map/scripts/codex_review_runner.py --review-preferences "[paste Review Preferences section above]"
|
|
442
358
|
```
|
|
443
359
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
360
|
+
Keep this command running and poll its process with the host's normal process tools;
|
|
361
|
+
progress names the current role. A tool timeout is not a completed review. If the
|
|
362
|
+
process was interrupted, rerun the command under the same admitted round and omit
|
|
363
|
+
`--review-preferences`: the exact preferences are saved on first collection, alongside
|
|
364
|
+
native thread IDs, pending chunks and acknowledged offsets. Explicitly different
|
|
365
|
+
preferences are rejected; omission reuses the saved text. A lost
|
|
366
|
+
thread or stale snapshot is an explicit error; never invent ACKs or replace its
|
|
367
|
+
session silently. Do not call begin_review_run for another round to hide a failure.
|
|
368
|
+
|
|
369
|
+
The driver builds compact role prompts, serves immutable resources through one
|
|
370
|
+
read-only dynamic tool, checks intact Code Mode output before ACK, resizes truncated
|
|
371
|
+
chunks, validates final envelopes and captures them in the usual ledger paths.
|
|
372
|
+
Each role has an independent environment-free Codex thread. A runtime probe checks
|
|
373
|
+
actual tool inventory, successful source delivery and a denied canary write before
|
|
374
|
+
any repository evidence is supplied. COMPLETE requires every admitted reader's
|
|
375
|
+
host witness as well as scope, snapshot/policy, checks and finalization receipts.
|
|
376
|
+
The legacy native profile remains `capability_enforcement=unverified`: findings
|
|
377
|
+
remain publishable, but that route stays INCOMPLETE and cannot approve. A failed
|
|
378
|
+
probe never becomes verified by configuration, version text or model assertion.
|
|
379
|
+
|
|
380
|
+
Reading claims in `receipt={covered_files:[],skipped_files:[],denied_access:[],check_evidence:[]}`
|
|
381
|
+
remain self_reported. The optional complexity lens stays advisory. On driver success,
|
|
382
|
+
continue at Step A.3 using captured artifacts; do not dispatch a second reviewer set.
|
|
463
383
|
|
|
464
384
|
### Step A.3: Verification gate (MANDATORY before any presentation)
|
|
465
385
|
|
|
@@ -531,17 +451,11 @@ When `--adversarial` is set (with `--cross-ai`: present cross-AI first, then thi
|
|
|
531
451
|
### Quick reference
|
|
532
452
|
|
|
533
453
|
```text
|
|
534
|
-
1.
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
5. Present: Unified report: CRITICAL/IMPORTANT/MINOR, convergence section, all-clear statements (--show-raw-findings for debug)
|
|
540
|
-
6. Feed ledger: persist the complete tagged aggregate to "$BRANCH_DIR/review-agent-adversarial.json"
|
|
541
|
-
including ledger_findings, reviewer_status and parse_errors
|
|
542
|
-
7. Skip to: Final Verdict → Handoff Artifacts; do NOT run normal 4-section walkthrough
|
|
543
|
-
The verdict is computed by the ledger from those findings — this phase
|
|
544
|
-
does not assign one.
|
|
454
|
+
1. Collect: python3 .map/scripts/codex_review_runner.py
|
|
455
|
+
Builds prompts, validates reports and captures the aggregate for the admitted roster.
|
|
456
|
+
On interruption rerun the same command in the same admitted round.
|
|
457
|
+
2. Present: Read the captured aggregate; show findings, convergence and all-clear statements.
|
|
458
|
+
3. Continue: Final Verdict → Handoff Artifacts. The ledger computes the verdict.
|
|
545
459
|
```
|
|
546
460
|
|
|
547
461
|
## Phase B: Interactive Presentation (4 Sections) — NORMAL MODE ONLY
|
|
@@ -21,106 +21,24 @@ The two role reviewers answer to the five-part output contract (`problem`,
|
|
|
21
21
|
fill all five is dropped by `aggregate_adversarial_findings` into
|
|
22
22
|
`contract_incomplete` — reported, never counted.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Steps B.adversarial.0–3: Collect through the Codex runner
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
BRANCH=$(python3 .map/scripts/map_utils.py branch)
|
|
28
|
-
BRANCH_DIR=".map/$BRANCH"
|
|
29
|
-
QUICK_ARG=$(python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print("--quick" if "edge_case" not in d["scheduled_reviewers"] else "")' "$BRANCH_DIR/review-mode.json") || exit 1
|
|
30
|
-
|
|
31
|
-
ADV_PROMPTS_JSON=$(python3 .map/scripts/map_step_runner.py build_adversarial_review_prompts $QUICK_ARG)
|
|
32
|
-
|
|
33
|
-
BLIND_PROMPT=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("blind",{}).get("prompt",""))')
|
|
34
|
-
BLIND_DESC=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("blind",{}).get("description",""))')
|
|
35
|
-
|
|
36
|
-
EDGE_PROMPT=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("edge_case",{}).get("prompt",""))')
|
|
37
|
-
EDGE_DESC=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("edge_case",{}).get("description",""))')
|
|
38
|
-
|
|
39
|
-
ACCEPTANCE_PROMPT=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("acceptance",{}).get("prompt",""))')
|
|
40
|
-
ACCEPTANCE_DESC=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("acceptance",{}).get("description",""))')
|
|
41
|
-
|
|
42
|
-
USER_EXPERIENCE_PROMPT=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("user_experience",{}).get("prompt",""))')
|
|
43
|
-
USER_EXPERIENCE_DESC=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("user_experience",{}).get("description",""))')
|
|
44
|
-
|
|
45
|
-
MAINTAINER_PROMPT=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("maintainer",{}).get("prompt",""))')
|
|
46
|
-
MAINTAINER_DESC=$(printf '%s' "$ADV_PROMPTS_JSON" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("prompts",{}).get("maintainer",{}).get("description",""))')
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Step B.adversarial.1: Launch all five in parallel (fan-out)
|
|
50
|
-
|
|
51
|
-
```text
|
|
52
|
-
# Dispatch all five reviewers together — they are fully independent.
|
|
53
|
-
# <n> increments on every dispatch in the run.
|
|
54
|
-
|
|
55
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_blind_<n>", message=BLIND_PROMPT)
|
|
56
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_edge_case_<n>", message=EDGE_PROMPT) # skip if --quick
|
|
57
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_acceptance_<n>", message=ACCEPTANCE_PROMPT)
|
|
58
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_user_experience_<n>", message=USER_EXPERIENCE_PROMPT)
|
|
59
|
-
spawn_agent(agent_type="review-reader", task_name="map_review_maintainer_<n>", message=MAINTAINER_PROMPT)
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Codex dispatch rules:
|
|
63
|
-
|
|
64
|
-
- `<n>` increments on every dispatch in the run (including the Step A.2b truncation retry, the Step B.adversarial.2 re-invoke, and the second `--compare-orderings` collection), so every call gets a unique `task_name`.
|
|
65
|
-
- Each call sends its generated prompt as `message`, plus a reminder that the reviewer is read-only and may return intermediate `context_request` JSON before its required final output.
|
|
66
|
-
- Wait for all dispatched reviewers and map each final JSON back to `BLIND_OUTPUT`, `EDGE_OUTPUT`, `ACCEPTANCE_OUTPUT`, `USER_EXPERIENCE_OUTPUT`, and `MAINTAINER_OUTPUT`.
|
|
67
|
-
- If concurrency is unavailable, make the same calls sequentially.
|
|
68
|
-
- Never replace independent review with parent-session personas.
|
|
69
|
-
- Every role uses `review-reader`; its generated prompt supplies the role-specific protocol, quality rubric and schema. No general-purpose fallback or shell restoration. Codex capability enforcement remains unverified: findings remain publishable, but completeness is INCOMPLETE and cannot approve.
|
|
70
|
-
|
|
71
|
-
## Step B.adversarial.2: Validate reviewer outputs
|
|
72
|
-
|
|
73
|
-
First apply Step A.2a's `serve_review_context` loop to every response, using the
|
|
74
|
-
original role key (`blind`, `edge_case`, `acceptance`, `user_experience` or
|
|
75
|
-
`maintainer`) and continuing the same agent. Context requests are intermediate;
|
|
76
|
-
never aggregate them or count them as malformed final responses. This also applies
|
|
77
|
-
to retries and both independent `--compare-orderings` collections.
|
|
78
|
-
|
|
79
|
-
Only after `status: not_context_request`, require valid JSON matching the adversarial finding schema. If any final reviewer output is truncated or invalid JSON:
|
|
80
|
-
- Log the failure
|
|
81
|
-
- Re-invoke that specific reviewer ONCE with the same prompt
|
|
82
|
-
- If still invalid, record the reviewer as `parse_error` and continue with remaining reviewers
|
|
83
|
-
|
|
84
|
-
## Step B.adversarial.3: Aggregate findings
|
|
85
|
-
|
|
86
|
-
Write each reviewer's raw JSON output to a temp file, then aggregate:
|
|
26
|
+
After admission and immutable bundle creation, run:
|
|
87
27
|
|
|
88
28
|
```bash
|
|
89
|
-
|
|
90
|
-
BRANCH_DIR=".map/$BRANCH"
|
|
91
|
-
RUN_MODE="$BRANCH_DIR/review-mode.json"
|
|
92
|
-
QUICK_FLAG=$(python3 -c 'import json,sys; print("true" if "edge_case" not in json.load(open(sys.argv[1]))["scheduled_reviewers"] else "false")' "$RUN_MODE") || exit 1
|
|
93
|
-
# In compare-orderings set ORDERING_LABEL=default or reverse in this call.
|
|
94
|
-
if [ -n "${ORDERING_LABEL:-}" ]; then BRANCH_DIR="$BRANCH_DIR/review-collections/$ORDERING_LABEL"; fi
|
|
95
|
-
mkdir -p "$BRANCH_DIR"
|
|
96
|
-
cat > "$BRANCH_DIR/adversarial-blind.json" <<'BLIND_EOF'
|
|
97
|
-
<paste the Blind JSON envelope verbatim>
|
|
98
|
-
BLIND_EOF
|
|
99
|
-
cat > "$BRANCH_DIR/adversarial-acceptance.json" <<'ACCEPTANCE_EOF'
|
|
100
|
-
<paste the Acceptance JSON envelope verbatim>
|
|
101
|
-
ACCEPTANCE_EOF
|
|
102
|
-
cat > "$BRANCH_DIR/adversarial-user-experience.json" <<'USER_EOF'
|
|
103
|
-
<paste the User Experience JSON envelope verbatim>
|
|
104
|
-
USER_EOF
|
|
105
|
-
cat > "$BRANCH_DIR/adversarial-maintainer.json" <<'MAINTAINER_EOF'
|
|
106
|
-
<paste the Maintainer JSON envelope verbatim>
|
|
107
|
-
MAINTAINER_EOF
|
|
108
|
-
rm -f "$BRANCH_DIR/adversarial-edge.json"
|
|
109
|
-
ADV_ARGS=(--blind "$BRANCH_DIR/adversarial-blind.json" --acceptance "$BRANCH_DIR/adversarial-acceptance.json"
|
|
110
|
-
--user-experience "$BRANCH_DIR/adversarial-user-experience.json" --maintainer "$BRANCH_DIR/adversarial-maintainer.json")
|
|
111
|
-
if [ "$QUICK_FLAG" != "true" ]; then
|
|
112
|
-
cat > "$BRANCH_DIR/adversarial-edge.json" <<'EDGE_EOF'
|
|
113
|
-
<paste the Edge Case JSON envelope verbatim>
|
|
114
|
-
EDGE_EOF
|
|
115
|
-
ADV_ARGS+=(--edge-case "$BRANCH_DIR/adversarial-edge.json")
|
|
116
|
-
fi
|
|
117
|
-
REVIEW_ROUND_ID="${REVIEW_ROUND_ID:-$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["round_id"])' "$RUN_MODE")}"
|
|
118
|
-
set -o pipefail
|
|
119
|
-
python3 .map/scripts/map_step_runner.py aggregate_adversarial_findings \
|
|
120
|
-
"${ADV_ARGS[@]}" | python3 .map/scripts/map_step_runner.py capture_review_output \
|
|
121
|
-
--reviewer adversarial --round-id "$REVIEW_ROUND_ID" --ordering "${ORDERING_LABEL:-}" || exit 1
|
|
29
|
+
python3 .map/scripts/codex_review_runner.py
|
|
122
30
|
```
|
|
123
31
|
|
|
32
|
+
The driver reads the admitted roster, creates independent environment-free threads,
|
|
33
|
+
probes each host boundary, serves only each role's permitted immutable context,
|
|
34
|
+
validates individual reports and captures the tagged adversarial aggregate. Blind
|
|
35
|
+
remains diff-only. Compare-orderings uses separate thread/session/receipt sets.
|
|
36
|
+
Poll the running command; on interruption rerun it under the same admitted round.
|
|
37
|
+
Do not spawn native readers, copy chunks through the parent, or promote an unverified
|
|
38
|
+
probe. See SKILL.md Step A.2 for the capability and recovery contract. Read the
|
|
39
|
+
captured `review-agent-adversarial.json` (or both review-collections in compare mode)
|
|
40
|
+
for presentation, then proceed below.
|
|
41
|
+
|
|
124
42
|
## Step B.adversarial.4: Present unified adversarial report
|
|
125
43
|
|
|
126
44
|
Parse the aggregated JSON and present the report in this structure:
|
|
@@ -6,7 +6,7 @@ This file contains lower-frequency review details. Keep `SKILL.md` focused on th
|
|
|
6
6
|
|
|
7
7
|
New gates default to shadow diagnostics: no new blockers, no reduced existing safeguards. Strict opt-in is `review: {security_gates: strict}` in `.map/config.yaml` on the pinned trusted default branch, never PR-head/local config. In strict mode admission overrides quick/lightweight or reduced explicit rosters for sensitive/unknown changes. Dispatch every admitted reviewer, including the independent `security` role, and capture its own envelope for each ordering. Normal approval and execution checks cannot replace security coverage.
|
|
8
8
|
|
|
9
|
-
Human consent is a separate snapshot/policy/action-bound `review_consent` hold in the existing durable store. Verified human provenance is currently unavailable: host UI answers, transcripts and caller JSON do not establish it. Never call `decide_approval_hold` to discharge review consent, or reinterpret auto mode, agent votes or successful checks as consent. Report the pending hold in both modes. In strict mode stop before review-ready; do not burn additional review rounds waiting. The strict ready gate remains blocked even when legacy ledger enforcement is disabled. Shadow holds do not add blockers and must never be reported as consent. Positive human ingress remains incomplete under #523; Codex capability remains unverified under #526.
|
|
9
|
+
Human consent is a separate snapshot/policy/action-bound `review_consent` hold in the existing durable store. Verified human provenance is currently unavailable: host UI answers, transcripts and caller JSON do not establish it. Never call `decide_approval_hold` to discharge review consent, or reinterpret auto mode, agent votes or successful checks as consent. Report the pending hold in both modes. In strict mode stop before review-ready; do not burn additional review rounds waiting. The strict ready gate remains blocked even when legacy ledger enforcement is disabled. Shadow holds do not add blockers and must never be reported as consent. Positive human ingress remains incomplete under #523; Legacy native Codex capability remains unverified under #526; the runner-owned app-server path requires per-reader host probes.
|
|
10
10
|
|
|
11
11
|
Shadow consent-store errors are reported in admission output and persisted in the review ledger when writable; they do not deny admission or ready. Never reset a corrupt hold store: existing generic hold blockers remain enforced. Strict consent-store errors still fail closed. Gate configuration is read from the pinned trusted revision independently of `REVIEW.md` content validation; invalid root/area policy cannot downgrade a strict configuration.
|
|
12
12
|
|
|
@@ -17,8 +17,21 @@ Shadow consent-store errors are reported in admission output and persisted in th
|
|
|
17
17
|
- Tests: changed behavior, failure cases, fixtures, coverage of acceptance tags.
|
|
18
18
|
- Performance: hot paths, large artifacts, prompt budgets, avoid speculative micro-optimizations.
|
|
19
19
|
|
|
20
|
+
## Review Scope
|
|
21
|
+
|
|
22
|
+
Required coverage is the admitted `required_files`: changed paths against the selected base,
|
|
23
|
+
including staged/unstaged/untracked inputs, deletions and both rename sides. The full
|
|
24
|
+
`context_files` inventory remains snapshot-bound and available for dependency checks.
|
|
25
|
+
Unread or explicitly skipped optional context does not make review incomplete.
|
|
26
|
+
|
|
20
27
|
## Compare Orderings
|
|
21
28
|
|
|
29
|
+
For supported Codex reviews, `codex_review_runner.py` performs binding, delivery,
|
|
30
|
+
ACK, finalization and capture, including both compare orderings. Do not perform
|
|
31
|
+
these steps manually. The manual collection instructions below apply only to
|
|
32
|
+
Claude and the legacy unverified native-reader path. Keep the comparison/report
|
|
33
|
+
steps after the driver completes.
|
|
34
|
+
|
|
22
35
|
When `--compare-orderings` is set, begin the invocation once, then collect with
|
|
23
36
|
`ORDERING_LABEL=default` and `ORDERING_LABEL=reverse` set in each capture call.
|
|
24
37
|
Keep envelopes in `review-collections/default/` and `review-collections/reverse/`;
|
|
@@ -238,6 +251,12 @@ decision table (`review_verdict_table.v1`) and writes:
|
|
|
238
251
|
|
|
239
252
|
### Parent-served context loop (Step A.2a)
|
|
240
253
|
|
|
254
|
+
For supported Codex reviews, `codex_review_runner.py` performs binding, delivery,
|
|
255
|
+
ACK, finalization and capture, including both compare orderings. Do not perform
|
|
256
|
+
these steps manually. The manual collection instructions below apply only to
|
|
257
|
+
Claude and the legacy unverified native-reader path. Keep the comparison/report
|
|
258
|
+
steps after the driver completes.
|
|
259
|
+
|
|
241
260
|
The role reviewers run in the SAME fan-out but with isolated context: they see
|
|
242
261
|
the diff and the bundle, never the other reviewers' output. They inspect supplied
|
|
243
262
|
base/current source and changed-hunk attribution — the user role checks the old
|
|
@@ -278,7 +297,8 @@ retries, both ordering collections and the advisory complexity lens:
|
|
|
278
297
|
For an early final response, retain no final capture: create the same request
|
|
279
298
|
shape from the status's next `remaining` resource/offset and continue delivery.
|
|
280
299
|
Required resources include the manifest, full original prompt (unless initially
|
|
281
|
-
inline), inventory and
|
|
300
|
+
inline), inventory and source resources marked `required`. Unchanged sources
|
|
301
|
+
are optional dependency context; fetch them only when needed. Blind stays diff-only.
|
|
282
302
|
2. Store the exact returned chunk JSON in a session-specific pending file under
|
|
283
303
|
`.map/<branch>/review-context-delivery/<session-id>/`, then pass that JSON
|
|
284
304
|
verbatim to the **same agent**:
|