Skip to content

feat(views): commit a reproducible front-door agent view (DEC-007) - #139

Merged
MCamner merged 2 commits into
mainfrom
feat/versioned-agent-view
Oct 14, 2026
Merged

MCamner merged 2 commits into
mainfrom
feat/versioned-agent-view

Conversation

@MCamner

@MCamner MCamner commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Summary

memory/learn/agent/mqobsidian.md is tracked and required by check-context-links.py, but no clean clone could reproduce it. It was built partly from gitignored memory/learn/repos/mqobsidian.md lessons and dated by the rebuild day. In the operator checkout it kept showing up as modified.

DEC-007 decides that a committed, generated agent view is built from committed sources only:

Path Policy
memory/learn/repos/*.md stays local and gitignored
memory/learn/agent/mqobsidian.md tracked, built from systems/mqobsidian/{hot,index}.md only
local views keep their "Relevant lessons"
CI rebuilds on a clean checkout and compares

Changes:

  • systems/mqobsidian/index.md declares agent_view: versioned. I put it in index.md rather than hot.md because hot.md sits exactly at its 80-line budget.
  • The view is regenerated. It drops the lessons section and the memory/learn/repos source, and generated: becomes 2026-09-17, the newest source updated:.
  • Public Safe Check gains "Check the committed agent view is reproducible". It runs mq-agent agent-views check --system mqobsidian with mq-agent installed from main. The step is declared CiOnly in check-gate-parity.py with its reason.
  • tests/test_versioned_agent_view.py is the local guard and needs no mq-agent. Every tracked view must belong to a marked system and cite only systems/<system>/ sources.
  • DEC-007 and a CHANGELOG entry are added.

Depends on mq-agent #395

The new CI step stays red until mq-agent #395 is merged. The generator on mq-agent main still includes the lessons and dates the view by the clock, so it reports this view stale. That is the expected red, not a defect.

Verification

  • Operator vault (with local lessons) and clean copy rebuild byte-identical views (cmp). agent-views check with #395 reports fresh.
  • python3 -m unittest discover -s tests: 230 tests OK (1 skipped). The new test also flags both problems in the main state.
  • validate-export, check-sensitive-content, check-token-budget, check-context-links, check-docs-freshness, check-agent-entrypoints, check-context-export-fresh, check-gate-parity (10 checks): pass
  • ruff (pinned): clean. markdownlint: 62 files, 0 issues.

Not covered here: "an export must never overwrite unrelated authored notes" is already guarded for the learn export by scripts/check-learn-namespace.py. The agent-view generator only writes inside memory/learn/agent/ (mq-agent contract rule 5).

🤖 Generated with Claude Code

memory/learn/agent/mqobsidian.md is tracked, but it was built partly from gitignored memory/learn/repos lessons and dated by the rebuild day, so no clean clone could reproduce it.

index.md declares agent_view: versioned. The view is rebuilt from hot/index only and dated 2026-09-17 from its sources. Public Safe Check reruns mq-agent agent-views check on the clean checkout; tests/test_versioned_agent_view.py guards the rule locally without mq-agent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MCamner
MCamner merged commit 31a00f4 into main Oct 14, 2026
2 checks passed
@MCamner
MCamner deleted the feat/versioned-agent-view branch October 14, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant