mirai-graph 1.3.0 → 2.1.0
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/cli.js +6 -0
- package/index.js +1 -0
- package/package.json +9 -121
- package/.github/workflows/ci.yml +0 -48
- package/.github/workflows/mirai-graph-validate.yml +0 -30
- package/CHANGELOG.md +0 -702
- package/CITATION.cff +0 -21
- package/LICENSE +0 -21
- package/LICENSE-DOCS +0 -26
- package/README.md +0 -351
- package/ROADMAP.md +0 -241
- package/benchmarks/protocols/measure-convert-optimize.md +0 -131
- package/benchmarks/synthetic-context-reduction-v0/README.md +0 -70
- package/benchmarks/synthetic-context-reduction-v0/RESULT.md +0 -52
- package/benchmarks/synthetic-context-reduction-v0/expected/context-pack-compact.md +0 -31
- package/benchmarks/synthetic-context-reduction-v0/gates/results.json +0 -12
- package/benchmarks/synthetic-context-reduction-v0/graph/objects.json +0 -114
- package/benchmarks/synthetic-context-reduction-v0/graph/relations.json +0 -74
- package/benchmarks/synthetic-context-reduction-v0/graph.json +0 -37
- package/benchmarks/synthetic-context-reduction-v0/metrics/example-metrics.json +0 -22
- package/benchmarks/synthetic-context-reduction-v0/results/baseline-comparison-result.json +0 -42
- package/benchmarks/synthetic-context-reduction-v0/results/context-pack.json +0 -181
- package/benchmarks/synthetic-context-reduction-v0/results/context-reduction-result.json +0 -8
- package/benchmarks/synthetic-context-reduction-v0/results/profile-conformance-result.json +0 -28
- package/benchmarks/synthetic-context-reduction-v0/results/readiness-score.json +0 -24
- package/benchmarks/synthetic-context-reduction-v0/reviews/semantic-completeness-review.json +0 -78
- package/benchmarks/synthetic-context-reduction-v0/scripts/calculate-context-reduction.js +0 -42
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/audit-events.md +0 -8
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/content-workflow.md +0 -8
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/identity-access.md +0 -8
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/notification-delivery.md +0 -8
- package/benchmarks/synthetic-context-reduction-v0/tasks/tasks.json +0 -31
- package/docs/README.md +0 -130
- package/docs/adoption/adopter-kit.md +0 -187
- package/docs/adoption/ai-employee-graph.md +0 -151
- package/docs/adoption/character-layer.md +0 -196
- package/docs/adoption/choose-profile.md +0 -106
- package/docs/adoption/cli.md +0 -134
- package/docs/adoption/connect-project-15-minutes.md +0 -122
- package/docs/adoption/developer-integration-guide.md +0 -122
- package/docs/adoption/end-to-end-control-loop.md +0 -168
- package/docs/adoption/for-developers.md +0 -210
- package/docs/adoption/getting-started.md +0 -192
- package/docs/adoption/mirai-graph-transition.md +0 -67
- package/docs/adoption/profile-conformance-fixtures.md +0 -112
- package/docs/adoption/seed-to-validated-package.md +0 -121
- package/docs/concept.md +0 -109
- package/docs/repository-purpose.md +0 -422
- package/docs/research/ai-work-field-instrumentation-bridge.md +0 -126
- package/docs/research/baseline-comparison-protocol.md +0 -79
- package/docs/research/evidence-package-v0.1.md +0 -99
- package/docs/research/evidence-package-v0.2.md +0 -150
- package/docs/research/evidence-package-v0.3.md +0 -256
- package/docs/research/independent-implementation-pilot-plan.md +0 -74
- package/docs/research/limitations-and-threats.md +0 -40
- package/docs/research/practice-science-program.md +0 -232
- package/docs/research/scientific-evidence-package.md +0 -188
- package/docs/research/semantic-completeness-review-protocol.md +0 -70
- package/docs/terminology.md +0 -119
- package/docs/transfer/ai-employee-profile-proposal.md +0 -119
- package/docs/transfer/federation-routing-control-loop-2026-05-31.md +0 -28
- package/docs/transfer/graph-capability-map-2026-05-29.md +0 -126
- package/docs/transfer/graph-skill-to-mirai-graph.md +0 -128
- package/docs/transfer/project-management-standard-harvest-2026-06-02.md +0 -322
- package/docs/transfer/skill-graph-standard-harvest-2026-05-31.md +0 -113
- package/docs/transfer/standard-gap-report-2026-05-28.md +0 -208
- package/examples/ai-employee-minimal/README.md +0 -53
- package/examples/ai-employee-minimal/gates/results.json +0 -35
- package/examples/ai-employee-minimal/graph/objects.json +0 -187
- package/examples/ai-employee-minimal/graph/relations.json +0 -167
- package/examples/ai-employee-minimal/graph.json +0 -37
- package/examples/ai-employee-minimal/results/profile-conformance-result.json +0 -28
- package/examples/character-layer-integration-minimal/README.md +0 -25
- package/examples/character-layer-integration-minimal/results/character-layer-integration.json +0 -53
- package/examples/character-layer-minimal/README.md +0 -29
- package/examples/character-layer-minimal/gates/results.json +0 -57
- package/examples/character-layer-minimal/graph/objects.json +0 -165
- package/examples/character-layer-minimal/graph/relations.json +0 -178
- package/examples/character-layer-minimal/graph.json +0 -37
- package/examples/character-layer-readiness-1-0/README.md +0 -27
- package/examples/character-layer-readiness-1-0/results/character-layer-readiness.json +0 -90
- package/examples/dynamic-episode-minimal/README.md +0 -34
- package/examples/dynamic-episode-minimal/gates/results.json +0 -12
- package/examples/dynamic-episode-minimal/graph/objects.json +0 -92
- package/examples/dynamic-episode-minimal/graph/relations.json +0 -29
- package/examples/dynamic-episode-minimal/graph.json +0 -47
- package/examples/dynamic-episode-minimal/invalid-canonical-write-allowed.json +0 -40
- package/examples/dynamic-episode-minimal/invalid-evidence-as-authorization.json +0 -46
- package/examples/dynamic-episode-minimal/invalid-missing-event.json +0 -35
- package/examples/dynamic-episode-minimal/invalid-missing-selected-path.json +0 -40
- package/examples/dynamic-episode-minimal/invalid-unclassified-finding.json +0 -50
- package/examples/dynamic-episode-minimal/results/dynamic-episode-trace.json +0 -149
- package/examples/federation-routing-smoke/README.md +0 -19
- package/examples/federation-routing-smoke/federation-health-dashboard.json +0 -42
- package/examples/federation-routing-smoke/route-explanation.json +0 -32
- package/examples/federation-routing-smoke/route-regression-result.json +0 -35
- package/examples/federation-routing-smoke/routes/production-deploy-execution-evidence.json +0 -17
- package/examples/federation-routing-smoke/routes/production-deploy-route-result.json +0 -12
- package/examples/federation-routing-smoke/routes/production-deploy-runtime-preflight.json +0 -8
- package/examples/federation-routing-smoke/routes/production-deploy-stderr.txt +0 -1
- package/examples/federation-routing-smoke/routes/production-deploy-stdout.txt +0 -1
- package/examples/federation-routing-smoke/routes/search-page-execution-evidence.json +0 -17
- package/examples/federation-routing-smoke/routes/search-page-route-result.json +0 -12
- package/examples/federation-routing-smoke/routes/search-page-stderr.txt +0 -1
- package/examples/federation-routing-smoke/routes/search-page-stdout.txt +0 -1
- package/examples/federation-routing-smoke/routing-fixture-run.json +0 -66
- package/examples/federation-routing-smoke/routing-fixtures.json +0 -44
- package/examples/goal-vector-quality-control-minimal/README.md +0 -22
- package/examples/goal-vector-quality-control-minimal/gates/results.json +0 -22
- package/examples/goal-vector-quality-control-minimal/graph/objects.json +0 -56
- package/examples/goal-vector-quality-control-minimal/graph/relations.json +0 -29
- package/examples/goal-vector-quality-control-minimal/graph.json +0 -41
- package/examples/goal-vector-quality-control-minimal/invalid-complete-without-evidence.json +0 -77
- package/examples/goal-vector-quality-control-minimal/invalid-correction-without-route.json +0 -86
- package/examples/goal-vector-quality-control-minimal/invalid-missing-reverse-audit.json +0 -77
- package/examples/goal-vector-quality-control-minimal/invalid-missing-vector-link.json +0 -62
- package/examples/goal-vector-quality-control-minimal/invalid-tests-as-acceptance.json +0 -72
- package/examples/goal-vector-quality-control-minimal/results/goal-vector-quality-control.json +0 -130
- package/examples/graph-dna-alignment-minimal/README.md +0 -16
- package/examples/graph-dna-alignment-minimal/graph/objects.json +0 -38
- package/examples/graph-dna-alignment-minimal/graph/relations.json +0 -20
- package/examples/graph-dna-alignment-minimal/graph.json +0 -37
- package/examples/graph-dna-alignment-minimal/results/graph-dna-alignment.json +0 -32
- package/examples/graph-seed-minimal/README.md +0 -9
- package/examples/graph-seed-minimal/graph-embryo.json +0 -63
- package/examples/graph-seed-minimal/graph-seed.json +0 -60
- package/examples/implementation-control-cycles/README.md +0 -47
- package/examples/implementation-control-cycles/gates/results.json +0 -22
- package/examples/implementation-control-cycles/graph/objects.json +0 -119
- package/examples/implementation-control-cycles/graph/relations.json +0 -200
- package/examples/implementation-control-cycles/graph.json +0 -37
- package/examples/implementation-control-cycles/results/implementation-control-cycles.json +0 -456
- package/examples/implementation-control-minimal/README.md +0 -39
- package/examples/implementation-control-minimal/gates/results.json +0 -42
- package/examples/implementation-control-minimal/graph/objects.json +0 -128
- package/examples/implementation-control-minimal/graph/relations.json +0 -128
- package/examples/implementation-control-minimal/graph.json +0 -37
- package/examples/implementation-control-minimal/results/implementation-control-loop.json +0 -21
- package/examples/instrumentation-layer-minimal/README.md +0 -32
- package/examples/instrumentation-layer-minimal/gates/results.json +0 -11
- package/examples/instrumentation-layer-minimal/graph/objects.json +0 -74
- package/examples/instrumentation-layer-minimal/graph/relations.json +0 -56
- package/examples/instrumentation-layer-minimal/graph.json +0 -37
- package/examples/instrumentation-layer-minimal/invalid-cockpit-missing-gates.json +0 -40
- package/examples/instrumentation-layer-minimal/invalid-feedback-accepted-with-blocking.json +0 -38
- package/examples/instrumentation-layer-minimal/invalid-feedback-process-improvement-without-kaizen.json +0 -38
- package/examples/instrumentation-layer-minimal/invalid-traceability-missing-evidence.json +0 -43
- package/examples/instrumentation-layer-minimal/results/development-cockpit.json +0 -68
- package/examples/instrumentation-layer-minimal/results/feature-implementation-traceability.json +0 -56
- package/examples/instrumentation-layer-minimal/results/multi-source-quality-feedback.json +0 -72
- package/examples/invalid-character-layer-context-authorization/graph/objects.json +0 -22
- package/examples/invalid-character-layer-context-authorization/graph/relations.json +0 -1
- package/examples/invalid-character-layer-context-authorization/graph.json +0 -35
- package/examples/invalid-character-layer-correction-loop-no-review/graph/objects.json +0 -22
- package/examples/invalid-character-layer-correction-loop-no-review/graph/relations.json +0 -1
- package/examples/invalid-character-layer-correction-loop-no-review/graph.json +0 -35
- package/examples/invalid-character-layer-feedback-auto-update/graph/objects.json +0 -22
- package/examples/invalid-character-layer-feedback-auto-update/graph/relations.json +0 -1
- package/examples/invalid-character-layer-feedback-auto-update/graph.json +0 -35
- package/examples/invalid-character-layer-object-kind/graph/objects.json +0 -22
- package/examples/invalid-character-layer-object-kind/graph/relations.json +0 -1
- package/examples/invalid-character-layer-object-kind/graph.json +0 -35
- package/examples/invalid-character-layer-relation-direction/graph/objects.json +0 -33
- package/examples/invalid-character-layer-relation-direction/graph/relations.json +0 -13
- package/examples/invalid-character-layer-relation-direction/graph.json +0 -35
- package/examples/invalid-character-layer-relation-type/graph/objects.json +0 -33
- package/examples/invalid-character-layer-relation-type/graph/relations.json +0 -13
- package/examples/invalid-character-layer-relation-type/graph.json +0 -35
- package/examples/invalid-character-layer-role-permission/graph/objects.json +0 -22
- package/examples/invalid-character-layer-role-permission/graph/relations.json +0 -1
- package/examples/invalid-character-layer-role-permission/graph.json +0 -35
- package/examples/invalid-context-pack-missing-explanation/context-pack.json +0 -25
- package/examples/invalid-missing-relation-target/graph/objects.json +0 -11
- package/examples/invalid-missing-relation-target/graph/relations.json +0 -11
- package/examples/invalid-missing-relation-target/graph.json +0 -32
- package/examples/invalid-profile-object-kind/graph/objects.json +0 -20
- package/examples/invalid-profile-object-kind/graph/relations.json +0 -1
- package/examples/invalid-profile-object-kind/graph.json +0 -32
- package/examples/invalid-profile-relation-type/graph/objects.json +0 -29
- package/examples/invalid-profile-relation-type/graph/relations.json +0 -11
- package/examples/invalid-profile-relation-type/graph.json +0 -32
- package/examples/invalid-relation-id-mismatch/graph/objects.json +0 -29
- package/examples/invalid-relation-id-mismatch/graph/relations.json +0 -11
- package/examples/invalid-relation-id-mismatch/graph.json +0 -32
- package/examples/invalid-seed-unsafe-write/graph-seed.json +0 -27
- package/examples/invalid-societal-governance-auto-learning-update/graph/objects.json +0 -29
- package/examples/invalid-societal-governance-auto-learning-update/graph/relations.json +0 -11
- package/examples/invalid-societal-governance-auto-learning-update/graph.json +0 -35
- package/examples/invalid-societal-governance-avatar-no-consent/graph/objects.json +0 -29
- package/examples/invalid-societal-governance-avatar-no-consent/graph/relations.json +0 -11
- package/examples/invalid-societal-governance-avatar-no-consent/graph.json +0 -35
- package/examples/invalid-societal-governance-generated-context-authorization/graph/objects.json +0 -38
- package/examples/invalid-societal-governance-generated-context-authorization/graph/relations.json +0 -20
- package/examples/invalid-societal-governance-generated-context-authorization/graph.json +0 -35
- package/examples/invalid-societal-governance-missing-appeal-path/graph/objects.json +0 -29
- package/examples/invalid-societal-governance-missing-appeal-path/graph/relations.json +0 -11
- package/examples/invalid-societal-governance-missing-appeal-path/graph.json +0 -35
- package/examples/invalid-societal-governance-private-trace-exposed/graph/objects.json +0 -29
- package/examples/invalid-societal-governance-private-trace-exposed/graph/relations.json +0 -11
- package/examples/invalid-societal-governance-private-trace-exposed/graph.json +0 -35
- package/examples/invalid-societal-governance-rights-overridden/graph/objects.json +0 -29
- package/examples/invalid-societal-governance-rights-overridden/graph/relations.json +0 -11
- package/examples/invalid-societal-governance-rights-overridden/graph.json +0 -35
- package/examples/launch-record-minimal/README.md +0 -29
- package/examples/launch-record-minimal/gates/results.json +0 -12
- package/examples/launch-record-minimal/graph/objects.json +0 -47
- package/examples/launch-record-minimal/graph/relations.json +0 -38
- package/examples/launch-record-minimal/graph.json +0 -34
- package/examples/launch-record-minimal/results/launch-record.json +0 -51
- package/examples/managed-project-control-loop/README.md +0 -43
- package/examples/managed-project-control-loop/gates/results.json +0 -22
- package/examples/managed-project-control-loop/graph/objects.json +0 -119
- package/examples/managed-project-control-loop/graph/relations.json +0 -110
- package/examples/managed-project-control-loop/graph.json +0 -37
- package/examples/managed-project-control-loop/results/managed-loop-result.json +0 -21
- package/examples/minimal-graph/README.md +0 -15
- package/examples/minimal-graph/gates/results.json +0 -12
- package/examples/minimal-graph/graph/objects.json +0 -24
- package/examples/minimal-graph/graph/relations.json +0 -11
- package/examples/minimal-graph/graph.json +0 -37
- package/examples/minimal-graph/results/profile-conformance-result.json +0 -26
- package/examples/model-portability-minimal/README.md +0 -15
- package/examples/model-portability-minimal/results/model-portability-evidence.json +0 -55
- package/examples/organization-governance-minimal/README.md +0 -29
- package/examples/organization-governance-minimal/gates/results.json +0 -21
- package/examples/organization-governance-minimal/graph/objects.json +0 -147
- package/examples/organization-governance-minimal/graph/relations.json +0 -147
- package/examples/organization-governance-minimal/graph.json +0 -37
- package/examples/organization-governance-minimal/results/profile-conformance-result.json +0 -31
- package/examples/process-control-contract-minimal/README.md +0 -19
- package/examples/process-control-contract-minimal/graph/objects.json +0 -38
- package/examples/process-control-contract-minimal/graph/relations.json +0 -29
- package/examples/process-control-contract-minimal/graph.json +0 -34
- package/examples/process-control-contract-minimal/results/process-control-contract.json +0 -58
- package/examples/process-transition-minimal/README.md +0 -25
- package/examples/process-transition-minimal/invalid-missing-launch-record.json +0 -14
- package/examples/process-transition-minimal/invalid-ready-to-written.json +0 -14
- package/examples/process-transition-minimal/invalid-release-missing-evidence.json +0 -14
- package/examples/process-transition-minimal/invalid-sync-to-update.json +0 -14
- package/examples/process-transition-minimal/invalid-terminal-missing-kaizen.json +0 -14
- package/examples/process-transition-minimal/invalid-tests-to-approved.json +0 -14
- package/examples/process-transition-minimal/results/transition-explanation-invalid-ready-to-written.json +0 -35
- package/examples/process-transition-minimal/results/transition-explanation-valid.json +0 -34
- package/examples/process-transition-minimal/state-machine.json +0 -79
- package/examples/process-transition-minimal/transition-request-skip-kaizen.json +0 -14
- package/examples/process-transition-minimal/transition-request.json +0 -14
- package/examples/project-technology-context-traversal/README.md +0 -17
- package/examples/project-technology-context-traversal/graph/objects.json +0 -78
- package/examples/project-technology-context-traversal/graph/relations.json +0 -47
- package/examples/project-technology-context-traversal/graph.json +0 -30
- package/examples/project-technology-context-traversal/selection.example.json +0 -29
- package/examples/project-technology-context-traversal/sources/announcement.md +0 -3
- package/examples/project-technology-context-traversal/sources/release-guide.md +0 -3
- package/examples/project-technology-context-traversal/sources/release-smoke.md +0 -3
- package/examples/project-technology-context-traversal/sources/rollback-policy.md +0 -3
- package/examples/risk-and-coordination-minimal/README.md +0 -16
- package/examples/risk-and-coordination-minimal/graph/objects.json +0 -47
- package/examples/risk-and-coordination-minimal/graph/relations.json +0 -29
- package/examples/risk-and-coordination-minimal/graph.json +0 -37
- package/examples/risk-and-coordination-minimal/results/multi-agent-coordination.json +0 -25
- package/examples/risk-and-coordination-minimal/results/risk-control-matrix.json +0 -34
- package/examples/self-service-onboarding/bootstrap-proposal/bootstrap-proposal.json +0 -20
- package/examples/self-service-onboarding/existing-graph/README.md +0 -4
- package/examples/self-service-onboarding/existing-graph/gates/results.json +0 -11
- package/examples/self-service-onboarding/existing-graph/graph/objects.json +0 -11
- package/examples/self-service-onboarding/existing-graph/graph/relations.json +0 -1
- package/examples/self-service-onboarding/existing-graph/graph.json +0 -36
- package/examples/self-service-onboarding/no-graph/README.md +0 -6
- package/examples/self-service-onboarding/no-graph/package.json +0 -6
- package/examples/self-service-onboarding/no-graph/src/index.js +0 -3
- package/examples/self-service-onboarding/stale-graph/README.md +0 -4
- package/examples/self-service-onboarding/stale-graph/graph.json +0 -36
- package/examples/semantic-intent-resolution-minimal/README.md +0 -13
- package/examples/semantic-intent-resolution-minimal/invalid-low-confidence-executes.json +0 -26
- package/examples/semantic-intent-resolution-minimal/invalid-proposal-canonical-update.json +0 -27
- package/examples/semantic-intent-resolution-minimal/results/semantic-intent-resolution.json +0 -45
- package/examples/skill-runtime-minimal/README.md +0 -29
- package/examples/skill-runtime-minimal/gates/results.json +0 -35
- package/examples/skill-runtime-minimal/graph/objects.json +0 -209
- package/examples/skill-runtime-minimal/graph/relations.json +0 -178
- package/examples/skill-runtime-minimal/graph.json +0 -37
- package/examples/skill-runtime-minimal/results/profile-conformance-result.json +0 -27
- package/examples/societal-governance-minimal/README.md +0 -37
- package/examples/societal-governance-minimal/graph/objects.json +0 -218
- package/examples/societal-governance-minimal/graph/relations.json +0 -209
- package/examples/societal-governance-minimal/graph.json +0 -37
- package/examples/source-boundary-minimal/README.md +0 -16
- package/examples/source-boundary-minimal/graph/objects.json +0 -38
- package/examples/source-boundary-minimal/graph/relations.json +0 -20
- package/examples/source-boundary-minimal/graph.json +0 -37
- package/examples/source-boundary-minimal/results/source-boundary-contract.json +0 -37
- package/examples/technology-quality-feedback-minimal/README.md +0 -33
- package/examples/technology-quality-feedback-minimal/graph/objects.json +0 -56
- package/examples/technology-quality-feedback-minimal/graph/relations.json +0 -47
- package/examples/technology-quality-feedback-minimal/graph.json +0 -34
- package/examples/technology-quality-feedback-minimal/invalid-accepted-with-blocking.json +0 -33
- package/examples/technology-quality-feedback-minimal/invalid-evidence-as-authorization.json +0 -22
- package/examples/technology-quality-feedback-minimal/invalid-missing-required-step.json +0 -22
- package/examples/technology-quality-feedback-minimal/invalid-process-improvement-without-kaizen.json +0 -33
- package/examples/technology-quality-feedback-minimal/invalid-spec-gap-without-route.json +0 -33
- package/examples/technology-quality-feedback-minimal/invalid-unclassified-finding.json +0 -33
- package/examples/technology-quality-feedback-minimal/results/technology-quality-feedback.json +0 -80
- package/examples/work-recovery-minimal/README.md +0 -15
- package/examples/work-recovery-minimal/graph/objects.json +0 -47
- package/examples/work-recovery-minimal/graph/relations.json +0 -20
- package/examples/work-recovery-minimal/graph.json +0 -37
- package/examples/work-recovery-minimal/results/recovery-resume-record.json +0 -17
- package/examples/work-recovery-minimal/results/work-state-machine.json +0 -21
- package/packages/cli/adopter-workflow.js +0 -228
- package/packages/cli/context-pack.js +0 -269
- package/packages/cli/graph-manifest.js +0 -367
- package/packages/cli/instrumentation-report.js +0 -97
- package/packages/cli/migrate-graph-manifest.js +0 -33
- package/packages/cli/mirai-graph.js +0 -154
- package/packages/cli/mirai_graph.js +0 -3
- package/packages/cli/playground-demo.js +0 -114
- package/packages/cli/project-technology.js +0 -129
- package/packages/cli/readiness-score.js +0 -164
- package/packages/cli/release-state.js +0 -329
- package/packages/cli/seed-preview.js +0 -78
- package/packages/cli/self-service-onboarding.js +0 -386
- package/packages/cli/validate-adopter-workflow.js +0 -63
- package/packages/cli/validate-artifact-releases.js +0 -282
- package/packages/cli/validate-baseline-comparison.js +0 -105
- package/packages/cli/validate-context-traversal.js +0 -292
- package/packages/cli/validate-graph-manifest-migration.js +0 -64
- package/packages/cli/validate-mirai-graph.js +0 -3245
- package/packages/cli/validate-process-transition-report.js +0 -105
- package/packages/cli/validate-profile-results.js +0 -64
- package/packages/cli/validate-project-continuity.js +0 -173
- package/packages/cli/validate-project-technology.js +0 -296
- package/packages/cli/validate-release-state.js +0 -100
- package/packages/cli/validate-routing-control-examples.js +0 -79
- package/packages/cli/validate-self-service-onboarding.js +0 -159
- package/packages/project-technology/artifact-release.js +0 -738
- package/packages/project-technology/context-traversal.js +0 -684
- package/packages/project-technology/continuity.js +0 -414
- package/packages/project-technology/index.js +0 -835
- package/pilots/independent-implementation-001-conference-planning/README.md +0 -40
- package/pilots/independent-implementation-001-conference-planning/gates/results.json +0 -12
- package/pilots/independent-implementation-001-conference-planning/graph/objects.json +0 -74
- package/pilots/independent-implementation-001-conference-planning/graph/relations.json +0 -56
- package/pilots/independent-implementation-001-conference-planning/graph-seed.json +0 -65
- package/pilots/independent-implementation-001-conference-planning/graph.json +0 -37
- package/pilots/independent-implementation-001-conference-planning/reports/pilot-report.md +0 -120
- package/pilots/independent-implementation-001-conference-planning/results/context-pack.json +0 -35
- package/pilots/independent-implementation-001-conference-planning/results/graph-embryo.json +0 -81
- package/pilots/independent-implementation-001-conference-planning/results/package-validation.json +0 -7
- package/pilots/independent-implementation-001-conference-planning/results/profile-conformance-result.json +0 -28
- package/pilots/independent-implementation-001-conference-planning/results/readiness-score.json +0 -26
- package/pilots/independent-implementation-001-conference-planning/results/seed-validation.json +0 -7
- package/pilots/independent-implementation-002-software-specification/README.md +0 -40
- package/pilots/independent-implementation-002-software-specification/gates/results.json +0 -22
- package/pilots/independent-implementation-002-software-specification/graph/objects.json +0 -101
- package/pilots/independent-implementation-002-software-specification/graph/relations.json +0 -92
- package/pilots/independent-implementation-002-software-specification/graph-seed.json +0 -72
- package/pilots/independent-implementation-002-software-specification/graph.json +0 -37
- package/pilots/independent-implementation-002-software-specification/reports/pilot-report.md +0 -142
- package/pilots/independent-implementation-002-software-specification/results/context-pack.json +0 -184
- package/pilots/independent-implementation-002-software-specification/results/graph-embryo.json +0 -90
- package/pilots/independent-implementation-002-software-specification/results/package-validation.json +0 -7
- package/pilots/independent-implementation-002-software-specification/results/profile-conformance-result.json +0 -28
- package/pilots/independent-implementation-002-software-specification/results/readiness-score.json +0 -26
- package/pilots/independent-implementation-002-software-specification/results/seed-validation.json +0 -7
- package/pilots/independent-implementation-002-software-specification/reviews/semantic-completeness-review.json +0 -81
- package/pilots/independent-implementation-003-ai-employee-workflow/README.md +0 -42
- package/pilots/independent-implementation-003-ai-employee-workflow/gates/results.json +0 -30
- package/pilots/independent-implementation-003-ai-employee-workflow/graph/objects.json +0 -156
- package/pilots/independent-implementation-003-ai-employee-workflow/graph/relations.json +0 -147
- package/pilots/independent-implementation-003-ai-employee-workflow/graph-seed.json +0 -90
- package/pilots/independent-implementation-003-ai-employee-workflow/graph.json +0 -37
- package/pilots/independent-implementation-003-ai-employee-workflow/reports/pilot-report.md +0 -49
- package/pilots/independent-implementation-003-ai-employee-workflow/results/profile-conformance-result.json +0 -30
- package/pilots/independent-implementation-004-research-program/README.md +0 -41
- package/pilots/independent-implementation-004-research-program/gates/results.json +0 -21
- package/pilots/independent-implementation-004-research-program/graph/objects.json +0 -102
- package/pilots/independent-implementation-004-research-program/graph/relations.json +0 -84
- package/pilots/independent-implementation-004-research-program/graph-seed.json +0 -76
- package/pilots/independent-implementation-004-research-program/graph.json +0 -37
- package/pilots/independent-implementation-004-research-program/reports/pilot-report.md +0 -50
- package/pilots/independent-implementation-004-research-program/results/profile-conformance-result.json +0 -30
- package/pilots/independent-implementation-005-organization-governance/README.md +0 -42
- package/pilots/independent-implementation-005-organization-governance/gates/results.json +0 -20
- package/pilots/independent-implementation-005-organization-governance/graph/objects.json +0 -137
- package/pilots/independent-implementation-005-organization-governance/graph/relations.json +0 -110
- package/pilots/independent-implementation-005-organization-governance/graph-seed.json +0 -97
- package/pilots/independent-implementation-005-organization-governance/graph.json +0 -37
- package/pilots/independent-implementation-005-organization-governance/reports/pilot-report.md +0 -47
- package/pilots/independent-implementation-005-organization-governance/results/profile-conformance-result.json +0 -29
- package/playground/README.md +0 -78
- package/playground/demo-report.md +0 -84
- package/profiles/README.md +0 -28
- package/profiles/ai-employee/README.md +0 -132
- package/profiles/ai-employee/profile.json +0 -58
- package/profiles/character-layer/README.md +0 -143
- package/profiles/character-layer/profile.json +0 -46
- package/profiles/implementation-control/README.md +0 -174
- package/profiles/implementation-control/profile.json +0 -108
- package/profiles/organization-governance/README.md +0 -60
- package/profiles/organization-governance/profile.json +0 -56
- package/profiles/project-management/README.md +0 -119
- package/profiles/project-management/profile.json +0 -38
- package/profiles/skill-runtime/README.md +0 -99
- package/profiles/skill-runtime/profile.json +0 -58
- package/profiles/societal-governance/README.md +0 -129
- package/profiles/societal-governance/profile.json +0 -121
- package/profiles/software-specification/README.md +0 -142
- package/profiles/software-specification/profile.json +0 -31
- package/publications/README.md +0 -39
- package/publications/observable-self-correcting-ai-workflows/README.md +0 -105
- package/publications/preprint-note.md +0 -11
- package/publications/preprint-outline.md +0 -45
- package/publications/semantic-intent-goal-vector-control/README.md +0 -99
- package/releases/0.1.0-alpha.0.md +0 -45
- package/releases/0.1.0-alpha.1.md +0 -63
- package/releases/0.1.0-alpha.10.md +0 -93
- package/releases/0.1.0-alpha.11.md +0 -114
- package/releases/0.1.0-alpha.2.md +0 -37
- package/releases/0.1.0-alpha.3.md +0 -61
- package/releases/0.1.0-alpha.4.md +0 -53
- package/releases/0.1.0-alpha.5.md +0 -48
- package/releases/0.1.0-alpha.6.md +0 -96
- package/releases/0.1.0-alpha.7.md +0 -114
- package/releases/0.1.0-alpha.8.md +0 -92
- package/releases/0.1.0-alpha.9.md +0 -80
- package/releases/1.0.0-rc.1.md +0 -121
- package/releases/1.0.0-rc.10.md +0 -14
- package/releases/1.0.0-rc.11.md +0 -14
- package/releases/1.0.0-rc.2.md +0 -79
- package/releases/1.0.0-rc.3.md +0 -51
- package/releases/1.0.0-rc.4.md +0 -70
- package/releases/1.0.0-rc.5.md +0 -88
- package/releases/1.0.0-rc.6.md +0 -76
- package/releases/1.0.0-rc.8.md +0 -17
- package/releases/1.0.0-rc.9.md +0 -14
- package/releases/1.0.0.md +0 -23
- package/releases/1.1.0.md +0 -36
- package/releases/1.1.1.md +0 -25
- package/releases/1.2.0.md +0 -19
- package/releases/1.3.0.md +0 -16
- package/releases/README.md +0 -135
- package/releases/societal-governance-profile-proposal.md +0 -45
- package/schemas/baseline-comparison-result.schema.json +0 -87
- package/schemas/character-layer-integration.schema.json +0 -112
- package/schemas/character-layer-readiness.schema.json +0 -73
- package/schemas/context-pack.schema.json +0 -190
- package/schemas/context-traversal-receipt.schema.json +0 -64
- package/schemas/development-cockpit.schema.json +0 -74
- package/schemas/dynamic-episode-trace.schema.json +0 -153
- package/schemas/feature-implementation-traceability.schema.json +0 -80
- package/schemas/federation-health-dashboard.schema.json +0 -47
- package/schemas/gate-result.schema.json +0 -44
- package/schemas/goal-vector-quality-control.schema.json +0 -131
- package/schemas/graph-dna-alignment.schema.json +0 -49
- package/schemas/graph-embryo.schema.json +0 -51
- package/schemas/graph-lock.schema.json +0 -28
- package/schemas/graph-manifest.schema.json +0 -154
- package/schemas/graph-seed.schema.json +0 -137
- package/schemas/implementation-control-cycle.schema.json +0 -265
- package/schemas/implementation-control-loop.schema.json +0 -84
- package/schemas/launch-record.schema.json +0 -78
- package/schemas/model-portability-evidence.schema.json +0 -93
- package/schemas/multi-agent-coordination.schema.json +0 -35
- package/schemas/multi-source-quality-feedback.schema.json +0 -54
- package/schemas/object.schema.json +0 -49
- package/schemas/package-manifest.schema.json +0 -53
- package/schemas/process-control-contract.schema.json +0 -100
- package/schemas/process-transition-request.schema.json +0 -41
- package/schemas/profile.schema.json +0 -56
- package/schemas/project-technology-extension.schema.json +0 -15
- package/schemas/project-technology-target-export.schema.json +0 -35
- package/schemas/readiness-score.schema.json +0 -43
- package/schemas/recovery-resume-record.schema.json +0 -25
- package/schemas/relation.schema.json +0 -43
- package/schemas/risk-control-matrix.schema.json +0 -36
- package/schemas/route-explanation.schema.json +0 -51
- package/schemas/route-regression-result.schema.json +0 -33
- package/schemas/routing-fixture-run.schema.json +0 -45
- package/schemas/routing-fixtures.schema.json +0 -59
- package/schemas/semantic-intent-resolution.schema.json +0 -151
- package/schemas/source-boundary-contract.schema.json +0 -31
- package/schemas/technology-quality-feedback.schema.json +0 -116
- package/schemas/work-state-machine.schema.json +0 -34
- package/standard/action-runtime-boundary.md +0 -99
- package/standard/adoption-levels.md +0 -69
- package/standard/conformance-levels.md +0 -133
- package/standard/context-pack-generation.md +0 -184
- package/standard/development-cockpit.md +0 -67
- package/standard/dynamic-episode-layer.md +0 -113
- package/standard/dynamic-layer-code-generation.md +0 -87
- package/standard/episode-trace.md +0 -97
- package/standard/evidence-provenance.md +0 -128
- package/standard/feature-implementation-traceability.md +0 -68
- package/standard/federation-health.md +0 -42
- package/standard/feedback-learning-gate.md +0 -101
- package/standard/goal-vector-quality-control.md +0 -128
- package/standard/governance.md +0 -137
- package/standard/graph-as-ai-brain.md +0 -81
- package/standard/graph-dna-alignment.md +0 -50
- package/standard/graph-dna.md +0 -70
- package/standard/graph-embryo.md +0 -69
- package/standard/graph-seed.md +0 -122
- package/standard/hybrid-source-of-truth.md +0 -91
- package/standard/implementation-control-cycles.md +0 -194
- package/standard/implementation-control.md +0 -102
- package/standard/launch-record.md +0 -53
- package/standard/lifecycle-readiness.md +0 -159
- package/standard/multi-agent-coordination.md +0 -50
- package/standard/multi-source-quality-feedback.md +0 -71
- package/standard/object-model.md +0 -167
- package/standard/organization-governance.md +0 -83
- package/standard/process-control-contract.md +0 -53
- package/standard/profile-boundaries.md +0 -225
- package/standard/profiles.md +0 -253
- package/standard/project-technology.md +0 -186
- package/standard/projection-views.md +0 -69
- package/standard/recovery-resume.md +0 -49
- package/standard/relation-model.md +0 -149
- package/standard/risk-control-matrix.md +0 -53
- package/standard/route-explanation.md +0 -35
- package/standard/route-regression.md +0 -33
- package/standard/routing-fixtures.md +0 -54
- package/standard/runtime-enablement.md +0 -85
- package/standard/semantic-intent-resolution.md +0 -91
- package/standard/source-boundary-contract.md +0 -49
- package/standard/standard-v0.1.md +0 -132
- package/standard/technology-quality-feedback.md +0 -97
- package/standard/test-suite.md +0 -159
- package/standard/work-state-machine.md +0 -62
- package/templates/README.md +0 -77
- package/templates/ai-employee-starter/README.md +0 -9
- package/templates/ai-employee-starter/gates/results.json +0 -12
- package/templates/ai-employee-starter/graph/objects.json +0 -90
- package/templates/ai-employee-starter/graph/relations.json +0 -47
- package/templates/ai-employee-starter/graph.json +0 -37
- package/templates/character-layer-starter/README.md +0 -39
- package/templates/character-layer-starter/gates/results.json +0 -20
- package/templates/character-layer-starter/graph/objects.json +0 -308
- package/templates/character-layer-starter/graph/relations.json +0 -344
- package/templates/character-layer-starter/graph.json +0 -37
- package/templates/organization-governance-starter/README.md +0 -9
- package/templates/organization-governance-starter/gates/results.json +0 -12
- package/templates/organization-governance-starter/graph/objects.json +0 -112
- package/templates/organization-governance-starter/graph/relations.json +0 -65
- package/templates/organization-governance-starter/graph.json +0 -37
- package/templates/research-program-starter/README.md +0 -9
- package/templates/research-program-starter/gates/results.json +0 -12
- package/templates/research-program-starter/graph/objects.json +0 -79
- package/templates/research-program-starter/graph/relations.json +0 -47
- package/templates/research-program-starter/graph.json +0 -37
- package/templates/software-project-starter/README.md +0 -9
- package/templates/software-project-starter/gates/results.json +0 -12
- package/templates/software-project-starter/graph/objects.json +0 -79
- package/templates/software-project-starter/graph/relations.json +0 -47
- package/templates/software-project-starter/graph.json +0 -37
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const root = path.resolve(__dirname, "..", "..");
|
|
7
|
-
|
|
8
|
-
const profiles = [
|
|
9
|
-
{
|
|
10
|
-
role: "developer",
|
|
11
|
-
aliases: ["developer", "software", "software_specification", "engineer"],
|
|
12
|
-
profile: "software_specification",
|
|
13
|
-
starter: "templates/software-project-starter",
|
|
14
|
-
useWhen: "features, requirements, components, implementation tasks and technical risks",
|
|
15
|
-
nextCommands: [
|
|
16
|
-
"node packages/cli/mirai-graph.js validate templates/software-project-starter",
|
|
17
|
-
"node packages/cli/mirai-graph.js report validation templates/software-project-starter",
|
|
18
|
-
"node packages/cli/mirai-graph.js adopter report templates/software-project-starter"
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
role: "researcher",
|
|
23
|
-
aliases: ["researcher", "research", "science", "project_management"],
|
|
24
|
-
profile: "project_management",
|
|
25
|
-
starter: "templates/research-program-starter",
|
|
26
|
-
useWhen: "hypotheses, evidence, milestones, review gates and publication risks",
|
|
27
|
-
nextCommands: [
|
|
28
|
-
"node packages/cli/mirai-graph.js validate templates/research-program-starter",
|
|
29
|
-
"node packages/cli/mirai-graph.js report validation templates/research-program-starter",
|
|
30
|
-
"node packages/cli/mirai-graph.js adopter report templates/research-program-starter"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
role: "ai-employee",
|
|
35
|
-
aliases: ["ai-employee", "ai_employee", "agent", "ai", "employee"],
|
|
36
|
-
profile: "ai_employee",
|
|
37
|
-
starter: "templates/ai-employee-starter",
|
|
38
|
-
useWhen: "AI worker roles, skills, tools, policies, actions, feedback and learning gates",
|
|
39
|
-
nextCommands: [
|
|
40
|
-
"node packages/cli/mirai-graph.js validate templates/ai-employee-starter",
|
|
41
|
-
"node packages/cli/mirai-graph.js report validation templates/ai-employee-starter",
|
|
42
|
-
"node packages/cli/mirai-graph.js adopter report templates/ai-employee-starter"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
role: "character-layer",
|
|
47
|
-
aliases: ["character-layer", "character_layer", "character", "behavior", "behaviour", "behavior-governance"],
|
|
48
|
-
profile: "character_layer",
|
|
49
|
-
starter: "templates/character-layer-starter",
|
|
50
|
-
useWhen: "behavior constitution, role character profiles, reflection, violation patterns and correction loops",
|
|
51
|
-
nextCommands: [
|
|
52
|
-
"node packages/cli/mirai-graph.js validate templates/character-layer-starter",
|
|
53
|
-
"node packages/cli/mirai-graph.js report validation templates/character-layer-starter",
|
|
54
|
-
"node packages/cli/mirai-graph.js adopter report templates/character-layer-starter"
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
role: "organization",
|
|
59
|
-
aliases: ["organization", "org", "governance", "organization_governance"],
|
|
60
|
-
profile: "organization_governance",
|
|
61
|
-
starter: "templates/organization-governance-starter",
|
|
62
|
-
useWhen: "mission, strategy, departments, programs, policies, controls and metrics",
|
|
63
|
-
nextCommands: [
|
|
64
|
-
"node packages/cli/mirai-graph.js validate templates/organization-governance-starter",
|
|
65
|
-
"node packages/cli/mirai-graph.js report validation templates/organization-governance-starter",
|
|
66
|
-
"node packages/cli/mirai-graph.js adopter report templates/organization-governance-starter"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
|
|
71
|
-
function usage() {
|
|
72
|
-
console.error("Usage:");
|
|
73
|
-
console.error(" adopter-workflow choose-profile");
|
|
74
|
-
console.error(" adopter-workflow plan <role-or-profile>");
|
|
75
|
-
console.error(" adopter-workflow report <template-dir>");
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function readJson(filePath) {
|
|
79
|
-
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function resolveProfile(input) {
|
|
83
|
-
const normalized = String(input || "").trim().toLowerCase().replace(/_/g, "-");
|
|
84
|
-
return profiles.find((item) => {
|
|
85
|
-
if (item.role === normalized) return true;
|
|
86
|
-
if (item.profile.replace(/_/g, "-") === normalized) return true;
|
|
87
|
-
return item.aliases.some((alias) => alias.replace(/_/g, "-") === normalized);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function printProfileMap() {
|
|
92
|
-
console.log("# Mirai Graph Profile Selection");
|
|
93
|
-
console.log("");
|
|
94
|
-
console.log("| Role | Profile | Starter | Use when |");
|
|
95
|
-
console.log("| --- | --- | --- | --- |");
|
|
96
|
-
for (const item of profiles) {
|
|
97
|
-
console.log(`| ${item.role} | \`${item.profile}\` | \`${item.starter}\` | ${item.useWhen} |`);
|
|
98
|
-
}
|
|
99
|
-
console.log("");
|
|
100
|
-
console.log("Boundary: profile selection is a starting point, not adoption proof.");
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function printPlan(input) {
|
|
104
|
-
const item = resolveProfile(input);
|
|
105
|
-
if (!item) {
|
|
106
|
-
console.error(`Unknown role or profile: ${input}`);
|
|
107
|
-
console.error(`Known roles: ${profiles.map((profile) => profile.role).join(", ")}`);
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
console.log(`# Mirai Graph Adopter Plan: ${item.role}`);
|
|
112
|
-
console.log("");
|
|
113
|
-
console.log(`- Profile: \`${item.profile}\``);
|
|
114
|
-
console.log(`- Starter: \`${item.starter}\``);
|
|
115
|
-
console.log(`- Use when: ${item.useWhen}.`);
|
|
116
|
-
console.log("");
|
|
117
|
-
console.log("## First Workflow");
|
|
118
|
-
console.log("");
|
|
119
|
-
console.log("```text");
|
|
120
|
-
console.log("choose profile -> copy starter -> replace synthetic objects -> validate -> report -> launch/evidence/kaizen");
|
|
121
|
-
console.log("```");
|
|
122
|
-
console.log("");
|
|
123
|
-
console.log("## Commands");
|
|
124
|
-
console.log("");
|
|
125
|
-
console.log("```bash");
|
|
126
|
-
for (const command of item.nextCommands) {
|
|
127
|
-
console.log(command);
|
|
128
|
-
}
|
|
129
|
-
console.log("```");
|
|
130
|
-
console.log("");
|
|
131
|
-
console.log("## Review Boundary");
|
|
132
|
-
console.log("");
|
|
133
|
-
console.log("- Validation confirms the current release-candidate package shape only.");
|
|
134
|
-
console.log("- Reports support review; they do not authorize canonical updates.");
|
|
135
|
-
console.log("- Add launch, evidence and Kaizen controls before using the package for governed work.");
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function templateReport(templateDir) {
|
|
139
|
-
const absTemplate = path.resolve(root, templateDir);
|
|
140
|
-
const manifestPath = path.join(absTemplate, "graph.json");
|
|
141
|
-
const objectsPath = path.join(absTemplate, "graph", "objects.json");
|
|
142
|
-
const relationsPath = path.join(absTemplate, "graph", "relations.json");
|
|
143
|
-
const gatesPath = path.join(absTemplate, "gates", "results.json");
|
|
144
|
-
|
|
145
|
-
const missing = [manifestPath, objectsPath, relationsPath].filter((filePath) => !fs.existsSync(filePath));
|
|
146
|
-
if (missing.length > 0) {
|
|
147
|
-
console.error(`Template is missing required files: ${missing.map((filePath) => path.relative(root, filePath)).join(", ")}`);
|
|
148
|
-
process.exit(1);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const manifest = readJson(manifestPath);
|
|
152
|
-
const objects = readJson(objectsPath);
|
|
153
|
-
const relations = readJson(relationsPath);
|
|
154
|
-
const gates = fs.existsSync(gatesPath) ? readJson(gatesPath) : [];
|
|
155
|
-
const manifestProfile = Array.isArray(manifest.profiles) ? manifest.profiles[0] : manifest.profile;
|
|
156
|
-
const profile = profiles.find((item) => item.profile === manifestProfile);
|
|
157
|
-
|
|
158
|
-
console.log(`# Mirai Graph Adopter Report: ${manifest.title || manifest.name}`);
|
|
159
|
-
console.log("");
|
|
160
|
-
console.log(`- Package: \`${manifest.id}\``);
|
|
161
|
-
console.log(`- Profile: \`${manifestProfile}\``);
|
|
162
|
-
console.log(`- Conformance: \`${manifest.conformance_level || "unspecified"}\``);
|
|
163
|
-
console.log(`- Public safety: \`${manifest.public_safety || "unspecified"}\``);
|
|
164
|
-
console.log(`- Objects: \`${objects.length}\``);
|
|
165
|
-
console.log(`- Relations: \`${relations.length}\``);
|
|
166
|
-
console.log(`- Gate results: \`${gates.length}\``);
|
|
167
|
-
console.log("");
|
|
168
|
-
|
|
169
|
-
if (profile) {
|
|
170
|
-
console.log("## Recommended Next Commands");
|
|
171
|
-
console.log("");
|
|
172
|
-
console.log("```bash");
|
|
173
|
-
for (const command of profile.nextCommands) {
|
|
174
|
-
console.log(command.replace(profile.starter, templateDir));
|
|
175
|
-
}
|
|
176
|
-
console.log("```");
|
|
177
|
-
console.log("");
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
console.log("## Adoption Checklist");
|
|
181
|
-
console.log("");
|
|
182
|
-
console.log("- Replace synthetic objects with project-specific objects.");
|
|
183
|
-
console.log("- Keep private source material outside public graph packages.");
|
|
184
|
-
console.log("- Run validation before adding launch or process-control artifacts.");
|
|
185
|
-
console.log("- Add evidence references before promoting readiness.");
|
|
186
|
-
console.log("- Add launch/evidence/Kaizen controls before governed execution.");
|
|
187
|
-
console.log("");
|
|
188
|
-
console.log("## Boundary");
|
|
189
|
-
console.log("");
|
|
190
|
-
console.log("This report is an adoption aid. It does not prove completeness, authorize production execution or update canonical graph state.");
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
const [command, ...args] = process.argv.slice(2);
|
|
194
|
-
|
|
195
|
-
if (!command || command === "--help" || command === "-h") {
|
|
196
|
-
usage();
|
|
197
|
-
process.exit(command ? 0 : 1);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (command === "choose-profile") {
|
|
201
|
-
if (args.length !== 0) {
|
|
202
|
-
usage();
|
|
203
|
-
process.exit(1);
|
|
204
|
-
}
|
|
205
|
-
printProfileMap();
|
|
206
|
-
process.exit(0);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (command === "plan") {
|
|
210
|
-
if (args.length !== 1) {
|
|
211
|
-
usage();
|
|
212
|
-
process.exit(1);
|
|
213
|
-
}
|
|
214
|
-
printPlan(args[0]);
|
|
215
|
-
process.exit(0);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
if (command === "report") {
|
|
219
|
-
if (args.length !== 1) {
|
|
220
|
-
usage();
|
|
221
|
-
process.exit(1);
|
|
222
|
-
}
|
|
223
|
-
templateReport(args[0]);
|
|
224
|
-
process.exit(0);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
usage();
|
|
228
|
-
process.exit(1);
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
function usage() {
|
|
7
|
-
console.error("Usage: node packages/cli/context-pack.js <package-dir> --task-id <task-id> [--write <output-file>]");
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function readJson(filePath) {
|
|
11
|
-
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function findManifestPath(packageDir) {
|
|
15
|
-
const current = path.join(packageDir, "graph.json");
|
|
16
|
-
if (fs.existsSync(current)) return current;
|
|
17
|
-
return path.join(packageDir, "mirai-graph-package.json");
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function normalizeToken(token) {
|
|
21
|
-
const normalized = token.toLowerCase();
|
|
22
|
-
const replacements = new Map([
|
|
23
|
-
["notification", "notify"],
|
|
24
|
-
["notifications", "notify"],
|
|
25
|
-
["notifying", "notify"],
|
|
26
|
-
["approval", "approve"],
|
|
27
|
-
["approved", "approve"],
|
|
28
|
-
["approving", "approve"],
|
|
29
|
-
["schedule", "schedule"],
|
|
30
|
-
["speaker", "speaker"],
|
|
31
|
-
["session", "session"],
|
|
32
|
-
["sessions", "session"]
|
|
33
|
-
]);
|
|
34
|
-
if (replacements.has(normalized)) {
|
|
35
|
-
return replacements.get(normalized);
|
|
36
|
-
}
|
|
37
|
-
return normalized
|
|
38
|
-
.replace(/[^a-z0-9_]+/g, "")
|
|
39
|
-
.replace(/(ing|ed|ions|ion|s)$/u, "");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function tokenize(text) {
|
|
43
|
-
return String(text)
|
|
44
|
-
.split(/[^a-zA-Z0-9]+/u)
|
|
45
|
-
.map(normalizeToken)
|
|
46
|
-
.filter((token) => token.length >= 3);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function objectText(object) {
|
|
50
|
-
return [
|
|
51
|
-
object.id,
|
|
52
|
-
object.kind,
|
|
53
|
-
object.title,
|
|
54
|
-
object.summary,
|
|
55
|
-
object.profile
|
|
56
|
-
].join(" ");
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function addReason(selectionReasons, objectId, reason) {
|
|
60
|
-
if (!selectionReasons.has(objectId)) {
|
|
61
|
-
selectionReasons.set(objectId, new Set());
|
|
62
|
-
}
|
|
63
|
-
selectionReasons.get(objectId).add(reason);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function hasSharedEvidence(object, evidenceIds) {
|
|
67
|
-
return Array.isArray(object.evidence) && object.evidence.some((id) => evidenceIds.has(id));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function isSafetyContextObject(object) {
|
|
71
|
-
if (!["constraint", "risk", "governance_gate"].includes(object.kind) && !object.id.startsWith("gate.")) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
const text = tokenize(objectText(object));
|
|
75
|
-
const safetyTokens = new Set([
|
|
76
|
-
"credential",
|
|
77
|
-
"leak",
|
|
78
|
-
"log",
|
|
79
|
-
"permission",
|
|
80
|
-
"privacy",
|
|
81
|
-
"public",
|
|
82
|
-
"safety",
|
|
83
|
-
"secret",
|
|
84
|
-
"security",
|
|
85
|
-
"token"
|
|
86
|
-
]);
|
|
87
|
-
return text.some((token) => safetyTokens.has(token));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function scoreObject(object, taskTokens) {
|
|
91
|
-
const text = tokenize(objectText(object));
|
|
92
|
-
const textSet = new Set(text);
|
|
93
|
-
let score = 0;
|
|
94
|
-
const reasons = [];
|
|
95
|
-
for (const token of taskTokens) {
|
|
96
|
-
if (textSet.has(token)) {
|
|
97
|
-
score += 3;
|
|
98
|
-
reasons.push(`exact token match: ${token}`);
|
|
99
|
-
} else if (text.some((candidate) => candidate.includes(token) || token.includes(candidate))) {
|
|
100
|
-
score += 1;
|
|
101
|
-
reasons.push(`partial token match: ${token}`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (object.kind === "evidence") {
|
|
105
|
-
score -= 1;
|
|
106
|
-
reasons.push("evidence object penalty until linked by selected graph context");
|
|
107
|
-
}
|
|
108
|
-
if (object.kind === "governance_gate" || object.id.startsWith("gate.")) {
|
|
109
|
-
score += 1;
|
|
110
|
-
reasons.push("governance gate boost");
|
|
111
|
-
}
|
|
112
|
-
return { score, reasons };
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function buildContextPack(packageDir, taskId) {
|
|
116
|
-
const manifestPath = findManifestPath(packageDir);
|
|
117
|
-
const manifest = fs.existsSync(manifestPath) ? readJson(manifestPath) : null;
|
|
118
|
-
const objectsPath = manifest
|
|
119
|
-
? path.join(packageDir, Array.isArray(manifest.graph.objects) ? manifest.graph.objects[0] : manifest.graph.objects)
|
|
120
|
-
: path.join(packageDir, "graph", "objects.json");
|
|
121
|
-
const relationsPath = manifest
|
|
122
|
-
? path.join(packageDir, Array.isArray(manifest.graph.relations) ? manifest.graph.relations[0] : manifest.graph.relations)
|
|
123
|
-
: path.join(packageDir, "graph", "relations.json");
|
|
124
|
-
const objects = readJson(objectsPath);
|
|
125
|
-
const relations = readJson(relationsPath);
|
|
126
|
-
const taskTokens = tokenize(taskId);
|
|
127
|
-
const scoredObjects = objects.map((object) => ({
|
|
128
|
-
object,
|
|
129
|
-
...scoreObject(object, taskTokens)
|
|
130
|
-
}));
|
|
131
|
-
const directMatches = objects
|
|
132
|
-
.map((object) => scoredObjects.find((entry) => entry.object.id === object.id))
|
|
133
|
-
.filter((entry) => entry.score > 0)
|
|
134
|
-
.sort((a, b) => b.score - a.score)
|
|
135
|
-
.map((entry) => entry.object);
|
|
136
|
-
|
|
137
|
-
const selectedIds = new Set(directMatches.map((object) => object.id));
|
|
138
|
-
const selectionReasons = new Map();
|
|
139
|
-
const objectScores = new Map(scoredObjects.map((entry) => [entry.object.id, entry.score]));
|
|
140
|
-
|
|
141
|
-
for (const entry of scoredObjects) {
|
|
142
|
-
if (entry.score > 0) {
|
|
143
|
-
for (const reason of entry.reasons) {
|
|
144
|
-
addReason(selectionReasons, entry.object.id, reason);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const relevantRelations = relations.filter((relation) => (
|
|
150
|
-
selectedIds.has(relation.source) || selectedIds.has(relation.target)
|
|
151
|
-
));
|
|
152
|
-
const relevantRelationIds = new Set(relevantRelations.map((relation) => relation.id));
|
|
153
|
-
|
|
154
|
-
for (const relation of relevantRelations) {
|
|
155
|
-
if (!selectedIds.has(relation.source)) {
|
|
156
|
-
addReason(selectionReasons, relation.source, `one-hop relation expansion from ${relation.id}`);
|
|
157
|
-
}
|
|
158
|
-
if (!selectedIds.has(relation.target)) {
|
|
159
|
-
addReason(selectionReasons, relation.target, `one-hop relation expansion from ${relation.id}`);
|
|
160
|
-
}
|
|
161
|
-
selectedIds.add(relation.source);
|
|
162
|
-
selectedIds.add(relation.target);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const selectedEvidenceIds = new Set(
|
|
166
|
-
objects
|
|
167
|
-
.filter((object) => selectedIds.has(object.id))
|
|
168
|
-
.flatMap((object) => object.evidence || [])
|
|
169
|
-
);
|
|
170
|
-
|
|
171
|
-
for (const object of objects) {
|
|
172
|
-
if (isSafetyContextObject(object) && hasSharedEvidence(object, selectedEvidenceIds)) {
|
|
173
|
-
if (!selectedIds.has(object.id)) {
|
|
174
|
-
addReason(selectionReasons, object.id, "safety-sensitive object with shared evidence");
|
|
175
|
-
}
|
|
176
|
-
selectedIds.add(object.id);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const expandedRelations = relations.filter((relation) => (
|
|
181
|
-
selectedIds.has(relation.source) && selectedIds.has(relation.target)
|
|
182
|
-
));
|
|
183
|
-
|
|
184
|
-
const selectedObjects = objects.filter((object) => (
|
|
185
|
-
selectedIds.has(object.id) ||
|
|
186
|
-
(object.kind === "evidence" && objects.some((selected) => (
|
|
187
|
-
selectedIds.has(selected.id) && Array.isArray(selected.evidence) && selected.evidence.includes(object.id)
|
|
188
|
-
)))
|
|
189
|
-
));
|
|
190
|
-
for (const object of selectedObjects) {
|
|
191
|
-
if (object.kind === "evidence" && !selectedIds.has(object.id)) {
|
|
192
|
-
addReason(selectionReasons, object.id, "evidence referenced by selected object");
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
const selectedObjectIds = selectedObjects.map((object) => object.id);
|
|
196
|
-
const relationIds = expandedRelations.map((relation) => relation.id);
|
|
197
|
-
const relationExplanations = expandedRelations.map((relation) => ({
|
|
198
|
-
id: relation.id,
|
|
199
|
-
reason: relevantRelationIds.has(relation.id)
|
|
200
|
-
? "one-hop relation expansion from direct object match"
|
|
201
|
-
: "connects selected objects after safety/evidence expansion",
|
|
202
|
-
source: relation.source,
|
|
203
|
-
target: relation.target
|
|
204
|
-
}));
|
|
205
|
-
const objectExplanations = selectedObjects.map((object) => ({
|
|
206
|
-
id: object.id,
|
|
207
|
-
relevance_score: objectScores.get(object.id) || 0,
|
|
208
|
-
reasons: Array.from(selectionReasons.get(object.id) || ["included as selected graph context"])
|
|
209
|
-
}));
|
|
210
|
-
const evidence = Array.from(new Set([
|
|
211
|
-
...selectedObjects.flatMap((object) => object.evidence || []),
|
|
212
|
-
...expandedRelations.flatMap((relation) => relation.evidence || [])
|
|
213
|
-
]));
|
|
214
|
-
const omittedObjects = objects
|
|
215
|
-
.filter((object) => !selectedObjectIds.includes(object.id))
|
|
216
|
-
.map((object) => object.id);
|
|
217
|
-
|
|
218
|
-
return {
|
|
219
|
-
id: `context_pack.${taskId.replace(/[^a-zA-Z0-9_]+/g, "_")}`,
|
|
220
|
-
task_id: taskId,
|
|
221
|
-
source_graph: manifest ? manifest.id : packageDir,
|
|
222
|
-
generated_at: new Date().toISOString(),
|
|
223
|
-
included_objects: selectedObjectIds,
|
|
224
|
-
included_relations: relationIds,
|
|
225
|
-
evidence,
|
|
226
|
-
selection: {
|
|
227
|
-
method: "token_matching_one_hop_relation_expansion_safety_shared_evidence",
|
|
228
|
-
task_tokens: taskTokens,
|
|
229
|
-
object_explanations: objectExplanations,
|
|
230
|
-
relation_explanations: relationExplanations
|
|
231
|
-
},
|
|
232
|
-
assumptions: [
|
|
233
|
-
"Alpha generator uses token matching plus one-hop relation expansion.",
|
|
234
|
-
"Safety-sensitive constraints and risks with shared evidence are included."
|
|
235
|
-
],
|
|
236
|
-
omissions: omittedObjects,
|
|
237
|
-
limitations: [
|
|
238
|
-
"Generated context pack is not canonical state.",
|
|
239
|
-
"This alpha generator does not prove semantic completeness."
|
|
240
|
-
]
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
const packageDir = process.argv[2];
|
|
245
|
-
const taskIndex = process.argv.indexOf("--task-id");
|
|
246
|
-
const writeIndex = process.argv.indexOf("--write");
|
|
247
|
-
const taskId = taskIndex >= 0 ? process.argv[taskIndex + 1] : null;
|
|
248
|
-
const outputPath = writeIndex >= 0 ? process.argv[writeIndex + 1] : null;
|
|
249
|
-
|
|
250
|
-
if (!packageDir || !taskId || (writeIndex >= 0 && !outputPath)) {
|
|
251
|
-
usage();
|
|
252
|
-
process.exit(2);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
try {
|
|
256
|
-
const contextPack = buildContextPack(path.resolve(packageDir), taskId);
|
|
257
|
-
const output = JSON.stringify(contextPack, null, 2);
|
|
258
|
-
|
|
259
|
-
if (outputPath) {
|
|
260
|
-
const resolvedOutputPath = path.resolve(outputPath);
|
|
261
|
-
fs.mkdirSync(path.dirname(resolvedOutputPath), { recursive: true });
|
|
262
|
-
fs.writeFileSync(resolvedOutputPath, `${output}\n`);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
console.log(output);
|
|
266
|
-
} catch (error) {
|
|
267
|
-
console.error(error.message);
|
|
268
|
-
process.exit(1);
|
|
269
|
-
}
|