agentleFS
jonathan-vellajonathan-vella/apex/AGENTS.md

apex

AGENTS.md220 starsChanged 2 months agoMITView on GitHub

Python deps (diagrams and apex-recall) install automatically via the dev container's post-create.sh. Setup details: https://apexops.pro/getting-started/azure-setup/ Microsoft employees must fully exit all VS Code windows, connect to the approved corporate network/VPN as required, then launch VS Code from the host with the CFS package feeds before starting the container: On Linux, macOS, or WSL, run bash .devcontainer/open-microsoft.sh instead. The launcher is not for a VS Code integrated terminal or an already-running VS Code process; see .devcontainer/README.md. Install only versions whose upstream…

  • Installs packages
  • Commits and pushes

The file

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

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Very specific:

    Never bypass quarantine using public registries or ms-feed-* browsing URLs.

    line 39
  2. Distinctive:

    Follow source selection and private native capture.

    line 120
  3. Very specific:

    All outputs → agent-output/{project}/.

    line 135
  4. Distinctive:

    Keep necessary full-text captures private outside Git unless redistribution rights and attribution are established.

    line 191

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

APEX

Setup Commands

# Clone the Accelerator template
# https://github.com/jonathan-vella/apex-accelerator
git clone https://github.com/YOUR-USERNAME/my-infraops-project.git && cd my-infraops-project
# Microsoft employees: use the host launcher below before opening the container.
# Everyone else: code . then F1 → Dev Containers: Reopen in Container.

npm install                              # Node.js deps (validators, linting)
npm run setup                            # Azure + GitHub OIDC/secrets/RBAC

Python deps (diagrams and apex-recall) install automatically via the dev container's post-create.sh. Setup details: https://apexops.pro/getting-started/azure-setup/

Microsoft employees must fully exit all VS Code windows, connect to the approved corporate network/VPN as required, then launch VS Code from the host with the CFS package feeds before starting the container:

.\.devcontainer\open-microsoft.ps1

On Linux, macOS, or WSL, run bash .devcontainer/open-microsoft.sh instead. The launcher is not for a VS Code integrated terminal or an already-running VS Code process; see .devcontainer/README.md.

