agentleFS
Space-DinosaursSpace-Dinosaurs/DinoStack/.codex/AGENTS.md

DinoStack

AGENTS.md14 starsChanged 12 days agoApache-2.0View on GitHub

This file binds the agentic engineering runtime for every Codex session in this repository. The full methodology (delegation, risk classification, activation preflight, Skeptic loop, quality gates, agent definitions) loads separately, on trigger, via the dinostack-codex skill - see "Load the methodology on trigger" below. Before following any operational instruction below, establish these bindings in order: 1. Preserve the absolute invocation directory, then bind AE_PROJECT_DIR to its repository root (git rev-parse --show-toplevel) when it is inside a Git repository, otherwise to…

The file

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

5 rules. About 0 are common, 3 are distinctive, and 2 are 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.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before following any operational instruction below, establish these bindings in order:

    line 10
  2. Very specific:

    After those checks, bind AE_REPO_DIR to that physical repository root.

    line 25
  3. Very specific:

    When an explicit config source selected the Codex directory, bind AE_ACTIVATION_CONFIG to agentic-engineering.json beneath that directory.

    line 27
  4. Distinctive:

    If any binding cannot be established exactly, fail closed before executing the methodology.

    line 35
  5. Distinctive:

    When the activation preflight resolves a provisional effective identity, surface this notice at the first user-facing turn - non-blocking:

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Agentic Engineering Protocol

This file binds the agentic engineering runtime for every Codex session in this repository. The full methodology (delegation, risk classification, activation preflight, Skeptic loop, quality gates, agent definitions) loads separately, on trigger, via the dinostack-codex skill - see "Load the methodology on trigger" below.

Codex runtime binding preamble

Before following any operational instruction below, establish these bindings in order:

  1. Preserve the absolute invocation directory, then bind AE_PROJECT_DIR to its repository root (git rev-parse --show-toplevel) when it is inside a Git repository, otherwise to that verified absolute invocation directory. Do this before changing directories.
  2. Select the active Codex config directory from the first non-empty runtime source in this order: AGENTIC_CONFIG_DIR, then CODEX_HOME, then the standard Codex config directory beneath a validated absolute HOME. Require the selected path to resolve to a real current-user-owned directory that is not group/world writable, then bind AE_CODEX_CONFIG_DIR to it. Profile identity operations use only the already-validated $AE_CODEX_CONFIG_DIR runtime binding; the active profile identity file is $AE_CODEX_CONFIG_DIR/identity.yml.
  3. Inspect AGENTS.md beneath that selected config directory without following an unchecked final path. Require the installed entry to be a symlink whose physical target is the regular .codex/AGENTS.md file beneath a repository candidate whose content/SKILL.md, .codex/ directory, and executable bin/ds-codex-dispatch form the DinoStack repository signature. After those checks, bind AE_REPO_DIR to that physical repository root. Never infer it from the process working directory.
  4. When an explicit config source selected the Codex directory, bind AE_ACTIVATION_CONFIG to agentic-engineering.json beneath that directory. On the standard default install, bind AE_ACTIVATION_CONFIG to agentic-engineering.json beneath the standard shared Claude config directory under the validated HOME. Require the activation file to be a real, current-user-owned regular file that is not group/world writable.
  5. Then bind AE_SHARED_CONFIG_DIR to the validated real parent directory of that activation file. It must be current-user-owned and not group/world writable.

If any binding cannot be established exactly, fail closed before executing the methodology. These rules mirror the native-skill resource-resolution contract and prevent project paths, repository resources, and shared user configuration from being conflated. After locating the validated dispatcher, evaluate the same contract with $AE_REPO_DIR/bin/ds-codex-dispatch runtime-bindings "<absolute-invocation-directory>" and accept its JSON bindings only when they match the paths established above.

Note: This file is auto-generated by $AE_REPO_DIR/.codex/build.sh. Do not edit it directly - edit the source files in content/sections/ (methodology) or content/rules/ (other rules) instead.

For detailed protocol specs (Skeptic loop, subagent protocol, agent team), see the reference docs in ~/.agents/skills/dinostack-codex/references/ (installed globally) or $AE_REPO_DIR/.codex/references/ (tracked relative symlinks to ../../content/references/*.md).


Activation preflight (pointer)

Run the activation preflight once at the first skill invocation (and every /-command), before any other operational instruction: identity resolution, opt-in/opt-out check, and profile resolution. Its full procedure is Step 1 of the loaded methodology - invoke the dinostack-codex skill below and follow it before proceeding. Do not spawn or use LLM reasoning for this step; it is a direct resolver call.

Identity confirmation (provisional handle)

When the activation preflight resolves a provisional effective identity, surface this notice at the first user-facing turn - non-blocking:

IDENTITY: tracking handle '<handle>' auto-derived (provisional) - confirm or correct.
Telemetry is buffered (not lost) until confirmed.
  Confirm (global/project): ds-identity confirm --scope <global|project>
  Correct (global/project): ds-identity init <handle> --force --scope <global|project>
  Show (profile): ds-identity show --scope profile --profile-dir "$AE_CODEX_CONFIG_DIR"
  Confirm (profile): ds-identity confirm --scope profile --profile-dir "$AE_CODEX_CONFIG_DIR"
  Correct (profile): ds-identity init <handle> --force --scope profile --profile-dir "$AE_CODEX_CONFIG_DIR"

Profile commands use the active config binding; add --profile-dir <dir> only when absent. The notice re-surfaces until confirmation. Full contract: $AE_REPO_DIR/content/commands/ds-identity.md.

Load the methodology on trigger

Before starting any task, check if the dinostack-codex skill should be loaded: code edits, debugging, testing, deployment, architecture decisions, git operations, agent orchestration, code review, refactoring, dependency management, or project setup. If any signal matches, invoke it ($dinostack-codex) before proceeding - it carries the activation preflight, delegation model, risk classification, Skeptic loop, quality gates, agent definitions, and every reference doc. When in doubt, invoke it.


Protocol Reference

For detailed protocol specs, see the reference docs:

  • skeptic-protocol.md - Skeptic loop orchestration, findings classification, sign-off format
  • subagent-protocol.md - Parallel spawning rules, worktree isolation, task decomposition
  • agent-team.md - Named agent roles, composed flows, decision rules
  • design-goals.md - System design principles and goals

These live in ~/.agents/skills/dinostack-codex/references/ (global install) or $AE_REPO_DIR/.codex/references/ (tracked relative symlinks to ../../content/references/*.md).

For command templates (ds-skeptic, ds-implement-ticket, ds-wrap, etc.), see $AE_REPO_DIR/.codex/commands/.

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.