feat: make devai guideline files marker-based and fully user-overridable#124
Merged
Merged
Conversation
devai now writes every agent guideline file (AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, junie/guidelines.md, .cursor/rules/marko.mdc) through a marker-aware GuidelinesWriter that: - creates the file with <!-- BEGIN/END marko:devai --> markers when absent - rewrites only content between the markers on update; user content outside is preserved byte-for-byte - backs off untouched, with a loud notice, when the markers are removed, so a user can take full ownership of any file Other changes: - core.md: drop dead .claude/ links, curate to behavior-shaping rules (no-traits, interface-over-driver, constructor-injection, config-as-truth), point depth at the search_docs MCP tool; AGENTS.md is now tool-agnostic - AgentsMdRenderer no longer emits a standalone generated-by header (the marker carries that semantics now) - InstallationOrchestrator drains GuidelinesWriter notices into the install log - fix stale tests/PackagingTest.php: exempt the skeleton project template from the .gitignore export-ignore rule (it intentionally ships its .gitignore) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes
marko/devai-generated AI guideline files portable across tools, single-sourced, and fully user-overridable — fixing the original bugs whereAGENTS.md/CLAUDE.mdwere clobbered on every run and shipped dead.claude/links into every generated project.What changed
AGENTS.md,CLAUDE.md,GEMINI.md,.github/copilot-instructions.md,junie/guidelines.md,.cursor/rules/marko.mdc) now routes through a new staticGuidelinesWriter:<!-- BEGIN marko:devai -->/<!-- END marko:devai -->markers when absent;core.mddrops the dead.claude/links and is curated to behavior-shaping rules (no-traits, interface-over-driver, constructor-injection, config-as-truth), pointing depth at thesearch_docsMCP tool. No static reference docs are shipped (they would drift against the MCP/LSP)..mdcfrontmatter stays valid — markers wrap only the body, never the leading---.AgentsMdRendererno longer emits a standalone generated-by header (the marker carries that semantics);InstallationOrchestratordrainsGuidelinesWriternotices into its log.tests/PackagingTest.phpthat blanket-required every package to export-ignore its.gitignore, contradicting the deliberateskeletonbehavior (commit 0ad6e90) of shipping its.gitignoreto generated projects — the project template is now exempted.Testing
Full suite green: 6935 passed, 0 failed. devai package: 217 passing.
Follow-up (not in this PR)
Live
search_docsranking could not be validated in-session (no MCP connected). A separate audit will run the greenfield query matrix against the live MCP and decide whether to adopt thedocs-vechybrid driver overdocs-fts.🤖 Generated with Claude Code