Where to Find the Archify Authoring Contract: Complete File Path Guide
The Archify authoring contract is located at archify/references/authoring-contract.md in the tt-a1i/archify repository.
This contract is a Markdown reference that defines the rules, conventions, and invariants for authoring diagrams with Archify. If you're looking for the Archify authoring contract, this guide shows you exactly where to find it and how the codebase uses it.
Exact Location of the Archify Authoring Contract
The authoritative Archify authoring contract lives in the repository under the archify/references directory:
| Path | Purpose |
|---|---|
archify/references/authoring-contract.md |
The canonical contract defining field enums, spacing math, geometry repair rules, and other authoring invariants |
You can view it directly on GitHub at archify/references/authoring-contract.md.
How the Codebase Uses the Authoring Contract
The contract is not just documentation—it is actively consumed by multiple parts of the system.
CLI Verification with archify.mjs
The CLI entry point at archify/bin/archify.mjs consults the authoring contract during doctor runs to verify that authoring follows prescribed standards:
# Verify the contract is present and valid
node archify/bin/archify.mjs doctor
Expected output includes:
[ok] Progressive authoring references – all contracts found
Test Suite Validation
The test file archify/test/authoring-safety-contract.test.mjs validates the contract's content and ensures it loads correctly. This prevents drift between the contract specification and runtime behavior.
Referenced from Skill Definition and Cookbook
The main skill definition at archify/SKILL.md references the authoring contract for detailed rules. The user-facing docs/authoring-cookbook.md also directs authors to the contract for deeper guidance.
Loading the Authoring Contract Programmatically
If you need to read the contract in your own tooling, use this pattern:
// Load the authoring contract from the repository
import { readFileSync } from 'fs';
import { join } from 'path';
const contractPath = join(__dirname, 'archify', 'references', 'authoring-contract.md');
const authoringContract = readFileSync(contractPath, 'utf8');
console.log('Authoring contract content (first 200 chars):');
console.log(authoringContract.slice(0, 200));
What the Contract Contains
The Archify authoring contract specifies:
- Field enums — Valid values for diagram properties
- Spacing math — Minimum distances and maximum overlaps
- Geometry repair rules — How to fix malformed diagrams
- Quality invariants — Constraints that must hold for valid authoring
The contract uses a structured format that tooling can parse. Here is an illustrative snippet of the data conventions it defines:
{
"meta": {
"locale": "en",
"quality_profile": "standard"
},
"spacing": {
"minPortDistance": 8,
"maxPortOverlap": 0
}
}
Related Files in the Archify Repository
| File | Description | Link |
|---|---|---|
archify/SKILL.md |
Main skill file referencing the authoring contract | view on GitHub |
docs/authoring-cookbook.md |
User-facing cookbook for diagram authors | view on GitHub |
archify/bin/archify.mjs |
CLI entry point with doctor verification |
view on GitHub |
archify/test/authoring-safety-contract.test.mjs |
Contract validation tests | view on GitHub |
Summary
- The Archify authoring contract is at
archify/references/authoring-contract.md - It is consulted by the CLI (
archify.mjs) and validated by the test suite - Reference it from
archify/SKILL.mdanddocs/authoring-cookbook.mdfor context - Use the
archify.mjs doctorcommand to verify contract presence
Frequently Asked Questions
What is the Archify authoring contract?
The Archify authoring contract is a Markdown file that defines the rules, conventions, and invariants for authoring diagrams with Archify. It specifies field enums, spacing math, geometry repair rules, and quality standards that authors and tools must follow.
How do I verify the authoring contract is present?
Run node archify/bin/archify.mjs doctor from the repository root. The CLI checks for the contract and reports [ok] Progressive authoring references – all contracts found when validation passes.
Can I parse the authoring contract programmatically?
Yes. The contract at archify/references/authoring-contract.md follows a structured format. You can load it with standard file system methods and parse its JSON-like sections to extract field enums, spacing constraints, and other authoring rules.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →