Skip to content

Agent instruction files follow STD-10 - #22

Merged
danieljhkim merged 1 commit into
agent-mainfrom
orbit/ORB-27028-bf341f84
Nov 23, 2026
Merged

danieljhkim merged 1 commit into
agent-mainfrom
orbit/ORB-27028-bf341f84

Conversation

@orbit-agent-01

Copy link
Copy Markdown
Contributor

Task

ORB-27028 — Agent instruction files follow STD-10

Description

What was found

Measured on 2026-11-22: AGENTS.md is 5,178 bytes with no bullet over 500 characters, and CLAUDE.md is a symlink to it, so the three mechanical limits pass. Two things matter because every new CLI repository starts from this file:

  • The rule "Update affected docs in the same PR as the code. Stale docs are a review blocker." has no limit for the instruction file. In scribe, which began as a copy, it led 39 commits to extend the introduction into a 13,431-character build history. Add the R11 limit here so copies inherit it.
  • The managed standards block sits above ## Rules; R9 puts it last.

Read the rest against R3 to R6. Keep whatever the template's own checks and operations/scripts/new-rust-cli.sh in the umbrella expect of this file.

The standard

STD-10 (agent instruction files), version 1, is in the constellation umbrella at docs/standards/STD-10-agent-instruction-files/STD-10.md (commit d40a4f6), with the reason for each rule in why.md beside it. Daniel approved it on 2026-11-22 and asked for every instruction file to be refactored to it ("we will refactor all of our AGENTS.md that way"). The rules, in short:

  • R1. AGENTS.md is the one source file in a directory. CLAUDE.md and GEMINI.md, where present, are a symlink to it, or a file whose first line is @AGENTS.md and whose other lines are rules for that provider alone. No second copy.
  • R2. A subdirectory has its own file only for rules that apply there alone, and it repeats nothing from a file above it.
  • R3. Every line is something an agent would get wrong or could not find without it. Four kinds of content only: what the repository is (the introduction); rules the code does not show; the commands to run and when; pointers to the document that owns a subject.
  • R4. Present tense, the repository as it is now. No history: what a past change added or removed, phase, slice or version narratives, dates of features. A rule may end with one reference to the incident behind it.
  • R5. No inventory of what the tree shows: modules, source files, commands, flags, formats, configuration keys.
  • R6. A rule that a standard, a document or a file above already states is linked, not restated.
  • R7. A title, then an introduction of at most three sentences.
  • R8. Below it, bullets under ## headings, one rule per bullet; no bullet or paragraph over 500 characters.
  • R9. The sections Rules, Branching, Gates, Code, Tests keep these names and this order where they exist; the project's own sections follow; a tool-managed block (the adopted standards list) is last.
  • R10. At most 8,000 bytes at the root and 4,000 in a subdirectory, counting the source file and any import file beside it.
  • R11. A change edits the instruction file only when it adds, changes or removes a rule, a command or a pointer. Describing a new feature goes in the feature's docs.
  • R12. A change that removes what a rule is about deletes or rewrites the rule.
  • R13. Every relative link and named path resolves.

This task does not vendor STD-10 into docs/standards/; that comes through the standards sync. Do not edit docs/standards/ or the text inside the managed constellation-standards block; moving the whole block is allowed.

Acceptance Criteria

  • In every directory with an instruction file, AGENTS.md is a regular file, and each CLAUDE.md or GEMINI.md beside it is a symlink to it or starts with the line @AGENTS.md (STD-10 R1).
  • wc -c of the root AGENTS.md plus any import file beside it is at most 8,000, and at most 4,000 for each subdirectory's (R10).
  • Outside code fences and the managed standards block, no bullet or paragraph in an instruction file exceeds 500 characters (R8).
  • The introduction is at most three sentences, and the file holds no history and no inventory of modules, source files, commands or formats (R4, R5, R7).
  • Sections follow R9: Rules, Branching, Gates, Code, Tests where they exist, the project's own after them, the managed standards block last.
  • No rule is dropped by pointing at a standard or a document in general. For each rule or fact removed from an instruction file, the execution summary names the file and heading, or the STD-nn §Rn, that states it today, checked by reading it. A rule stated nowhere else stays in the instruction file, or moves into the named document in the same change. The byte budget is a ceiling, not a target: a repository-specific rule the code does not show stays (R3).
  • Every relative link and every repository path the instruction files name resolves (R13).
  • The repository's rule about updating docs with code says that an instruction file is edited only when a rule, a command or a pointer in it changes (R11).
  • sh docs/standards/check.sh passes.

Execution Summary

Click to expand

Result: AGENTS.md refactored to STD-10 v1 (single file: only AGENTS.md changed; CLAUDE.md remains a symlink). Read as: the umbrella STD-10 text (docs/standards/STD-10-agent-instruction-files/) applied to this file, with R3 to R6 read against this repo's standards, ARCHITECTURE.md and Makefile.

