Stage 0 intake orchestrator — resolve the requested work, choose add vs apply mode, select the replay profile, and create or refresh the canonical text-pipeline workspace manifest/state.
Resolve what text is being worked on and initialize its canonical workspace.
This skill is the Stage 0 owner for intake and disambiguation. It should answer:
add mode or apply mode?It does not own:
Existing workspaces: !find ${LYCEUM_TEXTS_DIR:-output/texts} -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l
Bootstrap script: !ls scripts/init_text_pipeline_workspace.go 2>/dev/null | wc -l
Pipeline profiles defined: !grep -c "Profile[A-Z]" internal/textpipeline/textpipeline.go 2>/dev/null
/text-intake init [work] [--mode add|apply] [--profile <profile>] — Create or refresh a canonical workspace/text-intake inspect [work] — Inspect likely mode, scope, and ambiguity before initialization/text-intake gap [work] — Compare requested outcome against current workspace/repo state and identify missing assets/text-intake status [work] — Summarize intake state, profile, blockers, and next stageTarget: $ARGUMENTS
manifest.json and initial state.jsonDo NOT manually set english_edition_urn, generated_edition_urn, or greek_edition_urn in manifest.json.
The import script generates URNs containing "versified" which the reader requires for row view detection. Manually overriding these fields breaks the reader layout:
"versified", "verse", or "gen-eng" in the English edition URNWhat to do instead:
manifest.json<work_urn>.workspace-versified-eng1When you might be tempted to set them:
generated_edition_urnexisting_edition_urn instead, not edition URN fieldsThe validation in scripts/import_workspace.go will warn if this convention is violated.
The current scaffold for this skill is:
scripts/init_text_pipeline_workspace.gointernal/textpipeline/textpipeline.gointernal/textpipeline/textpipeline_test.gonix-shell -p go --run "go run ./scripts/init_text_pipeline_workspace.go \
-work 'WORK NAME' \
[-mode add|apply] \
[-profile PROFILE] \
[-edition-urn URN]"
nix-shell -p go --run "go run ./scripts/init_text_pipeline_workspace.go \
-work 'Sophocles Antigone'"
nix-shell -p go --run "go run ./scripts/init_text_pipeline_workspace.go \
-work 'Meditations' \
-mode apply \
-profile interlinear \
-edition-urn 'urn:cts:greekLit:tlg0562.tlg001.perseus-grc2'"
/text-intake inspectUse before initializing when the request is ambiguous or the existing text state is unclear.
add or apply$LYCEUM_TEXTS_DIR/<slug>/ (defaults to output/texts/)internal/textpipeline/textpipeline.go/text-intake initCreate or refresh the canonical workspace.
mode: add or applyprofile: one of the defined replay profileswork: canonical request label / work nameaddsource-upgradecleaningsegmentationwitness-upgradeversificationtransliterationinterlineartreebank-enrichmentreliabilityfull-rehab$LYCEUM_TEXTS_DIR/<slug>/
├── manifest.json
├── state.json
├── provenance.md
├── sources/
├── raw/
├── extracted/
├── clean/
├── structured/
├── witnesses/
├── versification/
├── interlinear/
├── qa/
└── replay/stage-history.json
Note: LYCEUM_TEXTS_DIR defaults to output/texts for local development.
/text-intake gapUse for apply-mode planning or when resuming a text.
find ${LYCEUM_TEXTS_DIR:-output/texts} -mindepth 1 -maxdepth 2 | sort
nix-shell -p jq --run "jq '.' ${LYCEUM_TEXTS_DIR:-output/texts}/SLUG/manifest.json"
nix-shell -p jq --run "jq '.' ${LYCEUM_TEXTS_DIR:-output/texts}/SLUG/state.json"
/text-intake statusSummarize:
$LYCEUM_TEXTS_DIR/<slug>/manifest.jsonstate.jsonreplay/stage-history.jsonprovenance.md and/or qa/final-review-pack.mdinternal/textpipeline/textpipeline.goThis skill follows the Stage 0 contract from docs/text-pipeline-skill-verification-2026-03-13.md.
$LYCEUM_TEXTS_DIR/<slug>/manifest.json$LYCEUM_TEXTS_DIR/<slug>/state.jsonAfter a successful intake run, the next owner is usually:
source-hunt for add mode or source-oriented apply worktext-replay when the user asked for a targeted replay profileAfter completing this stage, run the automated verification script:
bash scripts/verify_stage_0.sh "${SLUG}"
Exit codes: 0=PASS (advance), 1=FAIL (block), 2=WARN (advance with notes). The orchestrator runs this automatically; when executing manually, check the output for [FAIL] or [WARN] lines.
| File | Purpose |
|---|---|
scripts/init_text_pipeline_workspace.go | Current workspace initializer |
internal/textpipeline/textpipeline.go | Stage/profile definitions and invalidation rules |
internal/textpipeline/textpipeline_test.go | Bootstrap tests |
docs/text-pipeline-bootstrap-2026-03-13.md | Bootstrap behavior |
docs/text-pipeline-master-plan-2026-03-13.md | Canonical stage model |
docs/text-pipeline-skill-architecture-2026-03-13.md | Ownership and command surface |
docs/text-pipeline-skill-verification-2026-03-13.md | Verification contract |