Skip to content

Conversation

@jrepp
Copy link
Owner

@jrepp jrepp commented Jan 26, 2026

Summary

  • Add bulk command group with update and timestamps subcommands for bulk frontmatter operations
  • Add top-level migrate command for comprehensive schema migration (project_id, doc_uuid, tag normalization, date→created/updated)
  • Update timestamps to use ISO 8601 datetime format (YYYY-MM-DDTHH:MM:SSZ) instead of date-only
  • Update ADR schema to use created/updated fields instead of legacy date field
  • Add comprehensive tests improving code coverage
  • Remove deprecated project-specific modules

New Commands

Command Description
docuchango migrate Comprehensive schema migration (adds project_id, doc_uuid, normalizes tags, migrates date→created/updated)
docuchango bulk update Bulk set/add/remove/rename frontmatter fields
docuchango bulk timestamps Derive created/updated from git history

Schema Changes

  • ADR now uses created/updated fields instead of legacy date field
  • All datetime fields accept datetime | date | str for flexibility
  • Timestamps now use full ISO 8601 datetime format (YYYY-MM-DDTHH:MM:SSZ)

Test plan

  • All 552 tests passing
  • docuchango migrate successfully migrates 100+ files in target repository
  • docuchango validate passes after migration
  • Timestamps now include full datetime from git history

🤖 Generated with Claude Code

jrepp and others added 2 commits January 26, 2026 15:54
Adds 50 new tests targeting low-coverage modules:
- ProtoImportFixer class: init, find_pb_files, fix_file, fix_all
- MigrationSyntax: fix_migration_file with various SQL patterns
- MdxSyntax: fix_mdx_issues, process_file
- InternalLinks: fix_links_in_content, fix_links_in_file, process_directory
- CodeBlocksProper: fix_code_blocks function
- DocsModule: fix_trailing_whitespace, fix_code_fence_languages,
  fix_blank_lines_before_fences, fix_blank_lines_after_fences
- CLI: bootstrap command with various guides
- Schemas: all frontmatter types with complete field validation

Coverage improvement: 67.81% → 68.91% (+1.1%)
Key module improvements:
- proto_imports.py: 54.67% → 90.67% (+36%)
- cli.py: 79.85% → 84.98% (+5%)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed modules that were leftovers from the source repository
and not relevant to general documentation validation:

- proto_imports.py - HashiCorp-specific protobuf import fixing
- migration_syntax.py - PostgreSQL migration file fixing (Goose)
- broken_links.py - Hardcoded prism-data-layer/netflix link patterns
- code_blocks_proper.py - Duplicate of code_blocks.py
- mdx_code_blocks.py - Duplicate with project-specific directories

Also removed corresponding test files and updated test_bug_fixes.py
and test_coverage_improvements.py to remove references to deleted modules.

Test count: 620 → 552 (68 tests removed with deprecated modules)

Co-Authored-By: Claude <noreply@anthropic.com>
@jrepp jrepp changed the title test: add comprehensive tests to improve code coverage refactor: improve test coverage and remove deprecated modules Jan 27, 2026
jrepp and others added 4 commits January 26, 2026 16:10
…mands

Adds new `bulk` command group with three subcommands:

- `bulk update`: Set, add, remove, or rename frontmatter fields across
  multiple documents with --type filtering and --dry-run preview

- `bulk timestamps`: Derive created/updated timestamps from git history,
  migrates legacy 'date' field to created/updated format

- `bulk migrate`: Comprehensive schema migration that adds missing
  project_id, generates doc_uuid, normalizes id/tags, and derives
  timestamps from git history

Also updates templates:
- All templates now use consistent created/updated datetime format
  (ISO 8601 UTC: YYYY-MM-DDTHH:MM:SSZ)
- Templates include generation snippets as comments for each field
- doc_uuid placeholder standardized to 00000000-0000-4000-8000-000000000000
- ADR template uses created/updated instead of legacy 'date' field

Co-Authored-By: Claude <noreply@anthropic.com>
deciders is the team/person who made the decision, not the author.
The author field (in RFC/Memo/PRD) uses git config user.name.

Co-Authored-By: Claude <noreply@anthropic.com>
- ADRFrontmatter now uses `created` and `updated` fields like other doc types
- Legacy `date` field is deprecated and auto-migrated by bulk migrate command
- Updated all ADR tests to use new schema fields
- Schema maintains consistency: ADRs use `deciders`, other types use `author`

Co-Authored-By: Claude <noreply@anthropic.com>
- Update timestamps.py to generate full datetime (YYYY-MM-DDTHH:MM:SSZ)
  instead of date-only format
- Update schemas.py to accept datetime | date | str for flexibility
- Move migrate command from bulk subgroup to top-level command
- Update tests to expect new datetime format

Co-Authored-By: Claude <noreply@anthropic.com>
@jrepp jrepp changed the title refactor: improve test coverage and remove deprecated modules feat: add bulk operations, migrate command, and datetime timestamps Jan 27, 2026
- Use ternary operator for date_str assignment (SIM108)
- Format schemas.py

Co-Authored-By: Claude <noreply@anthropic.com>
@jrepp jrepp merged commit f565ccb into main Jan 27, 2026
8 checks passed
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