This document provides technical context, build steps, and conventions for AI coding agents. For a high-level project overview and user-facing documentation, see README.md.
Praxis is a TypeScript-based CLI tool that bridges Intent-Driven Development (IDD) and Spec-Driven Development (SDD).
- Runtime: Node.js (>= 18)
- Primary Language: TypeScript
- Package Manager: npm
- CLI Framework: Commander.js
- Test Runner: Vitest
npm installnpm run buildThis uses tsc to compile TypeScript source files from src/ to dist/.
npm test
npm run coveragesrc/index.ts: The main entry point. It dynamically registers commands from the manifest.src/manifest.ts: Central definition of all commands, subcommands, and their actions.src/commands/: Implementation of CLI command actions.src/core/: Core logic and shared utilities.src/core/utils.ts: Centralized path constants and file system helpers.src/core/command-generation/: Logic for generating tool-specific slash commands.
Commands are manifest-driven.
- To add a new command, define it in
src/manifest.ts. - Each command/subcommand should have an
actionproperty binding it to a function insrc/commands/. src/index.tsautomatically wires up arguments, options, and actions based on this manifest.
Always use the constants and utilities defined in src/core/utils.ts for interacting with the .praxis project structure:
PRAXIS_DIR:.praxisINTENTS_DIR:.praxis/intentsSPECS_DIR:.praxis/specsTEMPLATES_DIR:.praxis/templates
Use findIntentFile(intentId) and findAllSpecFiles() to locate project artifacts.
Praxis uses key-value pairs in Markdown comments for metadata. Use parseMetadata(content) from src/core/utils.ts to read metadata like **Status**: or **Created**:.
- Prefer functional patterns for command registration and data transformation.
- Keep command actions thin; delegate complex logic to
src/core/modules. - Maintain traceability between Intents and Specs by using unified identifiers.
- Adding a Command: 1. Implement action in
src/commands/. 2. Add definition tosrc/manifest.ts. - Modifying Templates: Update files in
templates/(copied to.praxis/templatesduringinit). - Extending IDE Support: Add a new adapter in
src/core/command-generation/adapters/and register it inregistry.ts.