# Where to Find the Archify Authoring Contract: Complete File Path Guide

> Locate the Archify authoring contract within the tt-a1i/archify repository. Get the complete file path for the authoring contract now.

- Repository: [tt-a1i/archify](https://github.com/tt-a1i/archify)
- Tags: api-reference
- Published: 2026-09-02

---

**The Archify authoring contract is located at [`archify/references/authoring-contract.md`](https://github.com/tt-a1i/archify/blob/main/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`](https://github.com/tt-a1i/archify/blob/main/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](https://github.com/tt-a1i/archify/blob/main/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:

```bash

# 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`](https://github.com/tt-a1i/archify/blob/main/archify/SKILL.md) references the authoring contract for detailed rules. The user-facing [`docs/authoring-cookbook.md`](https://github.com/tt-a1i/archify/blob/main/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:

```javascript
// 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:

```json
{
  "meta": {
    "locale": "en",
    "quality_profile": "standard"
  },
  "spacing": {
    "minPortDistance": 8,
    "maxPortOverlap": 0
  }
}

```

## Related Files in the Archify Repository

| File | Description | Link |
|------|-------------|------|
| [`archify/SKILL.md`](https://github.com/tt-a1i/archify/blob/main/archify/SKILL.md) | Main skill file referencing the authoring contract | [view on GitHub](https://github.com/tt-a1i/archify/blob/main/archify/SKILL.md) |
| [`docs/authoring-cookbook.md`](https://github.com/tt-a1i/archify/blob/main/docs/authoring-cookbook.md) | User-facing cookbook for diagram authors | [view on GitHub](https://github.com/tt-a1i/archify/blob/main/docs/authoring-cookbook.md) |
| `archify/bin/archify.mjs` | CLI entry point with `doctor` verification | [view on GitHub](https://github.com/tt-a1i/archify/blob/main/archify/bin/archify.mjs) |
| `archify/test/authoring-safety-contract.test.mjs` | Contract validation tests | [view on GitHub](https://github.com/tt-a1i/archify/blob/main/archify/test/authoring-safety-contract.test.mjs) |

## Summary

- The **Archify authoring contract** is at **[`archify/references/authoring-contract.md`](https://github.com/tt-a1i/archify/blob/main/archify/references/authoring-contract.md)**
- It is consulted by the CLI (`archify.mjs`) and validated by the test suite
- Reference it from [`archify/SKILL.md`](https://github.com/tt-a1i/archify/blob/main/archify/SKILL.md) and [`docs/authoring-cookbook.md`](https://github.com/tt-a1i/archify/blob/main/docs/authoring-cookbook.md) for context
- Use the `archify.mjs doctor` command 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`](https://github.com/tt-a1i/archify/blob/main/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.