Skip to content

Content writer: save_journey() helper (#1385)#1430

Merged
CraigBuckmaster merged 1 commit into
masterfrom
feature/1379-save-journey-helper
Apr 16, 2026
Merged

Content writer: save_journey() helper (#1385)#1430
CraigBuckmaster merged 1 commit into
masterfrom
feature/1379-save-journey-helper

Conversation

@CraigBuckmaster
Copy link
Copy Markdown
Owner

Summary

Closes #1385 (Phase 1 — Foundation for Epic #1379)

Adds save_journey(journey_type, data) to _tools/content_writer.py — a validated writer for journey JSON files, following the save_chapter() pattern.

Validations

  • journey_type must be one of thematic, concept, person
  • data['journey_type'] must match the argument
  • id must be lowercase alphanumeric + hyphens
  • title, description, stops required and non-empty
  • stop_order must be sequential starting at 1
  • bridge_to_next required (non-empty) on all stops except final; must be null on final stop

Output

Writes to content/meta/journeys/{type}/{id}.json

Test plan

  • Valid journey writes correctly
  • Invalid journey_type raises ValueError
  • Non-sequential stop_order raises ValueError
  • bridge_to_next on final stop raises ValueError
  • Test file cleaned up after verification

https://claude.ai/code/session_01Qj6otahNBTSak3fdYhFpes

Add save_journey(journey_type, data) to content_writer.py for validated
writing of journey JSON files. Validates journey_type, id format,
required fields, stop ordering, and bridge_to_next pattern (required on
all non-final stops, null on final stop).

https://claude.ai/code/session_01Qj6otahNBTSak3fdYhFpes
@github-actions
Copy link
Copy Markdown

Content Pipeline Results

✅ All pipeline checks passed

Step Status Details
Schema Validation 128476 passed, 76 failed
Build DB
DB Integrity 88 passed, 0 failed

@github-actions
Copy link
Copy Markdown

Test Results

✅ All tests passed

Passed Failed Total
Tests ✅ 3209 ❌ 0 3209
Suites ✅ 429 ❌ 0 429

Coverage

Statements Branches Functions Lines

⏱️ Duration: 77.4s

@CraigBuckmaster CraigBuckmaster merged commit 0ec7886 into master Apr 16, 2026
7 checks passed
@CraigBuckmaster CraigBuckmaster deleted the feature/1379-save-journey-helper branch April 16, 2026 17:20
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.

Content writer: save_journey() helper

2 participants