Comprehensive artifact maintenance — validates log naming, decision format, plan syntax compliance, staleness detection, and ensures the artifact corpus is parseable.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Comprehensive artifact maintenance — validates log naming, decision format, plan syntax compliance, staleness detection, and ensures the artifact corpus is parseable.
Validate Artifacts
Mental Model
Artifacts are the project's institutional memory. Logs capture what happened, decisions capture why, plans capture what's next. They must be well-formed so future agents can parse and learn from them. Malformed artifacts are technical debt — they look like documentation but can't be consumed by tools.
Artifacts live alongside code. When code changes and artifacts don't, staleness accumulates. A stale artifact is worse than no artifact — it actively misleads.
Note: superseded decisions should reference their replacement
Note: Non-standard statuses (e.g., open — architectural fork, not yet decided) should be flagged as warnings, not errors
## Context — what situation prompted this decision
## Decision — what was decided
## Rationale — why this option over alternatives
## Alternatives Considered — table of alternatives with rejection reasons
## Consequences — what this decision enables and constrains
## References — links to paper sections, log entries, related decisions
Integrity:
No duplicate DEC numbers
Status should be valid enum value
Superseded decisions should reference their replacement
3. Plans (artifacts/plans/)
Structure:
artifacts/plans/
├── research-plan.md # Top-level research plan
├── music-sim-plan.md # Feature-specific plan
├── pending/ # Plans being worked on
│ └── TASK-*.md # Active task plans
└── completed/ # Archived plans (optional directory)
Naming: Descriptive names for top-level plans (research-plan.md, music-sim-plan.md). Pending plans use TASK-*.md convention.
Content structure — validated against plan_md.py parser:
Must have # Task: <title> header (or # Research Plan: ... for legacy plans)
Must have ## Problem Statement section
Must have ## Phases section
Must have ## Completion Criteria section
Steps MUST be flat lists (no nesting)
Phase numbers must be sequential starting from 1
Annotations (**Notes:**, **Warning:**, **Blocked:**) go after steps, not inside them
Critical violations (will break parser):
Nested checkboxes (- [ ] subtask under another checkbox)
Non-sequential phase numbers (e.g., Phase 1 then Phase 3)
Bullets or numbered lists inside annotation text
Invalid phase format (e.g., ### Phase One: instead of ### Phase 1:)
Integrity:
No orphaned plans (plan references non-existent files)
Completion state is consistent (all steps marked done = plan should be archived)
4. README (artifacts/README.md)
Must exist
Should describe the artifact structure
Should be up-to-date with actual directory contents
5. Staleness Detection
Compare artifact age against code changes to detect drift:
Log staleness: If a log references a notebook that has been modified since the log was written, flag it
Decision staleness: If a decision references a file path that no longer exists, flag it
Plan staleness: If a plan references files or steps that have changed, flag it
Cross-reference integrity: If a decision references logs/YYYY-MM-DD_slug.md and that file doesn't exist, flag it
Auto-Fix Capabilities
Fix log naming
# Find misnamed logsfor f in artifacts/logs/*.md; dobasename=$(basename"$f")
if ! echo"$basename" | grep -qP '^\d{4}-\d{2}-\d{2}_[a-z0-9_-]+\.md$'; thenecho"MISNAMED: $basename"# To fix: rename to YYYY-MM-DD_slug.mdfidone
Fix decision naming
# Find misnamed decisionsfor f in artifacts/decisions/*.md; dobasename=$(basename"$f")
if ! echo"$basename" | grep -qP '^DEC-\d+_[a-z0-9_-]+\.md$'; thenecho"MISNAMED: $basename"fidone
Fix plan syntax (manual)
Nested checkboxes → flatten to separate steps or move to **Notes:**
Non-sequential phases → renumber sequentially
Invalid phase format → change ### Phase One: to ### Phase 1:
# Check log filenames (should produce no output):for f in artifacts/logs/*.md; dobasename=$(basename"$f")
if ! echo"$basename" | grep -qP '^\d{4}-\d{2}-\d{2}_[a-z0-9_-]+\.md$'; thenecho"STILL BAD: $basename"fidone# Check decision filenames (should produce no output):for f in artifacts/decisions/*.md; dobasename=$(basename"$f")
if ! echo"$basename" | grep -qP '^DEC-\d+_[a-z0-9_-]+\.md$'; thenecho"STILL BAD: $basename"fidone# Check plan parseability:# Use plan_read() tool for each plan file# Check for empty files:
find artifacts/ -name "*.md" -empty -type f
Report Format
STATUS: [no_work | fixed | stale | errors]
CHANGES:
- artifacts/logs/2026-06-24_experiment.md: Renamed from bad-name.md
- artifacts/decisions/DEC-001_use-sam.md: Added missing Rationale section
- artifacts/plans/research-plan.md: Flattened nested checkboxes
STALENESS:
- artifacts/logs/2026-04-13_aversion-layer-run1.md: References notebooks/01_train_aversion_layer_local.py (modified since log)
- artifacts/decisions/DEC-003.md: References logs/2026-04-15_foo.md (file not found)
ERRORS:
- artifacts/decisions/DEC-006.md: Missing required section "Alternatives Considered"
- artifacts/plans/pending/TASK-foo.md: Phase numbers non-sequential (1, 3)
DETAILS:
{Detailed explanation of each issue and fix}
Tool Integration
Use these tools when working with artifacts:
plan_read(plan_name) — Validate plan parseability
plan_complete_step(plan_name, step_id) — Mark plan steps complete
plan_archive(plan_name) — Archive completed plans
log_write(agent, title, category, body) — Write new log entries