Files
ansible-workspace-dnd/docs/roadmap/features/0028-coordinated-native-suite-integration.md

32 KiB
Raw Blame History

Feature 0028: Integrate the Native Suite and Compatible D&D Assets

Status: done

Approved: 2026-12-03, including disabled automatic cleanup, the replacement production profiles, separate compatible asset refs and config-local native prompt/catalog checkouts.

Summary

Integrate the four reviewed standalone application updates into the D&D pipeline role, together with compatible campaign and prompt assets. Deliver one coherent suite configuration for Narratio v4.0.0, Audita v4.3.0, Notarius v0.10.0 and Scriptorium v0.16.0. Seriatim stays at v1.5.0.

This is the next unit in the agreed upgrade sequence. Collection assembly and deployment-consumer updates follow independent review of this integration; the current collection remains on its existing compatible set.

Problem or Opportunity

Features 0024–0027 updated the generic installers, but the pipeline still emits retired application fields and selects older role revisions. The campaign registry uses private campaign/party formats and wrapperless glossaries; the prompt library uses legacy definitions and two removed catalog profile IDs. Changing application versions alone would leave an unusable installation.

Older pipeline releases follow the asset repositories' main branches. Replacing their contents with incompatible formats would break those releases independently of any role upgrade. Asset compatibility and suite wiring must therefore be planned together.

Scope

  • Select the reviewed application-role revisions and native configuration set.
  • Migrate both maintained campaigns and all six prompt definitions, preserving authored content, identities, input names and intended processing behavior.
  • Wire native resources, shared references, imports, secrets bootstrap, base and testing selections, runtime paths and publication outputs.
  • Support an optional installed reference catalog without selecting synthetic sample vocabulary for real campaigns.
  • Adapt the suite's offline behavioral coverage and document the operator migration, including state compatibility and cleanup retention.

Non-goals

  • Redesigning the reviewed standalone roles or changing upstream applications.
  • New extraction lanes, artifact workflows, campaign facts, spell collections, scheduling, live processing, provider smoke checks or operational deployment.
  • Automatic conversion/deletion of existing sessions, caches, configuration fragments or secrets; compatibility loaders, aliases or integrity machinery.
  • Collection subtree refresh, release tagging, consumer pin/playbook changes, or moving an operational host to the new suite during this feature.
  • Adopting new application releases merely because they appear during the work.

Target End State

Compatibility set and repository boundary

The pipeline requirements select these reviewed standalone revisions, using the existing public repository URLs and installed role names:

Role Application selection Reviewed role commit
rakestraw.scriptorium v0.16.0 e936d5200df675feeb53be235a175b608c0afc7c
rakestraw.audita v4.3.0 b818f6067789d7fdd09a8a4a54134452089811c8
rakestraw.notarius v0.10.0 85cd3a397f63342df8309aa4f36d9900ff610e41
rakestraw.narratio v4.0.0 2a4e82c734a256a02281dbb6e63b348a7171f808

Retain the current Seriatim role dependency and application selection. The suite uses Go 1.27/stable through its existing configurable toolchain inputs. Versions remain inventory-overridable, without promising that incompatible older applications accept the migrated configuration.

Only the standalone pipeline repository advances its dependency manifest here. The collection's vendored pipeline, dependency manifest and consumer stay put until the later distribution feature. Completion records the integrated pipeline and asset commits for that handoff.

Asset compatibility and selection

The arrangement is a native-v4 compatibility branch in each asset repository, based on the current reviewed content:

  • Campaigns: d1193e8be4163c2742baa2517c9a048b6873622d.
  • Prompt library: c7e18454e5f02aedb0657d522f7c550f82d874ed.

Keep the legacy main trees intact. The new suite selects full immutable commit IDs from the compatible branches, not a moving branch name. Repository URL, revision and destination remain caller-overridable. No old consumer must upgrade merely to continue obtaining its current asset format.

Both formats retain their ordinary repository-root layout on their respective refs. This avoids a second checkout root, runtime format selection, or role-side data conversion. A later promotion of native assets to main requires an explicit legacy-consumer cutover decision; it is not implicit in this feature. The workspace's asset checkouts may track the compatibility branches during development; documentation and tests must name their actual selected revisions. The duplicate sibling ../narratio-prompts is not the authoring checkout.

