You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are an independent reviewer. Critique the plan against the actual repository.
Implement Phase 9 (Author test with golden runs) of the ArtAgents orchestrator V1 design per docs/orchestrator-v1-plan.md section 12 (Phase 9).
LAUNCHER: every megaplan call = PYENV_VERSION=3.11.11 python -m megaplan ....
DRIVING DISCIPLINE: After every CLI call, run megaplan status --plan <name> and megaplan progress --plan <name>. If state == finalized and batches_remaining > 0, you MUST run megaplan execute --plan <name> --confirm-destructive --batch N for each remaining batch sequentially. DO NOT EXIT while state != done.
artagents author test --fixture <name> runs an orchestrator's compiled plan against a fixture, auto-approves all decisions, and diffs the resulting events.jsonl against <pack>/golden/<fixture>.events.jsonl.
Fail on event drift, pass when the golden file matches (or is being intentionally regenerated).
Fixture tests fail on event drift and pass when intentionally regenerated.
Assistant
{"checks":[{"id":"skill","question":"Use the ArtAgents repo instructions for this review.","findings":[{"detail":"I will use the ArtAgents skill instructions for repository-specific context, then review the plan against the checked-out code without invoking megaplan.","flagged":false}]}],"flags":[],"verified_flag_ids":[],"disputed_flag_ids":[]}
Assistant
{"checks":[{"id":"skill","question":"Use the ArtAgents repo instructions for this review.","findings":[{"detail":"The generic skill path in my first read attempt was absent, so I am loading the repo-local ArtAgents skill file named in the session skill list and continuing with the repository checks.","flagged":false}]}],"flags":[],"verified_flag_ids":[],"disputed_flag_ids":[]}
Assistant
{"checks":[{"id":"repo_context","question":"Run ArtAgents first commands where relevant for repository context.","findings":[{"detail":"I loaded the critique template and the ArtAgents repository instructions. I am now checking the current CLI/task/orchestrator implementation and the design doc sections that Phase 9 depends on.","flagged":false}]}],"flags":[],"verified_flag_ids":[],"disputed_flag_ids":[]}
Assistant
{"checks":[{"id":"investigation","question":"Inspect Phase 9 interfaces and existing implementation.","findings":[{"detail":"The current author test implementation is still explicitly labeled as a Phase 5 scaffold in artagents/orchestrate/cli.py, while the task kernel already has the gate, attestation, lifecycle, CAS, and event helpers the plan wants to reuse.","flagged":false}]}],"flags":[],"verified_flag_ids":[],"disputed_flag_ids":[]}
Assistant
{"checks":[{"id":"progress","question":"Populate critique findings incrementally.","findings":[{"detail":"I have enough repository context to start writing findings. The main tensions are around fixture layout, gitignored compiled plans, subprocess isolation, and where auto-approval should integrate with the current gate/ack split.","flagged":false}]}],"flags":[],"verified_flag_ids":[],"disputed_flag_ids":[]}
Assistant
User
Assistant
I’m using the ArtAgents skill again for repo-specific review, and I’ll keep this to a direct second-pass critique without invoking megaplan. I’ll read the template, verify the revised plan against the current code paths, then update the JSON in place.
Assistant
I’m checking the revised plan against the actual import/project/runtime behavior now. Most prior items look explicitly addressed, so I’m looking for second-order issues introduced by the revised scratch runner details.
Assistant
{"checks":[{"id":"issue_hints","question":"Did the work fully address issue hints and approved plan requirements?","findings":[{"detail":"Verified the revised plan resolves the prior fixture-layout and clean-checkout compiled-plan concerns, and still avoids nested megaplan usage.","flagged":false}]},{"id":"correctness","question":"Are the proposed changes technically correct?","findings":[{"detail":"New issue: code-step subprocesses run from , but is not importable outside the repo root in this checkout unless includes the repo root or the subprocess cwd stays at the repo root.","flagged":true}]},{"id":"scope","question":"Is the issue broader than the direct change?","findings":[{"detail":"Verified the revised plan now scopes the runner through / and covers nested, repeat, project-attached executor, attested, scratch-isolation, and project-record paths.","flagged":false}]},{"id":"all_locations","question":"Does the change touch all support locations?","findings":[{"detail":"Verified the revised plan includes author CLI parser glue, top-level help, canonical CLI tests, fixture resolver coverage, and no new dependencies.","flagged":false}]},{"id":"callers","question":"Do changed-function callers pass handled arguments?","findings":[{"detail":"Verified project-attached executor setup, attestation event constructor compatibility, and legacy callers are now covered.","flagged":false}]}],"flags":[{"id":"correctness-4","concern":"Author-test subprocess imports: code-step subprocesses run with , but is only importable from the repository root in this checkout unless includes the repo root.","category":"correctness","severity_hint":"significant","evidence":"Observed succeeds from the repo root and fails from with ; the revised plan says to set only if tests prove imports fail while also setting subprocess ."}],"verified_flag_ids":["issue_hints-1","issue_hints-2","correctness-1","correctness-2","correctness-3","scope","all_locations-1","all_locations-2","callers"],"disputed_flag_ids":[]}
User
Assistant
I’m doing the third-pass review now. The only previously open substantive item was scratch-cwd imports; I’ll verify the revised PYTHONPATH approach against the checkout and then update the critique JSON.
Assistant
{"checks":[{"id":"issue_hints","question":"Did the work fully address issue hints and approved plan requirements?","findings":[{"detail":"Verified the revised plan preserves the canonical hype fixture/golden paths, scratch compile fallback, stop-condition command, and no-megaplan constraint.","flagged":false}]},{"id":"correctness","question":"Are the proposed changes technically correct?","findings":[{"detail":"Verified the prior import-path issue is addressed: python3 -m artagents --help works from /tmp when PYTHONPATH includes the checkout root, and the plan now injects that path for scratch-cwd subprocesses.","flagged":false}]},{"id":"scope","question":"Is the issue broader than the direct change?","findings":[{"detail":"Verified the plan remains focused on author-test and task-kernel integration, using the existing / traversal path without broadening into legacy runner changes.","flagged":false}]},{"id":"all_locations","question":"Does the change touch all support locations?","findings":[{"detail":"Verified child env construction, import-path tests, CLI/help updates, fixture/golden resolution, task env/gate/event helpers, canonical DSL source, and focused tests are all represented.","flagged":false}]},{"id":"callers","question":"Do changed-function callers pass handled arguments?","findings":[{"detail":"Verified the planned subprocess caller env now includes scratch , author-test vars, and repo-root ; existing project, event, and legacy CLI callers remain covered.","flagged":false}]}],"flags":[],"verified_flag_ids":["correctness-4","correctness"],"disputed_flag_ids":[]}
WHAT TO IMPLEMENT:
Author-test CLI (in artagents/orchestrate/cli.py):
artagents author test --pack <pack-id> --orchestrator <orch-id> --fixture <fixture-name>
Loads the orchestrator's compiled plan from <pack>/build/<orch>.json.
Loads the fixture from <pack>/fixtures/<fixture-name>/ — fixture provides initial inputs and any external artifacts the steps need.
Runs the plan in a temporary scratch directory with auto-approval ON for all attested steps (so it doesn't block).
After completion, normalizes the resulting events.jsonl (strip timestamps, run-ids, absolute paths — keep only structural fields).
Diffs against <pack>/golden/<fixture-name>.events.jsonl.
Returns 0 on match, 1 on drift with a unified diff printed.
Auto-approval mode for attested steps (in core/task/lifecycle_ack.py or new helper):
When ARTAGENTS_AUTHOR_TEST=1 is set, attested steps that would normally block on user ack auto-approve and record a synthetic ack event marked source: author_test.
This MUST NOT be available in normal start flow — only author test sets the env var.
STOP CONDITION: Phase 9 done when pytest tests/ passes with new tests + artagents author test --pack builtin --orchestrator hype --fixture smoke exits 0 against a committed golden file.
code
Plan:
# Implementation Plan: Phase 9 Author Test Golden Runs
Overview
Phase 9 replaces the current author test scaffold in artagents/orchestrate/cli.py with a real task-mode golden-run harness. The repo already has the task kernel, hash-chained events.jsonl, lifecycle verbs, compiled DSL plans, and a Phase 5 scaffold that only diffs pre-captured files. The implementation should stay additive, stdlib-only, scratch-dir based, and compatible with the existing lifecycle/gate patterns.
Key current constraints:
author test currently accepts author test <pack>.<name> --fixture ...; the requested interface is author test --pack <pack-id> --orchestrator <orch-id> --fixture <fixture-name>.
<pack>/build/<orch>.json is gitignored, so the canonical builtin.hype stop condition needs either a generated build artifact before running or an agreed exception.
cmd_next only prints the next command; the golden-run harness must drive gate_command(), run code steps, auto-approve attested steps, and call record_dispatch_complete() itself.
Phase 1: Author-Test Runtime Harness
Step 1: Replace the Phase 5 scaffold (artagents/orchestrate/cli.py)
Scope: Medium
Add parser support for author test --pack builtin --orchestrator hype --fixture smoke [--regenerate].
Preserve the old positional author test builtin.hype --fixture smoke form as a backwards-compatible alias unless the project explicitly wants it removed.
Move the actual implementation out of the large CLI file into a small helper module such as artagents/orchestrate/author_test.py.
Resolve pack_root, build/<orch>.json, fixtures/<fixture>/, and golden/<fixture>.events.jsonl with clear error messages.
Step 2: Add the scratch runner (artagents/orchestrate/author_test.py)
Scope: Large
Load and validate the compiled plan JSON from <pack>/build/<orch>.json using load_plan().
Create a TemporaryDirectory containing an isolated projects root and a project slug such as author-test.
Copy fixture contents into scratch, exposing deterministic paths through environment variables such as ARTAGENTS_FIXTURE_DIR and ARTAGENTS_AUTHOR_TEST_RUN_DIR.
Start the task run in scratch by writing plan.json, active_run.json, and a deterministic run id, or by calling cmd_start() with projects_root=scratch/projects if the build path can be resolved cleanly.
Drive the plan until exhausted:
For CodeStep, call gate_command(), run shlex.split(step.command) with subprocess.run(..., shell=False), then call record_dispatch_complete().
For AttestedStep, synthesize an approval command using the step command plus the required --agent or --actor, then call gate_command() and record_dispatch_complete().
Let gate_command() handle nested traversal, repeat events, produces checks, and CAS.
Add a conservative max-step guard so a broken repeat cannot hang tests indefinitely.
Phase 2: Auto-Approval and Event Shape
Step 3: Add author-test-only auto approval (artagents/core/task/lifecycle_ack.py, artagents/core/task/gate.py, artagents/core/task/events.py)
Scope: Medium
Define a single env var constant for ARTAGENTS_AUTHOR_TEST=1.
Only the author-test runner sets this env var; normal start, next, and manual ack flows remain unchanged.
Add optional source support to make_step_attested_event() and make_item_attested_event().
When an attestation is auto-approved under ARTAGENTS_AUTHOR_TEST=1, record the normal attestation event plus source: "author_test".
Cover both actor and agent ack kinds without weakening normal identity validation.
Add helpers to normalize one event object and an entire events.jsonl file.
Strip volatile fields: ts, timestamp, hash, run_id, pid, and other direct runtime identifiers found during implementation.
Normalize absolute paths recursively in strings, lists, and dicts, replacing scratch run-root paths with <RUN_DIR>/<rel> and fixture-root paths with <FIXTURE_DIR>/<rel>.
Strip hash-chain hashes entirely rather than recomputing them, because normalized events are comparison artifacts, not appendable logs. Document this in the module docstring and in the author-test helper.
Emit deterministic JSONL with sorted keys and compact separators.
Phase 3: Diff and Regenerate Workflow
Step 5: Compare normalized actual events to golden (artagents/orchestrate/author_test.py)
Scope: Small
Normalize the scratch run’s events.jsonl after completion.
Read the golden file and normalize it too, so older raw goldens still compare predictably.
Return 0 on exact match.
Return 1 on drift and print a unified diff with stable file labels such as golden/smoke.events.jsonl and actual/smoke.events.jsonl.
When --regenerate is passed, write the normalized current events to <pack>/golden/<fixture>.events.jsonl.
Create the golden directory if needed.
Print a direct confirmation that the golden was regenerated and should be committed only if the drift is intentional.
Return 0 after a successful regeneration.
Phase 4: Canonical Hype Smoke Fixture
Step 7: Add a task-mode DSL source for builtin.hype if needed (artagents/packs/builtin/hype.py)
Scope: Medium
Current repo has legacy artagents/packs/builtin/hype/ but no DSL module at artagents/packs/builtin/hype.py; add the missing committed DSL source if Phase 13 migration is still absent.
Keep the smoke plan stdlib-only and fast. For the golden harness, use minimal code steps that consume fixture files and write deterministic JSON/text artifacts under task step directories.
Avoid invoking the full media pipeline in the smoke golden unless a tiny fixture and all required external tools are already guaranteed in CI.
Ensure the compiled plan can be generated with python3 -m artagents author compile builtin.hype.
Step 8: Add fixture and golden (artagents/packs/builtin/fixtures/smoke/, artagents/packs/builtin/golden/smoke.events.jsonl)
Scope: Small
Add a minimal smoke fixture, preferably text/JSON stubs rather than binary media, unless a tiny audio fixture is already present and safe to commit.
Generate the golden via artagents author test --pack builtin --orchestrator hype --fixture smoke --regenerate after compiling the DSL plan.
Commit only the fixture and golden, not scratch runs or generated project state.
Phase 5: Tests and Compatibility
Step 9: Replace scaffold tests with real author-test tests (tests/)
Scope: Medium
Update or retire tests/test_author_test_scaffold.py because missing-golden Phase 9 messages are no longer the expected behavior.
Add tests/test_author_test_pass.py: compile/setup a fixture plan and assert author-test passes against golden.
Add tests/test_author_test_drift.py: corrupt a temporary golden and assert exit 1 plus unified diff output.
Add tests/test_author_test_regenerate.py: run with --regenerate and assert the golden file is rewritten with normalized JSONL.
Add tests/test_author_test_auto_approval.py: assert attested steps do not auto-approve without ARTAGENTS_AUTHOR_TEST=1, and do record source: "author_test" when driven by the author-test runner.
Keep the tests using temporary packs/projects where possible, and use the canonical builtin.hype smoke test as the integration coverage.
Execution Order
Add normalization first; it is isolated and easy to unit-test.
Build the scratch author-test runner against a tiny temp-pack plan.
Add auto-approval event tagging once the runner can reach attested steps.
Add --regenerate after comparison behavior is stable.
Add or complete the canonical builtin.hype smoke fixture and golden last.
Update the old scaffold tests only after the new behavior is covered.
"version": 1,
"timestamp": "2026-05-05T09:38:29Z",
"hash": "sha256:0b5404ed9cc28b25145c20056982ea94c8e2744754330a0d3d4655ac2cf39346",
"questions": [
"Should artagents/packs/builtin/build/hype.json remain gitignored and generated before running author-test, or should Phase 9 make an explicit exception and commit the compiled canonical build artifact?",
"Should the new CLI preserve the existing positional author test builtin.hype --fixture smoke form as an alias, or should tests/docs move exclusively to --pack/--orchestrator?",
"For the canonical hype smoke fixture, is a deterministic stub fixture acceptable, or must it exercise a real small audio input through actual hype executors?"
],
"success_criteria": [
{
"criterion": "artagents author test --pack builtin --orchestrator hype --fixture smoke exits 0 when the normalized actual event sequence matches the committed golden.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "Author-test exits 1 and prints a unified diff when normalized actual events drift from the golden.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "--regenerate rewrites <pack>/golden/<fixture>.events.jsonl with normalized current events and returns 0.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Attested steps are auto-approved only during author-test mode and the resulting attestation event includes source: \"author_test\".",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Author-test runs entirely in a temporary scratch projects root and does not create or mutate real project runs outside the golden file when --regenerate is requested.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The event normalizer strips timestamps, run ids, pid fields, absolute scratch paths, and hash-chain hashes while preserving structural event fields such as kind, step path/id, decisions, produces/check metadata, and CAS hashes where stable.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The new tests and existing test suite pass with pytest tests/.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "The implementation remains stdlib-only and does not add new package dependencies.",
"priority": "must",
"requires": [
"parse_diff",
"read_files"
]
},
{
"criterion": "The author-test runner is split out of cli.py enough that the CLI remains a thin parser/dispatcher.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Golden fixture commands are deterministic, quick, and avoid real media/network work unless explicitly required.",
"priority": "should",
"requires": [
"run_tests",
"subjective_judgment"
]
}
],
"assumptions": [
"I will not invoke the megaplan CLI or nested planning harnesses.",
"I will keep the implementation additive and preserve existing author CLI behavior unless it conflicts with the requested Phase 9 syntax.",
"Golden files should store normalized JSONL, not raw hash-chained runtime events, because stable comparison is the purpose of these artifacts.",
"Hash-chain hash fields will be stripped rather than recomputed in normalized goldens; normalized goldens are not intended to be replayed as appendable event logs.",
"The canonical builtin.hype smoke fixture can be deterministic and lightweight; it does not need to render media unless clarified otherwise.",
"If builtin.hype has no committed DSL source, adding artagents/packs/builtin/hype.py is in scope because author test depends on a compiled task-mode plan."
],
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[]
Known accepted debt grouped by subsystem:
{}
Escalated debt subsystems:
[]
Debt guidance:
These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
Prefix every new concern with a subsystem tag followed by a colon, for example Timeout recovery: retry backoff remains brittle.
When a concern is recurring debt that still needs to be flagged, prefix it with Recurring debt: after the subsystem tag, for example Timeout recovery: Recurring debt: retry backoff remains brittle.
code
Your output template is at: /Users/user_c042661f/Documents/reigh-workspace/.megaplan-worktrees/phase-9-allcodexhigh-20260505/all-codex-high/.megaplan/plans/phase-9-allcodexhigh-20260505/critique_output.json
Read this file first — it contains 5 checks, each with a question and guidance.
For each check, investigate the codebase, then add your findings to the findings array for that check.
Each finding needs:
"detail": what you specifically checked and what you found (at least a full sentence)
"flagged": true if this describes a difference, risk, or tension — even if you think it's justified. false only if purely informational with no possible downside.
Every check must end with at least one finding. Never leave a findings array empty. If you found no issue, add one detailed flagged: false finding explaining what you checked and why it appears clear.
When in doubt, flag it — the gate can accept tradeoffs, but it can't act on findings it never sees.
Good: {"detail": "Checked callers of nthroot_mod in solveset.py line 1205 — passes prime moduli only, consistent with the fix.", "flagged": false}
Good: {"detail": "The fix handles empty tuples but not single-element tuples which need a trailing comma.", "flagged": true}
Bad: {"detail": "No issue found", "flagged": false} ← too brief, will be rejected
Bad: {"detail": "The hints suggest approach X but the plan uses Y. However Y is consistent with X's intent.", "flagged": false} ← a different approach than the hints IS a flag. You found a divergence — flag it. The gate decides if it's acceptable.
After filling in checks, add any additional concerns to the flags array (e.g., security, performance, dependencies).
Use the standard format (id, concern, category, severity_hint, evidence). This array can be empty.
Workflow: read the file → investigate → read file again → add finding → write file back. Repeat for each check.
code
Additional guidelines:
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Over-engineering: prefer the simplest approach that fully solves the problem.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids`: list flag IDs from prior iterations that the revised plan actually resolves (e.g., if the plan was revised to fix FLAG-001, and you confirm the fix is correct, include "FLAG-001"). Only include flags you've verified — don't guess.
- Verify that the plan follows the expected structure when validator warnings or the outline suggest drift.
- Additional flags may use these categories: correctness, security, completeness, performance, maintainability, other.
- Focus on concrete issues, not structural formatting.
{"checks":[{"id":"issue_hints","question":"Did the work fully address issue hints and plan requirements?","findings":[{"detail":"Filled the critique file. Key flagged gaps: fixture layout diverges from the explicit user path, and the gitignored compiled build artifact remains unresolved for the final author-test command.","flagged":true}]},{"id":"correctness","question":"Are the proposed changes technically correct?","findings":[{"detail":"Flagged correctness risks around scratch subprocess isolation, auto-approval hook placement, and actor attestation behavior under author-test mode.","flagged":true}]},{"id":"scope","question":"Is the issue broader than the direct change?","findings":[{"detail":"Flagged that author-test needs a coherent loop around peek/gate plus child env propagation to cover nested, repeat, project-attached executor, and attested paths.","flagged":true}]},{"id":"all_locations","question":"Does the plan touch all support locations?","findings":[{"detail":"Flagged missing explicit updates for top-level help/canonical CLI tests and the implications of the requested fixture layout.","flagged":true}]},{"id":"callers","question":"Do changed-function callers pass handled arguments?","findings":[{"detail":"Flagged that project-attached executor callers require a scratch project.json; confirmed event-constructor and old author CLI callers are otherwise covered by the plan shape.","flagged":true}]}],"flags":[{"id":"FLAG-001","concern":"Fixture layout: plan uses pack-root fixtures/ and golden/ while the Phase 9 task explicitly asks for artagents/packs/builtin/hype/fixtures/smoke/ and artagents/packs/builtin/hype/golden/smoke.events.jsonl.","category":"completeness","severity_hint":"uncertain","evidence":"Plan Step 8 names artagents/packs/builtin/fixtures/smoke/; user implementation item 5 names artagents/packs/builtin/hype/fixtures/smoke/."},{"id":"FLAG-002","concern":"Compiled plan availability: clean-checkout author test --pack builtin --orchestrator hype --fixture smoke can fail because <pack>/build/<orch>.json is gitignored and the plan does not resolve whether author-test should compile on demand.","category":"completeness","severity_hint":"likely-significant","evidence":"python3 -m artagents author compile builtin.hype currently fails due to missing artagents/packs/builtin/hype.py, and .gitignore excludes artagents/packs/*/build/."},{"id":"FLAG-003","concern":"Scratch isolation: child subprocesses need ARTAGENTS_PROJECTS_ROOT set to the scratch projects root, otherwise project-aware commands can read or mutate the user's real default projects root.","category":"correctness","severity_hint":"likely-significant","evidence":"project_dir() resolves from ARTAGENTS_PROJECTS_ROOT; the plan mentions fixture/run env vars but not ARTAGENTS_PROJECTS_ROOT for subprocess env."},{"id":"FLAG-004","concern":"Auto-approval hook placement: putting env-driven author-test approval only in lifecycle_ack.py would not affect the direct gate_command() path the plan uses to drive attested steps.","category":"correctness","severity_hint":"likely-significant","evidence":"lifecycle_ack._ack_approve() delegates to gate_command(), while attestation events are emitted in gate._dispatch_attested()."},{"id":"FLAG-005","concern":"Scratch project setup: cmd_start() does not create project.json, so project-attached executor commands in fixtures can fail unless author-test creates or copies a scratch project record before running steps.","category":"correctness","severity_hint":"likely-significant","evidence":"prepare_project_run() calls require_project(), but cmd_start() writes task-run state without calling create_project()."},{"id":"FLAG-006","concern":"CLI support: top-level python3 -m artagents --help and canonical CLI tests are not explicitly included even though the new author test --pack/--orchestrator form changes user-facing command syntax.","category":"completeness","severity_hint":"likely-minor","evidence":"Current help advertises author ... <pack>.<name>, and current argparse rejects author test --pack builtin --orchestrator hype --fixture smoke."}],"verified_flag_ids":[],"disputed_flag_ids":[]}
You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are an independent reviewer. Critique the plan against the actual repository.
Implement Phase 9 (Author test with golden runs) of the ArtAgents orchestrator V1 design per docs/orchestrator-v1-plan.md section 12 (Phase 9).
LAUNCHER: every megaplan call = PYENV_VERSION=3.11.11 python -m megaplan ....
DRIVING DISCIPLINE: After every CLI call, run megaplan status --plan <name> and megaplan progress --plan <name>. If state == finalized and batches_remaining > 0, you MUST run megaplan execute --plan <name> --confirm-destructive --batch N for each remaining batch sequentially. DO NOT EXIT while state != done.
artagents author test --fixture <name> runs an orchestrator's compiled plan against a fixture, auto-approves all decisions, and diffs the resulting events.jsonl against <pack>/golden/<fixture>.events.jsonl.
Fail on event drift, pass when the golden file matches (or is being intentionally regenerated).
Fixture tests fail on event drift and pass when intentionally regenerated.
WHAT TO IMPLEMENT:
Author-test CLI (in artagents/orchestrate/cli.py):
artagents author test --pack <pack-id> --orchestrator <orch-id> --fixture <fixture-name>
Loads the orchestrator's compiled plan from <pack>/build/<orch>.json.
Loads the fixture from <pack>/fixtures/<fixture-name>/ — fixture provides initial inputs and any external artifacts the steps need.
Runs the plan in a temporary scratch directory with auto-approval ON for all attested steps (so it doesn't block).
After completion, normalizes the resulting events.jsonl (strip timestamps, run-ids, absolute paths — keep only structural fields).
Diffs against <pack>/golden/<fixture-name>.events.jsonl.
Returns 0 on match, 1 on drift with a unified diff printed.
Auto-approval mode for attested steps (in core/task/lifecycle_ack.py or new helper):
When ARTAGENTS_AUTHOR_TEST=1 is set, attested steps that would normally block on user ack auto-approve and record a synthetic ack event marked source: author_test.
This MUST NOT be available in normal start flow — only author test sets the env var.
STOP CONDITION: Phase 9 done when pytest tests/ passes with new tests + artagents author test --pack builtin --orchestrator hype --fixture smoke exits 0 against a committed golden file.
code
Plan:
# Implementation Plan: Phase 9 Author Test Golden Runs
Overview
Phase 9 replaces the existing Phase 5 author test scaffold with a real golden-run harness: run a compiled task-mode plan in scratch, auto-approve attested steps, normalize events.jsonl, compare against a committed golden, and support intentional regeneration.
Root-cause check: the critique does not show that the plan targets the wrong subsystem. The right root remains artagents/orchestrate/cli.py plus task-kernel support in artagents/core/task/. The revision tightens the missing runtime details: fixture path resolution, clean-checkout compiled-plan availability, subprocess scratch isolation, gate-level auto-approval, actor ack handling, project record setup, and top-level help/tests.
Important repository facts:
author test currently only diffs fixture files and still expects a positional <pack>.<name> form.
The attestation event write path is artagents/core/task/gate.py::_dispatch_attested(), so author-test auto-approval belongs at the gate boundary.
Subprocess python3 -m artagents ... --project ... calls discover project state through ARTAGENTS_PROJECTS_ROOT, so scratch isolation must be propagated through child env.
artagents/packs/*/build/ is gitignored, so the stop-condition command must compile on demand into scratch if the committed build artifact is absent.
The canonical smoke fixture must use the explicitly requested folder layout: artagents/packs/builtin/hype/fixtures/smoke/ and artagents/packs/builtin/hype/golden/smoke.events.jsonl.
Phase 1: CLI Surface and Fixture Resolution
Step 1: Update author-test parser and gateway help (artagents/orchestrate/cli.py, artagents/pipeline.py, tests/test_canonical_cli.py)
Scope: Medium
Add the requested CLI form: python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke [--regenerate].
Preserve the existing positional alias author test builtin.hype --fixture smoke as an additive compatibility path.
Dispatch CLI work to a focused helper module such as artagents/orchestrate/author_test.py, keeping cli.py as parser/glue.
Update top-level help text in artagents/pipeline.py so python3 -m artagents --help advertises the new author-test form.
Update canonical CLI tests to cover the new parser shape and help output.
Preferred orchestrator-scoped layout: <pack>/<orchestrator>/fixtures/<fixture>/ and <pack>/<orchestrator>/golden/<fixture>.events.jsonl.
Backward-compatible pack-root layout: <pack>/fixtures/<fixture>/ and <pack>/golden/<fixture>.events.jsonl.
For builtin.hype, create and use the requested preferred layout under artagents/packs/builtin/hype/.
Keep author new pack-root scaffold behavior unless changing it is required by a failing test; author-test path resolution is enough to support both existing scaffold tests and the new canonical fixture.
On --regenerate, write to the golden path corresponding to the resolved fixture layout. If both are absent and a fixture path is being created for the canonical smoke case, write orchestrator-scoped.
Primary behavior: load <pack>/build/<orchestrator>.json when it exists, and validate with load_plan().
Clean-checkout fallback: if the build JSON is missing and <pack>/<orchestrator>.py exists, compile the DSL source into a scratch build path using compile_to_path(..., dest=<scratch>/build/<orchestrator>.json) and load that compiled JSON.
Do not write generated build JSON into the gitignored pack build directory during author-test.
Add the missing committed task-mode DSL source for builtin.hype at artagents/packs/builtin/hype.py if it is still absent.
Keep the canonical smoke plan deterministic and stdlib-only. It may use lightweight code steps that consume fixture stubs and write deterministic artifacts under task step directories; it must not require network access, media rendering, or external services.
Phase 3: Scratch Runner
Step 4: Create isolated project/run state (artagents/orchestrate/author_test.py)
Scope: Medium
Use TemporaryDirectory() for an isolated author-test workspace.
Create scratch/projects and a project slug such as author-test.
Seed a real project record before running steps:
If the fixture includes project.json, copy it into the scratch project.
Otherwise call the project creation helper, such as create_project("author-test", root=scratch_projects_root), so project-attached executor commands that call require_project() succeed.
Copy fixture files into a deterministic scratch fixture directory.
Start task-mode state in scratch by writing plan.json, active_run.json, runs/<run-id>/events.jsonl, and AGENT.md consistently with existing lifecycle expectations. Use cmd_start() only if it can be given the scratch projects root and scratch/real packs root without mutating pack state.
Use a deterministic run id such as author-test-run so normalization has less to strip.
Step 5: Drive the plan through peek_current_step() and gate_command() (artagents/orchestrate/author_test.py)
Scope: Large
Loop until peek_current_step() reports exhaustion.
For every iteration, re-read plan.json and events.jsonl, then ask peek_current_step() for the next dispatchable leaf. This keeps nested, repeat, and for-each cursor behavior aligned with the kernel.
Fail author-test if the subprocess return code is non-zero.
For AttestedStep:
Call gate_command(slug, step.command, [], root=scratch_projects_root) directly in author-test mode. The gate-level hook will synthesize the ack; no lifecycle cmd_ack() call is required.
Call record_dispatch_complete(decision, 0) for symmetry, knowing it remains a no-op for attested steps.
Let gate_command() emit nested-enter/exit, repeat, item, produces-check, CAS, and attestation events.
Add a max-dispatch guard with a clear error message to prevent infinite loops in bad repeat plans.
Step 6: Propagate scratch env into all child commands (artagents/orchestrate/author_test.py)
Scope: Medium
During in-process gate calls and child subprocess execution, set:
Build subprocess env from child_subprocess_env() plus these overrides so nested python3 -m artagents ... --project author-test calls gate and write inside scratch.
Set PYTHONPATH only if tests prove subprocess imports cannot find the current checkout; do not add unrelated path machinery preemptively.
Ensure the env override context is restored after author-test exits, including failure paths.
Phase 4: Gate-Level Auto Approval
Step 7: Implement author-test attested approval at the gate boundary (artagents/core/task/gate.py, artagents/core/task/events.py, optional artagents/core/task/env.py)
Scope: Medium
Add an ARTAGENTS_AUTHOR_TEST env helper, ideally near other task env helpers.
In _dispatch_attested(), detect ARTAGENTS_AUTHOR_TEST=1 before normal identity validation.
In author-test mode, accept the bare expected attested command (step.command) for the current cursor and synthesize identity without requiring --agent or --actor args.
For ack.kind == "agent", synthesize attestor_kind="agent", attestor_id="author-test".
For ack.kind == "actor", synthesize attestor_kind="actor", attestor_id="author-test" and bypass the normal ARTAGENTS_ACTOR equality and self-ack checks only for this author-test branch.
Add optional source support to make_step_attested_event() and make_item_attested_event().
Emit source: "author_test" on synthetic author-test step_attested and item_attested events.
Leave normal cmd_ack() and non-author-test gate_command() behavior unchanged; missing identity still fails outside author-test mode.
Add helpers for normalizing a single event object and an entire JSONL file.
Strip volatile fields recursively where appropriate: ts, timestamp, hash, run_id, pid, and direct runtime identifiers that tests show are unstable.
Normalize absolute path strings under the scratch run directory to <RUN_DIR>/<rel>.
Normalize absolute path strings under the scratch fixture directory to <FIXTURE_DIR>/<rel>.
Preserve structural fields such as kind, plan_step_id, plan_step_path, decision, attestor_kind, attestor_id, source, produces/check fields, and stable CAS artifact hashes.
Strip hash-chain hashes rather than recomputing them. Document that normalized goldens are comparison artifacts, not appendable hash-chained logs.
Emit deterministic JSONL using sorted keys and compact separators.
Step 9: Compare and regenerate goldens (artagents/orchestrate/author_test.py)
Scope: Small
After the scratch run completes, normalize its events.jsonl.
Read and normalize the golden if it exists, so legacy raw goldens still compare reliably.
Return 0 when normalized actual and normalized golden match.
Return 1 on drift and print a unified diff with stable labels for expected and actual files.
With --regenerate, write the normalized actual events to the resolved golden path, return 0, and print a confirmation telling the author to commit the regenerated golden only if intentional.
If the golden is missing and --regenerate is not set, return non-zero with a direct recovery command using --regenerate.
Phase 6: Canonical Hype Smoke Fixture
Step 10: Add canonical smoke fixture and golden (artagents/packs/builtin/hype/fixtures/smoke/, artagents/packs/builtin/hype/golden/smoke.events.jsonl)
Scope: Medium
Add a minimal fixture under artagents/packs/builtin/hype/fixtures/smoke/.
Prefer text/JSON stubs over binary media to keep tests fast and dependency-free, unless existing code already provides a tiny safe audio fixture.
Generate artagents/packs/builtin/hype/golden/smoke.events.jsonl using the new --regenerate flow.
Ensure python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke passes from a clean checkout without a manual compile step.
Commit only source fixture/golden files and DSL source; do not commit scratch runs or generated pack build output.
Phase 7: Tests
Step 11: Replace scaffold coverage with Phase 9 tests (tests/)
Scope: Large
Update or replace tests/test_author_test_scaffold.py because missing-golden Phase 5 scaffold behavior is no longer expected.
Add tests/test_author_test_pass.py to run author-test against builtin/hype/fixtures/smoke and assert it passes against the committed golden.
Add tests/test_author_test_drift.py to copy the pack/fixture/golden to a temp pack, corrupt the golden, and assert exit 1 plus unified diff output.
Add tests/test_author_test_regenerate.py to run with --regenerate in a temp pack and assert the golden is rewritten as normalized JSONL.
Add tests/test_author_test_auto_approval.py to assert missing identity still fails outside ARTAGENTS_AUTHOR_TEST=1, while author-test mode records source: "author_test" for actor and agent attested steps.
Add scratch-isolation coverage proving a subprocess python3 -m artagents ... --project author-test sees ARTAGENTS_PROJECTS_ROOT=<scratch/projects> and does not write to the default projects root.
Add project-record coverage for a project-attached command path so require_project() succeeds inside scratch.
Add fixture-layout coverage for both orchestrator-scoped and pack-root fallback layouts.
Keep broader lifecycle tests such as tests/test_lifecycle_ack.py and tests/test_task_kernel_e2e.py passing unchanged.
Execution Order
Update CLI parsing/help and fixture path resolution first; this makes the requested command shape testable.
Add clean-checkout build fallback and the missing builtin.hype DSL source before building the canonical fixture.
Implement scratch project/run setup with ARTAGENTS_PROJECTS_ROOT child env propagation.
Add gate-level author-test auto-approval and event source tagging.
Add normalization, comparison, and regeneration.
Add the canonical hype smoke fixture/golden.
Replace scaffold tests and add targeted regression tests for drift, regeneration, auto-approval, scratch isolation, fixture layout, and project record creation.
Validation Order
python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke --regenerate in a clean checkout-style state with no pack build artifact.
"version": 2,
"timestamp": "2026-05-05T09:47:26Z",
"hash": "sha256:ed4cb2b6bf9b3a3fb97b0e9fd66ceed6bebb7478c42945182f164c07717a23ed",
"changes_summary": "Revised the plan to use the explicit hype/fixtures and hype/golden layout, make the stop-condition command work from a clean checkout via scratch on-demand compile, move auto-approval to the gate boundary, handle actor attestations synthetically in author-test mode, propagate ARTAGENTS_PROJECTS_ROOT to subprocesses, seed a real scratch project record, and update top-level help plus targeted tests.",
"flags_addressed": [
"issue_hints-1",
"issue_hints-2",
"correctness-1",
"correctness-2",
"correctness-3",
"scope",
"all_locations-1",
"all_locations-2",
"callers"
],
"questions": [],
"success_criteria": [
{
"criterion": "python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke exits 0 from a clean checkout without a manual precompile step.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "The canonical smoke fixture and golden live at artagents/packs/builtin/hype/fixtures/smoke/ and artagents/packs/builtin/hype/golden/smoke.events.jsonl.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "Author-test exits 1 and prints a unified diff when normalized actual events drift from the golden.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "--regenerate rewrites the resolved golden file with normalized current events and returns 0.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Attested steps are auto-approved only when ARTAGENTS_AUTHOR_TEST=1 is active at the gate boundary, and synthetic attestation events include source: \"author_test\".",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Actor attested steps pass in author-test mode without requiring ARTAGENTS_ACTOR self-ack behavior, while normal actor ack validation remains unchanged outside author-test mode.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "All author-test child subprocesses receive ARTAGENTS_PROJECTS_ROOT=<scratch/projects> and do not write to the default project root.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The scratch runner creates or copies a valid project.json before running project-attached executor commands.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The event normalizer strips timestamps, run ids, pid fields, absolute scratch paths, and hash-chain hashes while preserving structural event fields and stable CAS hashes.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "python3 -m artagents --help and canonical CLI tests advertise/accept the new author test --pack --orchestrator --fixture form.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "The implementation remains stdlib-only and adds no new package dependencies.",
"priority": "must",
"requires": [
"parse_diff",
"read_files"
]
},
{
"criterion": "The new tests and existing test suite pass with .",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "The author-test runner is split out of enough that CLI code remains parser/dispatcher glue.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Golden fixture commands are deterministic, quick, and avoid real media/network work unless explicitly required.",
"priority": "should",
"requires": [
"run_tests",
"subjective_judgment"
]
}
],
"assumptions": [
"The implementation remains additive and keeps the legacy positional form as an alias.",
"Author-test may compile a missing pack build artifact into a scratch path, because pack build outputs are gitignored and the stop-condition command must work without a manual precompile step.",
"The canonical smoke fixture uses deterministic stubs instead of real media unless existing tests prove a tiny media fixture is already safe and dependency-free.",
"Golden files store normalized JSONL rather than raw hash-chained event logs.",
"Hash-chain fields are stripped in normalized goldens rather than recomputed.",
"Author-test auto-approval is intentionally implemented at because that is the event write boundary for attested steps.",
"The fixture resolver supports orchestrator-scoped layout first and pack-root layout as a compatibility fallback."
],
"delta_from_previous_percent": 92.3,
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "verifiability-0",
"concern": "Criterion 8: requires human verification (subjective_judgment).",
"status": "open",
"severity": "minor"
},
{
"id": "verifiability-1",
"concern": "Criterion 9: requires human verification (subjective_judgment).",
"status": "open",
"severity": "minor"
},
{
"id": "issue_hints-1",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Canonical fixture layout: the user-requested implementation explicitly names artagents/packs/builtin/hype/fixtures/smoke/ and artagents/packs/builtin/hype/golden/smoke.events.jsonl, but the plan's Step 8 uses artagents/packs/builtin/fixtures/smoke/ and artagents/packs/builtin/golden/smoke.events.jsonl. Current author new and the design doc use pack-root fixtures, so the plan is internally defensible, but it diverges from the explicit Phase 9 task text and should either be reconciled or called out as an intentional layout choice.",
"status": "addressed",
"severity": "significant"
},
{
"id": "issue_hints-2",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Compiled plan availability: I ran python3 -m artagents author compile builtin.hype and confirmed it currently fails because artagents/packs/builtin/hype.py is absent; .gitignore also excludes artagents/packs/*/build/. The plan notes this as an open question and later says to compile before validation, but the user stop condition names artagents author test --pack builtin --orchestrator hype --fixture smoke as the command that must exit 0, so a clean checkout will still fail unless author-test compiles on demand or the workflow explicitly requires a prior compile step.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Scratch subprocess isolation: current subprocess-dispatched project commands discover the project root through ARTAGENTS_PROJECTS_ROOT unless an in-process projects_root argument is passed. The plan sets ARTAGENTS_FIXTURE_DIR and ARTAGENTS_AUTHOR_TEST_RUN_DIR, and calls gate_command(..., root=scratch/projects), but it does not require setting ARTAGENTS_PROJECTS_ROOT in the child subprocess environment; code steps like python3 -m artagents executors run ... --project author-test would therefore gate and write against the user's default projects root instead of the scratch root.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: Auto-approval integration: the current attestation write path is in gate._dispatch_attested(), while lifecycle_ack._ack_approve() only synthesizes a command and delegates back to . The plan allows implementation in and also has the author-test runner call directly with synthetic identity flags, so an env-only auto-approval hook placed only in lifecycle_ack would not affect the direct author-test path; the plan should pin the helper at the gate dispatch boundary or explicitly route author-test through .",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-3",
"concern": "Are the proposed changes technically correct?: Actor attestations need special handling in author-test mode because requires to equal and rejects self-ack when matches. The plan says to synthesize when required, but it does not specify the run-start actor/env values or a controlled synthetic actor, so actor-ack fixtures can fail even with unless the new gate helper bypasses or deliberately satisfies those checks.",
"status": "addressed",
"severity": "significant"
},
{
"id": "scope",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Author-test is broader than : the existing task runner surfaces command dispatch through , direct , , , executor project runs, and inbox consumption. The plan correctly moves most work into a helper and covers gate plus lifecycle tests, but it should scope the author-test run loop around / and child env propagation explicitly so nested, repeat, project-attached executor, and attested paths are all covered by one mechanism.",
"status": "addressed",
"severity": "significant"
},
{
"id": "all_locations-1",
"concern": "Does the change touch all locations AND supporting infrastructure?: Top-level help and parser glue need updating in addition to : currently advertises , and currently exits with argparse error . The plan covers parser support but does not explicitly include the top-level gateway help or canonical CLI tests that snapshot lifecycle/author surfaces.",
"status": "addressed",
"severity": "significant"
},
{
"id": "all_locations-2",
"concern": "Does the change touch all locations AND supporting infrastructure?: If the fixture layout is changed to the explicit user-requested and form, supporting infrastructure also needs , existing scaffold tests, and path resolution behavior updated. The current plan instead leaves those mechanisms on pack-root and , so it avoids broad churn but does not address the explicit subdirectory layout.",
"status": "addressed",
"severity": "significant"
},
{
"id": "callers",
"concern": "Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?: Project-attached executor callers require a real project record: calls , and calls , which fails unless exists. The plan's scratch start path creates an active task run via or manual / writes, but only creates the project directory and run files; it does not call , so any fixture plan that runs can fail before producing events unless the runner seeds project.json from the fixture or creates a scratch project.",
"status": "addressed",
"severity": "significant"
}
]
code
Known accepted debt grouped by subsystem:
{}
Escalated debt subsystems:
[]
Debt guidance:
These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
Prefix every new concern with a subsystem tag followed by a colon, for example Timeout recovery: retry backoff remains brittle.
When a concern is recurring debt that still needs to be flagged, prefix it with Recurring debt: after the subsystem tag, for example Timeout recovery: Recurring debt: retry backoff remains brittle.
code
Your output template is at: /Users/user_c042661f/Documents/reigh-workspace/.megaplan-worktrees/phase-9-allcodexhigh-20260505/all-codex-high/.megaplan/plans/phase-9-allcodexhigh-20260505/critique_output.json
Read this file first — it contains 5 checks, each with a question and guidance.
For each check, investigate the codebase, then add your findings to the findings array for that check.
Each finding needs:
"detail": what you specifically checked and what you found (at least a full sentence)
"flagged": true if this describes a difference, risk, or tension — even if you think it's justified. false only if purely informational with no possible downside.
Every check must end with at least one finding. Never leave a findings array empty. If you found no issue, add one detailed flagged: false finding explaining what you checked and why it appears clear.
When in doubt, flag it — the gate can accept tradeoffs, but it can't act on findings it never sees.
Good: {"detail": "Checked callers of nthroot_mod in solveset.py line 1205 — passes prime moduli only, consistent with the fix.", "flagged": false}
Good: {"detail": "The fix handles empty tuples but not single-element tuples which need a trailing comma.", "flagged": true}
Bad: {"detail": "No issue found", "flagged": false} ← too brief, will be rejected
Bad: {"detail": "The hints suggest approach X but the plan uses Y. However Y is consistent with X's intent.", "flagged": false} ← a different approach than the hints IS a flag. You found a divergence — flag it. The gate decides if it's acceptable.
After filling in checks, add any additional concerns to the flags array (e.g., security, performance, dependencies).
Use the standard format (id, concern, category, severity_hint, evidence). This array can be empty.
Workflow: read the file → investigate → read file again → add finding → write file back. Repeat for each check.
This is critique iteration 2. The template file includes prior findings with their status. Verify addressed flags were actually fixed, re-flag if inadequate, and check for new issues introduced by the revision.
code
Additional guidelines:
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Over-engineering: prefer the simplest approach that fully solves the problem.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids`: list flag IDs from prior iterations that the revised plan actually resolves (e.g., if the plan was revised to fix FLAG-001, and you confirm the fix is correct, include "FLAG-001"). Only include flags you've verified — don't guess.
- Verify that the plan follows the expected structure when validator warnings or the outline suggest drift.
- Additional flags may use these categories: correctness, security, completeness, performance, maintainability, other.
- Focus on concrete issues, not structural formatting.
cwd=scratch_workspace
python3 -m artagents
PYTHONPATH
peek_current_step()
gate_command()
author test <pack>.<orchestrator>
cwd=scratch_workspace
python3 -m artagents
PYTHONPATH
python3 -m artagents --help
/tmp
No module named artagents
PYTHONPATH
cwd=scratch_workspace
You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are an independent reviewer. Critique the plan against the actual repository.
Implement Phase 9 (Author test with golden runs) of the ArtAgents orchestrator V1 design per docs/orchestrator-v1-plan.md section 12 (Phase 9).
LAUNCHER: every megaplan call = PYENV_VERSION=3.11.11 python -m megaplan ....
DRIVING DISCIPLINE: After every CLI call, run megaplan status --plan <name> and megaplan progress --plan <name>. If state == finalized and batches_remaining > 0, you MUST run megaplan execute --plan <name> --confirm-destructive --batch N for each remaining batch sequentially. DO NOT EXIT while state != done.
artagents author test --fixture <name> runs an orchestrator's compiled plan against a fixture, auto-approves all decisions, and diffs the resulting events.jsonl against <pack>/golden/<fixture>.events.jsonl.
Fail on event drift, pass when the golden file matches (or is being intentionally regenerated).
Fixture tests fail on event drift and pass when intentionally regenerated.
WHAT TO IMPLEMENT:
Author-test CLI (in artagents/orchestrate/cli.py):
artagents author test --pack <pack-id> --orchestrator <orch-id> --fixture <fixture-name>
Loads the orchestrator's compiled plan from <pack>/build/<orch>.json.
Loads the fixture from <pack>/fixtures/<fixture-name>/ — fixture provides initial inputs and any external artifacts the steps need.
Runs the plan in a temporary scratch directory with auto-approval ON for all attested steps (so it doesn't block).
After completion, normalizes the resulting events.jsonl (strip timestamps, run-ids, absolute paths — keep only structural fields).
Diffs against <pack>/golden/<fixture-name>.events.jsonl.
Returns 0 on match, 1 on drift with a unified diff printed.
Auto-approval mode for attested steps (in core/task/lifecycle_ack.py or new helper):
When ARTAGENTS_AUTHOR_TEST=1 is set, attested steps that would normally block on user ack auto-approve and record a synthetic ack event marked source: author_test.
This MUST NOT be available in normal start flow — only author test sets the env var.
STOP CONDITION: Phase 9 done when pytest tests/ passes with new tests + artagents author test --pack builtin --orchestrator hype --fixture smoke exits 0 against a committed golden file.
code
Plan:
# Implementation Plan: Phase 9 Author Test Golden Runs
Overview
Phase 9 replaces the existing Phase 5 author test scaffold with a real golden-run harness: run a compiled task-mode plan in scratch, auto-approve attested steps, normalize events.jsonl, compare against a committed golden, and support intentional regeneration.
Root-cause check: the remaining critique does not change the target subsystem or root cause. The plan still belongs in artagents/orchestrate/cli.py, a helper under artagents/orchestrate/, and task-kernel support under artagents/core/task/. The open issue is a concrete child-process environment requirement: because this checkout imports artagents from the repository root, author-test subprocesses running from a scratch cwd must proactively prepend the repo root to PYTHONPATH while keeping all project outputs pointed at scratch.
Important repository facts:
author test currently only diffs fixture files and still expects a positional <pack>.<name> form.
The attestation event write path is artagents/core/task/gate.py::_dispatch_attested(), so author-test auto-approval belongs at the gate boundary.
Subprocess python3 -m artagents ... --project ... calls discover project state through ARTAGENTS_PROJECTS_ROOT, so scratch isolation must be propagated through child env.
Subprocess python3 -m artagents ... is only importable from the checkout unless PYTHONPATH includes the repo root, so scratch-cwd subprocesses must receive that path explicitly.
artagents/packs/*/build/ is gitignored, so the stop-condition command must compile on demand into scratch if the committed build artifact is absent.
The canonical smoke fixture must use the explicitly requested folder layout: artagents/packs/builtin/hype/fixtures/smoke/ and artagents/packs/builtin/hype/golden/smoke.events.jsonl.
Phase 1: CLI Surface and Fixture Resolution
Step 1: Update author-test parser and gateway help (artagents/orchestrate/cli.py, artagents/pipeline.py, tests/test_canonical_cli.py)
Scope: Medium
Add the requested CLI form: python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke [--regenerate].
Preserve the existing positional alias author test builtin.hype --fixture smoke as an additive compatibility path.
Dispatch CLI work to a focused helper module such as artagents/orchestrate/author_test.py, keeping cli.py as parser/glue.
Update top-level help text in artagents/pipeline.py so python3 -m artagents --help advertises the new author-test form.
Update canonical CLI tests to cover the new parser shape and help output.
Preferred orchestrator-scoped layout: <pack>/<orchestrator>/fixtures/<fixture>/ and <pack>/<orchestrator>/golden/<fixture>.events.jsonl.
Backward-compatible pack-root layout: <pack>/fixtures/<fixture>/ and <pack>/golden/<fixture>.events.jsonl.
For builtin.hype, create and use the requested preferred layout under artagents/packs/builtin/hype/.
Keep author new pack-root scaffold behavior unless changing it is required by a failing test; author-test path resolution is enough to support both existing scaffold tests and the new canonical fixture.
On --regenerate, write to the golden path corresponding to the resolved fixture layout. If both are absent and a fixture path is being created for the canonical smoke case, write orchestrator-scoped.
Primary behavior: load <pack>/build/<orchestrator>.json when it exists, and validate with load_plan().
Clean-checkout fallback: if the build JSON is missing and <pack>/<orchestrator>.py exists, compile the DSL source into a scratch build path using compile_to_path(..., dest=<scratch>/build/<orchestrator>.json) and load that compiled JSON.
Do not write generated build JSON into the gitignored pack build directory during author-test.
Add the missing committed task-mode DSL source for builtin.hype at artagents/packs/builtin/hype.py if it is still absent.
Keep the canonical smoke plan deterministic and stdlib-only. It may use lightweight code steps that consume fixture stubs and write deterministic artifacts under task step directories; it must not require network access, media rendering, or external services.
Phase 3: Scratch Runner
Step 4: Create isolated project/run state (artagents/orchestrate/author_test.py)
Scope: Medium
Use TemporaryDirectory() for an isolated author-test workspace.
Create scratch/projects and a project slug such as author-test.
Seed a real project record before running steps:
If the fixture includes project.json, copy it into the scratch project.
Otherwise call the project creation helper, such as create_project("author-test", root=scratch_projects_root), so project-attached executor commands that call require_project() succeed.
Copy fixture files into a deterministic scratch fixture directory.
Start task-mode state in scratch by writing plan.json, active_run.json, runs/<run-id>/events.jsonl, and AGENT.md consistently with existing lifecycle expectations. Use cmd_start() only if it can be given the scratch projects root and scratch/real packs root without mutating pack state.
Use a deterministic run id such as author-test-run so normalization has less to strip.
Step 5: Drive the plan through peek_current_step() and gate_command() (artagents/orchestrate/author_test.py)
Scope: Large
Loop until peek_current_step() reports exhaustion.
For every iteration, re-read plan.json and events.jsonl, then ask peek_current_step() for the next dispatchable leaf. This keeps nested, repeat, and for-each cursor behavior aligned with the kernel.
Fail author-test if the subprocess return code is non-zero.
For AttestedStep:
Call gate_command(slug, step.command, [], root=scratch_projects_root) directly in author-test mode. The gate-level hook will synthesize the ack; no lifecycle cmd_ack() call is required.
Call record_dispatch_complete(decision, 0) for symmetry, knowing it remains a no-op for attested steps.
Let gate_command() emit nested-enter/exit, repeat, item, produces-check, CAS, and attestation events.
Add a max-dispatch guard with a clear error message to prevent infinite loops in bad repeat plans.
Step 6: Propagate scratch and import env into all child commands (artagents/orchestrate/author_test.py)
Scope: Medium
During in-process gate calls and child subprocess execution, set:
Build subprocess env from child_subprocess_env() plus these overrides so nested python3 -m artagents ... --project author-test calls gate and write inside scratch.
Proactively prepend the repository root to child PYTHONPATH while preserving any existing PYTHONPATH, because subprocesses run with cwd=scratch_workspace and python3 -m artagents is not importable from arbitrary directories in this checkout.
Keep cwd=scratch_workspace for fixture-relative code-step behavior; rely on PYTHONPATH for imports and ARTAGENTS_PROJECTS_ROOT for output isolation.
Add a focused test that runs a code step equivalent to python3 -m artagents --help from scratch cwd and proves it imports via the injected PYTHONPATH.
Ensure the env override context is restored after author-test exits, including failure paths.
Phase 4: Gate-Level Auto Approval
Step 7: Implement author-test attested approval at the gate boundary (artagents/core/task/gate.py, artagents/core/task/events.py, optional artagents/core/task/env.py)
Scope: Medium
Add an ARTAGENTS_AUTHOR_TEST env helper, ideally near other task env helpers.
In _dispatch_attested(), detect ARTAGENTS_AUTHOR_TEST=1 before normal identity validation.
In author-test mode, accept the bare expected attested command (step.command) for the current cursor and synthesize identity without requiring --agent or --actor args.
For ack.kind == "agent", synthesize attestor_kind="agent", attestor_id="author-test".
For ack.kind == "actor", synthesize attestor_kind="actor", attestor_id="author-test" and bypass the normal ARTAGENTS_ACTOR equality and self-ack checks only for this author-test branch.
Add optional source support to make_step_attested_event() and make_item_attested_event().
Emit source: "author_test" on synthetic author-test step_attested and item_attested events.
Leave normal cmd_ack() and non-author-test gate_command() behavior unchanged; missing identity still fails outside author-test mode.
Add helpers for normalizing a single event object and an entire JSONL file.
Strip volatile fields recursively where appropriate: ts, timestamp, hash, run_id, pid, and direct runtime identifiers that tests show are unstable.
Normalize absolute path strings under the scratch run directory to <RUN_DIR>/<rel>.
Normalize absolute path strings under the scratch fixture directory to <FIXTURE_DIR>/<rel>.
Preserve structural fields such as kind, plan_step_id, plan_step_path, decision, attestor_kind, attestor_id, source, produces/check fields, and stable CAS artifact hashes.
Strip hash-chain hashes rather than recomputing them. Document that normalized goldens are comparison artifacts, not appendable hash-chained logs.
Emit deterministic JSONL using sorted keys and compact separators.
Step 9: Compare and regenerate goldens (artagents/orchestrate/author_test.py)
Scope: Small
After the scratch run completes, normalize its events.jsonl.
Read and normalize the golden if it exists, so legacy raw goldens still compare reliably.
Return 0 when normalized actual and normalized golden match.
Return 1 on drift and print a unified diff with stable labels for expected and actual files.
With --regenerate, write the normalized actual events to the resolved golden path, return 0, and print a confirmation telling the author to commit the regenerated golden only if intentional.
If the golden is missing and --regenerate is not set, return non-zero with a direct recovery command using --regenerate.
Phase 6: Canonical Hype Smoke Fixture
Step 10: Add canonical smoke fixture and golden (artagents/packs/builtin/hype/fixtures/smoke/, artagents/packs/builtin/hype/golden/smoke.events.jsonl)
Scope: Medium
Add a minimal fixture under artagents/packs/builtin/hype/fixtures/smoke/.
Prefer text/JSON stubs over binary media to keep tests fast and dependency-free, unless existing code already provides a tiny safe audio fixture.
Generate artagents/packs/builtin/hype/golden/smoke.events.jsonl using the new --regenerate flow.
Ensure python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke passes from a clean checkout without a manual compile step.
Commit only source fixture/golden files and DSL source; do not commit scratch runs or generated pack build output.
Phase 7: Tests
Step 11: Replace scaffold coverage with Phase 9 tests (tests/)
Scope: Large
Update or replace tests/test_author_test_scaffold.py because missing-golden Phase 5 scaffold behavior is no longer expected.
Add tests/test_author_test_pass.py to run author-test against builtin/hype/fixtures/smoke and assert it passes against the committed golden.
Add tests/test_author_test_drift.py to copy the pack/fixture/golden to a temp pack, corrupt the golden, and assert exit 1 plus unified diff output.
Add tests/test_author_test_regenerate.py to run with --regenerate in a temp pack and assert the golden is rewritten as normalized JSONL.
Add tests/test_author_test_auto_approval.py to assert missing identity still fails outside ARTAGENTS_AUTHOR_TEST=1, while author-test mode records source: "author_test" for actor and agent attested steps.
Add scratch-isolation coverage proving a subprocess python3 -m artagents ... --project author-test sees ARTAGENTS_PROJECTS_ROOT=<scratch/projects> and does not write to the default projects root.
Add project-record coverage for a project-attached command path so require_project() succeeds inside scratch.
Add import-path coverage proving a scratch-cwd subprocess can run python3 -m artagents --help because the author-test child env prepends the repo root to PYTHONPATH.
Add fixture-layout coverage for both orchestrator-scoped and pack-root fallback layouts.
Keep broader lifecycle tests such as tests/test_lifecycle_ack.py and tests/test_task_kernel_e2e.py passing unchanged.
Execution Order
Update CLI parsing/help and fixture path resolution first; this makes the requested command shape testable.
Add clean-checkout build fallback and the missing builtin.hype DSL source before building the canonical fixture.
Implement scratch project/run setup with ARTAGENTS_PROJECTS_ROOT and repo-root PYTHONPATH child env propagation.
Add gate-level author-test auto-approval and event source tagging.
Add normalization, comparison, and regeneration.
Add the canonical hype smoke fixture/golden.
Replace scaffold tests and add targeted regression tests for drift, regeneration, auto-approval, scratch isolation, import path, fixture layout, and project record creation.
Validation Order
python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke --regenerate in a clean checkout-style state with no pack build artifact.
"version": 3,
"timestamp": "2026-05-05T09:52:35Z",
"hash": "sha256:c83265edd9539596d12103bb130cf9a41ea8bf16b3bdfe46912cad7f069aa997",
"changes_summary": "Updated the plan to proactively prepend the checkout root to child subprocess PYTHONPATH while keeping subprocess cwd and all project outputs in scratch. Added explicit import-path test coverage so python3 -m artagents works from the author-test scratch cwd.",
"flags_addressed": [
"correctness-4",
"correctness"
],
"questions": [],
"success_criteria": [
{
"criterion": "python3 -m artagents author test --pack builtin --orchestrator hype --fixture smoke exits 0 from a clean checkout without a manual precompile step.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "The canonical smoke fixture and golden live at artagents/packs/builtin/hype/fixtures/smoke/ and artagents/packs/builtin/hype/golden/smoke.events.jsonl.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "Author-test exits 1 and prints a unified diff when normalized actual events drift from the golden.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "--regenerate rewrites the resolved golden file with normalized current events and returns 0.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Attested steps are auto-approved only when ARTAGENTS_AUTHOR_TEST=1 is active at the gate boundary, and synthetic attestation events include source: \"author_test\".",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Actor attested steps pass in author-test mode without requiring ARTAGENTS_ACTOR self-ack behavior, while normal actor ack validation remains unchanged outside author-test mode.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "All author-test child subprocesses receive ARTAGENTS_PROJECTS_ROOT=<scratch/projects> and do not write to the default project root.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Author-test child subprocesses can run python3 -m artagents --help from scratch cwd because the child env prepends the checkout root to PYTHONPATH.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "The scratch runner creates or copies a valid project.json before running project-attached executor commands.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The event normalizer strips timestamps, run ids, pid fields, absolute scratch paths, and hash-chain hashes while preserving structural event fields and stable CAS hashes.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "python3 -m artagents --help and canonical CLI tests advertise/accept the new author test --pack --orchestrator --fixture form.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "The implementation remains stdlib-only and adds no new package dependencies.",
"priority": "must",
"requires": [
"parse_diff",
"read_files"
]
},
{
"criterion": "The new tests and existing test suite pass with .",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "The author-test runner is split out of enough that CLI code remains parser/dispatcher glue.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Golden fixture commands are deterministic, quick, and avoid real media/network work unless explicitly required.",
"priority": "should",
"requires": [
"run_tests",
"subjective_judgment"
]
}
],
"assumptions": [
"The implementation remains additive and keeps the legacy positional form as an alias.",
"Author-test may compile a missing pack build artifact into a scratch path, because pack build outputs are gitignored and the stop-condition command must work without a manual precompile step.",
"The canonical smoke fixture uses deterministic stubs instead of real media unless existing tests prove a tiny media fixture is already safe and dependency-free.",
"Golden files store normalized JSONL rather than raw hash-chained event logs.",
"Hash-chain fields are stripped in normalized goldens rather than recomputed.",
"Author-test auto-approval is intentionally implemented at because that is the event write boundary for attested steps.",
"The fixture resolver supports orchestrator-scoped layout first and pack-root layout as a compatibility fallback.",
"Child subprocesses should keep for fixture-relative behavior, and use repo-root plus scratch for imports and output isolation."
],
"delta_from_previous_percent": 5.95,
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "verifiability-0",
"concern": "Criterion 12: requires human verification (subjective_judgment).",
"status": "open",
"severity": "minor"
},
{
"id": "verifiability-1",
"concern": "Criterion 13: requires human verification (subjective_judgment).",
"status": "open",
"severity": "minor"
},
{
"id": "correctness-4",
"concern": "Author-test subprocess imports: code-step subprocesses run with cwd=scratch_workspace, but python3 -m artagents is only importable from the repository root in this checkout unless PYTHONPATH includes the repo root.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness",
"concern": "Are the proposed changes technically correct?: Import path: I tested python3 -m artagents --help from the repository root and from /tmp; it succeeds from the repo root but fails from /tmp with No module named artagents. The revised plan runs code-step subprocesses with cwd=scratch_workspace and says to set PYTHONPATH only if tests prove imports fail, but repository-local commands like python3 -m artagents executors run ... will fail in the scratch cwd unless the helper proactively includes the checkout root in PYTHONPATH or runs subprocesses from the repo root while keeping outputs isolated.",
"status": "addressed",
"severity": "significant"
}
]
code
Known accepted debt grouped by subsystem:
{}
Escalated debt subsystems:
[]
Debt guidance:
These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
Prefix every new concern with a subsystem tag followed by a colon, for example Timeout recovery: retry backoff remains brittle.
When a concern is recurring debt that still needs to be flagged, prefix it with Recurring debt: after the subsystem tag, for example Timeout recovery: Recurring debt: retry backoff remains brittle.
code
Your output template is at: /Users/user_c042661f/Documents/reigh-workspace/.megaplan-worktrees/phase-9-allcodexhigh-20260505/all-codex-high/.megaplan/plans/phase-9-allcodexhigh-20260505/critique_output.json
Read this file first — it contains 5 checks, each with a question and guidance.
For each check, investigate the codebase, then add your findings to the findings array for that check.
Each finding needs:
"detail": what you specifically checked and what you found (at least a full sentence)
"flagged": true if this describes a difference, risk, or tension — even if you think it's justified. false only if purely informational with no possible downside.
Every check must end with at least one finding. Never leave a findings array empty. If you found no issue, add one detailed flagged: false finding explaining what you checked and why it appears clear.
When in doubt, flag it — the gate can accept tradeoffs, but it can't act on findings it never sees.
Good: {"detail": "Checked callers of nthroot_mod in solveset.py line 1205 — passes prime moduli only, consistent with the fix.", "flagged": false}
Good: {"detail": "The fix handles empty tuples but not single-element tuples which need a trailing comma.", "flagged": true}
Bad: {"detail": "No issue found", "flagged": false} ← too brief, will be rejected
Bad: {"detail": "The hints suggest approach X but the plan uses Y. However Y is consistent with X's intent.", "flagged": false} ← a different approach than the hints IS a flag. You found a divergence — flag it. The gate decides if it's acceptable.
After filling in checks, add any additional concerns to the flags array (e.g., security, performance, dependencies).
Use the standard format (id, concern, category, severity_hint, evidence). This array can be empty.
Workflow: read the file → investigate → read file again → add finding → write file back. Repeat for each check.
This is critique iteration 3. The template file includes prior findings with their status. Verify addressed flags were actually fixed, re-flag if inadequate, and check for new issues introduced by the revision.
code
Additional guidelines:
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Over-engineering: prefer the simplest approach that fully solves the problem.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids`: list flag IDs from prior iterations that the revised plan actually resolves (e.g., if the plan was revised to fix FLAG-001, and you confirm the fix is correct, include "FLAG-001"). Only include flags you've verified — don't guess.
- Verify that the plan follows the expected structure when validator warnings or the outline suggest drift.
- Additional flags may use these categories: correctness, security, completeness, performance, maintainability, other.
- Focus on concrete issues, not structural formatting.
peek_current_step()
gate_command()
ARTAGENTS_PROJECTS_ROOT
PYTHONPATH
Not yet included in a published release.
tests/test_author_test_drift.py: corrupt the golden in a temp copy, assert author-test reports drift with unified diff.
tests/test_author_test_regenerate.py: run with --regenerate, assert golden file is rewritten.
tests/test_author_test_auto_approval.py: assert auto-approval only fires when ARTAGENTS_AUTHOR_TEST=1.
pytest tests/
cli.py
author test <pack>.<orchestrator> --fixture <name>