A prototype system for managing product specifications with structured JSON schemas, TypeScript-based verification, and agentic workflow support.
This system enables:
- Structured product specifications with both prose and machine-readable metadata
- Automated verification using TypeScript modules
- Agent-friendly tooling for reading, writing, and validating specs
- Traceability between requirements, tests, and features
# Install Node.js (18+ recommended)
# Then install project dependencies
npm installNote: All tools are written in TypeScript and executed via tsx. No external CLI tools required.
npm run verify all# Find circular dependencies
npm run query find-circular-deps
# List features by facet
npm run query list-features-by-facet
# Find orphaned features
npm run query find-orphaned-features# Set a value
npm run write set FEAT-CHECKOUT-UX-001 "metadata.status" '"approved"'
# Verify the change
npm run verify FEAT-CHECKOUT-UX-001# Convert all features to markdown with clickable links
npm run to-markdown
# Output will be in docs/ directoryverifier/
├── specs/ # Feature specifications
│ ├── manifest.json # Feature discovery manifest
│ └── checkout/ # Checkout feature specs
├── schemas/ # JSON Schema definitions
├── verifiers/ # TypeScript verification modules
│ ├── verify-dependencies.ts
│ ├── verify-constraints.ts
│ ├── verify-requirements.ts
│ └── verify-prose-schema.ts
├── queries/ # TypeScript query modules
│ ├── find-circular-deps.ts
│ ├── find-orphaned-features.ts
│ └── list-features-by-facet.ts
├── tools/ # TypeScript command-line tools
│ ├── types.ts # Shared TypeScript types
│ ├── verify.ts # Verification script
│ ├── query.ts # Query execution
│ ├── write.ts # Structured edits
│ └── to-markdown.ts # Markdown conversion
├── docs/ # Generated markdown docs (optional)
├── package.json # npm scripts and dependencies
├── tsconfig.json # TypeScript configuration
└── AGENTS.md # Agent configuration guide
The prototype includes 4 facets of the checkout flow:
- FEAT-CHECKOUT-UX-001: User Experience Flow
- FEAT-PAY-001: Payment Processing (Technical)
- FEAT-FRAUD-001: Fraud Detection (Business Constraints)
- FEAT-REQ-CHECKOUT-001: Requirements & Tests
The system includes 4 verification modules (TypeScript):
- verify-dependencies: Circular deps, orphaned refs, bidirectional consistency
- verify-constraints: Constraint feasibility and propagation
- verify-requirements: Requirements-test traceability
- verify-prose-schema: Prose-schema alignment
npm run verify- Run verification on featuresnpm run query- Execute queriesnpm run write- Make structured edits to feature filesnpm run to-markdown- Generate markdown documentation
See AGENTS.md for detailed agent configuration and workflow.
Prototype - Internal Use