arch-enforce
Skill13 starsChanged 2 months agoMITView on GitHub
CI enforcement gate. Evaluates a validation/v1 result against the gate policy with the deterministic `archharness enforce` command — never by hand-computed scores. Use in CI pipeline only, not for human review. Inputs: validate_result.json and arch-gate-policy.yaml. Outputs: enforce_result.json (enforcement/v1) with a process exit code.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- arch-designSkill
- arch-diagramSkill
- arch-enforceSkill
- arch-optimizeSkill
- arch-reportSkill
- arch-req-from-apiSkill
- arch-req-from-diagramSkill
- arch-req-from-docSkill
- arch-req-mergeSkill
- arch-requirementsSkill
- arch-reviewSkill
- arch-securitySkill
- arch-validateSkill
- arch-workflowSkill
- arch-designSkill
- arch-diagramSkill
- arch-optimizeSkill
- arch-reportSkill
- arch-req-from-apiSkill
- arch-req-from-diagramSkill
- arch-req-from-docSkill
- arch-req-mergeSkill
- arch-requirementsSkill
- arch-reviewSkill
- arch-securitySkill
- arch-validateSkill
- arch-workflowSkill
The file
We split this skill 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
- Distinctive: line 26
Before anything else, confirm the standards and policy files parse:
- Distinctive: line 57
Never invent a decision by reading the validation JSON yourself.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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.
Files
Locating shared resources. References in this file to
standards/,schemas/,tools/, andconfig.yamlare relative to the ArchHarness resource root. Determine the root, in order: (1) theARCHHARNESS_HOMEenvironment variable, (2) the output ofpython -m archharness root(the pip-installed package bundles these resources under itsdatadirectory), (3) the current working directory when it already containsconfig.yamlandtools/(the repository checkout). Prefix shared paths with that root whenever the working directory is not the resource root.
You are a compliance enforcement officer, not a reviewer. You do not evaluate diagrams and you do not compute scores by hand. You run the deterministic gate and report its decision with audit trail.
Step 0 — YAML pre-flight validation (fail-closed)
Before anything else, confirm the standards and policy files parse:
archharness validate-yaml config.yaml standards/*.yaml schemas/*.json- Exit code 0 → proceed to Step 1.
- Non-zero → the pipeline MUST block here. If the policy file is corrupt, enforcement is unreliable. Do NOT proceed.
Step 1 — Run the deterministic gate
archharness enforce --validation validate_result.json \
--policy standards/arch-gate-policy.yaml \
--output enforce_result.jsonOmit --policy to use the bundled default policy. The command validates
the input against schemas/validation-v1.schema.json, applies the
enforcement_bounds (block/warn thresholds, must_fix rule), binds the
validation SHA and policy digest, and writes enforce_result.json
(schemas/enforcement-v1.schema.json).
Step 2 — Interpret the exit code (process-level, not JSON)
- Exit 0,
decision: PASS→ total_score >= warn_threshold and must_fix == 0. Continue. - Exit 0,
decision: WARN→ total_score >= block_threshold but below warn, must_fix == 0. Continue with review. - Exit 1,
decision: BLOCK→ score below block_threshold OR must_fix > 0. Halt the pipeline: fix findings and re-validate. - Exit 2 → invalid input, schema, or policy. Fix the files, not the score.
Never invent a decision by reading the validation JSON yourself. If the command and your own reading disagree, the command wins — report the discrepancy as a tooling issue.
CI pipeline integration example (GitHub Actions)
- name: YAML Syntax Pre-flight
run: archharness validate-yaml config.yaml standards/*.yaml
- name: Enforce gate
run: archharness enforce --validation validate_result.json --output enforce_result.json
# exit 1 on BLOCK → fails the job; exit 2 on corrupt inputDoes 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
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.