Campaign and shared reference assets

The compatible campaign ref contains both centaurs and dilfs in the shared campaign, party and glossary formats used by the adopted applications:

  • Campaigns use maximumdirect.rpg.campaign.v1, stable id, references.party and the narratio extension for speaker input, glossary input and inline autocorrection. Move the existing rules into that native extension; preserve their order and text rather than inventing a conversion task on the host.
  • Parties use maximumdirect.rpg.party.v1. Retain character IDs, names, player relationships, classes and levels, with the native plural aliases field. Narratio derives its players document from this roster; stop binding the separately authored legacy players.yml as a runtime source.
  • Campaign vocabulary uses maximumdirect.glossary.v1, a named campaign collection and entries with stable unique IDs. Preserve names, aliases, categories and descriptions; map legacy summaries to native descriptions. Assign IDs once during authoring, not from a runtime hashing scheme.

Keep speaker mappings and existing campaign facts. Do not infer a setting or system selection from place names, invent missing player characters, correct unrelated factual inconsistencies, or install synthetic sample campaigns as production replacements. Shared schemas and tagged application guides own exact field semantics. Old files may remain inert on the compatible ref when useful; current campaign declarations must not depend on retired inputs.

Prompt library and model selection

The native prompt checkout defaults to /usr/local/etc/scriptorium/prompt-library. The compatible ref exposes a native wrapperless PromptKit entry point, promptkit.yml, containing explicit source-relative imports of its definitions. The Scriptorium root imports that entry point at native promptkit through the reviewed role's import interface using the contained relative path prompt-library/promptkit.yml. Schemas and message bodies travel with their defining files; the entry point selects schema_root: schemas, and resource paths use the native source-relative rules.

Migrate all six IDs: dnd.session_bounds, dnd.session_recap, dnd.hostile_rumors, dnd.deranged_rumors, dnd.scene_map and dnd.character_meta_analysis. Preserve prompt instructions, named inputs, Markdown/JSON outputs and structural-repair choices unless a native format change requires a different representation. Preserve supported session_id templates and the variables Narratio supplies. Retire version-based selection in favor of native prompt IDs rather than adding a legacy reader.

Review remediation approved on 2026-12-03 uses explicit current-only and previous-aware variants for recap and character analysis while upstream automatic optional sections are unavailable. dnd.session_recap and dnd.character_meta_analysis remain the default IDs and omit previous-recap inputs and messages; _with_previous variants require that context and are selected explicitly through the existing artifact/family configuration. Default suite bindings do not request a predecessor. Roster context is supplied by Narratio preparation and declared required where the prompts read it. See review and remediation for the selected asset revision and validation evidence. This configuration-only decision preserves application versions and requires no upstream patch.

Retain the available production selections: gemini-flash-latest for bounds, and claude-fable-latest for recap and character analysis. The replacement for the removed aion-2 rumor and nemotron-3-ultra scene-map profiles is gpt-terra-latest, as approved during roadmap review. Callers may override artifact/family profile selections or supply native profile definitions. Do not recreate the entire removed catalog in the suite or assume that an old profile name identifies an available provider model today.

Audita native processing policy

Use schema 3 and the reviewed role's native PromptKit backend/profile fields. Replace the old backend/profile maps with ID-bearing native lists, exposed through inventory-composable suite variables. Preserve the selected endpoint https://inference.ai.rakestrawhome.com/v1, model google/gemma-4-31b-it, AUDITA_LLM_API_KEY reference, backend capacity 4, proposal/validation IDs and per-profile 900-second timeout. Map credential/capacity fields to their native names; do not infer a provider implementation or freeze queue defaults.

Replace the old module-name list with ordered native stage records preserving glossary → homophones → glossary → spoken_word → grammar. Preserve the explicit D&D context, chunking, normalization and audita-v1 output choices. Retire confidence thresholds and the old repair variable. Leave transport retry, operation timeout and new semantic repair controls null unless an existing explicit suite requirement selects them; old retry counts do not imply new semantic guarantees.

