rob
70c3f6f80d
refactor: Clean up pre-commit hook and add comprehensive comments
...
Removed dead code and added detailed documentation:
1. Removed unused functions (61 lines deleted)
- resolve_template() - Template resolution now handled by config.py
- apply_patch_with_3way() - Patch application now handled by patcher.py
2. Added comprehensive function documentation
- check_append_only_discussion: Detailed docstring explaining validation logic
- ensure_summary: Explains companion file creation and auto-staging
3. Added execution flow documentation
- STEP 1: Collect staged files
- STEP 2: Process discussion files (validation + summary creation)
- STEP 3: Run AI automation (runner.py) with examples and debug info
- STEP 4: Run workflow automation (workflow.py) with vote tracking details
4. Improved inline comments
- Explained what each automation phase does
- Documented exit codes and behavior
- Added examples of file transformations
- Noted debug artifact locations
Result:
- Hook reduced from 141 lines to 109 lines (cleaner)
- Every section now clearly documented
- Easier for users to understand automation flow
- Better debugging guidance
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 01:08:00 -03:00
rob
4176f51e7d
fix: Add YAML syntax fix and mock AI script for testing
...
- Fix missing space after colon in features.ai-rules.yml
- Add tools/mock_ai.sh for testing automation without real AI
- Ensures installer has valid YAML templates
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 09:18:59 -03:00
rob
05002b766b
test: Add comprehensive workflow tests and improve template tests
...
Testing improvements completing Week 1 consolidation:
1. Add tests/test_workflow.py (6 comprehensive tests)
- test_extract_vote_value: Vote value extraction
- test_parse_votes_single_participant_single_vote: Basic parsing
- test_parse_votes_single_participant_multiple_votes: Latest vote wins
- test_parse_votes_multiple_participants: Multi-participant tracking
- test_parse_votes_malformed_lines: Error handling
- test_parse_votes_mixed_content: Real-world scenarios
2. Improve tests/test_template_meta.py
- Replace stub tests with real implementations
- test_find_template_fields: Field extraction from templates
- test_render_request_from_template: Template rendering
- test_render_request_from_template_with_existing_meta: Preserve existing data
3. Add __init__.py files for test imports
- assets/__init__.py: Make assets importable
- automation/__init__.py: Make automation importable
- Enables tests to import workflow.py and create_feature.py
4. Update pyproject.toml pytest configuration
- Add ".", "assets" to pythonpath
- Allows tests to import from automation/ and assets/
Test Results:
- All 11 tests passing
- Coverage: workflow vote parsing, template rendering, utils
- Foundation ready for Stage 2 development
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 16:20:42 -03:00
rob
03bb4afdcc
build: Bundle automation/ and update pre-commit hook comment
...
Integration fixes to make workflow.py available in user projects:
1. Bundle automation/ directory in installer
- Add automation/ to build_installer.py copy process
- Ensures workflow.py is available in generated projects
- Pre-commit hook can now actually call workflow.py
2. Update pre-commit hook comment
- Change from "planned feature...does not yet exist"
- Update to "provides non-blocking vote status reporting"
- Accurately describes current implementation
Verified:
- automation/workflow.py present in install bundle
- workflow.py executes successfully from bundle
- Pre-commit hook comment matches reality
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 14:24:32 -03:00
rob
d78b0d83c8
1st commit
2025-10-29 01:22:40 -03:00
rob
a0b2816cc5
1st commit
2025-10-28 21:23:08 -03:00
rob
e914caf15f
1st commit
2025-10-28 11:56:01 -03:00
rob
67a4415600
1st commit
2025-10-27 20:17:35 -03:00
rob
5506891a52
1st commit
2025-10-26 12:28:04 -03:00
rob
51a9bb0aa2
1st commit
2025-10-25 13:34:20 -03:00
rob
5425ce9fbb
1st commit
2025-10-25 02:30:38 -03:00
rob
5e3a7231f9
1st commit
2025-10-25 02:27:38 -03:00
rob
c61c988966
1st commit
2025-10-25 02:24:55 -03:00