This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm test- Run all tests using Node.js built-in test runnernpm run lint- Run ESLint with security pluginnpm run release- Run version bump script (scripts/bump-version.sh)
node --test test/init.test.js
node --test test/upgrade.test.jsThis is a CLI tool for specification-driven development workflows with the Codex CLI. It creates project scaffolding and installs Codex prompts for a structured development process.
- bin/cli.js - Main CLI entry point with minimist argument parsing
- lib/commands/ - Command implementations (init, upgrade)
- lib/utils/ - Shared utilities (paths, logger)
- templates/ - Localized templates for both prompts and scaffolding
- CLI Entry (
bin/cli.js) - Parses arguments and routes to commands - Path Resolution (
lib/utils/paths.js) - Generates all file paths based on locale and options - Command Execution - Creates
.sdd/structure and installs Codex prompts
- Locale Support: English and Japanese templates with automatic fallback to English
- Safe Operations: Existing prompt files are preserved, only
.sdd/README.mdis always overwritten - Template System: Structured templates organized by locale and type (init vs prompts)
- Path Abstraction: All file paths computed through
resolvePaths()utility
The tool creates:
.sdd/directory with steering/, specs/, description.md, README.md, target-spec.txt~/.codex/prompts/with 6 workflow prompts (sdd-steering.md through sdd-archive.md)
- ESLint security plugin is enabled
- Non-literal filesystem operations are explicitly approved with eslint-disable comments where template paths are used
- All user inputs are validated through path resolution
- Node.js built-in test runner for unit tests
- Temporary directories for isolated test environments
- Tests verify both successful operations and edge cases (existing files, locale switching)