Select the prepared party, campaign, setting and spells collections for glossary context. Declare empty collection entries where needed for a valid standalone Audita configuration; Narratio supplies the four runtime shared documents and replaces those entry lists. Do not duplicate campaign vocabulary in role defaults. Leave protection fallback with Audita unless inventory selects it explicitly. Audita's production and testing policy stays identical initially. Retire management of legacy profile files under /usr/local/etc/audita/profiles; leave existing files untouched and explain the native resource selection.

Notarius native pipeline and testing overlay

Use schema 6, native config.imports and one suite-owned imported pipeline map. Preserve the three ordered phases and all ten lanes in the maintained complete D&D workflow, including generated registry/scene/combat handoffs, chunk-map and evidence-context selections. Use the tagged complete example as the structural reference, without copying its sample file paths or model policy.

The production pipeline explicitly selects gpt-terra-latest; the Notarius testing overlay selects gpt-luna-latest for the suite-selected pipeline ID. Both IDs exist in the selected native catalog. Keep the map caller-composable, and change only the selected pipeline in the overlay so unrelated pipelines retain their selections. Do not duplicate a complete pipeline in the overlay.

Replace retired per-producer retry keys with native producer controls where selected. Leave mode and max_additional_turns unset and inherit Notarius's defaults; old retries: 2 is not a continuation budget. Prompt-owned structural repair and transport retry remain independent.

Use notarius_cache_directory: /var/cache/notarius through a suite variable. Ordinary accepted-result caching remains enabled with native auto policy; remove chunk-plan/checkpoint subdirectory controls and do not migrate/delete old records. Leave Narratio's optional cache override null in ordinary runs. Testing changes the model selection, not cache policy: operators seeking fresh inference force extraction or deliberately select refresh/bypass. Changing an overlay/model alone does not guarantee new Notarius inference or a Narratio rerun.

Bind party to narratio.input.party, and glossary and spell_catalog to narratio.input.glossary.combined. Keep generated handoffs internal to the pipeline. Shared collection selection belongs in native binding records; no separate authored player roster is required. Output declarations retain all ten lane IDs and optional flat JSON filenames, dropping retired media/schema/module descriptors. Extraction outputs remain available to analyze inputs as narratio.extraction.<key>.

Narratio configuration, filesystem and credentials

Adopt /usr/local/etc/narratio/narratio.yml as the suite root, with explicit ordered config.imports marked required for suite-owned fragments. Retain one file per artifact/family and a small processing fragment. Keep artifact keys, dependencies, enabled states, input names and publication sources. Flatten the character-family output pattern to artifacts/character_meta_analysis_{character_id}.md as required by v4; remote publish destinations remain independent.

Set native config.secrets_dir: secrets through the Narratio role and leave overwrite behavior with ConfigKit. Preserve credential-name lists for Audita, Notarius and Scriptorium and the typed S3 pair. The existing empty-by-default dnd_pipeline_secrets map remains the suite's managed-file option; environment delivery remains supported. Do not add a wrapper, --secrets-dir invocation, credential discovery, or mandatory file-only policy.

Retain narratio:narratio ownership, world-readable ordinary configuration and assets, restricted secrets 0750/0640, operator enrollment, and shared writable roots 2775 with the existing access/default ACL policy. Apply writable-root ACLs to the workspace and /var/cache/notarius; stop managing retired Narratio spool/audio-cache roots. Existing roots, ACLs and data are not recursively migrated or removed. Runtime application state stays application-owned.

Preserve S3 endpoint/bucket/prefix/region and credential-reference defaults, enabled publication and its selected products. Keep transcript/output handoffs explicit where the suite coordinates producers and consumers. Optional tuning elsewhere inherits application defaults via nullable variables. Remove obsolete Narratio cache/resume/module fields. Default automatic cleanup to false, retaining run history and diagnostics; inventory may explicitly enable it.

Narratio --overlay testing still enables Notarius and selects its independent testing overlay. Apply gemini-flash-latest to all ordinary Scriptorium artifacts/families and to trim bounds, so testing also covers the trim call. Keep production provider keys usable through the existing credential lists. The testing overlay does not silently disable processing, change storage, duplicate Audita settings or impose a new cache invalidation policy.

Optional reference catalog

