brownfield-drift
Skill169 starsChanged 8 months agoMITView on GitHub
Enforces architecture boundaries defined in PLAN.md. Use when a PR crosses module/service boundaries, when the dev asks "are we following the architecture?", or as a scheduled architecture health check. Not for querying what a module does — use brownfield-chat for that.
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- module-audit-agentSkill
- onboard-dev-agentSkill
- pr-review-agentSkill
- codebase-intelSkill
- deploy-checklistSkill
- greenfieldSkill
- pr-reviewSkill
- standards-kitSkill
- wednesday-gitSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
No PLAN.md exists — drift requires machine-readable boundaries in PLAN.md
- Very specific: line 23
Run wednesday-skills drift via Bash tool
- Distinctive: line 32
If the project has no constraints block, add one to PLAN.md:
- Distinctive: line 65
Run on projects without machine-readable PLAN.md constraints
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to use
- Dev asks "are we following the architecture?" or "is this a valid change?"
- PR touches files near module boundaries or service interfaces
- Weekly architecture health check
- Any cross-service import was just added
When NOT to use
- "What does module X do?" → use brownfield-chat
- "What breaks if I change X?" → use brownfield-chat
- Graph coverage is low on a file → use brownfield-fix (it fills gaps before editing)
- No PLAN.md exists — drift requires machine-readable boundaries in PLAN.md
What to do
- Run
wednesday-skills driftvia Bash tool - Report violations with:
- The specific edge that violates the rule
- The commit that introduced it (when available)
- The suggested fix per PLAN.md intent
- For PR reviews: run
wednesday-skills drift --since <base-commit>to only report new violations - For a single rule:
wednesday-skills drift --rule <rule-name>
Adding constraints to PLAN.md
If the project has no constraints block, add one to PLAN.md:
{
"boundaries": [
{
"rule": "frontend-never-imports-db",
"description": "Frontend components must never import DB layer directly",
"from": "src/app/**",
"to": "src/lib/db/**",
"type": "forbidden"
},
{
"rule": "no-circular-deps",
"description": "No circular dependencies anywhere",
"scope": "**",
"type": "no-cycle"
}
]
}Violation types
| Type | What it catches |
forbidden | Import from A → B that should never exist |
ownership | Logic pattern appearing outside its designated owner |
no-direct-import | Direct import between services that should use API |
no-cycle | Circular dependency between modules |
Never
- Auto-fix boundary violations — always ask the dev first
- Flag existing violations on a PR that did not introduce them (use
--since) - Run on projects without machine-readable PLAN.md constraints
- Report the same violation twice in one review session
CLI reference
wednesday-skills drift # full check
wednesday-skills drift --rule frontend-never-imports-db # single rule
wednesday-skills drift --since abc1234 # new drift only (for PR review)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

