Summary
AAMF writes useful observability artifacts today, but the runtime/agent/command logs and generated artifacts are spread across mixed top-level directories. This issue defines and implements a normalized directory layout for clearer operations, retention, and troubleshooting.
Problem
Current outputs are functional but harder to navigate at scale:
- Mixed log classes in a mostly flat
logs/ layout.
- State files, runtime artifacts, and reports are not consistently grouped by purpose.
- Cleanup/retention operations are harder to target safely.
Goals
- Make runtime outputs predictable and self-describing.
- Separate state, logs, artifacts, and reports.
- Preserve backward compatibility for existing readers/scripts during migration.
Proposed Target Layout
Within .aamf/migration/{projectName}/:
state/
checkpoint.json
checkpoint.backup.json
run-manifest.json (optional summary metadata)
logs/runtime/
logs/agents/{agent}/{taskId}/
- per-invocation stdout/stderr logs
logs/commands/{build|test}/
artifacts/contexts/
artifacts/results/
- structured sidecar result JSONs
artifacts/planning/
- planning outputs (
groups.json, tasks-*.json, etc.)
artifacts/parity/
- parity/final parity reports
artifacts/adjudication/
reports/
progress.md
observability/ report outputs
metrics/
invocations.jsonl, summary.json
Proposed Scope
- Centralize path derivation in one helper/module to avoid drift.
- Update runtime/orchestrator/context-builder/logger/agent-launcher to write to normalized paths.
- Add temporary compatibility shims (read from old paths when new path missing).
- Update README and fixtures/tests for new layout.
- Ensure keepArtifacts and reset behaviors continue to work correctly.
Acceptance Criteria
Test Plan
- Unit tests for path helper mappings.
- Integration tests verifying directory tree creation and expected file placement.
- Backward-compat tests: old-path artifacts still readable after upgrade.
Notes
This issue focuses on filesystem contract normalization only. Functional migration behavior should remain unchanged except for path locations.
Summary
AAMF writes useful observability artifacts today, but the runtime/agent/command logs and generated artifacts are spread across mixed top-level directories. This issue defines and implements a normalized directory layout for clearer operations, retention, and troubleshooting.
Problem
Current outputs are functional but harder to navigate at scale:
logs/layout.Goals
Proposed Target Layout
Within
.aamf/migration/{projectName}/:state/checkpoint.jsoncheckpoint.backup.jsonrun-manifest.json(optional summary metadata)logs/runtime/migration.loglogs/agents/{agent}/{taskId}/logs/commands/{build|test}/artifacts/contexts/artifacts/results/artifacts/planning/groups.json,tasks-*.json, etc.)artifacts/parity/artifacts/adjudication/reports/progress.mdobservability/report outputsmetrics/invocations.jsonl,summary.jsonProposed Scope
Acceptance Criteria
logs/*subtrees.state/and continue to load/save atomically.Test Plan
Notes
This issue focuses on filesystem contract normalization only. Functional migration behavior should remain unchanged except for path locations.