Support an optional Git-managed catalog at /usr/local/etc/narratio/reference-catalog, with configurable repository, revision and destination. Default the repository selection to null; an opting-in inventory supplies its source and revision. Import reference-catalog/catalog.yml as a required relative native source when selected. Custom checkout destinations must remain within the importing main's directory tree. Also expose nullable native setting/system maps for caller-managed files. Preserve native composition rather than adding a catalog loader or resource-fetching process at runtime.

../narratio-reference-catalog at 016473fd16b15847f3e913670c423faa7c35720b is a read-only example of this contract, not a selected public dependency: its local checkout has no configured origin and contains synthetic vocabulary. Default campaigns select neither its sample setting nor its sample system. Without a selection, Narratio still prepares empty setting/spells collections; Notarius retains its embedded spell vocabulary. Supplying real additional setting/system content is an inventory/asset-authoring choice, not a prerequisite for this integration. Tests can use a small synthetic catalog explicitly.

Operator handoff

Document public variable removals/replacements, immutable asset selection, native CLI selectors and required downstream configuration. Inventory examples contain credential names or encrypted-variable references, never actual keys.

Explain the new shared input formats, source-relative paths, flat outputs, cache reuse versus fresh experiments, and independent overlays. Preserve old authored sources and workspaces separately. Narratio accepts only local narratio.session-manifest.v2; old state is not converted by changing a marker. Regeneration or compatible product import into a new baseline is an operator workflow. Publication/restore no longer preserves the old execution ledger. Explain cleanup scope and the selected retention default explicitly.

Repository Ownership

  • ansible-role-dnd-pipeline: native composition, opinionated defaults, optional catalog deployment, imports/overlays, filesystem/credential policy, tests and migration guidance.
  • assets/campaigns and assets/narratio-prompts: authoritative compatible content on separate refs; no application-data conversion in the role.
  • Workspace: roadmap, later staged plan, tracking, selected revision evidence and any necessary orientation updates.
  • Application/framework/shared-schema sources and the local reference-catalog example: read-only contracts. Standalone roles are reused without redesign.
  • Collection and deployment consumer: unchanged until the distribution feature.

Constraints and Settled Decisions

Follow Ansible, testing and planning policy, the MVP architecture, and Decision 0002. This approved roadmap replaces retired version-specific suite wiring while preserving the separation of generic installers and D&D policy. Keep native resource defaults upstream-owned except for explicit suite choices.

Simplest Viable Implementation

Update existing dependency pins, defaults/specs and role variable bindings. Use ordinary Git tasks for selected assets/catalog, the existing file and ACL tasks for current roots, and template tasks for suite-owned fragments/overlays. Native Audita resources replace separate legacy profile deployment. Expose complete native maps/lists for inventory composition. The optional catalog adds only conditional checkout/import wiring. No runtime validators, version probes, assembly facts, state manifests, custom modules or compatibility parser are needed.

Acceptance Criteria

  • The standalone suite composes the reviewed role set and all five application selections with the new interfaces; retired variables are absent from active configuration and documented as migrations rather than aliases.
  • Compatible campaign and prompt commits are recorded and selected explicitly. Legacy asset main content and collection/consumer compatibility are preserved.
  • Both campaign/party documents validate offline through native inspection; migrated glossaries conform to the pinned shared schema. All six prompts and their source-relative message/schema resources resolve through native Scriptorium inspection/preparation without generation or a provider.
  • Audita schema 3, Notarius schema 6 and its complete pipeline, Scriptorium native resources, and Narratio base/testing composition validate offline. Domain artifact listing works with a migrated campaign/party and expands the existing family without creating processing state or contacting storage/providers.
  • Focused supplied-value cases prove backend/profile overrides, stage/list/map composition, selected-pipeline testing overlay, trim/artifact/family profile overrides, optional catalog binding, credential bootstrap and current lane handoffs. Test explicit overrides and useful falsey values, not default model identities, complete reports or native framework internals.
  • Retain meaningful service-account/human-group execution and shared-write coverage with synthetic credentials and a small fixture. Do not recheck module metadata or expand negative tests for self-evident guards. Remove obsolete command uses and redundant module/default assertions while adapting the harness.
  • Each role scenario has an immediate identical repeat with no reported changes. Syntax, production-profile lint, shell syntax, relevant offline integration and changed-document checks pass. Reuse the existing local test host and tooling; no controller deployment, paid model, preflight, mocked orchestration pipeline, full upstream release suite or live end-to-end run is an extra gate.
  • No data/secret/legacy-file cleanup or state migration occurs during convergence. README and handoff clearly identify compatibility, retention and testing limits. Record tested pipeline/asset revisions for later collection assembly and consumer adoption; do not claim live editorial or extraction quality.

