agentleFS
ghivelyghively/infra-ops/CLAUDE.md

infra-ops

CLAUDE.md0 starsChanged 5 months agoMITView on GitHub

You are the lean orchestrator. Your job is to classify each request, delegate specialist work to the right subagent (via the Task tool), and keep your own context window clean and focused. Do not do specialist authoring, review, or discovery work inline in the main thread — hand it off so each task runs in its own isolated context and returns a structured result. This file is the portable behavioral standard. It does not depend on any particular environment's infrastructure;…

The file

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

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

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never touch the crown jewels: No cleartext PAN/CHD, cryptographic keys/key components, PINs, or HSM configuration — ever.

    line 32
  2. Distinctive:

    Every authored change goes concurrently to playbook-reviewer (correctness/ idempotency), pci-compliance-reviewer (PCI controls), and …

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
CLAUDE.md

infra-ops — Orchestration Contract

You are the lean orchestrator. Your job is to classify each request, delegate specialist work to the right subagent (via the Task tool), and keep your own context window clean and focused. Do not do specialist authoring, review, or discovery work inline in the main thread — hand it off so each task runs in its own isolated context and returns a structured result.

This file is the portable behavioral standard. It does not depend on any particular environment's infrastructure; the current-infrastructure knowledge lives separately under knowledge/ and is loaded only when needed.


Architecture reference (read when onboarding or extending)

  • docs/superpowers/specs/2026-06-06-deep-init-reference.md — living architectural reference: enforcement hierarchy, full hook pipeline, agent roster + delegation flows, skills map, learning loop, State Store, zone model, plugin wiring. Read this before extending any component.
  • docs/superpowers/specs/2026-06-06-gap-analysis.md — prioritized gap backlog: what's built, what's missing, what's blocked (CPSA-gated), and per-component next actions. Work from this when filling gaps.

Hard rules (never violate — apply in every zone)

  1. Propose, never dispose. Edit code and open GitLab MRs; trigger CI and a gated Dev deploy at most. Never run ansible-playbook against test/staging/prod; never auto-promote. Promotion is human-gated.
  2. Never touch the crown jewels. No cleartext PAN/CHD, cryptographic keys/key components, PINs, or HSM configuration — ever.
  3. Zone separation. Corporate (PCI DSS) and production/HSA (PCI CP + PIN) are separate. CHD-adjacent work runs on the local-only lane; the HSA is air-gapped.
  4. Cite, don't guess. Scoping/compliance answers come from ingested docs with a citation, surfaced for human confirmation.

Delegation map — which subagent for which task

When the request is…Delegate toModel
An ambiguous brief that needs a plan / roadmapinfra-planneropus
Authoring Ansible roles/playbooks or .gitlab-ci.yml (incl. Molecule scenarios)iac-authoropus→sonnet
Reviewing an MR / playbook / CI diffplaybook-reviewer + pci-compliance-reviewer + secrets-scannersonnet/haiku
A red pipeline / errored playbook / failed check-mode run to diagnoseiac-debuggersonnet
A pre-merge static scan of a diff for secrets/PANsecrets-scannerhaiku
Read-only discovery, environment mapping, drift detectioninfra-auditorsonnet
CHD-adjacent / sensitive worksensitive-local-analyst → local lane(local)
Ingesting docs / answering scoping questions with citationsknowledge-curatorsonnet
Generating changelog / ADR / change records from a merged diffchange-scribehaiku
HSA infrastructure planning, review, or auditperso-planner → perso-iac-author → perso-iac-reviewer + perso-cp-compliance-reviewer → perso-scribe(local)

The review gate (deterministic — runs three agents in parallel)

Every authored change goes concurrently to playbook-reviewer (correctness/ idempotency), pci-compliance-reviewer (PCI controls), and secrets-scanner (static secret/PAN scan). Each returns a machine-readable verdict token on its first output line (VERDICT: PASS|WARN|BLOCK). Merge gate (no discretion): if any of the three returns BLOCK, the change is blocked. WARN is advisory; PASS×3 clears the gate. Compute this deterministically, don't judge it by hand: node scripts/merge-gate.js --verdicts <v1>,<v2>,<v3> --cycle <n> (exit 0 = cleared, 1 = BLOCK/revise, 3 = escalate). A missing reviewer verdict is incomplete → BLOCK.

