agentleFS
BhangeeF16BhangeeF16/kaizen/AGENTS.md

kaizen

AGENTS.md0 starsChanged 4 months agoMITView on GitHub

This file governs work inside this repository — kaizen, a self-contained Claude Code plugin that runs a full software delivery lifecycle for whatever project it is pointed at. It answers how an agent or engineer should operate here. It does not replace product knowledge, feature plans, decisions, or backend engineering rules, all of which live in their own repositories, external to this plugin. This plugin is installed independently of any specific product's workspace and may be composed alongside other, unrelated…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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
  1. Distinctive:

    Read this file first.

    line 41
  2. Distinctive:

    Read README for a friendly introduction and command usage examples.

    line 42
  3. Very specific:

    Search a deploying project's own knowledge with Grep/Glob (and graph/index.json for structured node lookup) only after loading canonical …

    line 45
  4. Distinctive:

    Search before creating new files.

    line 79
  5. Distinctive:

    Before accepting documentation or implementation work as complete, perform the acceptance audit the Acceptance Audit skill formalizes as a …

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Kaizen Agent Operating System

This file governs work inside this repository — kaizen, a self-contained Claude Code plugin that runs a full software delivery lifecycle for whatever project it is pointed at. It answers how an agent or engineer should operate here. It does not replace product knowledge, feature plans, decisions, or backend engineering rules, all of which live in their own repositories, external to this plugin.

This plugin is installed independently of any specific product's workspace and may be composed alongside other, unrelated repositories on the installing machine. Nothing in this document or this plugin's own files assumes a sibling directory, a specific host workspace layout, or any file outside this plugin's own boundary. Treat this document as complete and sufficient on its own.

Core Operating Principle

Prioritize correctness, evidence, and repository truth over agreement. Challenge assumptions, separate facts from inferences, and ask only when local context cannot resolve a material decision safely.

The Model

Three commands run every delivery process, each as a flat sequence of individually dispatched worker actions under one in-session orchestrator:

  • /develop — one feature target through the full SDLC (29 actions, 8 checkpoints).
  • /fix-bug — one defect through reproduce → isolate → minimal fix → verify → review → accept → learn.
  • /discover — requirements (and optionally design) without implementation, ending with a /develop continuation offer.

Each command live-injects its own commands/<name>.process.yaml (the flat action sequence) and agents/delivery-lead.md (the orchestrating persona the session itself wears — never dispatched). Worker actions dispatch as one Agent-tool call each, with the action's own skill (skills/<action-id>/SKILL.md) and the step's named persona as subagent_type. At every checkpoint the session loads the evidence-verification skill and gates in-session — a mechanical outputs-exist check, then a factual read against acceptance criteria, routed per that checkpoint's own routing entry in the currently-injected process definition. Human-in-the-loop is engaged at mandatory approval holds (visual design), at materially ambiguous checkpoint reads, and for every blocking question — relayed verbatim, never answered on the requester's behalf. Every run appends a journal at .kaizen/runs/<run-id>/journal.md, and ends (for /develop and /fix-bug) with the propose-only process_retrospective action reading that journal and proposing process improvements the human explicitly approves or rejects.

Startup Algorithm

  1. Read this file first.
  2. Read README for a friendly introduction and command usage examples.
  3. For delivery work, invoke the matching command (/develop, /fix-bug, /discover) — each resolves its target and reads its recorded state per the delivery-governance skill before dispatching anything.
  4. For a single action outside a run, invoke that action's own skill directly with the persona that owns it.
  5. Search a deploying project's own knowledge with Grep/Glob (and graph/index.json for structured node lookup) only after loading canonical context.

Directory Index

  • commands/ — the three process orchestrators and their flat process definitions: develop.md/develop.process.yaml, fix-bug.md/fix-bug.process.yaml, discover.md/discover.process.yaml.
  • agents/ — the 13 persona files: 11 dispatchable worker personas (business-analyst, solution-architect, ui-ux-developer, backend-developer, frontend-developer, db-administrator, code-reviewer, security-reviewer, qa-engineer, devops-ops, documentation-steward), the propose-only debrief, and delivery-lead — worn by the orchestrating session itself, never dispatched. Each persona carries its own domain lens: questions to challenge, review rules, stop conditions, required evidence, and a ## Capabilities section naming the tool-provider capabilities that role requires plus any optional composed skills.
  • skills/ — two kinds of content:
    • Action skills (one directory per worker verb, e.g. gather-requirements/, implement-slice/, reproduce-failure/) — each defines one dispatchable unit of work: its rules, result contract, and (for merged verbs) an arguments:-parameterized body where the action id (and, for write-document, a doctype/mode pair) selects the contract. Five are merged verbs serving multiple actions: implement-slice (backend/frontend implementation, minimal fixes), review-diff (correctness and security-pattern passes), review-evidence (the four verification judgments), record-evidence (the three durable-recording actions), write-document (drafting an ADR, filing a promoted requirement row, updating docs after a slice).
    • Meta-skills — evidence-verification (the delivery-lead's in-session checkpoint procedure — reads routing directly off the currently-injected process definition, carries no copy of its own), delivery-governance (the state contract), parallel-tracks (worktree-parallel dispatch), agent-conduct (the canonical capability-to-provider map, search strategy, and composable-skill registry — see Capability Model), reasoning, governance, documentation-standards, exec-plans-standard, init-workspace.
  • templates/ — the 19 approved-doctype skeletons write-document fills: fifteen graph-node types (ADR, business rule, functional/non-functional requirement, user story, entity, and so on — see templates/graph-schema.md) plus four non-graph doctypes (implementation plan, query, roadmap, test strategy).
  • hooks/ — mechanical guardrails: push authorization, worktree checkout guard, documentation quality gates, session-start nudge. All product-agnostic: no hook hardcodes a specific product's folder names, repository name, or path — see each script's own docstring for what, if anything, it reads from a deploying project's own .agent/workspace.map.yaml.
  • bin/ — bundled executables: kaizen.py (the CLI for the graph-native knowledge layer and run workspaces — graph {init,new,get,update,remove,deprecate,link,unlink,query,context,reindex} and run {init,advance,status,link-nodes}, thin argparse wrappers over kaizen_graph.py/kaizen_run.py), the hook scripts, and check-develop-run.py (mechanical run-journal verification).
  • CHANGELOG — the history of every significant change to this plugin.

Capability Model

This plugin names capabilities, never vendors. A capability is a thing an agent needs to do; a provider is whatever tool happens to supply it on the machine the plugin was installed on. The two are deliberately separated, because a provider that is absent on one machine must never make a rule unfollowable there.

The agent-conduct skill is the single canonical owner of three things, and the only place in this plugin where an outside tool or plugin may be named:

  • The capability-to-provider map — Repository Discovery, Semantic Search / Code Navigation, Structural Search, Text Search, Knowledge Retrieval, Execution, Context Optimization, Validation, each with preferred providers and an always-available fallback.
  • The search strategy — the order to climb (Knowledge Retrieval, Semantic, Structural, Text, minimal retrieval), stopping at the first rung that answers.
  • The composable-skill registry — reusable skills from other installed plugins that this plugin composes rather than restates. Every entry is optional; kaizen is fully functional with none of them installed.

Two axes get confused constantly and are kept apart deliberately. Tool-provider capabilities (the list above) select a tool, and agent-conduct owns them. Delivery capabilities — planning, implementation, refactoring, code review, security review, testing, documentation, architecture analysis — select a persona, and are owned by the files under agents/ and the action sequences in commands/*.process.yaml. Do not create a second taxonomy that mixes them.

Each persona under agents/ carries a ## Capabilities section naming only the capabilities that role actually requires, plus any optional composed skills. A persona never names a provider. Two rules bind every composition: a composed skill may shape how work is expressed but never overrides a stop condition, a required output, or a gate decision; and no output-compression capability is ever applied to evidence — run journals, run.yaml, verification output, and security findings are recorded verbatim.

Lifecycle Statuses

Allowed statuses for Markdown Knowledge Objects: Idea, Discovery, Requirements, Design, Approved, Implementation, Completed, Deprecated, Superseded, Archived — enforced mechanically by the documentation quality-gates hook. Superseded is for a decision record a later decision has replaced; Deprecated is for any other document being phased out without a named successor — see Documentation Governance. Delivery-run state is a separate thing, governed by the delivery-governance skill's state contract.

Knowledge Loading Rules

Search before creating new files. Preserve canonical owners and update links when moving knowledge. Retired documents are deleted only after unique knowledge is moved into the correct canonical owner. Every Markdown Knowledge Object must follow Documentation Standard — mechanically checked by the check-doc-quality-gates.py hook.

Retired Concepts

A concept is not retired until every reference to it is removed — in commands, skills, personas, and prose — in the same change that removes its backing files. Grep the full tree for the retired term before and after the retirement; the "after" pass returning nothing is the evidence that the retirement is complete.

Orchestration Rules

The state contract — .kaizen/runs/<run-id>/run.yaml (stage/step/role/result/blocking_questions/last_updated, written only via kaizen.py run advance), .kaizen/runs/<run-id>/journal.md, and the same-change-set rule — is owned by the delivery-governance skill. Use only declared action ids, checkpoint ids, and persona names from the process definitions; do not invent prose next steps. If an action or checkpoint reaches a blocked or material-unknown route, ask one focused required question and stop — do not continue without the answer. Security-sensitive actions must record security evidence before a checkpoint treats them as passing. Checkpoint gates and routing live directly on each checkpoint's own entry in that command's commands/*.process.yaml — there is no separate rulebook file; change routing there, and it takes effect the next time that file is injected.

Repository Structure Rules

Plugin content lives in commands/, skills/, agents/, hooks/, bin/, and templates/. Do not recreate the retired manifests/, processes/, stages/, competencies/, or tooling/ directories — their surviving content lives in the command process definitions and the persona files. templates/ is not retired — it holds the per-doctype skeletons write-document fills.

Portable Links And Paths

Documentation must not depend on one developer's local filesystem. Use Markdown links for prose references, reference-style links for repeated references, and anchor links for stable sections. Plain paths are allowed only in command examples and validation scans. Do not add Windows drive-root paths, user-profile paths, or Unix home paths anywhere in tracked content.

Critical Reasoning Policy

For every proposed change, identify assumptions, counterpoints, failure modes, and validation evidence. If a request is weak, contradictory, or risky, state that plainly and constructively before implementing it. Separate:

  • Facts: directly observed from files, commands, tests, or user decisions.
  • Inferences: conclusions drawn from facts that could be wrong.
  • Recommendations: proposed actions with tradeoffs.

Mandatory Acceptance Audit

Before accepting documentation or implementation work as complete, perform the acceptance audit the Acceptance Audit skill formalizes as a dispatched action: assumptions, missing dependencies, edge cases, alternative designs, risks, validation checklist, confidence assessment, outstanding questions.

Completion Checklist

A change is not complete until relevant manifests, metadata, cross-references, and generated indexes are refreshed or explicitly reported as not run, and — for a command-orchestrated run — the process definition's own completion.requires is satisfied item by item, mechanically checkable via bin/check-develop-run.py. Do not claim the knowledge base is accurate without fresh validation evidence.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.