Implementation Evidence

Independent review identified one prompt-input mismatch, resolved through the explicit variants recorded under review and remediation. The updated complete offline harness passed five clean repeats. Feature 0028 is closed, and its implementation repositories are published. The compatible asset branches and pipeline revisions are:

  • assets/campaigns native-v4: 488c2eb97b5c62efe51aa7af35a5ec9cb8b7a747. Legacy main remains d1193e8be4163c2742baa2517c9a048b6873622d.
  • assets/narratio-prompts native-v4: d15a630ddfec18ab505df3ea5b076f6a0a5fd4b3 after review remediation (original migration: 60e73a8). Legacy main remains c7e18454e5f02aedb0657d522f7c550f82d874ed.
  • Pipeline: e4f0c8fc492f5210eaeacd46ef91d747de094557 (core), 76aec69 (remove accidentally committed generated bytecode), and 12cdc04b7387cefcd0fe8d0402914c89d4c2f9f4 (optional catalog), followed by 63f1dd4fb43744c4df3f06c0f909c843f6eb68d0 (prompt-variant remediation). The last revision is the reviewed source for future collection assembly.

The pipeline's public role pins are Scriptorium e936d5200df675feeb53be235a175b608c0afc7c, Audita b818f6067789d7fdd09a8a4a54134452089811c8, Notarius 85cd3a397f63342df8309aa4f36d9900ff610e41, and Narratio 2a4e82c734a256a02281dbb6e63b348a7171f808; the Seriatim role pin remains v0.1.0 and its suite application selection v1.5.0. The two full asset commits above are the suite's selected revisions. Both asset compatibility branches and pipeline main are published at those revisions. Legacy asset main branches, the collection and the deployment consumer remain unchanged.

Both campaign and party files passed Narratio v4 config validate using a temporary synthetic main and explicit file paths. Both migrated glossaries passed jsonschema.Draft202012Validator against the v4-tagged embedded schema. The migrated entries and autocorrection rules were compared to the legacy sources. Scriptorium v0.16.0 config validate, promptkit show prompt and promptkit show prepared passed for all six IDs with synthetic inputs and source-relative message/schema resources. Initial prompt fixture checks exposed missing sequence-item placement and referenced optional inputs; the imports and preparation arguments were corrected before the successful run.

In the pipeline repository, bash -n tests/integration, git diff --check, Ansible playbook syntax checking and ansible-lint --profile production --offline passed. tests/integration passed for the core role with four clean repeats and again with optional catalog support with five clean repeats, each changed=0 and failed=0. It installed pinned public role/collection dependencies and selected unpublished asset commits via explicit local Git sources. The suite validated native application and testing configurations, selected Seriatim v1.4.0, inspected both campaigns/parties and the expanded family, prepared six prompts, exercised caller-composed pipelines and native overrides, and checked service-account/operator shared writes. The synthetic catalog passed shared-schema validation, was checked out by recorded Git revision, and its source-relative maps composed with a disjoint caller map. An initial lint failure from YAML indentation was corrected before passing. After the first full catalog run, fixture cleanup was adjusted to restore the no-catalog configuration first. The committed 12cdc04 harness then passed its complete suite again with five clean repeats and successful cleanup; native app validation also passed after cleanup. No production machinery was added beyond the planned assertion, Git/file tasks and native conditional import; test cleanup restoration keeps the temporary catalog from leaving a dangling import.

The authorized Ubuntu test host's application checkouts/binaries, account and suite configuration, managed roots and ACLs, and campaign/prompt checkouts were converged. Synthetic credential files and the resulting no-catalog suite configuration remain on the test host; temporary catalog and operator fixtures were removed. No existing sessions, legacy spool/cache data or old configuration files were migrated or cleaned. No provider, S3 transfer, preflight, live processing, editorial quality or operational deployment was validated.

Review and Remediation

