5 Commits

Author SHA1 Message Date
Debian
75294a2daf feat: Add phase-by-phase prompt generation for complex projects
- Generate prompts/phase{1-4}-prompt.txt files with phase-specific tasks
- Update GUIDE.md with phase-by-phase execution instructions
- Include both /ralph-wiggum and bash loop alternatives for each phase
- Each phase prompt references PROMPT.md and focuses on one phase only
- Add tech-stack-specific build/test/lint commands per phase

Also includes fix for JSON parsing with markdown code fences.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 04:40:05 +00:00
Debian
0352e56a20 Implement Phase 3 & 4: Generation Pipeline and Polish
Phase 3 - Generation Pipeline:
- SpecificationGenerator: generates features, data models, interfaces
- PRDGenerator: generates PROMPT.md, prd.json, GUIDE.md, CLAUDE.md
- ScaffoldGenerator: creates complete project structure with git init
- Interactive prompts with Inquirer.js for user confirmation
- Full pipeline integration in new command

Phase 4 - Polish:
- Validate command for PROMPT.md files
- Standalone research command using Perplexity
- Dry-run mode with --dry-run flag
- Comprehensive README.md documentation
- Examples directory with sample outputs
- npm packaging verified (npm pack, npm publish --dry-run)

Bug fixes:
- Fix EXDEV error in atomic file writes (use same-dir temp files)
- Update Claude model to claude-sonnet-4-5-20250929

All 110 tests passing, all completion criteria met.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 01:20:13 +00:00
Debian
ae0165a802 Implement Phase 2: Core API Integration
- Add Claude API client with Anthropic SDK
  - Retry logic with exponential backoff (3 attempts)
  - Handle auth errors, rate limits, and server errors
  - Architecture classification with JSON parsing
  - Research query generation from architecture
- Add Perplexity API client with native fetch
  - Retry logic with exponential backoff
  - Parse responses with sources and citations
  - Execute multiple research queries
- Add prompt templates for architecture classification
- Add default query generation as fallback
- Add ArchitectureGenerator combining Claude + Perplexity
- Add 44 new tests (80 total, all passing)

All Phase 2 acceptance criteria met:
- Claude client sends prompts and retries on failure
- Perplexity client searches and parses with sources
- Architecture classification returns valid JSON
- Research queries generated (4-6 per architecture)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:17:42 +00:00
Debian
606f27d6bb Implement Phase 1: Foundation
- Set up TypeScript project with strict mode
- Configure tsup build system (ESM output)
- Configure vitest for testing (36 tests passing)
- Configure ESLint with flat config for TypeScript
- Implement Commander.js CLI with all 4 commands:
  - init: Configure API keys with validation
  - new: Create new Ralph Method project (stub)
  - validate: Validate PROMPT.md files
  - research: Research topics via Perplexity (stub)
- Implement config management:
  - Keys stored in ~/.ralph-generator/config.json
  - File permissions set to 600
  - Environment variables override file config
- Implement logging utility with verbosity levels
- Implement atomic file writes utility

All Phase 1 acceptance criteria met.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:08:24 +00:00
Debian
688cfe57ed Initial Ralph scaffold for ralph-vibe 2026-01-10 11:59:27 +00:00