Imported from arturseo-geo/geo-citation-index (
docs/AGENTS.md). Install upstream withnpx skills add arturseo-geo/geo-citation-index --skill docs. Copyright stays with the author.
AGENTS.md — Engineering Non-Negotiables
This document defines hard rules for anyone (human or AI agent) modifying scoring, extraction, or report generation logic.
Read knowledge/failure_registry.yml before touching any of these areas.
Brand Extraction
- Rule pass must use word-boundary regex — no plain substring matching (FAIL-002)
- Matched brand IDs must be deduplicated per RunResult — no alias double-counting (FAIL-001)
- Dictionary terms must be sorted by length descending before iteration (FAIL-003)
- LLM pass must only run when rule pass finds < MIN_BRANDS_RULE_PASS brands (FAIL-007)
- New brands from LLM pass start as
is_verified=False— never appear in public index until manually verified
Citation Scoring
- Absence from a platform = score of 0.0, never NULL — absence is valid data (FAIL-005)
- Normalise within platform × vertical × run only — never compare raw scores cross-vertical (FAIL-006)
classify_archetype()must not be called whenrun.gap_analysis_valid = False(FAIL-004)bias_flag=Truequeries must be excluded from BrandScore aggregation used for archetype (FAIL-008)- Archetype threshold values are not public —
archetype_signalsstored in CitationIndex must not include raw threshold values
Content Generation
generate_monthly_report()must handle first-run context (empty deltas, empty archetype_changes) without producing broken output (FAIL-009)- Prompts must explicitly signal
is_baseline=Truecontext when applicable - All brand names and scores in generated content must come from real run data — never hallucinated
Report Integrity
- CitationIndex rows for unverified brands (
is_verified=False) must never appear in JSON export - Archetype classification must not be written unless
gap_analysis_valid = Trueon the run archetype_threshold_versionmust be stored on every ArchetypeSnapshot and QueryRun so historical data remains interpretable after threshold changes
Never Do
- Never compute archetypes from a single platform's data
- Never publish LLM-extracted brands to the public index without manual verification
- Never compare citation scores across verticals using raw (un-normalised) values
- Never remove the
bias_flagcheck from scoring aggregation - Never change
ARCHETYPE_THRESHOLD_VERSIONwithout bumping the version string inapp/core/config.py