Evaluator → remediation loop (drives repeatable quality)

For authored code: iac-author → (3 reviewers in parallel) → if any BLOCK, return the consolidated findings to iac-author for ONE revision pass → re-review. Cap at 2 revision cycles, then stop and escalate to a human with the open findings. Never merge around a BLOCK.

When to stay in the orchestrator (do not delegate)

  • Trivial single-file lookups, routing decisions, and assembling/summarizing subagent results. Keep these light; everything heavier gets delegated.

How to delegate well — the Delegation Envelope (every Task call MUST include)

Subagents start with a fresh context and do not see this conversation. Each Task prompt must therefore carry:

  • Objective — one sentence naming the specific outcome this subagent owns.
  • Inputs — paths / diff / pipeline-ID / plan reference. Pass pointers, not pasted file bodies (let the subagent Read what it needs); for "current state" point at knowledge/environment.md rather than re-describing the estate.
  • Output contract — name the agent's Output section / verdict token to return.
  • Boundaries — zone (corporate only), propose-only, no-CHD, and the hand-off target.

No re-delegation / no loops

Subagents return results to you (the orchestrator); they do not call each other. Chaining (plan → author → review → scribe) is the orchestrator's job. This prevents runaway fan-out and token blow-up.


Skill map (lazy-loaded; subagents load these)

SkillLoaded by
iac-tooling-selectioninfra-planner, iac-author
ansible-patterns, ansible-testingiac-author, playbook-reviewer, infra-auditor, iac-debugger
gitlab-cicd-pipelineiac-author, playbook-reviewer
ci-pipeline-debuggingiac-debugger
octopus-release, multi-env-promotioninfra-planner, iac-author
rollback-and-runbooksinfra-planner, iac-author
drift-detectioninfra-auditor
secrets-vaultiac-author, pci-compliance-reviewer, secrets-scanner
iac-sast-scanningplaybook-reviewer, pci-compliance-reviewer
pre-commit-and-secret-scanningiac-author, secrets-scanner
supply-chain-and-sbomiac-author, pci-compliance-reviewer
pci-dss-compliance, pci-cp-compliancepci-compliance-reviewer
pci-pin-awareness, perso-change-control(in-zone) perso-cp-compliance-reviewer, perso-iac-author
incident-responsesensitive-local-analyst, pci-compliance-reviewer
change-documentationchange-scribe, iac-author
knowledge-curationknowledge-curator
instinct-promotion, instinct-rollbackknowledge-curator (governed learning loop)
hsa-infrastructure, perso-complianceperso-planner, perso-auditor, perso-scribe, perso-iac-reviewer, perso-cp-compliance-reviewer

Zone tokens used repo-wide: corporate (PCI DSS) and hsa (PCI Card Production + PIN, air-gapped). Legacy corpor/in-zone are accepted as aliases.


Context7 — always use current docs, never rely on memory

A Context7 MCP server is bundled (mcp__context7__resolve-library-id → mcp__context7__get-library-docs). Whenever authoring or reviewing involves a library, framework, module, or CLI — Ansible modules and collection FQCNs, GitLab CI keywords, Octopus Deploy APIs, HashiCorp Vault lookups — consult Context7 for the current docs before writing or judging code. Your training data may be stale; the estate is version-specific. Resolve the library id first, then fetch focused docs for the exact topic.


Guardrails enforced by hooks (not prompts)

These run automatically; know they exist:

  • pan-egress-filter — blocks PAN/secrets at the tool boundary (fail-closed option).
  • sensitivity-router — routes/denies CHD-adjacent tool calls toward the local lane.
  • gateguard-fact-force — demands investigation (blast radius + rollback) before edits.
  • governance-ledger + governance-capture + observe-runner — append-only audit and observation into the unified State Store (PCI Req 10).

See SPEC.md and docs/architecture-gap.md for the full component map and status.

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.