Skip to content

feat(workflow): v4.1 — single .feature files, Rule: blocks, Hypothesis-only unit tests#60

Merged
5 commits merged intomainfrom
chore/v4.1-feature-file-restructure
Apr 17, 2026
Merged

feat(workflow): v4.1 — single .feature files, Rule: blocks, Hypothesis-only unit tests#60
5 commits merged intomainfrom
chore/v4.1-feature-file-restructure

Conversation

@nullhack
Copy link
Copy Markdown
Owner

Summary

  • Restructures feature files from folder-per-feature to a single .feature file per feature, with Rule: blocks for user stories and Example: blocks for ACs
  • Rewrites gen_test_stubs.py to parse Rule: blocks (one test file per Rule, test_<rule_slug>_<id_hex>() naming); updates gen_todo.py for file-based in-progress detection
  • Enforces Hypothesis-only tests/unit/: @given required, @pytest.mark.slow mandatory, plain tests forbidden; reviewer checks this at Step 5

Changes

Scripts

  • gen_test_stubs.py: Parses Rule: blocks; generates <rule-slug>_test.py per Rule; function naming test_<rule_slug>_<id_hex>()
  • gen_todo.py: find_in_progress_feature() looks for .feature files directly in in-progress/; source path updated to docs/features/in-progress/<name>.feature

Skills updated

  • scope/SKILL.md: All phases rewritten for file-based workflow
  • tdd/SKILL.md: Test Tool Decision table split by location; tests/unit/ rules section added
  • implementation/SKILL.md: Unit test constraint tightened; ## Self-Declaration block now mandatory in TODO.md
  • verify/SKILL.md: Two new rows in section 4f (@given check, @slow check) + Standards Summary
  • session-workflow/SKILL.md: Step 4 TODO format + Rule 8 for Self-Declaration

Feature migration

  • docs/features/completed/display-version/ (3 files) → docs/features/completed/display-version.feature (single file, 2 Rule: blocks)

Testing

  • uv run task lint — passes
  • uv run task static-check — 0 errors
  • uv run task test-fast — passes
  • uv run task gen-tests -- --check — "All test stubs are in sync"
  • uv run task gen-todo -- --check — "TODO.md is in sync"

…le: blocks

- Replace folder-per-feature with one .feature file per feature
- User stories are now Rule: blocks; ACs are Example: blocks under each Rule
- Discovery content embedded in feature description free text
- Test layout: tests/features/<feature-name>/<rule-slug>_test.py
- Function naming: test_<rule_slug>_<id_hex>()
- Rewrite gen_test_stubs.py to parse Rule: blocks (one test file per Rule)
- Update gen_todo.py to find .feature files directly in in-progress/
- Update all skills: scope, tdd, implementation, verify, session-workflow
- Add mandatory Self-Declaration block in TODO.md at SELF-DECLARE phase
- Enforce Hypothesis @given + @pytest.mark.slow on all tests/unit/ tests
- Migrate completed/display-version to new single-file format
- Clarify OC-8: fix must produce a new named class, no workarounds
…s, fix gen_test_stubs duplicate detection

- Rewrite developer.md, product-owner.md, reviewer.md as thin routing scripts (~60 lines each, down from ~150)
- Remove duplicated workflow details, principle lists, and path specs from agent files
- Fix stale folder-based paths in developer.md and product-owner.md (v4.1 restructure)
- Fix product-owner.md Phase 3 description (one .feature file with Rule: blocks, not one per story)
- Fix reviewer.md report template using <story> instead of <rule_slug>
- Consolidate Self-Declaration checklist in session-workflow/SKILL.md to reference implementation/SKILL.md
- Fix gen_test_stubs.py find_duplicate_ids() false positives: use set instead of list so the same feature in multiple stage dirs (completed + in-progress) does not trigger spurious warnings
Replace the hard rule that tests/unit/ must use @given with guidance:
use Hypothesis for properties spanning many inputs, plain pytest for
specific behaviors or single edge cases. @pytest.mark.slow remains
mandatory on all @given-decorated tests.

Affected files: AGENTS.md, tdd/SKILL.md, implementation/SKILL.md, verify/SKILL.md
@nullhack nullhack closed this pull request by merging all changes into main in 5341f34 Apr 17, 2026
@nullhack nullhack deleted the chore/v4.1-feature-file-restructure branch April 17, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant