feat: dossier parser + spec validation for AGENTS.md (lib/dossier.sh) #464
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 13 minutes 29 seconds
Due date
igor
13 minutes 29 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#464
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the machine half of
docs/agents-md-spec.md(on master as of today). Read that spec first — it is the authoritative contract; this ticket summarizes, the spec governs.Deliverables
lib/dossier.sh— the dossier parser:dossier_get <checkout_dir> <key>— echoes the value for<key>from the rootAGENTS.mdMetadata block; empty + nonzero when absent. Extraction rule per spec: the FIRST fenced code block after the literal heading## Metadata, parsed as flatkey: valuescalar lines (grep/awk only — no yaml dependency).dossier_keys <checkout_dir>— lists the keys present.AGENTS.md, read the same logical keys from legacyagent.json(url←.smoke.url,feedback-csv←.feedback.csv) so existing consumers can switch todossier_getwithout behavior change during migration.lib/repo-checks.sh/bin/validate-repo.sh) — implement the spec's "Validation contract" section exactly:AGENTS.md→ legacy validation path, NOT a failure (migration gate).## Metadatalast with exactly one fenced block of flat scalars; closed key vocabulary;typealways required;urlrequired for site types (arcade,game,content,api,personal); H1 equalsurlhost with leadingwww.stripped; KPI entries carry a measurement source (separator--, en/em dash, or comma) or the section is exactly(none yet); nestedAGENTS.mdfiles contain no## Metadata.bin/test-dossier.sh(added to the suite the same way as the otherbin/test-*.sh): happy path, each validation failure mode above, the absent-vs-nonconforming gate, the agent.json fallback, and a fixture with a nested prose-only AGENTS.md.Explicitly OUT of scope (follow-up tickets)
bin/onboard.sh).dossier_get(they keep readingagent.jsondirectly for now; the fallback in deliverable 1 is what makes the later cutover a one-line change per call site).Notes for the implementer