feat: Add GAMEPLAN.md and autonomous work protocols

- GAMEPLAN.md: Complete implementation roadmap for Issue #46 schema generation capability
- AUTONOMOUS_WORK_REMINDER.md: TDD8 workflow protocols for uninterrupted development
- Ready to begin autonomous implementation of Issue #50 metaschema definition

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-01 02:20:47 +02:00
parent a3855f0dd5
commit 30b5f1c5bd
2 changed files with 252 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
# Autonomous Work Reminder - TDD8 Implementation
## 🎯 MISSION: Complete Issue #50 - Metaschema Definition
**CRITICAL REMINDERS FOR AUTONOMOUS WORK:**
### 📋 TDD8 Workflow - NEVER SKIP STEPS
1. **ISSUE** - Understand requirements (Issue #50 already analyzed)
2. **TEST** - Write failing tests first (RED state required)
3. **RED** - Verify tests fail before implementation
4. **GREEN** - Implement minimal code to pass tests
5. **REFACTOR** - Clean up code while keeping tests green
6. **DOCUMENT** - Update documentation and help
7. **REFINE** - Polish and optimize
8. **PUBLISH** - Commit and close issue
### 🚨 AUTONOMOUS WORK PROTOCOLS
#### DO NOT FORGET TO:
- ✅ Run tests after each change to verify state
- ✅ Commit frequently with descriptive messages
- ✅ Update CLI help when adding new features
- ✅ Maintain backward compatibility
- ✅ Follow existing code patterns and conventions
- ✅ Use proper PYTHONPATH=. for all test runs
- ✅ Close the issue when complete using: `make close-issue NUM=50`
#### QUALITY STANDARDS:
- All tests must pass before moving to next TDD8 step
- Code must follow existing project conventions
- Documentation must be comprehensive
- CLI integration must be complete and tested
#### ISSUE #50 SPECIFIC REQUIREMENTS:
- Define JSON Schema metaschema for MarkiTect extensions
- Support heading text capture
- Support content field instructions
- Support outline structure representation
- Maintain backward compatibility with existing schemas
- Include validation rules for new features
#### COMPLETION CRITERIA:
- Metaschema JSON file created and validated
- Tests cover all metaschema features
- Documentation explains structure and usage
- CLI can validate schemas against metaschema
- All existing schemas still validate correctly
### 🔄 WORKFLOW COMMANDS
```bash
# Start work
make tdd-start NUM=50
# Run tests
PYTHONPATH=. python3 -m pytest tests/ --tb=short -q
# Commit work
git add . && git commit -m "step: [TDD8_PHASE] description"
# Close issue when complete
make close-issue NUM=50
```
### 🎯 SUCCESS = Issue #50 completely implemented, tested, documented, and closed

188
GAMEPLAN.md Normal file
View File

@@ -0,0 +1,188 @@
# MarkiTect Schema Generation Capability Outline - GAMEPLAN
## 🎯 Mission: Transform MarkiTect from Static Analysis to Dynamic Generation
**Parent Issue**: [#46 - Schema generation capability outline](http://gitea.coulomb.social/coulomb/markitect_project/issues/46)
**Vision**: Enable users to generate document variations from example documents through schema-driven templates with content instructions and data automation.
---
## 📋 Issue Breakdown & Implementation Order
### **🏗️ Phase 1: Foundation (HIGH PRIORITY)**
#### Issue #50: Define metaschema for JSON schema structure
- **Priority**: High
- **Status**: Ready to start
- **Dependencies**: Current schema generation (Issue #5), JSON Schema validation (Issue #7)
- **Goal**: Create JSON Schema specification that extends standard JSON Schema with MarkiTect-specific features
- **Key Features**:
- Heading text capture support
- Content field instructions support
- Outline structure representation
- Backward compatibility with existing schemas
- **Start Command**: `make tdd-start NUM=50`
---
### **🔧 Phase 2: Core Features (HIGH-MEDIUM PRIORITY)**
#### Issue #51: Add outline mode to schema generation
- **Priority**: High
- **Dependencies**: Metaschema definition (Issue #50)
- **Goal**: `markitect schema-generate --mode outline --depth 3 --outfile invoice.json example.md`
- **Key Features**:
- New `--mode outline` option
- `--depth` parameter for control
- Schema title: "Schema from example.md" (not "for")
- Actual heading text capture
#### Issue #52: Capture actual heading text in schemas
- **Priority**: Medium
- **Dependencies**: Metaschema (Issue #50), Current schema generation (Issue #5)
- **Goal**: Preserve exact heading text in schemas for validation
- **Key Features**:
- Store heading text alongside structure
- Enable heading text validation
- Meaningful error messages for mismatches
---
### **📝 Phase 3: Content Instructions (MEDIUM PRIORITY)**
#### Issue #54: Add content field instruction capabilities
- **Priority**: Medium
- **Dependencies**: Metaschema (Issue #50), Heading text capture (Issue #52)
- **Goal**: Include guidance for content authors in schemas
- **Key Features**:
- Instructions for each section/content area
- Support for different content types
- Optional/required instruction flags
- CLI support for adding instructions
---
### **🚀 Phase 4: Generation Pipeline (MEDIUM PRIORITY)**
#### Issue #55: Schema-based draft generation
- **Priority**: Medium
- **Dependencies**: All previous issues, Current stub generation (Issue #6)
- **Goal**: Generate document templates from schemas with instructions
- **Key Features**:
- New CLI command for draft generation
- Proper heading hierarchy from schema
- Content instruction placeholders
- Schema reference for future validation
---
### **🤖 Phase 5: Data Automation (LOW PRIORITY)**
#### Issue #56: Data-driven multiple draft generation
- **Priority**: Low
- **Dependencies**: Schema-based draft generation (Issue #55)
- **Goal**: Batch document generation from data sources
- **Key Features**:
- Multiple data formats (JSON, CSV)
- Field mapping from data to schema
- Batch generation capabilities
- Data validation against schema
---
## 🛣️ Complete User Workflow (Target State)
```bash
# 1. Generate schema from example document
markitect schema-generate --mode outline --depth 3 --outfile requirements_schema.json example_requirements.md
# 2. Tune the schema (manual editing)
# - Remove overly specific elements
# - Add content instructions
# - Refine outline structure
# 3. Generate drafts from schema
markitect generate-draft requirements_schema.json --outfile new_requirements.md
# 4. Data-driven batch generation (future)
markitect generate-batch requirements_schema.json --data projects.csv --output-dir ./generated/
# 5. Validate generated documents
markitect validate new_requirements.md requirements_schema.json
```
---
## 🎯 Implementation Strategy
### **Foundation-First Approach**
1. **Start with Issue #50** - metaschema is prerequisite for everything
2. **Parallel development** possible for Issues #51, #52 after #50
3. **Sequential dependency** for Issues #54, #55, #56
### **TDD Workflow Integration**
- Use `make tdd-start NUM=X` for each issue
- Write tests first, implement features second
- Maintain backward compatibility throughout
### **Testing Strategy**
- Each issue requires comprehensive test coverage
- Integration tests for end-to-end workflow
- Performance testing for batch generation
### **Documentation Requirements**
- CLI help updates for new options
- User guide for complete workflow
- API documentation for new schema features
---
## 📊 Success Metrics
### **Phase 1 Success**: Metaschema Defined
- ✅ Extended JSON Schema with MarkiTect features
- ✅ Backward compatibility maintained
- ✅ Validation rules implemented
### **Phase 2 Success**: Outline Mode Working
-`--mode outline` generates proper schemas
- ✅ Heading text captured accurately
- ✅ Depth control functional
### **Phase 3 Success**: Instructions Integrated
- ✅ Content instructions in schemas
- ✅ Instructions appear in generated drafts
- ✅ Validation includes instruction compliance
### **Phase 4 Success**: Draft Generation
- ✅ Schema-to-document generation working
- ✅ Structured templates with placeholders
- ✅ Round-trip validation (generate → validate)
### **Phase 5 Success**: Data Automation
- ✅ Batch generation from data sources
- ✅ Field mapping functionality
- ✅ Production-ready automation pipeline
---
## 🚦 Current Status
**Active Phase**: Ready to start Phase 1
**Next Action**: `make tdd-start NUM=50`
**Estimated Timeline**: 6-8 development sessions across phases
**Risk Level**: Low (building on solid foundation)
---
## 📝 Notes
- This gameplan transforms Issue #46 from concept to implementation roadmap
- Each phase delivers user value incrementally
- Foundation-first approach ensures stable architecture
- TDD methodology maintains quality throughout development
- End result: Powerful document automation pipeline for MarkiTect users
**Last Updated**: 2025-01-26
**Status**: Active Gameplan