How aicspec/aic works
AIC is a TypeScript library and CLI for authoring, inspecting, and checking YAML Architecture Implementation Contracts. The main workflow is to load or bundle a contract, parse and model it, validate its rules and maturity, then produce agent briefs, implementation plans, verification checklists, and conformance verdicts. The repository also ships contract documentation and agent skill prompts. Edges reflect the shown imports, calls, exports, and README descriptions; some CLI dispatch details and skill internals were not sampled, so those relationships are omitted or documented only where supported.
Main entry points: cli.ts AIC CLI · index.ts Library API · model.ts Contract model · brief.ts Module briefs and plans
Components 17
CLI and agent workflow
- AIC CLI
src/cli.ts - Library API
src/index.ts - Module briefs and plans
src/agent/brief.ts - Validation report
src/agent/report.ts - Verification checklist and verdict
src/agent/verify.ts
Contract processing
- Agent contract reader
src/agent/contract.ts - Reference bundler
src/core/bundle.ts - YAML parser and writer
src/core/yaml.ts - Contract model
src/core/model.ts - Contract schema
schema/aic-contract-0.1.schema.json
Architecture analysis
- Contract validator
src/core/validate.ts - Maturity analysis
src/core/maturity.ts
Shipped resources
- Reference documents
src/documents.ts - Agent skill prompts
skills/aic
Other components
- Engineer or agent
- Contract YAML files
- Checklist results
Connections 30
- Engineer or agent → AIC CLI: runs commands
README.md - Contract YAML files → AIC CLI: provides contract
src/cli.ts - AIC CLI → Reference bundler: bundles references
src/cli.ts - AIC CLI → YAML parser and writer: loads and writes
src/cli.ts - AIC CLI → Module briefs and plans: requests plans
src/cli.ts - AIC CLI → Validation report: requests reports
src/cli.ts - AIC CLI → Verification checklist and verdict: requests checks
src/cli.ts - AIC CLI → Reference documents: reads references
src/cli.ts - AIC CLI → Agent skill prompts: installs prompts
src/cli.ts - AIC CLI → Checklist results: reads results
src/cli.ts - Agent contract reader → YAML parser and writer: parses text
src/agent/contract.ts - YAML parser and writer → Contract model: uses schema helpers
src/core/yaml.ts - Contract model → Contract schema: loads schema
src/core/model.ts - Contract validator → Contract model: inspects contract
src/core/validate.ts - Maturity analysis → Contract model: inspects contract
src/core/maturity.ts - Module briefs and plans → Contract model: derives module context
src/agent/brief.ts - Module briefs and plans → Maturity analysis: computes readiness
src/agent/brief.ts - Module briefs and plans → Contract validator: checks violations
src/agent/brief.ts - Validation report → Contract validator: validates contract
src/agent/report.ts - Validation report → Maturity analysis: summarizes maturity
src/agent/report.ts - Verification checklist and verdict → Contract model: builds checks
src/agent/verify.ts - Verification checklist and verdict → Module briefs and plans: reuses interface data
src/agent/verify.ts - Library API → Contract model: exports model
src/index.ts - Library API → YAML parser and writer: exports YAML tools
src/index.ts - Library API → Contract validator: exports validation
src/index.ts - Library API → Maturity analysis: exports maturity
src/index.ts - Library API → Reference bundler: exports bundler
src/index.ts - Library API → Module briefs and plans: exports agent briefs
src/index.ts - Library API → Validation report: exports reports
src/index.ts - Library API → Verification checklist and verdict: exports verification
src/index.ts