CRITERIA

  1. R1 pass: AGENTS.md is a regular file; CLAUDE.md -> AGENTS.md; no GEMINI.md; no subdirectory instruction files.
  2. R10 pass: root AGENTS.md 6,016 bytes (no import file), budget 8,000.
  3. R8 pass: longest bullet/paragraph outside the managed block is 371 characters.
  4. R4/R5/R7 pass: intro is 2 sentences; no history; file/module inventory removed (see map).
  5. R9 pass: Rules, Branching, Gates, Code, then the managed block last.
  6. Removal map below.
  7. R13 pass: every relative link and backticked repo path resolves (checked by script).
  8. R11 pass: the docs bullet now says an instruction file is edited only when a rule, a command or a pointer in it changes; a new feature goes in its own docs.
  9. sh docs/standards/check.sh: OK.

MAP OF REMOVED OR CHANGED STATEMENTS (rule text kept unless noted)

  • Managed block moved from the top (line 5) to the end. Byte-identical to HEAD (cmp). R9.
  • Gates paragraph converted to three bullets (R8). Removed the parenthetical "(fmt, structure, documentation and standards checks)": the contents of ci-fast are in the Makefile ci-fast target and in make help. R5.
  • Code bullet "tmpl-cli-core is the domain...": removed the file names note.rs, query.rs, cli.rs, app.rs, audit_middleware.rs and the CLI-crate responsibility list. Stated today in ARCHITECTURE.md: Layers table tier 1 (tmpl-cli-core::note, ::query, no I/O), tier 2 (store is the only core module touching the filesystem), tier 3 (tmpl-cli::app), tier 4 (tmpl-cli::cli, ::commands, ::audit_middleware, ::output). Kept: no clap, no terminal crate, no environment reads (ARCHITECTURE "Module rules" and "Crates" banned list). The "large noun becomes a directory with one file per verb" rule is not in ARCHITECTURE; kept as its own bullet with a full path.
  • "Exit codes: 0 ok, 1 failure, 2 usage." replaced by "Exit codes follow STD-01 R20", which states 0 success, 1 command failure, 2 usage error. R6.
  • Pointers added, text kept: STD-02 R6 (crate/edge update), STD-03 R20 (host state), STD-04 R1/R2 (regression test), STD-02 R21 (behaviour tests), STD-02 R8/R9 (visibility, workspace deps), STD-02 R19/R20 (unit tests), STD-01 R23 (internal ids), STD-03 R5/R6 (store writes), STD-04 R16 (handoff), STD-01 R31 (read-only commands), STD-01 R12 and STD-02 R15 (stdout), STD-02 R13/R15/R27/R28 and STD-03 R1 (lints), STD-01 R10, STD-02 R16 and STD-03 R23 (contracts, UPGRADES), STD-02 R10 to R12 (errors).
  • Path rewrites, no meaning change: "store/format.rs::UPGRADES" is now a full repo-relative link to crates/tmpl-cli-core/src/store/format.rs; "commands//" placeholder replaced by "a directory there"; link label "tests/support" changed to "test support" so the label is not a path; backtick removed from the generic word tests.

JUDGEMENT CALLS

  • R11 sentence sits in the docs bullet as acceptance criterion 8 asks. It is written in this file because STD-10 is not vendored here, so no link to it can resolve (R13).
  • R8: only Gates was split into bullets. Pre-existing multi-sentence bullets were kept, not split.
  • "No narrowing as (STD-02 R28)": R28 states the rule for operator input; checks.md lists the cast lints under R28. Cited as R28; a reviewer may prefer checks.md.
  • The managed block contains the placeholder path docs/design//4_decisions.md. It is managed and was not edited.
  • Intro, Branching, the CHANGELOG bullet, the authorized-scope bullet and the make ci bullet are unchanged; they state repo-only facts.

VALIDATION (run in this worktree)

  • make ci-fast: passed (exit 0): fmt-check, structure, standards-check, docs-check.
  • make ci-lint: passed (exit 0): clippy --all-targets -D warnings; cargo-deny advisories, bans, licenses, sources ok.
  • make goldens: passed (exit 0): 3 of 3.
  • sh docs/standards/check.sh: passed (OK).
  • git diff --check: clean.
  • Not run: none. No task.final_validation_commands in the envelope.

RECONCILIATION

  • Baseline at HEAD b3d2772: clean. Now: git status --short shows only " M AGENTS.md". No untracked files; no stray artifacts.
  • context_files unchanged (file:AGENTS.md); no selector changes needed.
  • Deviation: I did the orbit.task.show re-read after the first edit and validation, not before (the terminal-task guard then reported in-progress, terminal false). Disclosed.
  • Transient comparison files were written to /tmp for the managed-block cmp, then deleted; not task artifacts.
  • No friction filed; no contradictions found that cost >10 minutes.

Validation

  • Not reported

Branch Freshness

  • Base ref: refs/remotes/origin/agent-main
  • Head ref: orbit/ORB-27028-bf341f84
  • Behind base: 0
  • Ahead of base: 1

Orchestrated-By: fable

Result: AGENTS.md refactored to STD-10 v1 (single file: only AGENTS.md changed; CLAUDE.md remains a symlink). Read as: the umbrella STD-10 text (docs/standards/STD-10-agent-instruction-files/) applied to this file, with R3 to R6 read against this repo's standards, ARCHITECTURE.md and Makefile.

Orbit-Task: ORB-27028
Orchestrated-By: Orchestrated-By: fable
@danieljhkim
danieljhkim merged commit 8552415 into agent-main Nov 23, 2026
2 checks passed
@danieljhkim
danieljhkim deleted the orbit/ORB-27028-bf341f84 branch November 23, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants