Skip to content

Migrate intrinsic quality criteria to .deepreview rules#249

Open
nhorton wants to merge 10 commits intomainfrom
reconcile_reviews
Open

Migrate intrinsic quality criteria to .deepreview rules#249
nhorton wants to merge 10 commits intomainfrom
reconcile_reviews

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Mar 2, 2026

Summary

  • Extract intrinsic quality criteria from job.yml review blocks into .deepreview rules so they run on ANY file change, not just during specific workflows
  • Add 2 new .deepreview rules: job_yml_quality (step decomposition, review coverage, orphaned steps, promise tags) and step_instruction_quality (completeness, specificity, output examples, quality criteria, conciseness)
  • Enhance deepreview_config_quality with valid-configuration and effective-instructions checks
  • Slim down job.yml process reviews to only workflow-specific criteria (deepwork_jobs 1.5.0→1.6.0, deepwork_reviews 1.0.1→1.1.0)

Test plan

  • uv run pytest — 708 tests pass
  • get_workflows MCP call — all 4 jobs parse with 0 errors
  • get_configured_reviews MCP call — 16 rules load including both new ones
  • Run /review on the branch to validate the new rules fire correctly

🤖 Generated with Claude Code

nhorton and others added 10 commits February 27, 2026 13:25
Enables agents to navigate back to prior steps when earlier outputs need
revision. Clears all session progress from the target step onward, forcing
re-execution to ensure consistency. Also teaches the new_job workflow about
the iterative loop pattern so newly authored jobs can leverage go_to_step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…step

- Add JOBS-REQ-001.7 (go_to_step tool, 15 requirements) and renumber
  serialization section to JOBS-REQ-001.8
- Add JOBS-REQ-003.19 (step navigation state management, 10 requirements)
- Update JOBS-REQ-003.7 to include go_to_step in session ID routing list
- Update doc/architecture.md: add go_to_step to MCP tools list, diagram,
  tool docs, StateManager methods, and schemas listing
- Add traceability comments to all 14 new test methods (9 in test_tools.py,
  5 in test_state.py)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Catch StateError and raise ToolError with guidance on how to resume a
workflow by restarting it and skipping steps with quality_review_override_reason.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update JOBS-REQ-001.4.4: finished_step raises ToolError (not StateError)
  when no session exists, with guidance on resuming workflows
- Add traceability for JOBS-REQ-001.7.14 to test_go_back_clears_subsequent_progress
- Add test for JOBS-REQ-001.7.5: go_to_step with explicit session_id
- Add test for JOBS-REQ-001.7.10: files on disk preserved after go_to_step
- Add test for JOBS-REQ-001.7.11: concurrent entry navigates to first step

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract _build_active_step_info and _append_concurrent_info helpers in tools.py
- Rename _resolve_session to resolve_session (public API)
- Fix doc/mcp_interface.md: remove phantom field, add missing fields, remove obsolete config section
- Fix doc/architecture.md: correct finished_step params, output format, StateManager/QualityGate signatures
- Restructure SKILL.md dense paragraphs into numbered sub-lists
- Extract Work Product Storage Guidelines to reference section in define.md
- Standardize placeholder convention to square brackets in define.md
- Move traceability comments before def lines in test_tools.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…w rules

Intrinsic criteria (is the file well-formed?) should be enforced on ANY file
change, not just during specific workflows. This extracts them into .deepreview
rules and leaves only process criteria (did the agent follow the workflow?) in
job.yml review blocks.

New .deepreview rules:
- job_yml_quality: step decomposition, review coverage, orphaned steps, promise tags
- step_instruction_quality: completeness, specificity, examples, conciseness

Enhanced deepreview_config_quality with valid-configuration and effective-instructions checks.

Bumps deepwork_jobs 1.5.0→1.6.0 and deepwork_reviews 1.0.1→1.1.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…output formats

- Fix 3 test methods silently skipped by pytest (testresolve_* → test_resolve_*)
  and convert from sync event loop to async (matching project convention)
- Remove duplicate fixtures from 3 test classes (module-level ones suffice)
- Update descriptions for deepreview_config_quality and step_instruction_quality
  to match their actual checks
- Add PASS/FAIL output format sections to 4 rules that were missing them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n rename

- Move 5 traceability comments in TestGoToStep from inside method body
  to immediately before the def line (matching project convention)
- Update JOBS-REQ-003.7 spec: _resolve_session → resolve_session
- Apply ruff format line-wrapping fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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