Context
The spec format specification (docs/spec-format.md in af-spec) has been updated from v1.0 to v1.1 to introduce architecture.md as an optional fifth artifact in a spec package. Previously, architectural content (module responsibilities, components/interfaces, data models, technology stack) was dumped into prd.md optional sections, making the PRD a grab-bag mixing intent with architecture. The new format cleanly separates "why/what" (prd.md) from "how" (architecture.md).
What Changed in the Spec Format
architecture.md is an optional free-form markdown file (no frontmatter, no JSON schema, no machine validation)
- A spec remains valid with four files;
architecture.md is recognized when present
- The file can be created, modified, or deleted at any lifecycle stage
- Both operators and coordinators have write access (archetypes do not)
- It is exempt from schema validation and cross-file integrity checks
- In combined rendering, it appears between
prd.md and the rendered JSON artifacts
Required Library Changes
File recognition
architecture.md must be recognized as a valid file in a spec directory (not flagged as unknown)
- Its absence must NOT cause validation failures or incomplete-spec errors
Copy / move / archive operations
- When a spec is superseded, archived, or moved,
architecture.md must move with the rest of the directory
Validation
architecture.md must be excluded from schema validation (it has no schema)
architecture.md must be excluded from cross-file integrity checks
- The completeness check must continue to require only the four JSON/markdown files (
prd.md, requirements.json, test_spec.json, tasks.json)
Rendering
- Combined render must include
architecture.md content (as-is) between prd.md and the rendered JSON artifacts, when present
- Per-file render is not applicable (the file is already markdown)
Spec type / model
- The
Spec model should gain an optional field for the architecture content (e.g., architecture: str | None = None)
- I/O functions (
load_spec, save_spec) should read/write architecture.md when present
Reference
- Spec format v1.1:
docs/spec-format.md §5 in af-spec
- Key sections: §1 (scope/artifact table), §3.2 (completeness), §5 (architecture.md), §10 (validation), §11.3 (permissions), §12.1 (rendering)
Context
The spec format specification (
docs/spec-format.mdinaf-spec) has been updated from v1.0 to v1.1 to introducearchitecture.mdas an optional fifth artifact in a spec package. Previously, architectural content (module responsibilities, components/interfaces, data models, technology stack) was dumped intoprd.mdoptional sections, making the PRD a grab-bag mixing intent with architecture. The new format cleanly separates "why/what" (prd.md) from "how" (architecture.md).What Changed in the Spec Format
architecture.mdis an optional free-form markdown file (no frontmatter, no JSON schema, no machine validation)architecture.mdis recognized when presentprd.mdand the rendered JSON artifactsRequired Library Changes
File recognition
architecture.mdmust be recognized as a valid file in a spec directory (not flagged as unknown)Copy / move / archive operations
architecture.mdmust move with the rest of the directoryValidation
architecture.mdmust be excluded from schema validation (it has no schema)architecture.mdmust be excluded from cross-file integrity checksprd.md,requirements.json,test_spec.json,tasks.json)Rendering
architecture.mdcontent (as-is) betweenprd.mdand the rendered JSON artifacts, when presentSpec type / model
Specmodel should gain an optional field for the architecture content (e.g.,architecture: str | None = None)load_spec,save_spec) should read/writearchitecture.mdwhen presentReference
docs/spec-format.md§5 in af-spec