Skip to content

Detect and re-sync imported agent-instruction docs when their source changes #13

Description

@ivklgn

Problem

Imported agent-instruction docs (from CLAUDE.md, AGENTS.md, .cursorrules, etc.) carry imported + source:<slug> tags and an "Imported from <path> on <date>" pointer, but nothing detects or re-syncs when the source file changes afterwards. plugins/archcore/skills/audit/lib/drift-detection.md has no imported/source: handling, so even the assumed "/archcore:audit --drift covers it" fallback is not actually wired. Imported stubs silently diverge from their sources.

Expected result

  • Detection: /archcore:audit --drift flags imported docs whose source:<slug> file changed (git mtime vs. recorded import date).
  • Correction (stretch): an /archcore:init --refresh-driven assisted re-import.

Impact

Keeps imported instructions trustworthy over time instead of quietly going stale, so agents don't act on outdated conventions.

Proposed approach (small PRs)

  • Add an imported-doc drift category to drift-detection.md (detection).
  • Add assisted re-import via /archcore:init --refresh (correction).

Acceptance criteria

  • --drift flags an imported doc after its source file is modified.
  • Re-import updates the doc through MCP and refreshes the recorded import date.

References

Design rationale: .archcore/plugin/zero-content-onboarding-implementation.plan.md (Out of scope) and magic-first-day-init.plan.md. Code: plugins/archcore/skills/init/lib/agent-files.md, plugins/archcore/skills/audit/lib/drift-detection.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:onboarding/archcore:init and first-run experiencearea:skillsIntent skills and agentspriority:P2Valuable follow-upsize:M1-3 days

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions