Claude/Agents MD files

The host-instructions setup agent. It idempotently ensures a host application's two root agent-instruction files — CLAUDE.md (the real, canonical file) and AGENTS.md (a relative symlink that resolves to it) — so one set of bytes serves both Claude Code and the wider AGENTS.md tool ecosystem with zero drift. It is an operation-layer op-card: you start it by sending its prompt path directly, it is not routed through the orchestrator or the stage pipeline, and at end-of-run it records its work as an operation_record job born complete in 4_done/. Run it whenever you want to create or refresh those files on a host.

All request types

Source of truth: the registry row in _processes/_shared/request-types.md, the agent prompt _processes/00_app/claude-agents-md-files.prompt.md, and the committed baseline packet _processes/00_app/_shared/claude-agents-md-files-baseline.md.

The flow

claude-agents-md-files runs outside the per-job pipeline. It first resolves the host root (the host project at ../ when installed, the repo root in standalone mode) and runs its self-target guard, then surveys the host read-only for the facts a good canonical CLAUDE.md needs (project identity, build & test commands, conventions, directory map, existing instruction files). It consults the committed baseline packet and re-validates current web guidance, generates a fresh CLAUDE.md candidate, then applies the locked regenerate-with-confirmation policy — create freely when missing, ask before replacing any divergent file — establishing AGENTS.md as a relative symlink to CLAUDE.md (or a user-selected real-copy fallback). Finally it authors an operation_record job born complete in 4_done/ so the run is tracked like every other action.

What it is for

claude-agents-md-files exists to give a host project a clean, current, single-source pair of root agent-instruction files. AGENTS.md is the open agent-instructions standard read by a wide ecosystem of tools; CLAUDE.md is Claude Code's auto-loaded project-memory file (which does not natively read AGENTS.md). Keeping AGENTS.md as a relative symlink to the canonical CLAUDE.md (always the main one) means both audiences read the same bytes, with zero drift.

It does not touch app.md or config.json. Unlike app-init / app-update, this op-card's product is the host's root CLAUDE.md + AGENTS.md — not the workflow's own host-context files.

The logic

claude-agents-md-files sits in the operation layer with shape op-card. Like the other op-cards it is direct-invoked: you send its prompt path yourself and it runs immediately. It is not orchestrator-routed and never enters the stage pipeline.

The fields

An op-card carries no stage, gate, or action config. claude-agents-md-files is selected in the intake form only as a copy-the-prompt-path card; there is no ## Stages, no ## Approval gates, no ## Action block, and no ## Per-stage config. It is not a job you configure — it is an agent you run.

Its "inputs" are the host project it surveys, the committed baseline packet it consults, the current web guidance it re-validates, and your answers at any conflict point. Its "outputs" are the host's two root instruction files (and, at end-of-run, its own tracked operation_record folder).

What claude-agents-md-files writes (source: _processes/00_app/claude-agents-md-files.prompt.md)
ArtifactTracked?What it holds
CLAUDE.md (host root)committedThe real, canonical agent-instructions file (always the main one) — concise, host-specific (identity, build & test commands, conventions, directory pointers, do's/don'ts), validated against the baseline + current web guidance, secret-free.
AGENTS.md (host root)committedA relative symlink to CLAUDE.md (or, by user selection, a real copy of it). One set of bytes, zero drift.
jobs/4_done/<op-slug>/committedThe end-of-run operation_record job (its own JOB.md + PROGRESS.md + 09_action/action-report.md) recording which files were generated/symlinked, the host root resolved, the self-target outcome, any user asks, and the web-validation sources + confidence.

How to run it

claude-agents-md-files is an op-card: there is no intake to drop and no orchestrator to route it. Send the prompt path directly to a fresh Claude Code session.

Copy this path and send it to a fresh Claude Code session.
Copy this path
_processes/00_app/claude-agents-md-files.prompt.md
Two invocation modes — copy blocks show the workflow-internal path (bare _processes/...); prefix with _code_workflow/ when your cwd is the host project root. See How to use → Two invocation modes.

See also