Closed on 2026-12-03 after independent review and remediation of its one finding. The initial definitions declared previous recap optional while reading it unconditionally, causing native preparation to fail for first sessions. Released PromptKit does not expose automatic optional-input rendering; the user approved a configuration-only workaround rather than an application patch.

Prompt assets d15a630 provide current-only dnd.session_recap and dnd.character_meta_analysis definitions, plus explicit _with_previous variants that require previous recap. Pipeline 63f1dd4 pins those assets and omits previous-session bindings by default. Operators can select the alternate IDs and required bindings through the existing artifact/family mappings. Shared instructions, model selections, artifact keys, destinations, enabled states and testing overrides retain their existing meaning. Roster inputs are accurately declared required, matching Narratio's prepared party and derived players. No application code, placeholder files or runtime presence flags were introduced.

All eight prompt IDs passed native offline preparation. Current-only analysis was exercised without a recap; previous-aware analysis included supplied synthetic recap content. The complete updated pipeline integration suite passed fresh dependency installation, syntax checking, production-profile offline lint, native app/domain inspection, both variant overrides and existing composition, shared-write and catalog cases. All five immediate repeats reported changed=0 and failed=0. Catalog cleanup restored current-only, no-catalog configuration; post-cleanup Narratio native validation also passed. Shell/Python syntax, whitespace and local documentation links passed. No provider, S3 transfer, live processing, operational deployment or state migration was performed.

Publication completed for campaigns 488c2eb and prompts d15a630 on their native-v4 branches, and pipeline 63f1dd4 on main. The documentation-only PromptKit feature request is also published at 33cc00d; automatic optional sections remain future work, not a blocker to the approved workaround. The executed implementation plan and resolved remediation document were retired; this roadmap retains the decisions, review result and validation evidence.

Dependencies and Follow-up Work

Features 0024–0028 are complete. The next scope is collection assembly and consumer adoption: import pipeline 63f1dd4, update collection dependencies and consumer selections, and provide the operator handoff. Neither the collection nor the operational consumer was updated by Feature 0028. Actual deployment and online readiness remain separate operator activities. Agree on the next feature roadmap before preparing a new implementation plan.

Rationale for Approved Choices

1. Cleanup retention under Narratio v4

Default the migrated suite's cleanup setting to false for the initial v4 integration, retaining session run history, logs and diagnostics. Publication remains enabled. Operators can explicitly opt into true when they intend the new entire-run-history removal. This change to existing suite policy was explicitly approved rather than inferred from a version bump.

Alternative: retain the existing true default, preserving automatic cleanup as the suite's chosen behavior. This is viable if the broader deletion of all session attempts after successful publication is intended; document it clearly and retain the inventory override. Neither option authorizes cleanup at install time.

2. Production profiles removed from the native catalog

Use gpt-terra-latest for hostile/deranged rumors and the optional scene map, retaining the other available production defaults and gemini-flash-latest testing policy. It is a selected native catalog profile and avoids guessing replacement provider IDs for aion-2 and nemotron-3-ultra, which the old assets name without defining.

The alternative was to retain those public profile names and author explicit native profiles for operator-confirmed provider model IDs. That would preserve the exact model intent if those models remained available, but their IDs/settings would need separate review. The approved catalog replacement avoids that dependency. Do not silently choose a new provider model solely from the old profile name.

3. Native import containment

Released ConfigKit rejects absolute imports and confines relative imports to the main source's filesystem root, normally its canonical directory. The originally proposed shared prompt/catalog locations cannot be imported from the selected /usr/local/etc application mains. A native Scriptorium probe confirmed external imports fail and contained imports pass.

The approved layout places native prompts at /usr/local/etc/scriptorium/prompt-library and the optional catalog at /usr/local/etc/narratio/reference-catalog, importing both relatively. Preserve the campaign root, compatibility refs, ordinary readability, ownership and all other approved choices; leave legacy shared checkouts untouched. One Git checkout per selected asset remains sufficient.

Keeping shared destinations and requesting upstream external-source support was a viable alternative, but would introduce a release dependency. Config-local checkouts use the released contract directly without duplicate copies or a synchronization layer. Existing checkouts beneath /usr/local/share/narratio remain untouched; campaign assets retain their selected shared location.

Open Questions

None. Cleanup, profile replacement, asset compatibility and the config-local import layout are approved.

Upstream References