Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/bitwikiorg/init.md/llms.txt

Use this file to discover all available pages before exploring further.

init.md is designed to be machine-readable — an AI agent can read the root protocol or a selected template directly and execute the six stages without special parsing or tooling. The Markdown file is the instruction. The agent inspects the target, determines what applies, creates and configures only what the target requires, validates the result, and reports the operational state.

How agents use init.md

Agents follow the same six-stage procedure as human practitioners. The key properties of correct agent execution are:
  • Agents read the Markdown file directly — no special parsing is required. The protocol body is structured prose with clear stage headings and a small instruction vocabulary.
  • During INSPECT, agents determine whether agent instructions are applicable — not every target needs an AGENTS.md file. The decision is made during inspection, not assumed before it.
  • Agents select the appropriate template based on the target type — the same five canonical templates are available: minimal, dry run, development project, agent, and server.
  • Agents create only what applies — they do not install generic files into every project. Outputs are conditional on what the target actually requires.

The AGENTS.md decision

The most common point of incorrect agent behavior with init.md is treating AGENTS.md as a universal output. The correct conditional logic is:
  • Inspect whether an AGENTS.md file already exists in the target
  • Preserve valid existing instructions — do not overwrite a well-authored instruction file
  • Create an AGENTS.md file only when it would materially improve operation and none exists
  • Derive the contents from the actual target — its purpose, tools, expected inputs and outputs, and operating constraints
  • Do not install a generic AGENTS.md into every project
  • Different projects should have different AGENTS.md files
The agent init template (templates/agent_init_protocol.md) provides the complete procedure for targets where agent instructions are the primary initialization concern. For other targets, the AGENTS.md decision is one conditional step within the broader procedure.

Example agent instructions

These instructions can be placed in a prompt, task file, or agent instruction set to invoke the init.md procedure:
Initialize this repository using the development-project template.
Inspect this server using the server template in dry-run mode.
Determine what this agent workspace needs to become operational.
Create an AGENTS.md file only if this project would benefit from one.

What agents should NOT do

The INSPECT stage requires relevant inspection, not exhaustive scanning. Agents executing init.md should avoid the following:
  • Do not scan unrelated files without reason — stay within the target boundary unless another location is directly referenced
  • Do not install generic instruction files across all projects — agent artifacts are useful only when they materially improve operation
  • Do not declare success without a relevant validation step — validation must be derived from the target, not assumed complete
  • Do not impose server checks on non-server targets — each template’s validation scope applies only to the target types it describes
  • Do not overwrite substantial user-authored work without clear reason — prefer adaptation over replacement; identify conflicts before changing them

Validation from an agent’s perspective

Agents validate by checking conditions that are relevant to the target and the selected template. Depending on the target, validation may include:
  • Instruction files are target-specific and internally consistent
  • Required files exist at expected paths
  • Tools or providers are accessible where validation is permitted
  • Startup path, prompts, and expected outputs are clear
  • Commands execute without errors
  • Dependencies resolve correctly
  • Configuration parses without errors
The result is reported using one of the four standard states: OPERATIONAL, OPERATIONAL_WITH_WARNINGS, BLOCKED, or DRY_RUN_COMPLETE.
Different targets should have different agent instructions. Nested projects may require nested AGENTS.md files.

Build docs developers (and LLMs) love