Install only versions whose upstream artifacts are at least seven days old, through CFS-approved sources. Microsoft maintainers keep package managers on packagefeedproxy.microsoft.io for corporate laptops/dev boxes, or an approved team-owned Azure Artifacts feed, and opt the dev container in with APEX_NPM_REGISTRY_HOST_PATH and APEX_PIP_INDEX_HOST_PATH; the dev container uses public registries otherwise. Automated builds and CI require an authenticated CFS-compliant feed. Standing exception (history in #794, closed as not planned): no authenticated CI feed exists and none is planned, so hosted CI does not meet this requirement. Every hosted job, including the dev container validation job, installs from the public registries (no workflow configures a feed or sets the opt-in variables). The exception does not extend to dev boxes or local builds. Never bypass quarantine using public registries or ms-feed-* browsing URLs. Verify age and feed availability before changing pins; missing versions or metadata are not permission to bypass these requirements. These CFS and quarantine rules are Microsoft's supply-chain policy for its own maintainers' environments. Other users and organizations apply their own equivalent controls and can point the dev container at their own sources; see Package Sources.

Build & Validation

# Full validation suite
npm run validate:all

# Individual checks (most-used)
npm run lint:md                          # Markdown linting
npm run lint:json                        # JSON/JSONC validation
npm run validate:agents                  # Agent + prompt frontmatter, model alignment
npm run validate:agent-registry          # Registry shape (file path, optional legacy model, step)
npm run validate:iac-security-baseline   # TLS/HTTPS/Entra-only/no-public-blob baseline
npm run lint:safe-shell                  # No interactive shell prompts in committed snippets

# Full list → npm run | grep -E "^  (lint|validate|test):" or
# https://apexops.pro/reference/validation-reference/

# Pre-commit/pre-push hooks (installed via lefthook on `npm run prepare`)
git push                                 # Triggers diff-based-push-check.sh automatically

# IaC validation
bicep build infra/bicep/{project}/main.bicep && bicep lint infra/bicep/{project}/main.bicep
terraform fmt -check -recursive infra/terraform/ && npm run validate:terraform

Code Style

Code style (CAF naming, required tags, default region, AVM-first, unique suffix pattern) is documented in .github/skills/apex-azure-defaults/SKILL.md. Agents read that file as part of their mandatory skill load; this file no longer duplicates the tables.

Security Baseline

The non-negotiable security baseline (TLS 1.2 minimum, HTTPS-only, no public blob, no shared key, Managed Identity, Entra-only SQL, App Service HTTP/2, Container Registry admin disabled, MySQL/PostgreSQL SSL, no public network access for PaaS data services except the Azure Monitor allowance below, private App Service APIs, mandatory private DNS, no hardcoded secrets) is documented in .github/instructions/references/iac-policy-compliance.md. Log Analytics and workspace-based Application Insights may use authenticated public query/ingestion when effective policy and approved requirements permit it. AMPLS is not required by default; private-only monitoring requirements still apply. See the networking baseline. This is the source of truth for IaC validators (validate:iac-security-baseline) and the Architect / IaC Planner / CodeGen agents. Always cross-check 04-governance-constraints.md for subscription-level Azure Policy requirements that may add to the baseline.

Commit & PR Guidelines

Use Conventional Commits: <type>[optional scope]: <description>. Types: feat (feature), fix, docs, refactor, ci, chore. Scopes: agents, skills, instructions, bicep, terraform, mcp, docs, scripts. Run npm run lint:md and relevant validations before committing.

Agent Workflow

WAF-only requests use the explicit standalone assessment profile: evidence-only or requirements-led intake, required WAF/diagram/cost bundle, upfront scope and final acceptance. Internal owner handoffs and both quality reviews are automatic within granted scope. Completed assessments have no next Governance or implementation owner. Existing project history and review allowances are preserved by explicit adoption, never inferred from new defaults. The numeric delivery table below applies to infrastructure delivery, not assessment routing.

New recall projects use the practical workflow: existing stage approvals and independent lenses remain, with an initial and optional closure call per required artifact/lens inside actual granted scope. Legacy projects adopt explicitly; histories and exhausted allowances are never reset. Preliminary policy feasibility precedes final Architecture approval when read scope is available; it does not complete formal Governance. New delivery projects also use corp-policy-v1: explicit hash-bound shared Corp assumptions may support Architecture approval without target identifiers, but planning completion, CodeGen and deployment require current target-verified policy evidence. Existing projects adopt only through an actual source choice. Follow source selection and private native capture; do not require user-prepared scope JSON or publish identifying private evidence.

StepPhaseOutputReview
1Requirements01-requirements.md + sku-manifest.{json,md} (rev 1)1× comprehensive (mandatory)
2Architecture02-architecture-assessment.md + cost estimatecomprehensive + separate cost-feasibility (both mandatory; deep is opt-in)
3Design (opt)03-des-*.{py,png,md} diagrams and ADRsopt-in: 1× comprehensive on ADRs (skipped when no Step 3)
3.5Governance04-governance-constraints.md/.json1× governance-reconciliation (skip when no constraints)
4IaC Plan04-implementation-plan.md + 04-*-diagram.py/.png1× comprehensive (mandatory; opt-in: deep)
5IaC Codeinfra/bicep/{project}/ or infra/terraform/{project}/opt-in (default: skip)
6Deploy06-deployment-summary.mdnone (policy precheck folded in as informational H2)
7As-Built07-*.md documentation suite—
PostLessons09-lessons-learned.json/.md—

All outputs → agent-output/{project}/. Source of truth: .github/skills/apex-workflow-engine/templates/workflow-graph.json. The Orchestrator drives all steps with human approval gates. The unified 05-IaC Planner feeds dual IaC tracks: Bicep (06b/07b) and Terraform (06t/07t). Architecture also requires an independent cost-feasibility review in every mode. Rotating multi-pass reviews are an explicit opt-in via decisions.review_depth = "deep" (captured once per project by 01-Orchestrator) or via direct 10-Challenger invocation. Reviews target AI-generated creative decisions — not tool output (what-if/plan previews).

The sole supported runtime is the GitHub Copilot SDK harness inside VS Code. Canonical runtime rules: Copilot instructions. This entry-point safety summary does not replace them:

  • 01-Orchestrator is human-selected (disable-model-invocation: true); native tasks do not waive domain prerequisites or separate consequential approval.
  • Direct main agents own ask_user; delegated mains return forms to the interactive parent. Leaves cannot ask users or delegate. Cancel stops; decline never approves.
  • Independent reviews require actual attributed results and current evidence. Missing capability blocks; missing/empty output allows one identical-input retry within existing accounting, then human escalation. No self-review, nested wrapper or invented approval.
  • Skills inherit caller model/tools without granting permissions. Active definitions omit model pins; model telemetry is not a readiness gate and does not prove runtime cost-tier eligibility.
  • Native task results, essential agent-body constraints and separate human approvals remain required. Historical prompts are not active entry points; repository runtime hooks remain retired.

Mandatory challenger reviews are enforced at runtime, not just at commit. apex-recall complete-step and transition --complete refuse to mark Steps 1, 2, 3.5, or 4 complete when the gating challenge-findings-*.json sidecar is missing (exit code 2), has unresolved must-fix findings, mismatches the artifact/lens, or fails strict freshness validation. An intentional missing-review bypass requires --allow-missing-challenger --challenger-skip-reason "<text>" (invalid present evidence cannot use this bypass; npm run validate:challenger-presence provides a commit/CI fallback). Explicit later review selection (--governance-review, --plan-review), state/index recovery, and view schemas are documented in show-schema.md; non-production lab risk exceptions are documented in risk-authorizations.md.

Artifact lint is enforced by the lefthook artifact-validation pre-commit hook and the 10-Challenger review — agents do not call lint:artifact-templates or markdownlint-cli2 directly against agent-output/** (see .github/instructions/agent-authoring.instructions.md).

sku-manifest.{json,md} is created at Step 1 (user pins and, for existing workloads, evidenced observed-current SKUs — empty services[] remains valid after preference capture) and mutated through Step 7: Step 2 authoring, Step 3.5 read-only findings, Step 4 reconciliation + requires[] cross-check, Step 6 substitution on quota/region conflict (via the block-with-escalation pattern), Step 7 bidirectional drift detection. Authoring rules: .github/instructions/sku-manifest.instructions.md.

Conventions Detail

Third-party research belongs in source/date references and short original conclusions, not automatic whole-page copies. Keep necessary full-text captures private outside Git unless redistribution rights and attribution are established. Pricing's exact-byte retail API evidence requirement does not extend to commercial documentation pages; follow the documentation evidence contract.

For deeper guidance, agents read these on demand:

  • Bicep conventions: infra/bicep/AGENTS.md
  • Terraform conventions: infra/terraform/AGENTS.md
  • azd multi-project rules: .github/instructions/azure-yaml.instructions.md (auto-loaded for azure.yaml)
  • Terminal hygiene (no mv -i/rm -i/read -p, pipe long output to file): .github/instructions/no-interactive-shell.instructions.md (enforced by lint:safe-shell)
  • Azure defaults: .github/skills/apex-azure-defaults/SKILL.md
  • Workflow DAG: .github/skills/apex-workflow-engine/templates/workflow-graph.json
  • Full validation reference: https://apexops.pro/reference/validation-reference/

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.