feat(voyage)!: rename type discriminators across validators + fixtures [skip-docs]

- brief-validator: BRIEF_TYPE_VALUES ['ultrabrief','ultrareview'] -> ['trekbrief','trekreview'] + dependent branches
- research-validator: 'ultraresearch-brief' -> 'trekresearch-brief'
- review-validator: 'ultrareview' -> 'trekreview'
- 3 templates frontmatter type:
- 4 synthetic fixtures: ultraplan-synthetic/ultrareview-synthetic -> trek* (frontmatter only; bodies untouched, Jaccard floor preserved)
- 2 trekreview fixtures: type: trekreview
- 6 validator-test fixtures + asserts
- agents/review-coordinator.md frontmatter example

Atomic: validator + fixtures committed together — partial state would cause vacuous
test passes or hard validator rejection.

Part of voyage-rebrand session 2 (W3.3 / Step 5).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-05-05 14:40:25 +02:00
commit 0508edff15
16 changed files with 28 additions and 28 deletions

View file

@ -7,12 +7,12 @@ import { issue, ok, fail } from '../util/result.mjs';
export const BRIEF_REQUIRED_FRONTMATTER = ['type', 'brief_version', 'task', 'slug', 'research_topics', 'research_status'];
export const REVIEW_AS_BRIEF_REQUIRED_FRONTMATTER = ['type', 'task', 'slug', 'project_dir', 'findings'];
export const BRIEF_TYPE_VALUES = Object.freeze(['ultrabrief', 'ultrareview']);
export const BRIEF_TYPE_VALUES = Object.freeze(['trekbrief', 'trekreview']);
export const BRIEF_RESEARCH_STATUS_VALUES = ['pending', 'in_progress', 'complete', 'skipped'];
export const BRIEF_BODY_SECTIONS = ['Intent', 'Goal', 'Success Criteria'];
function getRequiredFields(type) {
return type === 'ultrareview' ? REVIEW_AS_BRIEF_REQUIRED_FRONTMATTER : BRIEF_REQUIRED_FRONTMATTER;
return type === 'trekreview' ? REVIEW_AS_BRIEF_REQUIRED_FRONTMATTER : BRIEF_REQUIRED_FRONTMATTER;
}
export function validateBriefContent(text, opts = {}) {
@ -38,10 +38,10 @@ export function validateBriefContent(text, opts = {}) {
));
}
if (fm.type === 'ultrareview' && fm.findings !== undefined && !Array.isArray(fm.findings)) {
if (fm.type === 'trekreview' && fm.findings !== undefined && !Array.isArray(fm.findings)) {
errors.push(issue(
'BRIEF_BAD_FINDINGS_TYPE',
'Field "findings" must be an array of finding-IDs for type:ultrareview',
'Field "findings" must be an array of finding-IDs for type:trekreview',
'Use block-style YAML: `findings:\\n - <id1>\\n - <id2>`',
));
}

View file

@ -23,8 +23,8 @@ export function validateResearchContent(text, opts = {}) {
if (!(k in fm)) errors.push(issue('RESEARCH_MISSING_FIELD', `Required frontmatter field missing: ${k}`));
}
if (fm.type !== undefined && fm.type !== 'ultraresearch-brief') {
errors.push(issue('RESEARCH_WRONG_TYPE', `frontmatter.type must be "ultraresearch-brief", got "${fm.type}"`));
if (fm.type !== undefined && fm.type !== 'trekresearch-brief') {
errors.push(issue('RESEARCH_WRONG_TYPE', `frontmatter.type must be "trekresearch-brief", got "${fm.type}"`));
}
if (fm.confidence !== undefined) {

View file

@ -37,8 +37,8 @@ export function validateReviewContent(text, opts = {}) {
}
}
if (fm.type !== undefined && fm.type !== 'ultrareview') {
errors.push(issue('REVIEW_WRONG_TYPE', `frontmatter.type must be "ultrareview", got "${fm.type}"`));
if (fm.type !== undefined && fm.type !== 'trekreview') {
errors.push(issue('REVIEW_WRONG_TYPE', `frontmatter.type must be "trekreview", got "${fm.type}"`));
}
if (fm.findings !== undefined) {