Skip to content

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 20, 2026

Summary

  • Add DTDs as a first-class feature for formalizing document specifications with quality criteria
  • Extend job.yml output schema to support DTD references (backward compatible)
  • Update skill generators to inject DTD context into Claude and Gemini templates
  • Add document detection workflow to deepwork_jobs.define (Steps 1.5, 1.6, 1.7)
  • Add DTD improvement workflow to deepwork_jobs.learn (Steps 3.5, 4.5)
  • Bump version to 0.4.0

Test plan

  • All 531 unit/integration tests pass
  • Linting clean
  • Manual verification: Create a DTD and job referencing it, run deepwork sync
  • Verify generated skills include DTD quality criteria

🤖 Generated with Claude Code

Implement DTDs as a first-class feature for formalizing document specifications
with quality criteria, enabling consistent document structure across job outputs.

Key changes:
- Add DTD schema and parser for frontmatter markdown format
- Extend job.yml output schema to support DTD references
- Update skill generators to inject DTD context into templates
- Add document detection workflow to deepwork_jobs.define
- Add DTD improvement workflow to deepwork_jobs.learn
- Update Claude and Gemini templates for DTD-aware rendering
- Bump version to 0.4.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nhorton nhorton force-pushed the docs/job-type-classification branch from cc303bc to 2748519 Compare January 20, 2026 18:41
nhorton and others added 7 commits January 20, 2026 11:53
Change the output schema from referencing DTDs by name to using full file paths:
- Renamed `dtd` field to `document_type` in job.yml outputs
- Changed pattern from name-based (e.g., "monthly_report") to path-based
  (e.g., ".deepwork/dtds/monthly_report.md")
- This makes references self-documenting and allows agents to understand
  them without additional context

Updated:
- Schema: new pattern ^\.deepwork/dtds/[a-z][a-z0-9_-]*\.md$
- Parser: OutputSpec.dtd -> OutputSpec.document_type
- Generator: load DTDs by file path instead of directory scan
- Templates: has_dtd -> has_document_type, dtd -> document_type
- Documentation: updated all examples and explanations
- Tests and fixtures: renamed job_with_dtd to job_with_document_type

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create job_spec.md DTD with 9 quality criteria for job.yml files
- Update install.py to copy DTDs from standard jobs to .deepwork/dtds/
- Reference DTD in deepwork_jobs define step output with document_type
- Bump deepwork_jobs version to 0.7.0
- Temporarily disable new-standard-job-warning rule (bug causes infinite loop)

The DTD ensures consistent quality for all job.yml files created via
/deepwork_jobs.define by validating: identifier format, semantic version,
summary length, description richness, changelog presence, step completeness,
dependency validity, input consistency, and output paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add DTD-based quality validation step between define and implement that:
- Uses a sub-agent (haiku model) for unbiased review of job.yml
- Evaluates all 9 DTD quality criteria from job_spec.md
- Iterates fix-review cycle until all criteria pass

This establishes a reusable pattern for DTD-conforming document validation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Review of all jobs against job_spec DTD revealed 3 jobs with steps
missing required outputs:
- add_platform/verify: added verification_checklist.md
- commit (test, lint, commit_and_push): added implicit state outputs
- update/job: added files_synced implicit state output

These are process-oriented steps where the "output" is a state change
rather than a file artifact, but the DTD requires at least one output
per step for completeness.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename dtd_parser.py to doc_spec_parser.py
- Rename dtd_schema.py to doc_spec_schema.py
- Rename .deepwork/dtds/ directories to doc_specs/
- Rename document-type-definitions.md to doc-specs.md
- Update all references from DTD/dtd to doc spec/doc_spec
- Update schema pattern for document_type paths
- Update documentation, job definitions, and templates
- Add pytest and uv to allowed commands in Claude settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reconcile branch with main, incorporating v0.3.1 fixes:
- created rule mode for matching only newly created files
- Fix created mode rules incorrectly firing on modified files
- Fix compare_to: prompt mode detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nhorton nhorton merged commit c9b99b1 into main Jan 20, 2026
4 checks passed
@nhorton nhorton deleted the docs/job-type-classification branch January 20, 2026 23:47
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.

2 participants