mirror-mind 0.0.1 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/log-session-end.sh +85 -0
- package/.claude/hooks/log-user-prompt.sh +85 -0
- package/.claude/hooks/mirror-inject.sh +85 -0
- package/.claude/hooks/session-start.sh +85 -0
- package/.gemini/hooks/log-assistant.sh +85 -0
- package/.gemini/hooks/log-user.sh +85 -0
- package/.gemini/hooks/session-end.sh +85 -0
- package/.gemini/hooks/session-start.sh +85 -0
- package/.pi/extensions/mirror-logger.ts +561 -0
- package/.pi/skills/mm-backup/SKILL.md +21 -0
- package/.pi/skills/mm-build/SKILL.md +1206 -0
- package/.pi/skills/mm-consolidate/SKILL.md +112 -0
- package/.pi/skills/mm-consult/SKILL.md +70 -0
- package/.pi/skills/mm-conversations/SKILL.md +16 -0
- package/.pi/skills/mm-discard/SKILL.md +39 -0
- package/.pi/skills/mm-explore/SKILL.md +255 -0
- package/.pi/skills/mm-help/SKILL.md +74 -0
- package/.pi/skills/mm-identity/SKILL.md +96 -0
- package/.pi/skills/mm-journal/SKILL.md +16 -0
- package/.pi/skills/mm-journey/SKILL.md +23 -0
- package/.pi/skills/mm-journeys/SKILL.md +15 -0
- package/.pi/skills/mm-memories/SKILL.md +17 -0
- package/.pi/skills/mm-mirror/SKILL.md +98 -0
- package/.pi/skills/mm-mute/SKILL.md +18 -0
- package/.pi/skills/mm-new/SKILL.md +18 -0
- package/.pi/skills/mm-recall/SKILL.md +17 -0
- package/.pi/skills/mm-release-notes/SKILL.md +52 -0
- package/.pi/skills/mm-seed/SKILL.md +19 -0
- package/.pi/skills/mm-shadow/SKILL.md +117 -0
- package/.pi/skills/mm-soul/SKILL.md +502 -0
- package/.pi/skills/mm-tasks/SKILL.md +24 -0
- package/.pi/skills/mm-update/SKILL.md +32 -0
- package/.pi/skills/mm-week/SKILL.md +28 -0
- package/.pi/skills/mm-welcome/SKILL.md +24 -0
- package/AGENTS.md +188 -0
- package/README.md +126 -9
- package/bin/loader.js +67 -0
- package/bin/mirror-hook.js +7 -0
- package/bin/mirror.js +7 -0
- package/docs/releases/index.md +99 -0
- package/docs/releases/pending-cutoffs.md +510 -0
- package/docs/releases/v0.10.0.md +123 -0
- package/docs/releases/v0.10.1.md +66 -0
- package/docs/releases/v0.10.10.md +51 -0
- package/docs/releases/v0.10.11.md +39 -0
- package/docs/releases/v0.10.12.md +57 -0
- package/docs/releases/v0.10.13.md +35 -0
- package/docs/releases/v0.10.14.md +42 -0
- package/docs/releases/v0.10.15.md +53 -0
- package/docs/releases/v0.10.16.md +35 -0
- package/docs/releases/v0.10.17.md +43 -0
- package/docs/releases/v0.10.2.md +64 -0
- package/docs/releases/v0.10.3.md +78 -0
- package/docs/releases/v0.10.4.md +42 -0
- package/docs/releases/v0.10.5.md +57 -0
- package/docs/releases/v0.10.6.md +47 -0
- package/docs/releases/v0.10.7.md +53 -0
- package/docs/releases/v0.10.8.md +49 -0
- package/docs/releases/v0.10.9.md +37 -0
- package/docs/releases/v0.11.0.md +86 -0
- package/docs/releases/v0.12.0.md +67 -0
- package/docs/releases/v0.13.0.md +64 -0
- package/docs/releases/v0.14.0.md +68 -0
- package/docs/releases/v0.15.0.md +48 -0
- package/docs/releases/v0.16.0.md +50 -0
- package/docs/releases/v0.16.1.md +55 -0
- package/docs/releases/v0.16.2.md +36 -0
- package/docs/releases/v0.17.0.md +50 -0
- package/docs/releases/v0.17.1.md +58 -0
- package/docs/releases/v0.17.2.md +42 -0
- package/docs/releases/v0.17.3.md +58 -0
- package/docs/releases/v0.18.0.md +84 -0
- package/docs/releases/v0.18.1.md +51 -0
- package/docs/releases/v0.18.2.md +69 -0
- package/docs/releases/v0.19.0.md +85 -0
- package/docs/releases/v0.19.1.md +46 -0
- package/docs/releases/v0.20.0.md +85 -0
- package/docs/releases/v0.21.0.md +61 -0
- package/docs/releases/v0.21.1.md +47 -0
- package/docs/releases/v0.22.0.md +77 -0
- package/docs/releases/v0.22.1.md +42 -0
- package/docs/releases/v0.23.0.md +105 -0
- package/docs/releases/v0.24.0.md +125 -0
- package/docs/releases/v0.25.0.md +107 -0
- package/docs/releases/v0.26.0.md +139 -0
- package/docs/releases/v0.26.1.md +65 -0
- package/docs/releases/v0.26.2.md +43 -0
- package/docs/releases/v0.27.0.md +63 -0
- package/docs/releases/v0.28.0.md +59 -0
- package/docs/releases/v0.29.0.md +61 -0
- package/docs/releases/v0.29.1.md +59 -0
- package/docs/releases/v0.29.2.md +59 -0
- package/docs/releases/v0.29.3.md +93 -0
- package/docs/releases/v0.30.0.md +75 -0
- package/docs/releases/v0.30.1.md +93 -0
- package/docs/releases/v0.30.2.md +66 -0
- package/docs/releases/v0.31.0.md +122 -0
- package/docs/releases/v0.31.1.md +142 -0
- package/docs/releases/v0.31.10.md +118 -0
- package/docs/releases/v0.31.11.md +88 -0
- package/docs/releases/v0.31.12.md +105 -0
- package/docs/releases/v0.31.13.md +99 -0
- package/docs/releases/v0.31.14.md +97 -0
- package/docs/releases/v0.31.2.md +115 -0
- package/docs/releases/v0.31.3.md +142 -0
- package/docs/releases/v0.31.4.md +117 -0
- package/docs/releases/v0.31.5.md +155 -0
- package/docs/releases/v0.31.6.md +132 -0
- package/docs/releases/v0.31.7.md +132 -0
- package/docs/releases/v0.31.8.md +120 -0
- package/docs/releases/v0.31.9.md +120 -0
- package/docs/releases/v0.32.0.md +261 -0
- package/docs/releases/v0.32.1.md +59 -0
- package/docs/releases/v0.8.0.md +118 -0
- package/docs/releases/v0.9.0.md +98 -0
- package/docs/releases/v0.9.1.md +83 -0
- package/package.json +102 -6
- package/plugins/mirror-mind/.claude-plugin/plugin.json +13 -0
- package/plugins/mirror-mind/hooks/hooks.json +50 -0
- package/plugins/mirror-mind/hooks/log-session-end.sh +98 -0
- package/plugins/mirror-mind/hooks/log-user-prompt.sh +98 -0
- package/plugins/mirror-mind/hooks/mirror-inject.sh +98 -0
- package/plugins/mirror-mind/hooks/session-start.sh +98 -0
- package/plugins/mirror-mind/mcp/launch.sh +52 -0
- package/plugins/mirror-mind/skills/mm-backup/SKILL.md +27 -0
- package/plugins/mirror-mind/skills/mm-build/SKILL.md +1206 -0
- package/plugins/mirror-mind/skills/mm-consolidate/SKILL.md +112 -0
- package/plugins/mirror-mind/skills/mm-consult/SKILL.md +83 -0
- package/plugins/mirror-mind/skills/mm-conversations/SKILL.md +17 -0
- package/plugins/mirror-mind/skills/mm-discard/SKILL.md +40 -0
- package/plugins/mirror-mind/skills/mm-explore/SKILL.md +241 -0
- package/plugins/mirror-mind/skills/mm-help/SKILL.md +104 -0
- package/plugins/mirror-mind/skills/mm-identity/SKILL.md +96 -0
- package/plugins/mirror-mind/skills/mm-journal/SKILL.md +21 -0
- package/plugins/mirror-mind/skills/mm-journey/SKILL.md +37 -0
- package/plugins/mirror-mind/skills/mm-journeys/SKILL.md +15 -0
- package/plugins/mirror-mind/skills/mm-memories/SKILL.md +20 -0
- package/plugins/mirror-mind/skills/mm-mirror/SKILL.md +65 -0
- package/plugins/mirror-mind/skills/mm-mute/SKILL.md +18 -0
- package/plugins/mirror-mind/skills/mm-new/SKILL.md +18 -0
- package/plugins/mirror-mind/skills/mm-recall/SKILL.md +17 -0
- package/plugins/mirror-mind/skills/mm-release-notes/SKILL.md +31 -0
- package/plugins/mirror-mind/skills/mm-seed/SKILL.md +15 -0
- package/plugins/mirror-mind/skills/mm-shadow/SKILL.md +117 -0
- package/plugins/mirror-mind/skills/mm-soul/SKILL.md +488 -0
- package/plugins/mirror-mind/skills/mm-tasks/SKILL.md +36 -0
- package/plugins/mirror-mind/skills/mm-update/SKILL.md +30 -0
- package/plugins/mirror-mind/skills/mm-week/SKILL.md +46 -0
- package/plugins/mirror-mind/skills/mm-welcome/SKILL.md +22 -0
- package/scripts/codex-hooks/session-end.sh +85 -0
- package/scripts/codex-hooks/session-start.sh +85 -0
- package/scripts/codex-mirror.sh +48 -0
- package/templates/identity/README.md +119 -0
- package/templates/identity/ego/behavior.yaml +52 -0
- package/templates/identity/ego/constraints.yaml +15 -0
- package/templates/identity/ego/identity.yaml +43 -0
- package/templates/identity/journeys/personal-growth.yaml +39 -0
- package/templates/identity/organization/identity.yaml +24 -0
- package/templates/identity/organization/principles.yaml +17 -0
- package/templates/identity/personas/coach.yaml +94 -0
- package/templates/identity/personas/designer.yaml +93 -0
- package/templates/identity/personas/doctor.yaml +96 -0
- package/templates/identity/personas/engineer.yaml +77 -0
- package/templates/identity/personas/financial.yaml +97 -0
- package/templates/identity/personas/prompt-engineer.yaml +122 -0
- package/templates/identity/personas/researcher.yaml +88 -0
- package/templates/identity/personas/strategist.yaml +91 -0
- package/templates/identity/personas/teacher.yaml +95 -0
- package/templates/identity/personas/therapist.yaml +91 -0
- package/templates/identity/personas/thinker.yaml +74 -0
- package/templates/identity/personas/writer.yaml +76 -0
- package/templates/identity/self/config.yaml +16 -0
- package/templates/identity/self/soul.yaml +105 -0
- package/templates/identity/user/identity.yaml +30 -0
- package/ts/src/backup/staging.ts +62 -0
- package/ts/src/backup/zipBackup.ts +267 -0
- package/ts/src/backup/zipReader.ts +109 -0
- package/ts/src/backup/zipWriter.ts +148 -0
- package/ts/src/builder/activeCheckpoint.ts +134 -0
- package/ts/src/builder/aggregateStatus.ts +34 -0
- package/ts/src/builder/approve.ts +149 -0
- package/ts/src/builder/argv.ts +292 -0
- package/ts/src/builder/ariadMethod.ts +536 -0
- package/ts/src/builder/artifacts/artifactSurfaces.ts +106 -0
- package/ts/src/builder/artifacts/artifactWriter.ts +113 -0
- package/ts/src/builder/artifacts/closureArtifacts.ts +199 -0
- package/ts/src/builder/artifacts/deliveryStoryArtifacts.ts +316 -0
- package/ts/src/builder/artifacts/planArtifacts.ts +242 -0
- package/ts/src/builder/artifacts/scaffoldSections.ts +273 -0
- package/ts/src/builder/artifacts/scaffoldState.ts +227 -0
- package/ts/src/builder/artifacts/storyFiles.ts +61 -0
- package/ts/src/builder/artifacts/storyIndex.ts +166 -0
- package/ts/src/builder/cadence.ts +59 -0
- package/ts/src/builder/card.ts +192 -0
- package/ts/src/builder/checkpointRefused.ts +66 -0
- package/ts/src/builder/closure.ts +964 -0
- package/ts/src/builder/commands.ts +2053 -0
- package/ts/src/builder/cursorPosition.ts +176 -0
- package/ts/src/builder/cursorTransitions.ts +77 -0
- package/ts/src/builder/deliveryCursor.ts +577 -0
- package/ts/src/builder/deliveryStoryClosure.ts +521 -0
- package/ts/src/builder/deliveryStoryPlan.ts +536 -0
- package/ts/src/builder/deliveryStoryReady.ts +160 -0
- package/ts/src/builder/deliveryStoryRoadmapClosure.ts +151 -0
- package/ts/src/builder/expand.ts +336 -0
- package/ts/src/builder/flowUnit.ts +339 -0
- package/ts/src/builder/homeSurface.ts +122 -0
- package/ts/src/builder/implementationGuard.ts +125 -0
- package/ts/src/builder/index.ts +11 -0
- package/ts/src/builder/lifecycleRefusal.ts +92 -0
- package/ts/src/builder/lifecycleRibbon.ts +159 -0
- package/ts/src/builder/load.ts +313 -0
- package/ts/src/builder/methodAdoption.ts +113 -0
- package/ts/src/builder/methodDefinition.ts +429 -0
- package/ts/src/builder/methodInspection.ts +371 -0
- package/ts/src/builder/plan.ts +408 -0
- package/ts/src/builder/planPreauthorization.ts +265 -0
- package/ts/src/builder/prepare.ts +225 -0
- package/ts/src/builder/projectPaths.ts +64 -0
- package/ts/src/builder/pull.ts +356 -0
- package/ts/src/builder/pullCandidates.ts +463 -0
- package/ts/src/builder/pullCandidatesRender.ts +238 -0
- package/ts/src/builder/refinementField.ts +93 -0
- package/ts/src/builder/releaseIntent.ts +173 -0
- package/ts/src/builder/resumeState.ts +84 -0
- package/ts/src/builder/resumeSurface.ts +149 -0
- package/ts/src/builder/roadmapGrammar.ts +300 -0
- package/ts/src/builder/roadmapScan.ts +97 -0
- package/ts/src/builder/roadmapScope.ts +210 -0
- package/ts/src/builder/scopePhrases.ts +146 -0
- package/ts/src/builder/storyPaths.ts +196 -0
- package/ts/src/builder/storyPlanPreauthorization.ts +287 -0
- package/ts/src/builder/surfaceProtocol.ts +42 -0
- package/ts/src/builder/templateGeneration.ts +148 -0
- package/ts/src/builder/transition.ts +178 -0
- package/ts/src/consult/args.ts +99 -0
- package/ts/src/consult/core.ts +122 -0
- package/ts/src/consult/modelCatalog.ts +55 -0
- package/ts/src/consult/render.ts +47 -0
- package/ts/src/conversation/append.ts +414 -0
- package/ts/src/conversation/backfill.ts +387 -0
- package/ts/src/conversation/closeTail.ts +467 -0
- package/ts/src/conversation/extraction.ts +333 -0
- package/ts/src/conversation/extractionDriver.ts +130 -0
- package/ts/src/conversation/extractionRun.ts +70 -0
- package/ts/src/conversation/journeyInference.ts +165 -0
- package/ts/src/conversation/journeyRepair.ts +114 -0
- package/ts/src/conversation/lifecycleFaces.ts +197 -0
- package/ts/src/conversation/lifecycleWrites.ts +313 -0
- package/ts/src/conversation/listing.ts +77 -0
- package/ts/src/conversation/logger.ts +576 -0
- package/ts/src/conversation/loggerCli.ts +282 -0
- package/ts/src/conversation/loggerRuntime.ts +259 -0
- package/ts/src/conversation/metadataLifecycle.ts +443 -0
- package/ts/src/conversation/recall.ts +66 -0
- package/ts/src/conversation/sessionComposites.ts +258 -0
- package/ts/src/conversation/sessionImport.ts +90 -0
- package/ts/src/conversation/transcriptBackfill.ts +141 -0
- package/ts/src/cultivation/applyActions.ts +241 -0
- package/ts/src/cultivation/cluster.ts +86 -0
- package/ts/src/cultivation/consolidationStore.ts +281 -0
- package/ts/src/cultivation/promptContext.ts +62 -0
- package/ts/src/cultivation/propose.ts +305 -0
- package/ts/src/cultivation/scan.ts +155 -0
- package/ts/src/db/backupGate.ts +47 -0
- package/ts/src/db/bootstrap.ts +108 -0
- package/ts/src/db/bootstrapLock.ts +223 -0
- package/ts/src/db/copyGuard.ts +60 -0
- package/ts/src/db/database.ts +397 -0
- package/ts/src/db/decode.ts +66 -0
- package/ts/src/db/ftsIntegrity.ts +41 -0
- package/ts/src/db/migrateOnOpen.ts +214 -0
- package/ts/src/db/migrations.ts +576 -0
- package/ts/src/db/readyOnOpen.ts +35 -0
- package/ts/src/db/rowDecode.ts +42 -0
- package/ts/src/db/schema.ts +432 -0
- package/ts/src/db/schemaInventory.ts +225 -0
- package/ts/src/db/schemaInventorySnapshot.ts +2107 -0
- package/ts/src/db/schemaState.ts +91 -0
- package/ts/src/db/schemaTsDivergence.ts +114 -0
- package/ts/src/descriptor/descriptorRead.ts +49 -0
- package/ts/src/docs/docsLint.ts +265 -0
- package/ts/src/explorer/handoff.ts +522 -0
- package/ts/src/explorer/render.ts +335 -0
- package/ts/src/explorer/story.ts +769 -0
- package/ts/src/explorer/transition.ts +72 -0
- package/ts/src/extensions/bindings.ts +170 -0
- package/ts/src/extensions/catalog.ts +249 -0
- package/ts/src/extensions/catalogCommands.ts +513 -0
- package/ts/src/extensions/catalogWrites.ts +652 -0
- package/ts/src/extensions/contextRuntime.ts +325 -0
- package/ts/src/extensions/dispatch.ts +374 -0
- package/ts/src/extensions/errors.ts +24 -0
- package/ts/src/extensions/manifest.ts +356 -0
- package/ts/src/extensions/migrations.ts +350 -0
- package/ts/src/extraction/conversation.ts +304 -0
- package/ts/src/extraction/conversationMetadata.ts +206 -0
- package/ts/src/extraction/fencing.ts +106 -0
- package/ts/src/extraction/json.ts +17 -0
- package/ts/src/extraction/prompts.ts +470 -0
- package/ts/src/frontDoor/args.ts +30 -0
- package/ts/src/frontDoor/argvShape.ts +106 -0
- package/ts/src/frontDoor/buildLoadRuntime.ts +139 -0
- package/ts/src/frontDoor/buildRoute.ts +398 -0
- package/ts/src/frontDoor/cli.ts +1865 -0
- package/ts/src/frontDoor/cloneRoleGuard.ts +98 -0
- package/ts/src/frontDoor/consultRoute.ts +50 -0
- package/ts/src/frontDoor/contentTailRoute.ts +239 -0
- package/ts/src/frontDoor/conversationLoggerRoute.ts +73 -0
- package/ts/src/frontDoor/cultivationRoute.ts +210 -0
- package/ts/src/frontDoor/dbPath.ts +131 -0
- package/ts/src/frontDoor/dbSafetyToolsRoute.ts +240 -0
- package/ts/src/frontDoor/exploreRoute.ts +572 -0
- package/ts/src/frontDoor/extensionCatalogRoute.ts +252 -0
- package/ts/src/frontDoor/frontDoorLog.ts +57 -0
- package/ts/src/frontDoor/identityWrite.ts +36 -0
- package/ts/src/frontDoor/journeyWriteRoute.ts +26 -0
- package/ts/src/frontDoor/lifecycleWriteRoute.ts +110 -0
- package/ts/src/frontDoor/liveBackup.ts +100 -0
- package/ts/src/frontDoor/mirrorModeRoute.ts +163 -0
- package/ts/src/frontDoor/namedRefusal.ts +35 -0
- package/ts/src/frontDoor/nodeSupport.ts +24 -0
- package/ts/src/frontDoor/render/consolidate.ts +199 -0
- package/ts/src/frontDoor/render/conversations.ts +33 -0
- package/ts/src/frontDoor/render/cultivationShared.ts +21 -0
- package/ts/src/frontDoor/render/descriptor.ts +20 -0
- package/ts/src/frontDoor/render/detectPersona.ts +50 -0
- package/ts/src/frontDoor/render/icons.ts +13 -0
- package/ts/src/frontDoor/render/identity.ts +59 -0
- package/ts/src/frontDoor/render/identityRows.ts +17 -0
- package/ts/src/frontDoor/render/inspectPersona.ts +53 -0
- package/ts/src/frontDoor/render/journeyStatus.ts +78 -0
- package/ts/src/frontDoor/render/journeys.ts +79 -0
- package/ts/src/frontDoor/render/list.ts +41 -0
- package/ts/src/frontDoor/render/memories.ts +67 -0
- package/ts/src/frontDoor/render/recall.ts +49 -0
- package/ts/src/frontDoor/render/shadow.ts +155 -0
- package/ts/src/frontDoor/render/tasks.ts +99 -0
- package/ts/src/frontDoor/render/tasksImportSync.ts +63 -0
- package/ts/src/frontDoor/render/week.ts +113 -0
- package/ts/src/frontDoor/routing.ts +999 -0
- package/ts/src/frontDoor/runtimeRoute.ts +623 -0
- package/ts/src/frontDoor/searchRoute.ts +166 -0
- package/ts/src/frontDoor/seedPaths.ts +98 -0
- package/ts/src/frontDoor/soulRoute.ts +433 -0
- package/ts/src/frontDoor/tasksImportSyncRoute.ts +110 -0
- package/ts/src/frontDoor/tasksWriteRoute.ts +101 -0
- package/ts/src/frontDoor/usage.ts +176 -0
- package/ts/src/guards/claudePlugin.ts +252 -0
- package/ts/src/guards/packContents.ts +306 -0
- package/ts/src/guards/piSourcedSkills.ts +70 -0
- package/ts/src/guards/retiredRouteShadows.ts +57 -0
- package/ts/src/guards/retiredSurfaces.ts +564 -0
- package/ts/src/hooks/claude.ts +176 -0
- package/ts/src/hooks/codex.ts +45 -0
- package/ts/src/hooks/gemini.ts +126 -0
- package/ts/src/hooks/main.ts +109 -0
- package/ts/src/hooks/mirrorState.ts +71 -0
- package/ts/src/hooks/payload.ts +68 -0
- package/ts/src/hooks/runtime.ts +159 -0
- package/ts/src/identity/applyConsolidationIdentityUpdate.ts +67 -0
- package/ts/src/identity/descriptorGenerate.ts +162 -0
- package/ts/src/identity/identityEdit.ts +143 -0
- package/ts/src/identity/identityKey.ts +77 -0
- package/ts/src/identity/identityRead.ts +69 -0
- package/ts/src/identity/identityStore.ts +80 -0
- package/ts/src/identity/journeyListing.ts +53 -0
- package/ts/src/identity/personaInspect.ts +44 -0
- package/ts/src/identity/personaListing.ts +37 -0
- package/ts/src/identity/setIdentity.ts +64 -0
- package/ts/src/index.ts +231 -0
- package/ts/src/init/init.ts +111 -0
- package/ts/src/journey/journeyOptions.ts +131 -0
- package/ts/src/journey/journeyRemoval.ts +158 -0
- package/ts/src/journey/journeyStatus.ts +149 -0
- package/ts/src/journey/journeySyncFile.ts +87 -0
- package/ts/src/journey/journeyWrite.ts +203 -0
- package/ts/src/journey/parentJourney.ts +41 -0
- package/ts/src/journey/validateParentJourney.ts +55 -0
- package/ts/src/mcp/boundary.ts +151 -0
- package/ts/src/mcp/guards.ts +244 -0
- package/ts/src/mcp/main.ts +121 -0
- package/ts/src/mcp/payload.ts +141 -0
- package/ts/src/mcp/protocol.ts +141 -0
- package/ts/src/mcp/readModels.ts +241 -0
- package/ts/src/mcp/registry.ts +201 -0
- package/ts/src/mcp/serve.ts +120 -0
- package/ts/src/mcp/tools/deterministic.ts +137 -0
- package/ts/src/mcp/tools/providerCrossing.ts +187 -0
- package/ts/src/mcp/wire.ts +8 -0
- package/ts/src/memory/journal.ts +180 -0
- package/ts/src/memory/listing.ts +107 -0
- package/ts/src/memory/memoryWrite.ts +88 -0
- package/ts/src/memory/reinforcement.ts +35 -0
- package/ts/src/mirror/context.ts +161 -0
- package/ts/src/mirror/defaultResolution.ts +199 -0
- package/ts/src/mirror/orchestration.ts +364 -0
- package/ts/src/mirror/reception.ts +194 -0
- package/ts/src/mirror/render.ts +75 -0
- package/ts/src/mirror/runtimeSession.ts +205 -0
- package/ts/src/mode/operatingMode.ts +148 -0
- package/ts/src/observability/callOutcome.ts +115 -0
- package/ts/src/observability/inspectLedger.ts +329 -0
- package/ts/src/observability/ledgerHooks.ts +126 -0
- package/ts/src/observability/llmCalls.ts +154 -0
- package/ts/src/persona/detectPersona.ts +81 -0
- package/ts/src/planning/promptAssembly.ts +111 -0
- package/ts/src/planning/weekPending.ts +81 -0
- package/ts/src/planning/weekPlan.ts +183 -0
- package/ts/src/planning/weekSave.ts +117 -0
- package/ts/src/providers/config.ts +189 -0
- package/ts/src/providers/cost.ts +64 -0
- package/ts/src/providers/credits.ts +204 -0
- package/ts/src/providers/embedding.ts +321 -0
- package/ts/src/providers/familyProviders.ts +147 -0
- package/ts/src/providers/llm.ts +334 -0
- package/ts/src/providers/openrouter.ts +244 -0
- package/ts/src/providers/redaction.ts +110 -0
- package/ts/src/providers/replay.ts +15 -0
- package/ts/src/providers/transport.ts +410 -0
- package/ts/src/repair/encodingRepair.ts +253 -0
- package/ts/src/runtime/backup.ts +151 -0
- package/ts/src/runtime/channel.ts +146 -0
- package/ts/src/runtime/config.ts +168 -0
- package/ts/src/runtime/diagnose.ts +686 -0
- package/ts/src/runtime/git.ts +510 -0
- package/ts/src/runtime/installKind.ts +220 -0
- package/ts/src/runtime/migrate.ts +154 -0
- package/ts/src/runtime/packageIdentity.ts +102 -0
- package/ts/src/runtime/releaseNotes.ts +244 -0
- package/ts/src/runtime/status.ts +557 -0
- package/ts/src/runtime/strategies/clone.ts +200 -0
- package/ts/src/runtime/strategies/package.ts +328 -0
- package/ts/src/runtime/treeRoot.ts +30 -0
- package/ts/src/runtime/update.ts +445 -0
- package/ts/src/runtime/updateGate.ts +40 -0
- package/ts/src/runtime/updatePipeline.ts +159 -0
- package/ts/src/runtime/version.ts +36 -0
- package/ts/src/runtime/wiring.ts +130 -0
- package/ts/src/search/memorySearch.ts +338 -0
- package/ts/src/search/ranker.ts +154 -0
- package/ts/src/seed/seed.ts +256 -0
- package/ts/src/seed/seedYaml.ts +133 -0
- package/ts/src/soul/apply.ts +218 -0
- package/ts/src/soul/harvest.ts +267 -0
- package/ts/src/soul/prompts/soul_beauty_voice.md +103 -0
- package/ts/src/soul/prompts/soul_self_voice.md +219 -0
- package/ts/src/soul/prompts/soul_wisdom_voice.md +121 -0
- package/ts/src/soul/prompts.ts +85 -0
- package/ts/src/soul/render.ts +358 -0
- package/ts/src/soul/state.ts +212 -0
- package/ts/src/soul/transition.ts +37 -0
- package/ts/src/tasks/journeyPathParse.ts +113 -0
- package/ts/src/tasks/taskImportSync.ts +142 -0
- package/ts/src/tasks/taskStore.ts +312 -0
- package/ts/src/tasks/weekView.ts +120 -0
- package/ts/src/util/clipCodePoints.ts +26 -0
- package/ts/src/util/paths.ts +63 -0
- package/ts/src/util/program.ts +9 -0
- package/ts/src/util/pyGenerators.ts +144 -0
- package/ts/src/util/pythonText.ts +317 -0
- package/ts/src/util/semver.ts +45 -0
- package/ts/src/util/shellWord.ts +25 -0
- package/ts/src/util/slug.ts +64 -0
- package/ts/src/welcome/card.ts +339 -0
- package/ts/src/welcome/statusLine.ts +101 -0
- package/ts/src/welcome/updateCache.ts +129 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
// CV22.DS7.US8 plateau 1 — the Ariad method definition, as data.
|
|
2
|
+
//
|
|
3
|
+
// Port of `src/memory/builder/ariad_method.py`: 663 lines with no logic in them.
|
|
4
|
+
// Nine lifecycle events, a taxonomy, three work-item levels, four cadence
|
|
5
|
+
// profiles, three checkpoints, nine contracts carrying ~60 rule strings, eleven
|
|
6
|
+
// surfaces, one surface route, nine templates, and the open questions.
|
|
7
|
+
//
|
|
8
|
+
// Porting data has no behavior to characterize. What it has is TRANSCRIPTION
|
|
9
|
+
// RISK, and the blast radius is real: `prepare-templates` writes these nine
|
|
10
|
+
// template bodies into the user's own repository, and `inspect-method ariad`
|
|
11
|
+
// renders a contract's rules as a COUNT (`rules: 7`), so a typo inside a rule
|
|
12
|
+
// string is invisible in every surface. The guard is therefore structural, not
|
|
13
|
+
// visual — `builder-method.golden.json` carries a complete field-by-field dump
|
|
14
|
+
// of the Python definition and the test asserts deep equality against it.
|
|
15
|
+
//
|
|
16
|
+
// Two naming rules, and the second one matters:
|
|
17
|
+
//
|
|
18
|
+
// 1. Structural fields are camelCase, the project convention for a ported
|
|
19
|
+
// dataclass (`ExplorerStory` set it in US7) and the shape that stays after
|
|
20
|
+
// DS10 deletes the Python original.
|
|
21
|
+
// 2. The keys INSIDE `policies`, `openQuestions`, and `stateSemantics` are
|
|
22
|
+
// preserved exactly as authored — `message_style`, `allowed_after`,
|
|
23
|
+
// `final_dsl_file_format`. They are not field names; they are content.
|
|
24
|
+
// `_append_mapping_fields` prints them straight into the inspection
|
|
25
|
+
// surface, so camelCasing them would rewrite the DSL and change bytes a
|
|
26
|
+
// Navigator reads.
|
|
27
|
+
//
|
|
28
|
+
// Nothing here is a place to improve Ariad. A rule whose wording looks wrong is
|
|
29
|
+
// a CR against the method, not an edit in a port.
|
|
30
|
+
|
|
31
|
+
import type { MethodDefinition } from "./methodDefinition.ts";
|
|
32
|
+
|
|
33
|
+
export const ARIAD_METHOD: MethodDefinition = {
|
|
34
|
+
id: "ariad",
|
|
35
|
+
label: "Ariad",
|
|
36
|
+
resolution: {
|
|
37
|
+
layers: ["method_default", "project_config", "journey_config", "navigator_override"],
|
|
38
|
+
conflictPolicy: "explicit_override",
|
|
39
|
+
audit: true,
|
|
40
|
+
},
|
|
41
|
+
taxonomy: {
|
|
42
|
+
stateVocabulary: ["Planned", "Active", "Blocked", "Validated", "Done", "Deferred", "Dropped"],
|
|
43
|
+
levels: [
|
|
44
|
+
{
|
|
45
|
+
id: "cv",
|
|
46
|
+
label: "Capability Value",
|
|
47
|
+
contains: ["delivery_story"],
|
|
48
|
+
allowedStates: ["Planned", "Active", "Blocked", "Done", "Deferred", "Dropped"],
|
|
49
|
+
stateSemantics: {
|
|
50
|
+
Done: "the project reached the value boundary named by this CV",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "delivery_story",
|
|
55
|
+
label: "Delivery Story",
|
|
56
|
+
contains: ["user_story", "technical_story"],
|
|
57
|
+
allowedStates: ["Planned", "Active", "Blocked", "Validated", "Done", "Deferred", "Dropped"],
|
|
58
|
+
stateSemantics: {
|
|
59
|
+
Validated:
|
|
60
|
+
"child stories passed their relevant validation, but delivery story closure may still be pending",
|
|
61
|
+
Done: "child stories produced a coherent delivery outcome and the project history reflects that outcome",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "user_story",
|
|
66
|
+
label: "User Story",
|
|
67
|
+
contains: ["task"],
|
|
68
|
+
allowedStates: ["Planned", "Active", "Blocked", "Validated", "Done", "Deferred", "Dropped"],
|
|
69
|
+
stateSemantics: {
|
|
70
|
+
Validated:
|
|
71
|
+
"observable behavior or capability passed automated evidence and Navigator-facing validation",
|
|
72
|
+
Done: "validated behavior is coherent, reviewed, recorded, and absorbed into its parent delivery arc",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "technical_story",
|
|
77
|
+
label: "Technical Story",
|
|
78
|
+
contains: ["task"],
|
|
79
|
+
allowedStates: ["Planned", "Active", "Blocked", "Validated", "Done", "Deferred", "Dropped"],
|
|
80
|
+
stateSemantics: {
|
|
81
|
+
Validated:
|
|
82
|
+
"internal capability passed automated or internal evidence sufficient for the delivery story",
|
|
83
|
+
Done: "technical substrate is coherent, reviewed, recorded, and ready for its parent delivery arc",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "task",
|
|
88
|
+
label: "Task",
|
|
89
|
+
contains: [],
|
|
90
|
+
allowedStates: ["Planned", "Active", "Blocked", "Done"],
|
|
91
|
+
stateSemantics: {
|
|
92
|
+
Done: "concrete local work is complete inside its parent story",
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
lifecycle: [
|
|
98
|
+
{
|
|
99
|
+
id: "pull",
|
|
100
|
+
meaning: "chooses the focus",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "prepare",
|
|
104
|
+
meaning: "reads the terrain",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "expand",
|
|
108
|
+
meaning: "unfolds the granularity",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "plan",
|
|
112
|
+
meaning: "firms the contract",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "implement",
|
|
116
|
+
meaning: "changes the system",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "validation",
|
|
120
|
+
meaning: "proves behavior",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "review",
|
|
124
|
+
meaning: "faces the debt",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "coherence",
|
|
128
|
+
meaning: "integrates the traces",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "done",
|
|
132
|
+
meaning: "records and closes",
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
workItemLevels: [
|
|
136
|
+
{
|
|
137
|
+
id: "delivery_story",
|
|
138
|
+
label: "Delivery Story",
|
|
139
|
+
implementableByDefault: false,
|
|
140
|
+
expandsTo: ["user_story", "technical_story"],
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "user_story",
|
|
144
|
+
label: "User Story",
|
|
145
|
+
implementableByDefault: true,
|
|
146
|
+
expandsTo: [],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "technical_story",
|
|
150
|
+
label: "Technical Story",
|
|
151
|
+
implementableByDefault: true,
|
|
152
|
+
expandsTo: [],
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
cadenceProfiles: [
|
|
156
|
+
{
|
|
157
|
+
id: "stepwise",
|
|
158
|
+
label: "Stepwise",
|
|
159
|
+
stopPolicy: "stop_after_every_phase",
|
|
160
|
+
active: true,
|
|
161
|
+
planApprovalPolicy: "navigator_approval",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: "checkpoint",
|
|
165
|
+
label: "Checkpoint",
|
|
166
|
+
stopPolicy: "continue_until_next_method_checkpoint",
|
|
167
|
+
active: true,
|
|
168
|
+
planApprovalPolicy: "navigator_approval",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: "accelerated",
|
|
172
|
+
label: "Accelerated",
|
|
173
|
+
stopPolicy: "continue_through_story_plan_to_navigator_validation",
|
|
174
|
+
active: true,
|
|
175
|
+
planApprovalPolicy: "bounded_story_authority",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "autonomous",
|
|
179
|
+
label: "Autonomous",
|
|
180
|
+
stopPolicy: "continue_until_hard_constraint_with_explicit_limits",
|
|
181
|
+
active: true,
|
|
182
|
+
planApprovalPolicy: "navigator_approval",
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
checkpoints: [
|
|
186
|
+
{
|
|
187
|
+
id: "after_plan",
|
|
188
|
+
occursAfter: "plan",
|
|
189
|
+
blocks: ["implement"],
|
|
190
|
+
requiredArtifacts: ["plan"],
|
|
191
|
+
requiredConfirmations: ["navigator_approval"],
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: "navigator_validation",
|
|
195
|
+
occursAfter: "validation",
|
|
196
|
+
blocks: ["done"],
|
|
197
|
+
requiredArtifacts: ["validation_route", "validation_evidence"],
|
|
198
|
+
requiredConfirmations: ["navigator_validation"],
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: "review_decision",
|
|
202
|
+
occursAfter: "review",
|
|
203
|
+
blocks: ["coherence"],
|
|
204
|
+
requiredArtifacts: ["review_report"],
|
|
205
|
+
requiredConfirmations: ["navigator_debt_decision"],
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
contracts: [
|
|
209
|
+
{
|
|
210
|
+
id: "pull_contract",
|
|
211
|
+
appliesAt: "pull",
|
|
212
|
+
rules: [
|
|
213
|
+
"choose an explicit focus before delivery work begins",
|
|
214
|
+
"classify the pulled work as delivery_story, user_story, technical_story, task, or maintenance",
|
|
215
|
+
"do not start roadmap candidates automatically",
|
|
216
|
+
"preserve Navigator choice as the commitment boundary",
|
|
217
|
+
],
|
|
218
|
+
stopConditions: [],
|
|
219
|
+
requiredOutputs: ["selected_item", "pull_level", "why_this_level_now"],
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: "prepare_contract",
|
|
223
|
+
appliesAt: "prepare",
|
|
224
|
+
rules: [
|
|
225
|
+
"read relevant story, project, code, tests, decisions, and local guide context",
|
|
226
|
+
"identify story shape, risks, applicable rules, and local guide overrides",
|
|
227
|
+
"decide whether expand or collapse is needed before Plan",
|
|
228
|
+
"identify whether the active item is implementable by default or requires a granularity decision",
|
|
229
|
+
"do not create a Plan or start implementation during Prepare",
|
|
230
|
+
],
|
|
231
|
+
stopConditions: [],
|
|
232
|
+
requiredOutputs: [
|
|
233
|
+
"context_summary",
|
|
234
|
+
"story_shape_assessment",
|
|
235
|
+
"risk_summary",
|
|
236
|
+
"applicable_rules",
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: "expand_contract",
|
|
241
|
+
appliesAt: "expand",
|
|
242
|
+
rules: [
|
|
243
|
+
"expand Delivery Stories into User Stories and Technical Stories when they are not implementable as one coherent unit",
|
|
244
|
+
"Delivery Stories always expand before implementation and are never planned as the implementable unit",
|
|
245
|
+
"materialize child User Story and Technical Story packages during expansion",
|
|
246
|
+
],
|
|
247
|
+
stopConditions: [],
|
|
248
|
+
requiredOutputs: ["granularity_decision", "child_story_candidates"],
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: "plan_contract",
|
|
252
|
+
appliesAt: "plan",
|
|
253
|
+
rules: [
|
|
254
|
+
"plan only implementable User Stories or Technical Stories",
|
|
255
|
+
"define scope, non-goals, acceptance behavior, validation route, documentation impact, and implementation contract",
|
|
256
|
+
"express User Story acceptance behavior with Given/When/Then/And when practical",
|
|
257
|
+
"decide whether E2E validation is required for user-visible flows or cross-system behavior",
|
|
258
|
+
"block implementation until Navigator approves the Plan checkpoint",
|
|
259
|
+
],
|
|
260
|
+
stopConditions: ["navigator_approval_required"],
|
|
261
|
+
requiredOutputs: [
|
|
262
|
+
"scope",
|
|
263
|
+
"non_goals",
|
|
264
|
+
"acceptance_behavior",
|
|
265
|
+
"validation_route",
|
|
266
|
+
"implementation_contract",
|
|
267
|
+
],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: "implement_contract",
|
|
271
|
+
appliesAt: "implement",
|
|
272
|
+
rules: [
|
|
273
|
+
"follow the approved Plan",
|
|
274
|
+
"use TDD or characterization tests for behavior changes when testable",
|
|
275
|
+
"keep changes scoped to the active story",
|
|
276
|
+
"add or update E2E tests when required by the approved Plan",
|
|
277
|
+
"do not silently absorb new scope into implementation",
|
|
278
|
+
],
|
|
279
|
+
stopConditions: [
|
|
280
|
+
"scope_change_detected",
|
|
281
|
+
"plan_rule_conflict",
|
|
282
|
+
"failing_required_check_without_clear_fix",
|
|
283
|
+
"navigator_decision_needed",
|
|
284
|
+
],
|
|
285
|
+
requiredOutputs: [],
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: "validation_contract",
|
|
289
|
+
appliesAt: "validation",
|
|
290
|
+
rules: [
|
|
291
|
+
"run automated checks required by the Plan and local guide",
|
|
292
|
+
"run E2E tests required by the approved Plan or local guide",
|
|
293
|
+
"provide Navigator validation route with expected observation, pass condition, and fail condition",
|
|
294
|
+
"record validation evidence before Review",
|
|
295
|
+
],
|
|
296
|
+
stopConditions: [],
|
|
297
|
+
requiredOutputs: ["automated_evidence", "navigator_validation_route", "validation_evidence"],
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
id: "debt_review_contract",
|
|
301
|
+
appliesAt: "review",
|
|
302
|
+
rules: [
|
|
303
|
+
"name debt paid, debt introduced, and debt carried forward",
|
|
304
|
+
"record revisit trigger for carried debt",
|
|
305
|
+
"decide whether a durable debt ledger entry is required",
|
|
306
|
+
],
|
|
307
|
+
stopConditions: [],
|
|
308
|
+
requiredOutputs: ["review_report", "debt_decision"],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: "coherence_contract",
|
|
312
|
+
appliesAt: "coherence",
|
|
313
|
+
rules: [
|
|
314
|
+
"verify Process, Project, and Product alignment",
|
|
315
|
+
"surface differences between Ariad defaults and the local development guide",
|
|
316
|
+
"verify docs, roadmap, worklog, decisions, and runtime state match actual behavior",
|
|
317
|
+
"verify lifecycle contract compliance before Done",
|
|
318
|
+
],
|
|
319
|
+
stopConditions: [],
|
|
320
|
+
requiredOutputs: ["coherence_result"],
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: "done_contract",
|
|
324
|
+
appliesAt: "done",
|
|
325
|
+
rules: [
|
|
326
|
+
"close the story only after validation, review, and coherence are satisfied",
|
|
327
|
+
"record history at coherent story boundaries unless local policy overrides",
|
|
328
|
+
"update worklog for meaningful milestones",
|
|
329
|
+
"recommend next pull, parent collapse, or release boundary when relevant",
|
|
330
|
+
],
|
|
331
|
+
stopConditions: [],
|
|
332
|
+
requiredOutputs: ["closure_summary", "history_action", "next_recommendation"],
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
policies: {
|
|
336
|
+
history: {
|
|
337
|
+
commit: {
|
|
338
|
+
mode: "propose_and_wait",
|
|
339
|
+
granularity: "coherent_story",
|
|
340
|
+
message_style: "descriptive_why",
|
|
341
|
+
},
|
|
342
|
+
worklog: {
|
|
343
|
+
mode: "meaningful_milestones",
|
|
344
|
+
},
|
|
345
|
+
decision_records: {
|
|
346
|
+
mode: "when_architectural_or_process_decision_changes",
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
push: {
|
|
350
|
+
mode: "ask_before_push",
|
|
351
|
+
allowed_after: ["story_done", "release_publish", "manual_request"],
|
|
352
|
+
requires: [
|
|
353
|
+
"clean_worktree",
|
|
354
|
+
"commits_present",
|
|
355
|
+
"remote_configured",
|
|
356
|
+
"navigator_confirmation",
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
release: {
|
|
360
|
+
modes: ["planned_release", "emergent_release"],
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
surfaces: [
|
|
364
|
+
{
|
|
365
|
+
id: "adoption_report",
|
|
366
|
+
event: "adoption",
|
|
367
|
+
transport: "verbatim",
|
|
368
|
+
markerProtocol: "ariad_compact",
|
|
369
|
+
interpretationPolicy: "after_block_only",
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
id: "builder_resume",
|
|
373
|
+
event: "on_builder_load",
|
|
374
|
+
transport: "verbatim",
|
|
375
|
+
markerProtocol: "ariad_compact",
|
|
376
|
+
interpretationPolicy: "after_block_only",
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
id: "roadmap_snapshot",
|
|
380
|
+
event: "roadmap_inspection",
|
|
381
|
+
transport: "verbatim",
|
|
382
|
+
markerProtocol: "ariad_compact",
|
|
383
|
+
interpretationPolicy: "after_block_only",
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
id: "pull_candidates",
|
|
387
|
+
event: "roadmap_inspection",
|
|
388
|
+
transport: "verbatim",
|
|
389
|
+
markerProtocol: "ariad_compact",
|
|
390
|
+
interpretationPolicy: "after_block_only",
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
id: "pull_report",
|
|
394
|
+
event: "pull",
|
|
395
|
+
transport: "verbatim",
|
|
396
|
+
markerProtocol: "ariad_compact",
|
|
397
|
+
interpretationPolicy: "after_block_only",
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
id: "prepare_report",
|
|
401
|
+
event: "prepare",
|
|
402
|
+
transport: "verbatim",
|
|
403
|
+
markerProtocol: "ariad_compact",
|
|
404
|
+
interpretationPolicy: "after_block_only",
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "plan_checkpoint",
|
|
408
|
+
event: "plan",
|
|
409
|
+
stopsFor: "navigator_approval",
|
|
410
|
+
transport: "verbatim",
|
|
411
|
+
markerProtocol: "ariad_compact",
|
|
412
|
+
interpretationPolicy: "after_block_only",
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
id: "validation_checkpoint",
|
|
416
|
+
event: "validation",
|
|
417
|
+
stopsFor: "navigator_validation",
|
|
418
|
+
transport: "verbatim",
|
|
419
|
+
markerProtocol: "ariad_compact",
|
|
420
|
+
interpretationPolicy: "after_block_only",
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: "debt_review_checkpoint",
|
|
424
|
+
event: "review",
|
|
425
|
+
stopsFor: "navigator_debt_decision",
|
|
426
|
+
transport: "verbatim",
|
|
427
|
+
markerProtocol: "ariad_compact",
|
|
428
|
+
interpretationPolicy: "after_block_only",
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: "coherence_checkpoint",
|
|
432
|
+
event: "coherence",
|
|
433
|
+
transport: "verbatim",
|
|
434
|
+
markerProtocol: "ariad_compact",
|
|
435
|
+
interpretationPolicy: "after_block_only",
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: "done_checkpoint",
|
|
439
|
+
event: "done",
|
|
440
|
+
transport: "verbatim",
|
|
441
|
+
markerProtocol: "ariad_compact",
|
|
442
|
+
interpretationPolicy: "after_block_only",
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
surfaceRoutes: [
|
|
446
|
+
{
|
|
447
|
+
trigger: "show_roadmap",
|
|
448
|
+
surfaces: ["roadmap_snapshot", "pull_candidates"],
|
|
449
|
+
intents: ["show roadmap", "inspect roadmap", "see pull candidates", "what can I pull now"],
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
templates: [
|
|
453
|
+
{
|
|
454
|
+
id: "ariad_adoption",
|
|
455
|
+
path: "docs/project/roadmap/ariad-adoption.md",
|
|
456
|
+
content:
|
|
457
|
+
"# Ariad Adoption\n\nThis project is prepared for Ariad-governed Builder Mode.\n\n## Method\n\n- adopted method: ariad\n- adoption prepares documentation templates only\n- delivery cursor sync is handled by a later Builder story\n\n## Boundaries\n\nTemplate preparation does not execute story lifecycle work, change story status,\ncommit, push, or release.\n",
|
|
458
|
+
description: "Records Ariad adoption readiness for this project.",
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
id: "technical_debt_ledger",
|
|
462
|
+
path: "docs/project/roadmap/technical-debt-ledger.md",
|
|
463
|
+
content:
|
|
464
|
+
"# Technical Debt Ledger\n\nAriad Review records technical debt here when debt should be paid now or deferred.\n\n| ID | Source Story | Location | Kind | Description | Impact | Recommendation | Navigator Decision | Status |\n|----|--------------|----------|------|-------------|--------|----------------|--------------------|--------|\n\n## Deferred Debt Requirements\n\nWhen debt is deferred, record the defer reason and revisit trigger.\n",
|
|
465
|
+
description: "Versioned debt ledger used by Ariad Review and Refactor.",
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
id: "delivery_story_index",
|
|
469
|
+
path: "docs/project/roadmap/templates/delivery-story-index.md",
|
|
470
|
+
content:
|
|
471
|
+
"[< Parent](../index.md)\n\n# <CODE> — <Delivery Story Title>\n\n**Status:** 🟡 Planned\n\n---\n\n## Outcome\n\n<Coherent delivery outcome this story creates.>\n\n## Candidate Stories\n\n| Code | Story | Type | Outcome | Status |\n|------|-------|------|---------|--------|\n\n## Done Condition\n\n<Condition that closes this delivery story.>\n",
|
|
472
|
+
description: "Template for an Ariad Delivery Story index.",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: "user_story_index",
|
|
476
|
+
path: "docs/project/roadmap/templates/user-story-index.md",
|
|
477
|
+
content:
|
|
478
|
+
"[< Parent](../index.md)\n\n# <CODE> — <User Story Title>\n\n**Status:** 🟡 Planned\n**Type:** User Story\n\n---\n\n## User Story\n\nAs a [user persona],\nI want to [action/feature],\nSo that [benefit/value].\n\n## Outcome\n\n<Navigator-visible behavior or capability.>\n\n## Acceptance Behavior\n\n```text\nGiven <context>\nWhen <action>\nThen <observable result>\n```\n\n## Scope\n\n- <in scope>\n\n## Out Of Scope\n\n- <out of scope>\n\n## Validation\n\n<Navigator-facing validation route.>\n",
|
|
479
|
+
description: "Template for an Ariad User Story index.",
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
id: "technical_story_index",
|
|
483
|
+
path: "docs/project/roadmap/templates/technical-story-index.md",
|
|
484
|
+
content:
|
|
485
|
+
"[< Parent](../index.md)\n\n# <CODE> — <Technical Story Title>\n\n**Status:** 🟡 Planned\n**Type:** Technical Story\n\n---\n\n## Technical Story\n\nIn order to [achieve a technical benefit/business capability],\nAs [an engineering team/system component],\nI want to [perform a technical action],\nSo that [expected technical outcome].\n\n## Outcome\n\n<Internal capability or substrate.>\n\n## Acceptance Behavior\n\n```text\nGiven <technical context>\nWhen <operation runs>\nThen <internal behavior or invariant holds>\n```\n\n## Scope\n\n- <in scope>\n\n## Out Of Scope\n\n- <out of scope>\n\n## Validation\n\n<Automated or internal validation route.>\n",
|
|
486
|
+
description: "Template for an Ariad Technical Story index.",
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: "plan",
|
|
490
|
+
path: "docs/project/roadmap/templates/plan.md",
|
|
491
|
+
content:
|
|
492
|
+
"[< Story](index.md)\n\n# Plan — <CODE> <Title>\n\n## Pull\n\n<Pulled item and why this level now.>\n\n## Prepare\n\n<Context summary, story shape, risks, and applicable rules.>\n\n## Scope\n\n- <in scope>\n\n## Non-Goals\n\n- <out of scope>\n\n## Implementation Approach\n\n<How implementation will proceed.>\n\n## Test Strategy\n\n<Automated and manual tests.>\n\n## Validation Route\n\n<How the Navigator validates observable behavior, when applicable.>\n\n## Checkpoint\n\nImplementation must not start until the Navigator approves this plan.\n",
|
|
493
|
+
description: "Template for the Ariad Plan checkpoint artifact.",
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
id: "test_guide",
|
|
497
|
+
path: "docs/project/roadmap/templates/test-guide.md",
|
|
498
|
+
content:
|
|
499
|
+
"[< Story](index.md)\n\n# Test Guide — <CODE> <Title>\n\n## Automated Validation\n\n```bash\n<commands>\n```\n\n## Navigator Validation\n\n<Manual validation route, expected observation, pass condition, and fail condition.>\n\n## Validation Evidence\n\n<Recorded evidence after validation runs.>\n",
|
|
500
|
+
description: "Template for Ariad validation evidence and Navigator validation.",
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
id: "review",
|
|
504
|
+
path: "docs/project/roadmap/templates/review.md",
|
|
505
|
+
content:
|
|
506
|
+
"[< Story](index.md)\n\n# Review — <CODE> <Title>\n\n## Changed Surface\n\n<Files, modules, docs, and behaviors changed.>\n\n## Debt Scan\n\n<Design, test, documentation, duplication, complexity, naming, coupling, or migration debt.>\n\n## Recommendation\n\n<No action, defer, or pay now.>\n\n## Navigator Decision\n\n<Decision and rationale.>\n",
|
|
507
|
+
description: "Template for Ariad Review debt scan.",
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
id: "coherence",
|
|
511
|
+
path: "docs/project/roadmap/templates/coherence.md",
|
|
512
|
+
content:
|
|
513
|
+
"[< Story](index.md)\n\n# Coherence — <CODE> <Title>\n\n## Process\n\n<Lifecycle and checkpoint alignment.>\n\n## Project\n\n<Roadmap, docs, and runtime state alignment.>\n\n## Product\n\n<Behavior and product boundary alignment.>\n\n## Result\n\n<Coherent or incoherent, with next action.>\n",
|
|
514
|
+
description: "Template for Ariad Coherence integration check.",
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
openQuestions: {
|
|
518
|
+
maintenance_and_operational_updates: {
|
|
519
|
+
status: "open",
|
|
520
|
+
note: "Do not overdesign upfront. Model when real cases appear.",
|
|
521
|
+
},
|
|
522
|
+
final_surface_content: {
|
|
523
|
+
status: "open",
|
|
524
|
+
note: "Use Ariad visual grammar during implementation.",
|
|
525
|
+
},
|
|
526
|
+
final_dsl_file_format: {
|
|
527
|
+
status: "open",
|
|
528
|
+
note: "YAML is the exploration notation, not yet a committed parser format.",
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
/** Python `get_ariad_method()`. */
|
|
534
|
+
export function getAriadMethod(): MethodDefinition {
|
|
535
|
+
return ARIAD_METHOD;
|
|
536
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// CV22.DS7.US8 plateau 3 — the artifact materialization surface.
|
|
2
|
+
//
|
|
3
|
+
// Port of `src/memory/builder/artifact_surfaces.py`.
|
|
4
|
+
//
|
|
5
|
+
// This is the surface that tells the Navigator which files a lifecycle command
|
|
6
|
+
// touched and whether it created, updated, or left them alone. Two details carry
|
|
7
|
+
// the meaning:
|
|
8
|
+
//
|
|
9
|
+
// * the STATUS is a three-way distinction, not a boolean. `existing` is what the
|
|
10
|
+
// preservation rule reports when a file was authored by a human and kept, and
|
|
11
|
+
// it is the only visible evidence that the command did not overwrite it.
|
|
12
|
+
// * the PATH is relativized against the journey's project root, through
|
|
13
|
+
// `displayPath`, the one rule every card that prints a path follows (CR082), and
|
|
14
|
+
// the row under the context names that project and the journey (CR009), so the
|
|
15
|
+
// relative paths can be checked against the right repository.
|
|
16
|
+
|
|
17
|
+
import { cardText, cardWrapped } from "../card.ts";
|
|
18
|
+
import { displayPath, targetLine } from "../projectPaths.ts";
|
|
19
|
+
import { wrapAriadSurface } from "../surfaceProtocol.ts";
|
|
20
|
+
|
|
21
|
+
/** Python `MaterializedArtifact`, plus a note (CR112): what an existing file is. */
|
|
22
|
+
export interface MaterializedArtifact {
|
|
23
|
+
readonly kind: string;
|
|
24
|
+
readonly path: string;
|
|
25
|
+
readonly status: string;
|
|
26
|
+
/** Printed after the kind, as `— <note>`: `scaffold`, `authored`, `partly authored`. */
|
|
27
|
+
readonly note?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Python `materialized_artifact`. */
|
|
31
|
+
export function materializedArtifact(
|
|
32
|
+
kind: string,
|
|
33
|
+
path: string,
|
|
34
|
+
options: { existedBefore: boolean },
|
|
35
|
+
): MaterializedArtifact {
|
|
36
|
+
return { kind, path, status: options.existedBefore ? "updated" : "created" };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Python `existing_artifact`, with the state of the file that was left alone (CR112). */
|
|
40
|
+
export function existingArtifact(kind: string, path: string, note?: string): MaterializedArtifact {
|
|
41
|
+
return note === undefined
|
|
42
|
+
? { kind, path, status: "existing" }
|
|
43
|
+
: { kind, path, status: "existing", note };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Python `_status_icon`: an unknown status renders `•` rather than failing. */
|
|
47
|
+
function statusIcon(status: string): string {
|
|
48
|
+
switch (status) {
|
|
49
|
+
case "created":
|
|
50
|
+
return "✓";
|
|
51
|
+
case "updated":
|
|
52
|
+
return "✎";
|
|
53
|
+
case "existing":
|
|
54
|
+
return "↻";
|
|
55
|
+
// CR079: a record the runtime did not write, or one edited since, left as it is.
|
|
56
|
+
case "preserved":
|
|
57
|
+
return "⊘";
|
|
58
|
+
default:
|
|
59
|
+
return "•";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ArtifactsSurfaceOptions {
|
|
64
|
+
readonly context: string;
|
|
65
|
+
readonly artifacts: readonly MaterializedArtifact[];
|
|
66
|
+
readonly projectPath?: string | null;
|
|
67
|
+
/** The journey the files were written for, named with the project (CR009). */
|
|
68
|
+
readonly journey: string;
|
|
69
|
+
readonly boundary?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Python `render_artifacts_materialized_surface`. */
|
|
73
|
+
export function renderArtifactsMaterializedSurface(options: ArtifactsSurfaceOptions): string {
|
|
74
|
+
const projectPath = options.projectPath ?? null;
|
|
75
|
+
const boundary = options.boundary ?? "Files were materialized only.";
|
|
76
|
+
const lines: string[] = [
|
|
77
|
+
"Artifacts",
|
|
78
|
+
"",
|
|
79
|
+
"╭────────────────────────────────────────────────────────╮",
|
|
80
|
+
"│ ✎ ARTIFACTS MATERIALIZED │",
|
|
81
|
+
"│ │",
|
|
82
|
+
...cardWrapped(options.context),
|
|
83
|
+
...(projectPath === null ? [] : cardWrapped(targetLine(projectPath, options.journey))),
|
|
84
|
+
"│ │",
|
|
85
|
+
];
|
|
86
|
+
if (options.artifacts.length > 0) {
|
|
87
|
+
options.artifacts.forEach((artifact, index) => {
|
|
88
|
+
// A blank row BETWEEN entries only, so the block does not open or close
|
|
89
|
+
// with one. An off-by-one here is invisible until a golden compares bytes.
|
|
90
|
+
if (index > 0) lines.push("│ │");
|
|
91
|
+
const note = artifact.note === undefined ? "" : ` — ${artifact.note}`;
|
|
92
|
+
lines.push(
|
|
93
|
+
...cardWrapped(`${statusIcon(artifact.status)} ${artifact.status} ${artifact.kind}${note}`),
|
|
94
|
+
);
|
|
95
|
+
lines.push(...cardWrapped(displayPath(artifact.path, projectPath)));
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
lines.push(cardText("none"));
|
|
99
|
+
}
|
|
100
|
+
lines.push(
|
|
101
|
+
"│ │",
|
|
102
|
+
...cardWrapped(boundary),
|
|
103
|
+
"╰────────────────────────────────────────────────────────╯",
|
|
104
|
+
);
|
|
105
|
+
return wrapAriadSurface("artifacts_materialized", `${lines.join("\n")}\n`);
|
|
106
|
+
}
|