software-factory AGENTS.md

software-factory AGENTS.md is an instructions file for Codex, OpenCode from nicolasmelo1/software-factory. It costs 2,050 tokens per session, scanned A, original, MIT.

Repository guidance for Software Factory, a project that checks software rules and development workflows. It defines preparation steps and requirements for rules, fixtures, documentation, and verification.

In plain words
What is it for?
Use it before changing the project, especially when adding or editing a skill, rule, mutation fixture, interview decision, or template, and when running its verification commands.
Why use it?
It helps ensure that a new rule is documented, testable, and actually enforced rather than appearing correct only on paper.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/nicolasmelo1/software-factory/agents-md
Clone the repo
git clone --depth 1 https://github.com/nicolasmelo1/software-factory

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for software-factory AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nicolasmelo1/software-factory/agents-md.svg)](https://agentmods.dev/instructions/nicolasmelo1/software-factory/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/nicolasmelo1/software-factory/agents-md"><img src="https://agentmods.dev/badge/instructions/nicolasmelo1/software-factory/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,050 This file is loaded in full into every session.
When invoked 2,050 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02050 $0.02050
Opus 5 $0.01025 $0.01025
Sonnet 5 $0.00410 $0.00410
Haiku 4.5 $0.00205 $0.00205

Measured today against content hash fdd7ccec3124, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

software-factory AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent instructions

This repository is a software factory harness. It holds itself to the method it ships.

Before changing anything

  1. Read docs/method.md. The layering is not arbitrary and the ordering (L1/L4/L5 first, L0 after the third occurrence of a pattern) is the load-bearing advice.
  2. Run sf verify before sf check. A check that no longer fires makes every green run meaningless, and it is the cheaper failure to find.

Hard rules

  • A rule needs why and fix. The catalog refuses to load without them, and L4.EVERY_RULE_HAS_A_WHY fails when enforcement and prose come apart. A new rule means a new section in docs/rules.md in the same commit.
  • A rule needs a mutation fixture, in every language it claims. Add it to src/fixtures.rs in the same change, then sf fixtures. L5.EVERY_CHECK_HAS_A_MUTATION_TEST fails without one, and sf verify fails both if the fixture does not trip the rule and if it trips it in only some of the languages the rule declares a query for.
  • A rule must be pointed at something, or switched off in writing. L5.NO_INERT_RULE fails an enabled lock with no scope, a hazard rule with no tools, a structural rule with no query for any language this repository declares, or an instance whose when names a dependency version the manifest no longer declares. Disabled with a reason in docs/rules.md is honest; enabled and inert is a rule lying about its own coverage.
  • Prose may only name commands this sf accepts. L4.RULE_PROSE_NAMES_A_REAL_COMMAND reads every sf ... a rule's statement, why or fix quotes and compares it with the clap definition in src/main.rs, so a fix written against a subcommand that does not exist yet fails the check. Ship the command in the same change, or name the one that exists. A unit test does the same sweep over the whole shipped catalog, including the rules this repository has switched off.
  • Never widen a rule to make a finding disappear. If a rule is wrong, argue it in the prose and change it deliberately. Silently loosening a glob is indistinguishable from a fix at the diff level, which is exactly the failure mode this repository exists to catch.
  • Never hand-edit a digest or a lock. Run sf lock or sf seal <gate>. That now includes .software-factory/catalog.lock.json, which records the reach of every enabled rule so that L2.CATALOG_ONLY_TIGHTENS can tell an upgrade that strengthened a rule from one that weakened it. Re-locking to clear that finding without reading it is the move the rule exists to make expensive.
  • Never weaken the policy to go green. L2.FACTORY_CONFIG_IS_LOCKED will notice the edit and L2.POLICY_ONLY_TIGHTENS will notice its direction. If a rule genuinely needs loosening, that is a pull request about the rule, with the reasoning in the body — not a line inside a change about something else.
  • Order of operations after touching the guardrail: sf fixtures, sf docs, sf ratchet, then sf lock last. The lock covers the ratchet, so locking before re-seeding leaves the build red.
  • Rule ids are a public contract. Every repository that adopted this tool pinned them. Renaming one is a breaking change.

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +1 lines · +17 tokens per session fdd7ccec3124
  2. 4d ago First seen · 147 lines · 2,033 tokens per session scan A 718fcbccf8b2

Subscribe to this mod's changes

software-factory AGENTS.md is an instructions file published in the GitHub repository nicolasmelo1/software-factory (30 stars, last pushed today), licensed MIT. It adds 2,050 tokens to every session, about $0.0103 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens