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,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawnSync } = require("child_process");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const root = path.resolve(__dirname, "..", "..");
|
|
7
|
-
const node = process.execPath;
|
|
8
|
-
const releaseState = path.join(root, "packages", "cli", "release-state.js");
|
|
9
|
-
|
|
10
|
-
const args = process.argv.slice(2);
|
|
11
|
-
const requireGitTag = args.includes("--require-git-tag");
|
|
12
|
-
const requireGithubRelease = args.includes("--require-github-release");
|
|
13
|
-
const requireNpmPublished = args.includes("--require-npm-published");
|
|
14
|
-
const releaseStateArgs = [
|
|
15
|
-
...(requireGitTag ? ["--require-git-tag"] : []),
|
|
16
|
-
...(requireGithubRelease ? ["--require-github-release"] : []),
|
|
17
|
-
...(requireNpmPublished ? ["--require-npm-published"] : [])
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
const result = spawnSync(node, [releaseState, ...releaseStateArgs], {
|
|
21
|
-
cwd: root,
|
|
22
|
-
encoding: "utf8"
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const errors = [];
|
|
26
|
-
let state = null;
|
|
27
|
-
|
|
28
|
-
if (result.status !== 0) {
|
|
29
|
-
errors.push(`release-state command failed with exit ${result.status}`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
state = JSON.parse(result.stdout);
|
|
34
|
-
} catch (error) {
|
|
35
|
-
errors.push("release-state output is not valid JSON");
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (state) {
|
|
39
|
-
if (state.report_type !== "mirai_graph_release_state") {
|
|
40
|
-
errors.push("unexpected report_type");
|
|
41
|
-
}
|
|
42
|
-
if (!state.package || state.package.name !== "mirai-graph") {
|
|
43
|
-
errors.push("package name must be mirai-graph");
|
|
44
|
-
}
|
|
45
|
-
if (!state.package || !state.package.version) {
|
|
46
|
-
errors.push("package version is required");
|
|
47
|
-
}
|
|
48
|
-
if (requireGitTag && (!state.git || !state.git.tag_exists)) {
|
|
49
|
-
errors.push("current package version must have a local git tag");
|
|
50
|
-
}
|
|
51
|
-
if (requireGithubRelease && (!state.github_release || !state.github_release.found)) {
|
|
52
|
-
errors.push("matching GitHub Release must exist");
|
|
53
|
-
}
|
|
54
|
-
if (!state.npm || !state.npm.package || typeof state.npm.package.version_published !== "boolean") {
|
|
55
|
-
errors.push("npm package publication state must be reported");
|
|
56
|
-
}
|
|
57
|
-
if (!state.npm || typeof state.npm.authenticated !== "boolean") {
|
|
58
|
-
errors.push("npm authentication state must be reported");
|
|
59
|
-
}
|
|
60
|
-
if (!Array.isArray(state.blockers)) {
|
|
61
|
-
errors.push("blockers must be an array");
|
|
62
|
-
}
|
|
63
|
-
if (!Array.isArray(state.boundary) || !state.boundary.some((item) => item.includes("does not publish"))) {
|
|
64
|
-
errors.push("release-state boundary must state that the report does not publish");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const markdown = spawnSync(node, [releaseState, "--markdown", ...releaseStateArgs], {
|
|
69
|
-
cwd: root,
|
|
70
|
-
encoding: "utf8"
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
if (markdown.status !== 0) {
|
|
74
|
-
errors.push(`release-state markdown command failed with exit ${markdown.status}`);
|
|
75
|
-
} else {
|
|
76
|
-
for (const expected of ["Mirai Graph Release State", "GitHub Release", "NPM Package", "Blockers"]) {
|
|
77
|
-
if (!markdown.stdout.includes(expected)) {
|
|
78
|
-
errors.push(`markdown report missing ${expected}`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const validation = {
|
|
84
|
-
mode: "release_state",
|
|
85
|
-
valid: errors.length === 0,
|
|
86
|
-
checked_version: state && state.package && state.package.version || null,
|
|
87
|
-
require_git_tag: requireGitTag,
|
|
88
|
-
require_github_release: requireGithubRelease,
|
|
89
|
-
require_npm_published: requireNpmPublished,
|
|
90
|
-
npm_version_published: state && state.npm && state.npm.package && state.npm.package.version_published,
|
|
91
|
-
npm_authenticated: state && state.npm && state.npm.authenticated,
|
|
92
|
-
blockers: state && state.blockers || [],
|
|
93
|
-
errors
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
console.log(JSON.stringify(validation, null, 2));
|
|
97
|
-
|
|
98
|
-
if (errors.length > 0) {
|
|
99
|
-
process.exit(1);
|
|
100
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const exampleDir = path.join("examples", "federation-routing-smoke");
|
|
7
|
-
const requiredFiles = [
|
|
8
|
-
"routing-fixtures.json",
|
|
9
|
-
"routing-fixture-run.json",
|
|
10
|
-
"route-explanation.json",
|
|
11
|
-
"route-regression-result.json",
|
|
12
|
-
"federation-health-dashboard.json"
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
const errors = [];
|
|
16
|
-
|
|
17
|
-
function readJson(file) {
|
|
18
|
-
try {
|
|
19
|
-
return JSON.parse(fs.readFileSync(file, "utf8"));
|
|
20
|
-
} catch (error) {
|
|
21
|
-
errors.push(`${file}: cannot read JSON: ${error.message}`);
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
for (const fileName of requiredFiles) {
|
|
27
|
-
const file = path.join(exampleDir, fileName);
|
|
28
|
-
if (!fs.existsSync(file)) {
|
|
29
|
-
errors.push(`${file}: missing`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const fixtures = readJson(path.join(exampleDir, "routing-fixtures.json"));
|
|
34
|
-
const run = readJson(path.join(exampleDir, "routing-fixture-run.json"));
|
|
35
|
-
const explanation = readJson(path.join(exampleDir, "route-explanation.json"));
|
|
36
|
-
const regression = readJson(path.join(exampleDir, "route-regression-result.json"));
|
|
37
|
-
const health = readJson(path.join(exampleDir, "federation-health-dashboard.json"));
|
|
38
|
-
|
|
39
|
-
if (fixtures) {
|
|
40
|
-
if (fixtures.canonical_write_allowed !== false) errors.push("routing-fixtures.json: canonical_write_allowed must be false");
|
|
41
|
-
if (!Array.isArray(fixtures.fixtures) || fixtures.fixtures.length < 2) errors.push("routing-fixtures.json: must include at least two synthetic fixtures");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (run) {
|
|
45
|
-
if (run.canonical_write_allowed !== false) errors.push("routing-fixture-run.json: canonical_write_allowed must be false");
|
|
46
|
-
if (!run.summary || run.summary.fixture_count !== 2 || run.summary.passed !== 2) errors.push("routing-fixture-run.json: expected two passing fixtures");
|
|
47
|
-
for (const result of run.results || []) {
|
|
48
|
-
if (!result.execution_evidence_ref) errors.push(`${result.fixture_id}: execution_evidence_ref is required`);
|
|
49
|
-
if (!result.route_result_ref) errors.push(`${result.fixture_id}: route_result_ref is required`);
|
|
50
|
-
if (result.high_risk_route && !result.route_explanation_ref) errors.push(`${result.fixture_id}: high-risk route requires route_explanation_ref`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (explanation) {
|
|
55
|
-
if (explanation.canonical_write_allowed !== false) errors.push("route-explanation.json: canonical_write_allowed must be false");
|
|
56
|
-
if (!explanation.route_evidence_ref) errors.push("route-explanation.json: route_evidence_ref is required");
|
|
57
|
-
if (explanation.explanation_source !== "synthetic_example") errors.push("route-explanation.json: explanation_source must be synthetic_example");
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (regression) {
|
|
61
|
-
if (regression.regression_status !== "unchanged") errors.push("route-regression-result.json: regression_status must be unchanged");
|
|
62
|
-
if (regression.canonical_write_allowed !== false) errors.push("route-regression-result.json: canonical_write_allowed must be false");
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (health) {
|
|
66
|
-
if (health.watch_conflict_count < 1) errors.push("federation-health-dashboard.json: watch_conflict_count should expose watched conflict families");
|
|
67
|
-
if (health.high_risk_without_explanation_count !== 0) errors.push("federation-health-dashboard.json: high_risk_without_explanation_count must be zero");
|
|
68
|
-
if (health.canonical_write_allowed !== false) errors.push("federation-health-dashboard.json: canonical_write_allowed must be false");
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const output = {
|
|
72
|
-
mode: "routing_control_examples",
|
|
73
|
-
valid: errors.length === 0,
|
|
74
|
-
checked_files: requiredFiles.map((fileName) => path.join(exampleDir, fileName)),
|
|
75
|
-
errors
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
console.log(JSON.stringify(output, null, 2));
|
|
79
|
-
process.exit(output.valid ? 0 : 1);
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const os = require("os");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const { spawnSync } = require("child_process");
|
|
7
|
-
|
|
8
|
-
const root = path.resolve(__dirname, "..", "..");
|
|
9
|
-
const node = process.execPath;
|
|
10
|
-
const cli = path.join(root, "packages", "cli", "mirai-graph.js");
|
|
11
|
-
const validator = path.join(root, "packages", "cli", "validate-mirai-graph.js");
|
|
12
|
-
|
|
13
|
-
function run(args, options = {}) {
|
|
14
|
-
return spawnSync(node, [cli, ...args], {
|
|
15
|
-
cwd: root,
|
|
16
|
-
encoding: "utf8",
|
|
17
|
-
...options
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function runValidator(args, options = {}) {
|
|
22
|
-
return spawnSync(node, [validator, ...args], {
|
|
23
|
-
cwd: root,
|
|
24
|
-
encoding: "utf8",
|
|
25
|
-
...options
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function readJson(text) {
|
|
30
|
-
return JSON.parse(text);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function listFiles(dir) {
|
|
34
|
-
if (!fs.existsSync(dir)) return [];
|
|
35
|
-
const out = [];
|
|
36
|
-
function walk(current) {
|
|
37
|
-
for (const entry of fs.readdirSync(current).sort()) {
|
|
38
|
-
const abs = path.join(current, entry);
|
|
39
|
-
const rel = path.relative(dir, abs);
|
|
40
|
-
if (fs.statSync(abs).isDirectory()) {
|
|
41
|
-
walk(abs);
|
|
42
|
-
} else {
|
|
43
|
-
out.push(rel);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
walk(dir);
|
|
48
|
-
return out;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function copyDir(source, target) {
|
|
52
|
-
fs.mkdirSync(target, { recursive: true });
|
|
53
|
-
for (const entry of fs.readdirSync(source)) {
|
|
54
|
-
const src = path.join(source, entry);
|
|
55
|
-
const dst = path.join(target, entry);
|
|
56
|
-
if (fs.statSync(src).isDirectory()) {
|
|
57
|
-
copyDir(src, dst);
|
|
58
|
-
} else {
|
|
59
|
-
fs.copyFileSync(src, dst);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const errors = [];
|
|
65
|
-
|
|
66
|
-
function assert(condition, message) {
|
|
67
|
-
if (!condition) errors.push(message);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), "mirai-graph-self-service-"));
|
|
71
|
-
|
|
72
|
-
const noGraph = path.join(root, "examples", "self-service-onboarding", "no-graph");
|
|
73
|
-
const staleGraph = path.join(root, "examples", "self-service-onboarding", "stale-graph");
|
|
74
|
-
const existingGraph = path.join(root, "examples", "self-service-onboarding", "existing-graph");
|
|
75
|
-
|
|
76
|
-
const beforeDetect = listFiles(noGraph);
|
|
77
|
-
const detect = run(["detect", noGraph, "--json"]);
|
|
78
|
-
assert(detect.status === 0, `detect failed: ${detect.stderr}`);
|
|
79
|
-
if (detect.status === 0) {
|
|
80
|
-
const result = readJson(detect.stdout);
|
|
81
|
-
assert(result.graph_presence === "missing", "detect should classify no-graph fixture as missing");
|
|
82
|
-
assert(result.recommended_profile === "software_specification", "detect should recommend software_specification for package.json/src fixture");
|
|
83
|
-
assert(result.canonical_write_allowed === false, "detect must not allow canonical writes");
|
|
84
|
-
}
|
|
85
|
-
assert(JSON.stringify(beforeDetect) === JSON.stringify(listFiles(noGraph)), "detect must not write files");
|
|
86
|
-
|
|
87
|
-
const staleDetect = run(["detect", staleGraph, "--json"]);
|
|
88
|
-
assert(staleDetect.status === 0, `stale detect failed: ${staleDetect.stderr}`);
|
|
89
|
-
if (staleDetect.status === 0) {
|
|
90
|
-
const result = readJson(staleDetect.stdout);
|
|
91
|
-
assert(result.graph_presence === "incomplete", "stale fixture should be incomplete");
|
|
92
|
-
assert(result.missing_artifacts.includes(path.join("graph", "objects.json")), "stale fixture should report missing graph/objects.json");
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const bootstrapTarget = path.join(tmpRoot, "bootstrap-target");
|
|
96
|
-
copyDir(noGraph, bootstrapTarget);
|
|
97
|
-
const bootstrap = run(["bootstrap", bootstrapTarget, "--mode", "suggest", "--json"]);
|
|
98
|
-
assert(bootstrap.status === 0, `bootstrap suggest failed: ${bootstrap.stderr}`);
|
|
99
|
-
if (bootstrap.status === 0) {
|
|
100
|
-
const result = readJson(bootstrap.stdout);
|
|
101
|
-
assert(result.mode === "bootstrap_suggest", "bootstrap should report bootstrap_suggest");
|
|
102
|
-
assert(result.canonical_write_allowed === false, "bootstrap suggest must not allow canonical writes");
|
|
103
|
-
assert(fs.existsSync(result.proposal_ref), "bootstrap proposal should exist");
|
|
104
|
-
const proposal = readJson(fs.readFileSync(result.proposal_ref, "utf8"));
|
|
105
|
-
assert(proposal.canonical_write_allowed === false, "bootstrap proposal must keep canonical_write_allowed=false");
|
|
106
|
-
assert(!fs.existsSync(path.join(bootstrapTarget, "graph.json")), "bootstrap suggest must not create canonical manifest");
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const initTarget = path.join(tmpRoot, "init-target");
|
|
110
|
-
fs.mkdirSync(initTarget, { recursive: true });
|
|
111
|
-
const init = run(["init", initTarget, "--profile", "software_specification"]);
|
|
112
|
-
assert(init.status === 0, `init failed: ${init.stderr}`);
|
|
113
|
-
assert(fs.existsSync(path.join(initTarget, "graph.json")), "init should create v2 manifest");
|
|
114
|
-
assert(fs.existsSync(path.join(initTarget, "graph", "objects.json")), "init should create graph/objects.json");
|
|
115
|
-
assert(fs.existsSync(path.join(initTarget, "graph", "relations.json")), "init should create graph/relations.json");
|
|
116
|
-
assert(fs.existsSync(path.join(initTarget, "gates", "results.json")), "init should create gates/results.json");
|
|
117
|
-
|
|
118
|
-
const initValidation = runValidator([initTarget]);
|
|
119
|
-
assert(initValidation.status === 0, `created package should validate: ${initValidation.stderr || initValidation.stdout}`);
|
|
120
|
-
|
|
121
|
-
const existingTarget = path.join(tmpRoot, "existing-target");
|
|
122
|
-
copyDir(existingGraph, existingTarget);
|
|
123
|
-
const initExisting = run(["init", existingTarget, "--profile", "software_specification"]);
|
|
124
|
-
assert(initExisting.status !== 0, "init should fail on existing graph files without --force");
|
|
125
|
-
assert(initExisting.stderr.includes("Refusing") || initExisting.stderr.includes("already has graph files"), "init existing failure should explain overwrite boundary");
|
|
126
|
-
|
|
127
|
-
const invalidProfile = run(["init", path.join(tmpRoot, "invalid-profile"), "--profile", "unknown_profile"]);
|
|
128
|
-
assert(invalidProfile.status !== 0, "invalid profile should fail");
|
|
129
|
-
assert(invalidProfile.stderr.includes("Unknown profile"), "invalid profile should produce actionable error");
|
|
130
|
-
|
|
131
|
-
const markdown = run(["detect", noGraph, "--markdown"]);
|
|
132
|
-
assert(markdown.status === 0, `detect markdown failed: ${markdown.stderr}`);
|
|
133
|
-
assert(markdown.stdout.includes("Mirai Graph Self-Service Report"), "detect markdown should include report title");
|
|
134
|
-
|
|
135
|
-
const fixtureProposal = JSON.parse(fs.readFileSync(path.join(root, "examples", "self-service-onboarding", "bootstrap-proposal", "bootstrap-proposal.json"), "utf8"));
|
|
136
|
-
assert(fixtureProposal.canonical_write_allowed === false, "static bootstrap proposal fixture must keep canonical_write_allowed=false");
|
|
137
|
-
|
|
138
|
-
const result = {
|
|
139
|
-
mode: "self_service_onboarding",
|
|
140
|
-
valid: errors.length === 0,
|
|
141
|
-
temp_dir: tmpRoot,
|
|
142
|
-
checked: [
|
|
143
|
-
"detect read-only",
|
|
144
|
-
"stale graph detection",
|
|
145
|
-
"bootstrap suggest proposal",
|
|
146
|
-
"init creates valid package",
|
|
147
|
-
"init overwrite negative",
|
|
148
|
-
"invalid profile negative",
|
|
149
|
-
"markdown report",
|
|
150
|
-
"static proposal fixture"
|
|
151
|
-
],
|
|
152
|
-
errors
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
console.log(JSON.stringify(result, null, 2));
|
|
156
|
-
|
|
157
|
-
if (errors.length > 0) {
|
|
158
|
-
process.exit(1);
|
|
159
|
-
}
|