mirai-graph 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +376 -0
- package/CITATION.cff +20 -0
- package/LICENSE +21 -0
- package/LICENSE-DOCS +26 -0
- package/README.md +270 -0
- package/ROADMAP.md +225 -0
- package/benchmarks/protocols/measure-convert-optimize.md +131 -0
- package/benchmarks/synthetic-context-reduction-v0/README.md +70 -0
- package/benchmarks/synthetic-context-reduction-v0/RESULT.md +52 -0
- package/benchmarks/synthetic-context-reduction-v0/expected/context-pack-compact.md +31 -0
- package/benchmarks/synthetic-context-reduction-v0/gates/results.json +12 -0
- package/benchmarks/synthetic-context-reduction-v0/graph/objects.json +114 -0
- package/benchmarks/synthetic-context-reduction-v0/graph/relations.json +74 -0
- package/benchmarks/synthetic-context-reduction-v0/metrics/example-metrics.json +22 -0
- package/benchmarks/synthetic-context-reduction-v0/mirai-graph-package.json +14 -0
- package/benchmarks/synthetic-context-reduction-v0/results/baseline-comparison-result.json +42 -0
- package/benchmarks/synthetic-context-reduction-v0/results/context-pack.json +181 -0
- package/benchmarks/synthetic-context-reduction-v0/results/context-reduction-result.json +8 -0
- package/benchmarks/synthetic-context-reduction-v0/results/profile-conformance-result.json +28 -0
- package/benchmarks/synthetic-context-reduction-v0/results/readiness-score.json +24 -0
- package/benchmarks/synthetic-context-reduction-v0/reviews/semantic-completeness-review.json +78 -0
- package/benchmarks/synthetic-context-reduction-v0/scripts/calculate-context-reduction.js +42 -0
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/audit-events.md +8 -0
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/content-workflow.md +8 -0
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/identity-access.md +8 -0
- package/benchmarks/synthetic-context-reduction-v0/source-corpus/notification-delivery.md +8 -0
- package/benchmarks/synthetic-context-reduction-v0/tasks/tasks.json +31 -0
- package/docs/adoption/adopter-kit.md +179 -0
- package/docs/adoption/ai-employee-graph.md +151 -0
- package/docs/adoption/character-layer.md +196 -0
- package/docs/adoption/choose-profile.md +98 -0
- package/docs/adoption/cli.md +78 -0
- package/docs/adoption/developer-integration-guide.md +93 -0
- package/docs/adoption/end-to-end-control-loop.md +168 -0
- package/docs/adoption/getting-started.md +169 -0
- package/docs/adoption/mirai-graph-transition.md +64 -0
- package/docs/adoption/profile-conformance-fixtures.md +112 -0
- package/docs/adoption/seed-to-validated-package.md +121 -0
- package/docs/concept.md +109 -0
- package/docs/repository-purpose.md +421 -0
- package/docs/research/ai-work-field-instrumentation-bridge.md +126 -0
- package/docs/research/baseline-comparison-protocol.md +79 -0
- package/docs/research/evidence-package-v0.1.md +99 -0
- package/docs/research/evidence-package-v0.2.md +150 -0
- package/docs/research/evidence-package-v0.3.md +226 -0
- package/docs/research/independent-implementation-pilot-plan.md +74 -0
- package/docs/research/limitations-and-threats.md +40 -0
- package/docs/research/practice-science-program.md +232 -0
- package/docs/research/scientific-evidence-package.md +154 -0
- package/docs/research/semantic-completeness-review-protocol.md +70 -0
- package/docs/terminology.md +119 -0
- package/docs/transfer/ai-employee-profile-proposal.md +119 -0
- package/docs/transfer/federation-routing-control-loop-2026-05-31.md +28 -0
- package/docs/transfer/graph-capability-map-2026-05-29.md +126 -0
- package/docs/transfer/graph-skill-to-mirai-graph.md +128 -0
- package/docs/transfer/project-management-standard-harvest-2026-06-02.md +322 -0
- package/docs/transfer/skill-graph-standard-harvest-2026-05-31.md +113 -0
- package/docs/transfer/standard-gap-report-2026-05-28.md +208 -0
- package/examples/ai-employee-minimal/README.md +53 -0
- package/examples/ai-employee-minimal/gates/results.json +35 -0
- package/examples/ai-employee-minimal/graph/objects.json +187 -0
- package/examples/ai-employee-minimal/graph/relations.json +167 -0
- package/examples/ai-employee-minimal/mirai-graph-package.json +14 -0
- package/examples/ai-employee-minimal/results/profile-conformance-result.json +28 -0
- package/examples/character-layer-integration-minimal/README.md +25 -0
- package/examples/character-layer-integration-minimal/results/character-layer-integration.json +53 -0
- package/examples/character-layer-minimal/README.md +29 -0
- package/examples/character-layer-minimal/gates/results.json +57 -0
- package/examples/character-layer-minimal/graph/objects.json +165 -0
- package/examples/character-layer-minimal/graph/relations.json +178 -0
- package/examples/character-layer-minimal/mirai-graph-package.json +14 -0
- package/examples/character-layer-readiness-1-0/README.md +27 -0
- package/examples/character-layer-readiness-1-0/results/character-layer-readiness.json +90 -0
- package/examples/federation-routing-smoke/README.md +19 -0
- package/examples/federation-routing-smoke/federation-health-dashboard.json +42 -0
- package/examples/federation-routing-smoke/route-explanation.json +32 -0
- package/examples/federation-routing-smoke/route-regression-result.json +35 -0
- package/examples/federation-routing-smoke/routes/production-deploy-execution-evidence.json +17 -0
- package/examples/federation-routing-smoke/routes/production-deploy-route-result.json +12 -0
- package/examples/federation-routing-smoke/routes/production-deploy-runtime-preflight.json +8 -0
- package/examples/federation-routing-smoke/routes/production-deploy-stderr.txt +1 -0
- package/examples/federation-routing-smoke/routes/production-deploy-stdout.txt +1 -0
- package/examples/federation-routing-smoke/routes/search-page-execution-evidence.json +17 -0
- package/examples/federation-routing-smoke/routes/search-page-route-result.json +12 -0
- package/examples/federation-routing-smoke/routes/search-page-stderr.txt +1 -0
- package/examples/federation-routing-smoke/routes/search-page-stdout.txt +1 -0
- package/examples/federation-routing-smoke/routing-fixture-run.json +66 -0
- package/examples/federation-routing-smoke/routing-fixtures.json +44 -0
- package/examples/graph-dna-alignment-minimal/README.md +16 -0
- package/examples/graph-dna-alignment-minimal/graph/objects.json +38 -0
- package/examples/graph-dna-alignment-minimal/graph/relations.json +20 -0
- package/examples/graph-dna-alignment-minimal/mirai-graph-package.json +14 -0
- package/examples/graph-dna-alignment-minimal/results/graph-dna-alignment.json +32 -0
- package/examples/graph-seed-minimal/README.md +9 -0
- package/examples/graph-seed-minimal/graph-embryo.json +63 -0
- package/examples/graph-seed-minimal/graph-seed.json +60 -0
- package/examples/implementation-control-cycles/README.md +47 -0
- package/examples/implementation-control-cycles/gates/results.json +22 -0
- package/examples/implementation-control-cycles/graph/objects.json +119 -0
- package/examples/implementation-control-cycles/graph/relations.json +200 -0
- package/examples/implementation-control-cycles/mirai-graph-package.json +14 -0
- package/examples/implementation-control-cycles/results/implementation-control-cycles.json +456 -0
- package/examples/implementation-control-minimal/README.md +39 -0
- package/examples/implementation-control-minimal/gates/results.json +42 -0
- package/examples/implementation-control-minimal/graph/objects.json +128 -0
- package/examples/implementation-control-minimal/graph/relations.json +128 -0
- package/examples/implementation-control-minimal/mirai-graph-package.json +14 -0
- package/examples/implementation-control-minimal/results/implementation-control-loop.json +21 -0
- package/examples/instrumentation-layer-minimal/README.md +32 -0
- package/examples/instrumentation-layer-minimal/gates/results.json +11 -0
- package/examples/instrumentation-layer-minimal/graph/objects.json +74 -0
- package/examples/instrumentation-layer-minimal/graph/relations.json +56 -0
- package/examples/instrumentation-layer-minimal/invalid-cockpit-missing-gates.json +40 -0
- package/examples/instrumentation-layer-minimal/invalid-feedback-accepted-with-blocking.json +38 -0
- package/examples/instrumentation-layer-minimal/invalid-feedback-process-improvement-without-kaizen.json +38 -0
- package/examples/instrumentation-layer-minimal/invalid-traceability-missing-evidence.json +43 -0
- package/examples/instrumentation-layer-minimal/mirai-graph-package.json +14 -0
- package/examples/instrumentation-layer-minimal/results/development-cockpit.json +68 -0
- package/examples/instrumentation-layer-minimal/results/feature-implementation-traceability.json +56 -0
- package/examples/instrumentation-layer-minimal/results/multi-source-quality-feedback.json +72 -0
- package/examples/invalid-character-layer-context-authorization/graph/objects.json +22 -0
- package/examples/invalid-character-layer-context-authorization/graph/relations.json +1 -0
- package/examples/invalid-character-layer-context-authorization/mirai-graph-package.json +14 -0
- package/examples/invalid-character-layer-correction-loop-no-review/graph/objects.json +22 -0
- package/examples/invalid-character-layer-correction-loop-no-review/graph/relations.json +1 -0
- package/examples/invalid-character-layer-correction-loop-no-review/mirai-graph-package.json +14 -0
- package/examples/invalid-character-layer-feedback-auto-update/graph/objects.json +22 -0
- package/examples/invalid-character-layer-feedback-auto-update/graph/relations.json +1 -0
- package/examples/invalid-character-layer-feedback-auto-update/mirai-graph-package.json +14 -0
- package/examples/invalid-character-layer-object-kind/graph/objects.json +22 -0
- package/examples/invalid-character-layer-object-kind/graph/relations.json +1 -0
- package/examples/invalid-character-layer-object-kind/mirai-graph-package.json +14 -0
- package/examples/invalid-character-layer-relation-direction/graph/objects.json +33 -0
- package/examples/invalid-character-layer-relation-direction/graph/relations.json +13 -0
- package/examples/invalid-character-layer-relation-direction/mirai-graph-package.json +14 -0
- package/examples/invalid-character-layer-relation-type/graph/objects.json +33 -0
- package/examples/invalid-character-layer-relation-type/graph/relations.json +13 -0
- package/examples/invalid-character-layer-relation-type/mirai-graph-package.json +14 -0
- package/examples/invalid-character-layer-role-permission/graph/objects.json +22 -0
- package/examples/invalid-character-layer-role-permission/graph/relations.json +1 -0
- package/examples/invalid-character-layer-role-permission/mirai-graph-package.json +14 -0
- package/examples/invalid-context-pack-missing-explanation/context-pack.json +25 -0
- package/examples/invalid-missing-relation-target/graph/objects.json +11 -0
- package/examples/invalid-missing-relation-target/graph/relations.json +11 -0
- package/examples/invalid-missing-relation-target/mirai-graph-package.json +11 -0
- package/examples/invalid-profile-object-kind/graph/objects.json +20 -0
- package/examples/invalid-profile-object-kind/graph/relations.json +1 -0
- package/examples/invalid-profile-object-kind/mirai-graph-package.json +11 -0
- package/examples/invalid-profile-relation-type/graph/objects.json +29 -0
- package/examples/invalid-profile-relation-type/graph/relations.json +11 -0
- package/examples/invalid-profile-relation-type/mirai-graph-package.json +11 -0
- package/examples/invalid-relation-id-mismatch/graph/objects.json +29 -0
- package/examples/invalid-relation-id-mismatch/graph/relations.json +11 -0
- package/examples/invalid-relation-id-mismatch/mirai-graph-package.json +11 -0
- package/examples/invalid-seed-unsafe-write/graph-seed.json +27 -0
- package/examples/launch-record-minimal/README.md +29 -0
- package/examples/launch-record-minimal/gates/results.json +12 -0
- package/examples/launch-record-minimal/graph/objects.json +47 -0
- package/examples/launch-record-minimal/graph/relations.json +38 -0
- package/examples/launch-record-minimal/mirai-graph-package.json +11 -0
- package/examples/launch-record-minimal/results/launch-record.json +51 -0
- package/examples/managed-project-control-loop/README.md +43 -0
- package/examples/managed-project-control-loop/gates/results.json +22 -0
- package/examples/managed-project-control-loop/graph/objects.json +119 -0
- package/examples/managed-project-control-loop/graph/relations.json +110 -0
- package/examples/managed-project-control-loop/mirai-graph-package.json +14 -0
- package/examples/managed-project-control-loop/results/managed-loop-result.json +21 -0
- package/examples/minimal-graph/README.md +15 -0
- package/examples/minimal-graph/gates/results.json +12 -0
- package/examples/minimal-graph/graph/objects.json +24 -0
- package/examples/minimal-graph/graph/relations.json +11 -0
- package/examples/minimal-graph/mirai-graph-package.json +14 -0
- package/examples/minimal-graph/results/profile-conformance-result.json +26 -0
- package/examples/model-portability-minimal/README.md +15 -0
- package/examples/model-portability-minimal/results/model-portability-evidence.json +55 -0
- package/examples/organization-governance-minimal/README.md +29 -0
- package/examples/organization-governance-minimal/gates/results.json +21 -0
- package/examples/organization-governance-minimal/graph/objects.json +147 -0
- package/examples/organization-governance-minimal/graph/relations.json +147 -0
- package/examples/organization-governance-minimal/mirai-graph-package.json +15 -0
- package/examples/organization-governance-minimal/results/profile-conformance-result.json +31 -0
- package/examples/process-control-contract-minimal/README.md +19 -0
- package/examples/process-control-contract-minimal/graph/objects.json +38 -0
- package/examples/process-control-contract-minimal/graph/relations.json +29 -0
- package/examples/process-control-contract-minimal/mirai-graph-package.json +11 -0
- package/examples/process-control-contract-minimal/results/process-control-contract.json +58 -0
- package/examples/process-transition-minimal/README.md +25 -0
- package/examples/process-transition-minimal/invalid-missing-launch-record.json +14 -0
- package/examples/process-transition-minimal/invalid-ready-to-written.json +14 -0
- package/examples/process-transition-minimal/invalid-release-missing-evidence.json +14 -0
- package/examples/process-transition-minimal/invalid-sync-to-update.json +14 -0
- package/examples/process-transition-minimal/invalid-terminal-missing-kaizen.json +14 -0
- package/examples/process-transition-minimal/invalid-tests-to-approved.json +14 -0
- package/examples/process-transition-minimal/results/transition-explanation-invalid-ready-to-written.json +35 -0
- package/examples/process-transition-minimal/results/transition-explanation-valid.json +34 -0
- package/examples/process-transition-minimal/state-machine.json +79 -0
- package/examples/process-transition-minimal/transition-request-skip-kaizen.json +14 -0
- package/examples/process-transition-minimal/transition-request.json +14 -0
- package/examples/risk-and-coordination-minimal/README.md +16 -0
- package/examples/risk-and-coordination-minimal/graph/objects.json +47 -0
- package/examples/risk-and-coordination-minimal/graph/relations.json +29 -0
- package/examples/risk-and-coordination-minimal/mirai-graph-package.json +14 -0
- package/examples/risk-and-coordination-minimal/results/multi-agent-coordination.json +25 -0
- package/examples/risk-and-coordination-minimal/results/risk-control-matrix.json +34 -0
- package/examples/skill-runtime-minimal/README.md +29 -0
- package/examples/skill-runtime-minimal/gates/results.json +35 -0
- package/examples/skill-runtime-minimal/graph/objects.json +209 -0
- package/examples/skill-runtime-minimal/graph/relations.json +178 -0
- package/examples/skill-runtime-minimal/mirai-graph-package.json +14 -0
- package/examples/skill-runtime-minimal/results/profile-conformance-result.json +27 -0
- package/examples/source-boundary-minimal/README.md +16 -0
- package/examples/source-boundary-minimal/graph/objects.json +38 -0
- package/examples/source-boundary-minimal/graph/relations.json +20 -0
- package/examples/source-boundary-minimal/mirai-graph-package.json +14 -0
- package/examples/source-boundary-minimal/results/source-boundary-contract.json +37 -0
- package/examples/technology-quality-feedback-minimal/README.md +33 -0
- package/examples/technology-quality-feedback-minimal/graph/objects.json +56 -0
- package/examples/technology-quality-feedback-minimal/graph/relations.json +47 -0
- package/examples/technology-quality-feedback-minimal/invalid-accepted-with-blocking.json +33 -0
- package/examples/technology-quality-feedback-minimal/invalid-evidence-as-authorization.json +22 -0
- package/examples/technology-quality-feedback-minimal/invalid-missing-required-step.json +22 -0
- package/examples/technology-quality-feedback-minimal/invalid-process-improvement-without-kaizen.json +33 -0
- package/examples/technology-quality-feedback-minimal/invalid-spec-gap-without-route.json +33 -0
- package/examples/technology-quality-feedback-minimal/invalid-unclassified-finding.json +33 -0
- package/examples/technology-quality-feedback-minimal/mirai-graph-package.json +11 -0
- package/examples/technology-quality-feedback-minimal/results/technology-quality-feedback.json +80 -0
- package/examples/work-recovery-minimal/README.md +15 -0
- package/examples/work-recovery-minimal/graph/objects.json +47 -0
- package/examples/work-recovery-minimal/graph/relations.json +20 -0
- package/examples/work-recovery-minimal/mirai-graph-package.json +14 -0
- package/examples/work-recovery-minimal/results/recovery-resume-record.json +17 -0
- package/examples/work-recovery-minimal/results/work-state-machine.json +21 -0
- package/package.json +104 -0
- package/packages/cli/adopter-workflow.js +227 -0
- package/packages/cli/context-pack.js +267 -0
- package/packages/cli/instrumentation-report.js +97 -0
- package/packages/cli/mirai-graph.js +121 -0
- package/packages/cli/mirai_graph.js +3 -0
- package/packages/cli/playground-demo.js +114 -0
- package/packages/cli/readiness-score.js +162 -0
- package/packages/cli/release-state.js +329 -0
- package/packages/cli/seed-preview.js +78 -0
- package/packages/cli/validate-adopter-workflow.js +63 -0
- package/packages/cli/validate-baseline-comparison.js +105 -0
- package/packages/cli/validate-mirai-graph.js +2434 -0
- package/packages/cli/validate-process-transition-report.js +105 -0
- package/packages/cli/validate-profile-results.js +64 -0
- package/packages/cli/validate-release-state.js +100 -0
- package/packages/cli/validate-routing-control-examples.js +79 -0
- package/pilots/independent-implementation-001-conference-planning/README.md +40 -0
- package/pilots/independent-implementation-001-conference-planning/gates/results.json +12 -0
- package/pilots/independent-implementation-001-conference-planning/graph/objects.json +74 -0
- package/pilots/independent-implementation-001-conference-planning/graph/relations.json +56 -0
- package/pilots/independent-implementation-001-conference-planning/graph-seed.json +65 -0
- package/pilots/independent-implementation-001-conference-planning/mirai-graph-package.json +14 -0
- package/pilots/independent-implementation-001-conference-planning/reports/pilot-report.md +120 -0
- package/pilots/independent-implementation-001-conference-planning/results/context-pack.json +35 -0
- package/pilots/independent-implementation-001-conference-planning/results/graph-embryo.json +81 -0
- package/pilots/independent-implementation-001-conference-planning/results/package-validation.json +7 -0
- package/pilots/independent-implementation-001-conference-planning/results/profile-conformance-result.json +28 -0
- package/pilots/independent-implementation-001-conference-planning/results/readiness-score.json +26 -0
- package/pilots/independent-implementation-001-conference-planning/results/seed-validation.json +7 -0
- package/pilots/independent-implementation-002-software-specification/README.md +40 -0
- package/pilots/independent-implementation-002-software-specification/gates/results.json +22 -0
- package/pilots/independent-implementation-002-software-specification/graph/objects.json +101 -0
- package/pilots/independent-implementation-002-software-specification/graph/relations.json +92 -0
- package/pilots/independent-implementation-002-software-specification/graph-seed.json +72 -0
- package/pilots/independent-implementation-002-software-specification/mirai-graph-package.json +14 -0
- package/pilots/independent-implementation-002-software-specification/reports/pilot-report.md +142 -0
- package/pilots/independent-implementation-002-software-specification/results/context-pack.json +184 -0
- package/pilots/independent-implementation-002-software-specification/results/graph-embryo.json +90 -0
- package/pilots/independent-implementation-002-software-specification/results/package-validation.json +7 -0
- package/pilots/independent-implementation-002-software-specification/results/profile-conformance-result.json +28 -0
- package/pilots/independent-implementation-002-software-specification/results/readiness-score.json +26 -0
- package/pilots/independent-implementation-002-software-specification/results/seed-validation.json +7 -0
- package/pilots/independent-implementation-002-software-specification/reviews/semantic-completeness-review.json +81 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/README.md +42 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/gates/results.json +30 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/graph/objects.json +156 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/graph/relations.json +147 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/graph-seed.json +90 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/mirai-graph-package.json +15 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/reports/pilot-report.md +49 -0
- package/pilots/independent-implementation-003-ai-employee-workflow/results/profile-conformance-result.json +30 -0
- package/pilots/independent-implementation-004-research-program/README.md +41 -0
- package/pilots/independent-implementation-004-research-program/gates/results.json +21 -0
- package/pilots/independent-implementation-004-research-program/graph/objects.json +102 -0
- package/pilots/independent-implementation-004-research-program/graph/relations.json +84 -0
- package/pilots/independent-implementation-004-research-program/graph-seed.json +76 -0
- package/pilots/independent-implementation-004-research-program/mirai-graph-package.json +15 -0
- package/pilots/independent-implementation-004-research-program/reports/pilot-report.md +50 -0
- package/pilots/independent-implementation-004-research-program/results/profile-conformance-result.json +30 -0
- package/pilots/independent-implementation-005-organization-governance/README.md +42 -0
- package/pilots/independent-implementation-005-organization-governance/gates/results.json +20 -0
- package/pilots/independent-implementation-005-organization-governance/graph/objects.json +137 -0
- package/pilots/independent-implementation-005-organization-governance/graph/relations.json +110 -0
- package/pilots/independent-implementation-005-organization-governance/graph-seed.json +97 -0
- package/pilots/independent-implementation-005-organization-governance/mirai-graph-package.json +14 -0
- package/pilots/independent-implementation-005-organization-governance/reports/pilot-report.md +47 -0
- package/pilots/independent-implementation-005-organization-governance/results/profile-conformance-result.json +29 -0
- package/playground/README.md +78 -0
- package/playground/demo-report.md +84 -0
- package/profiles/README.md +19 -0
- package/profiles/ai-employee/README.md +132 -0
- package/profiles/ai-employee/profile.json +58 -0
- package/profiles/character-layer/README.md +143 -0
- package/profiles/character-layer/profile.json +46 -0
- package/profiles/implementation-control/README.md +170 -0
- package/profiles/implementation-control/profile.json +106 -0
- package/profiles/organization-governance/README.md +61 -0
- package/profiles/organization-governance/profile.json +56 -0
- package/profiles/project-management/README.md +115 -0
- package/profiles/project-management/profile.json +31 -0
- package/profiles/skill-runtime/README.md +94 -0
- package/profiles/skill-runtime/profile.json +58 -0
- package/profiles/software-specification/README.md +142 -0
- package/profiles/software-specification/profile.json +31 -0
- package/publications/README.md +24 -0
- package/publications/preprint-note.md +11 -0
- package/publications/preprint-outline.md +45 -0
- package/releases/0.1.0-alpha.0.md +45 -0
- package/releases/0.1.0-alpha.1.md +63 -0
- package/releases/0.1.0-alpha.10.md +93 -0
- package/releases/0.1.0-alpha.11.md +114 -0
- package/releases/0.1.0-alpha.2.md +37 -0
- package/releases/0.1.0-alpha.3.md +61 -0
- package/releases/0.1.0-alpha.4.md +53 -0
- package/releases/0.1.0-alpha.5.md +48 -0
- package/releases/0.1.0-alpha.6.md +96 -0
- package/releases/0.1.0-alpha.7.md +114 -0
- package/releases/0.1.0-alpha.8.md +92 -0
- package/releases/0.1.0-alpha.9.md +80 -0
- package/releases/1.0.0-rc.1.md +112 -0
- package/releases/README.md +114 -0
- package/schemas/baseline-comparison-result.schema.json +87 -0
- package/schemas/character-layer-integration.schema.json +112 -0
- package/schemas/character-layer-readiness.schema.json +73 -0
- package/schemas/context-pack.schema.json +137 -0
- package/schemas/development-cockpit.schema.json +74 -0
- package/schemas/feature-implementation-traceability.schema.json +80 -0
- package/schemas/federation-health-dashboard.schema.json +47 -0
- package/schemas/gate-result.schema.json +44 -0
- package/schemas/graph-dna-alignment.schema.json +49 -0
- package/schemas/graph-embryo.schema.json +51 -0
- package/schemas/graph-seed.schema.json +137 -0
- package/schemas/implementation-control-cycle.schema.json +265 -0
- package/schemas/implementation-control-loop.schema.json +84 -0
- package/schemas/launch-record.schema.json +78 -0
- package/schemas/model-portability-evidence.schema.json +93 -0
- package/schemas/multi-agent-coordination.schema.json +35 -0
- package/schemas/multi-source-quality-feedback.schema.json +54 -0
- package/schemas/object.schema.json +49 -0
- package/schemas/package-manifest.schema.json +53 -0
- package/schemas/process-control-contract.schema.json +100 -0
- package/schemas/process-transition-request.schema.json +41 -0
- package/schemas/profile.schema.json +56 -0
- package/schemas/readiness-score.schema.json +43 -0
- package/schemas/recovery-resume-record.schema.json +25 -0
- package/schemas/relation.schema.json +43 -0
- package/schemas/risk-control-matrix.schema.json +36 -0
- package/schemas/route-explanation.schema.json +51 -0
- package/schemas/route-regression-result.schema.json +33 -0
- package/schemas/routing-fixture-run.schema.json +45 -0
- package/schemas/routing-fixtures.schema.json +59 -0
- package/schemas/source-boundary-contract.schema.json +31 -0
- package/schemas/technology-quality-feedback.schema.json +116 -0
- package/schemas/work-state-machine.schema.json +34 -0
- package/standard/action-runtime-boundary.md +99 -0
- package/standard/adoption-levels.md +69 -0
- package/standard/conformance-levels.md +133 -0
- package/standard/context-pack-generation.md +141 -0
- package/standard/development-cockpit.md +67 -0
- package/standard/evidence-provenance.md +128 -0
- package/standard/feature-implementation-traceability.md +68 -0
- package/standard/federation-health.md +42 -0
- package/standard/feedback-learning-gate.md +101 -0
- package/standard/governance.md +137 -0
- package/standard/graph-as-ai-brain.md +81 -0
- package/standard/graph-dna-alignment.md +50 -0
- package/standard/graph-dna.md +70 -0
- package/standard/graph-embryo.md +69 -0
- package/standard/graph-seed.md +122 -0
- package/standard/hybrid-source-of-truth.md +91 -0
- package/standard/implementation-control-cycles.md +194 -0
- package/standard/implementation-control.md +102 -0
- package/standard/launch-record.md +53 -0
- package/standard/lifecycle-readiness.md +159 -0
- package/standard/multi-agent-coordination.md +50 -0
- package/standard/multi-source-quality-feedback.md +71 -0
- package/standard/object-model.md +152 -0
- package/standard/organization-governance.md +84 -0
- package/standard/process-control-contract.md +53 -0
- package/standard/profiles.md +233 -0
- package/standard/projection-views.md +69 -0
- package/standard/recovery-resume.md +49 -0
- package/standard/relation-model.md +139 -0
- package/standard/risk-control-matrix.md +53 -0
- package/standard/route-explanation.md +35 -0
- package/standard/route-regression.md +33 -0
- package/standard/routing-fixtures.md +54 -0
- package/standard/runtime-enablement.md +85 -0
- package/standard/source-boundary-contract.md +49 -0
- package/standard/standard-v0.1.md +132 -0
- package/standard/technology-quality-feedback.md +97 -0
- package/standard/test-suite.md +105 -0
- package/standard/work-state-machine.md +62 -0
- package/templates/README.md +64 -0
- package/templates/ai-employee-starter/README.md +9 -0
- package/templates/ai-employee-starter/gates/results.json +12 -0
- package/templates/ai-employee-starter/graph/objects.json +90 -0
- package/templates/ai-employee-starter/graph/relations.json +47 -0
- package/templates/ai-employee-starter/mirai-graph-package.json +14 -0
- package/templates/character-layer-starter/README.md +39 -0
- package/templates/character-layer-starter/gates/results.json +20 -0
- package/templates/character-layer-starter/graph/objects.json +308 -0
- package/templates/character-layer-starter/graph/relations.json +344 -0
- package/templates/character-layer-starter/mirai-graph-package.json +14 -0
- package/templates/organization-governance-starter/README.md +9 -0
- package/templates/organization-governance-starter/gates/results.json +12 -0
- package/templates/organization-governance-starter/graph/objects.json +112 -0
- package/templates/organization-governance-starter/graph/relations.json +65 -0
- package/templates/organization-governance-starter/mirai-graph-package.json +14 -0
- package/templates/research-program-starter/README.md +9 -0
- package/templates/research-program-starter/gates/results.json +12 -0
- package/templates/research-program-starter/graph/objects.json +79 -0
- package/templates/research-program-starter/graph/relations.json +47 -0
- package/templates/research-program-starter/mirai-graph-package.json +14 -0
- package/templates/software-project-starter/README.md +9 -0
- package/templates/software-project-starter/gates/results.json +12 -0
- package/templates/software-project-starter/graph/objects.json +79 -0
- package/templates/software-project-starter/graph/relations.json +47 -0
- package/templates/software-project-starter/mirai-graph-package.json +14 -0
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
|
|
9
|
+
function usage() {
|
|
10
|
+
console.error("Usage:");
|
|
11
|
+
console.error(" mirai-graph validate <package-dir>");
|
|
12
|
+
console.error(" mirai-graph choose-profile");
|
|
13
|
+
console.error(" mirai-graph adopter plan <role-or-profile>");
|
|
14
|
+
console.error(" mirai-graph adopter report <template-dir>");
|
|
15
|
+
console.error(" mirai-graph report validation <package-dir>");
|
|
16
|
+
console.error(" mirai-graph report process-transition <state-machine-file> <transition-request-file>");
|
|
17
|
+
console.error(" mirai-graph report technology-quality-feedback <feedback-file>");
|
|
18
|
+
console.error(" mirai-graph report instrumentation [package-dir]");
|
|
19
|
+
console.error(" mirai-graph explain process-transition <state-machine-file> <transition-request-file>");
|
|
20
|
+
console.error(" mirai-graph report playground");
|
|
21
|
+
console.error(" mirai-graph release state [--markdown] [--require-git-tag] [--require-github-release] [--require-npm-published]");
|
|
22
|
+
console.error("");
|
|
23
|
+
console.error("Boundary:");
|
|
24
|
+
console.error(" Reports explain validation decisions. They do not authorize canonical updates.");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function run(script, args) {
|
|
28
|
+
const result = spawnSync(node, [path.join(root, script), ...args], {
|
|
29
|
+
cwd: root,
|
|
30
|
+
stdio: "inherit"
|
|
31
|
+
});
|
|
32
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const args = process.argv.slice(2);
|
|
36
|
+
|
|
37
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
38
|
+
usage();
|
|
39
|
+
process.exit(args.length === 0 ? 1 : 0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const [command, subcommand, ...rest] = args;
|
|
43
|
+
|
|
44
|
+
if (command === "validate") {
|
|
45
|
+
if (!subcommand) {
|
|
46
|
+
usage();
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
run("packages/cli/validate-mirai-graph.js", [subcommand, ...rest]);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (command === "choose-profile") {
|
|
53
|
+
if (subcommand || rest.length !== 0) {
|
|
54
|
+
usage();
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
run("packages/cli/adopter-workflow.js", ["choose-profile"]);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (command === "adopter" && subcommand === "plan") {
|
|
61
|
+
if (rest.length !== 1) {
|
|
62
|
+
usage();
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
run("packages/cli/adopter-workflow.js", ["plan", rest[0]]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (command === "adopter" && subcommand === "report") {
|
|
69
|
+
if (rest.length !== 1) {
|
|
70
|
+
usage();
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
run("packages/cli/adopter-workflow.js", ["report", rest[0]]);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (command === "report" && subcommand === "validation") {
|
|
77
|
+
if (rest.length !== 1) {
|
|
78
|
+
usage();
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
run("packages/cli/validate-mirai-graph.js", ["--markdown", rest[0]]);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if ((command === "report" || command === "explain") && subcommand === "process-transition") {
|
|
85
|
+
if (rest.length !== 2) {
|
|
86
|
+
usage();
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
run("packages/cli/validate-mirai-graph.js", ["--markdown", "process-transition", rest[0], rest[1]]);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (command === "report" && subcommand === "technology-quality-feedback") {
|
|
93
|
+
if (rest.length !== 1) {
|
|
94
|
+
usage();
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
run("packages/cli/validate-mirai-graph.js", ["--markdown", "technology-quality-feedback", rest[0]]);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (command === "report" && subcommand === "instrumentation") {
|
|
101
|
+
if (rest.length > 1) {
|
|
102
|
+
usage();
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
run("packages/cli/instrumentation-report.js", rest);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (command === "report" && subcommand === "playground") {
|
|
109
|
+
if (rest.length !== 0) {
|
|
110
|
+
usage();
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
run("packages/cli/playground-demo.js", []);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (command === "release" && subcommand === "state") {
|
|
117
|
+
run("packages/cli/release-state.js", rest);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
usage();
|
|
121
|
+
process.exit(1);
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
|
|
5
|
+
function readJson(filePath) {
|
|
6
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function countItems(filePath) {
|
|
10
|
+
const value = readJson(filePath);
|
|
11
|
+
return Array.isArray(value) ? value.length : 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const packageDir = "benchmarks/synthetic-context-reduction-v0";
|
|
15
|
+
const objectsCount = countItems(`${packageDir}/graph/objects.json`);
|
|
16
|
+
const relationsCount = countItems(`${packageDir}/graph/relations.json`);
|
|
17
|
+
const contextPack = readJson(`${packageDir}/results/context-pack.json`);
|
|
18
|
+
const launchRecord = readJson("examples/launch-record-minimal/results/launch-record.json");
|
|
19
|
+
const transition = readJson("examples/process-transition-minimal/transition-request.json");
|
|
20
|
+
const transitionExplanation = readJson("examples/process-transition-minimal/results/transition-explanation-valid.json");
|
|
21
|
+
const processControl = readJson("examples/process-control-contract-minimal/results/process-control-contract.json");
|
|
22
|
+
const baselineComparison = readJson(`${packageDir}/results/baseline-comparison-result.json`);
|
|
23
|
+
const cockpit = readJson("examples/instrumentation-layer-minimal/results/development-cockpit.json");
|
|
24
|
+
const traceability = readJson("examples/instrumentation-layer-minimal/results/feature-implementation-traceability.json");
|
|
25
|
+
const feedback = readJson("examples/instrumentation-layer-minimal/results/multi-source-quality-feedback.json");
|
|
26
|
+
|
|
27
|
+
const lines = [
|
|
28
|
+
"# Mirai Graph Playground Demo Report",
|
|
29
|
+
"",
|
|
30
|
+
"Status: deterministic 1.0.0-rc.1 demo",
|
|
31
|
+
"",
|
|
32
|
+
"## Control Loop",
|
|
33
|
+
"",
|
|
34
|
+
"```text",
|
|
35
|
+
"seed -> graph -> context -> launch -> transition explanation -> cockpit -> traceability -> multi-source feedback -> evidence -> kaizen -> baseline comparison",
|
|
36
|
+
"```",
|
|
37
|
+
"",
|
|
38
|
+
"## Demo Inputs",
|
|
39
|
+
"",
|
|
40
|
+
`- Synthetic package: \`${packageDir}\``,
|
|
41
|
+
`- Objects: \`${objectsCount}\``,
|
|
42
|
+
`- Relations: \`${relationsCount}\``,
|
|
43
|
+
`- Context pack: \`${contextPack.id}\``,
|
|
44
|
+
`- Launch record: \`${launchRecord.id}\``,
|
|
45
|
+
`- Transition request: \`${transition.id}\``,
|
|
46
|
+
`- Transition explanation: \`${transitionExplanation.fixture_id}\``,
|
|
47
|
+
`- Process-control contract: \`${processControl.id}\``,
|
|
48
|
+
`- Development cockpit: \`${cockpit.id}\``,
|
|
49
|
+
`- Feature traceability: \`${traceability.id}\``,
|
|
50
|
+
`- Multi-source feedback: \`${feedback.id}\``,
|
|
51
|
+
`- Baseline comparison: \`${baselineComparison.id}\``,
|
|
52
|
+
"",
|
|
53
|
+
"## Commands",
|
|
54
|
+
"",
|
|
55
|
+
"```bash",
|
|
56
|
+
"npm run validate:minimal",
|
|
57
|
+
"npm run seed:preview",
|
|
58
|
+
"npm run context:generate",
|
|
59
|
+
"npm run validate:launch-record",
|
|
60
|
+
"npm run validate:process-transition",
|
|
61
|
+
"npm run validate:process-transition-report",
|
|
62
|
+
"npm run validate:process-control",
|
|
63
|
+
"npm run validate:instrumentation-layer",
|
|
64
|
+
"npm run validate:instrumentation-report",
|
|
65
|
+
"npm run validate:implementation-control-cycles",
|
|
66
|
+
"npm run validate:baseline-comparison",
|
|
67
|
+
"```",
|
|
68
|
+
"",
|
|
69
|
+
"## Transition Explanation",
|
|
70
|
+
"",
|
|
71
|
+
`- Requested transition: \`${transitionExplanation.explanation.current_state} -> ${transitionExplanation.explanation.target_state}\``,
|
|
72
|
+
`- Matched transition: \`${transitionExplanation.explanation.matched_transition ? "true" : "false"}\``,
|
|
73
|
+
`- Required evidence: \`${transitionExplanation.explanation.required_evidence.join(", ")}\``,
|
|
74
|
+
`- Missing evidence: \`${transitionExplanation.explanation.missing_evidence.length}\``,
|
|
75
|
+
`- Kaizen decision: \`${transitionExplanation.explanation.kaizen_decision.status}\``,
|
|
76
|
+
"",
|
|
77
|
+
"## Instrumentation",
|
|
78
|
+
"",
|
|
79
|
+
`- Cockpit production readiness: \`${cockpit.readiness.production_readiness}\``,
|
|
80
|
+
`- Cockpit next action: \`${cockpit.next_best_action.action}\``,
|
|
81
|
+
`- Feature mappings: \`${traceability.coverage_summary.mapped_feature_count}\``,
|
|
82
|
+
`- Evidence-backed mappings: \`${traceability.coverage_summary.evidence_backed_mapping_count}\``,
|
|
83
|
+
`- Multi-source feedback verdict: \`${feedback.verdict}\``,
|
|
84
|
+
`- Blocking findings: \`${feedback.blocking_findings.length}\``,
|
|
85
|
+
`- Kaizen refs: \`${feedback.kaizen_refs.join(", ")}\``,
|
|
86
|
+
"",
|
|
87
|
+
"## Baseline Comparison",
|
|
88
|
+
"",
|
|
89
|
+
`- Baseline context units: \`${baselineComparison.baseline.context_units}\``,
|
|
90
|
+
`- Mirai Graph context units: \`${baselineComparison.mirai_graph.context_units}\``,
|
|
91
|
+
`- Context reduction: \`${baselineComparison.outcome.context_reduction_percent}%\``,
|
|
92
|
+
`- Baseline missed dependencies: \`${baselineComparison.baseline.missed_dependencies}\``,
|
|
93
|
+
`- Mirai Graph missed dependencies: \`${baselineComparison.mirai_graph.missed_dependencies}\``,
|
|
94
|
+
`- Verdict: \`${baselineComparison.outcome.verdict}\``,
|
|
95
|
+
"",
|
|
96
|
+
"## What This Demonstrates",
|
|
97
|
+
"",
|
|
98
|
+
"- Mirai Graph can validate a graph package.",
|
|
99
|
+
"- Mirai Graph can generate task-specific context from graph state.",
|
|
100
|
+
"- Launch records describe bounded work permission.",
|
|
101
|
+
"- Process transitions are checked and explained against an executable state machine.",
|
|
102
|
+
"- Process-control contracts bind launch, evidence, recovery and Kaizen policy.",
|
|
103
|
+
"- Instrumentation connects cockpit signals, feature traceability and multi-source feedback.",
|
|
104
|
+
"- Baseline comparison records synthetic measurement boundaries.",
|
|
105
|
+
"",
|
|
106
|
+
"## Boundaries",
|
|
107
|
+
"",
|
|
108
|
+
"- This is a public-safe synthetic demo.",
|
|
109
|
+
"- Generated context is not canonical state.",
|
|
110
|
+
"- Evidence and proposals do not authorize canonical updates.",
|
|
111
|
+
"- Synthetic evidence is not broad scientific proof."
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
console.log(lines.join("\n"));
|
|
@@ -0,0 +1,162 @@
|
|
|
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/readiness-score.js <package-dir> [--target-mode discovery|canonical|pilot|controlled_runtime|production_runtime] [--write <output-file>]");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function readJson(filePath) {
|
|
11
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function findManifestPath(packageDir) {
|
|
15
|
+
return path.join(packageDir, "mirai-graph-package.json");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function exists(filePath) {
|
|
19
|
+
return fs.existsSync(filePath);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function scorePackage(packageDir, targetMode) {
|
|
23
|
+
const manifestPath = findManifestPath(packageDir);
|
|
24
|
+
const graphObjectsPath = path.join(packageDir, "graph", "objects.json");
|
|
25
|
+
const graphRelationsPath = path.join(packageDir, "graph", "relations.json");
|
|
26
|
+
const gateResultsPath = path.join(packageDir, "gates", "results.json");
|
|
27
|
+
|
|
28
|
+
const evidence = [];
|
|
29
|
+
const blockers = [];
|
|
30
|
+
const manifest = exists(manifestPath) ? readJson(manifestPath) : null;
|
|
31
|
+
let score = 0;
|
|
32
|
+
|
|
33
|
+
if (manifest) {
|
|
34
|
+
score += 10;
|
|
35
|
+
evidence.push("package manifest exists");
|
|
36
|
+
} else {
|
|
37
|
+
blockers.push("missing package manifest");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (exists(graphObjectsPath) && exists(graphRelationsPath)) {
|
|
41
|
+
const objects = readJson(graphObjectsPath);
|
|
42
|
+
const relations = readJson(graphRelationsPath);
|
|
43
|
+
if (Array.isArray(objects) && objects.length > 0) {
|
|
44
|
+
score += 15;
|
|
45
|
+
evidence.push(`objects exist: ${objects.length}`);
|
|
46
|
+
}
|
|
47
|
+
if (Array.isArray(relations)) {
|
|
48
|
+
score += 10;
|
|
49
|
+
evidence.push(`relations exist: ${relations.length}`);
|
|
50
|
+
}
|
|
51
|
+
const evidenceObjects = Array.isArray(objects)
|
|
52
|
+
? objects.filter((object) => object.kind === "evidence").length
|
|
53
|
+
: 0;
|
|
54
|
+
if (evidenceObjects > 0) {
|
|
55
|
+
score += 15;
|
|
56
|
+
evidence.push(`evidence objects exist: ${evidenceObjects}`);
|
|
57
|
+
}
|
|
58
|
+
const acceptedObjects = Array.isArray(objects)
|
|
59
|
+
? objects.filter((object) => object.readiness === "accepted").length
|
|
60
|
+
: 0;
|
|
61
|
+
if (acceptedObjects > 0) {
|
|
62
|
+
score += 10;
|
|
63
|
+
evidence.push(`accepted objects exist: ${acceptedObjects}`);
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
blockers.push("missing graph objects or relations");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (exists(gateResultsPath)) {
|
|
70
|
+
const gateResults = readJson(gateResultsPath);
|
|
71
|
+
if (Array.isArray(gateResults) && gateResults.length > 0) {
|
|
72
|
+
score += 15;
|
|
73
|
+
evidence.push(`gate results exist: ${gateResults.length}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const contextPackPath = path.join(packageDir, "expected", "context-pack-compact.md");
|
|
78
|
+
if (exists(contextPackPath)) {
|
|
79
|
+
score += 10;
|
|
80
|
+
evidence.push("context pack example exists");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const metricsPath = path.join(packageDir, "metrics", "example-metrics.json");
|
|
84
|
+
if (exists(metricsPath)) {
|
|
85
|
+
score += 10;
|
|
86
|
+
evidence.push("benchmark metric example exists");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const caps = [];
|
|
90
|
+
if (blockers.length > 0) {
|
|
91
|
+
caps.push({ reason: "structural blockers exist", max_score: 39 });
|
|
92
|
+
}
|
|
93
|
+
if (targetMode !== "discovery" && !exists(gateResultsPath)) {
|
|
94
|
+
caps.push({ reason: "no gate results for non-discovery target", max_score: 59 });
|
|
95
|
+
}
|
|
96
|
+
if (["pilot", "controlled_runtime", "production_runtime"].includes(targetMode) && !exists(metricsPath)) {
|
|
97
|
+
caps.push({ reason: "no benchmark evidence for pilot/runtime target", max_score: 69 });
|
|
98
|
+
}
|
|
99
|
+
if (
|
|
100
|
+
manifest &&
|
|
101
|
+
typeof manifest.public_safety === "string" &&
|
|
102
|
+
manifest.public_safety.includes("synthetic") &&
|
|
103
|
+
["pilot", "controlled_runtime", "production_runtime"].includes(targetMode)
|
|
104
|
+
) {
|
|
105
|
+
caps.push({ reason: "synthetic-only evidence cannot exceed pilot-ready navigation score", max_score: 69 });
|
|
106
|
+
}
|
|
107
|
+
if (["controlled_runtime", "production_runtime"].includes(targetMode)) {
|
|
108
|
+
caps.push({ reason: "runtime policy is not implemented in public alpha", max_score: 74 });
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
for (const cap of caps) {
|
|
112
|
+
score = Math.min(score, cap.max_score);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
schema_version: "0.1.0",
|
|
117
|
+
target_mode: targetMode,
|
|
118
|
+
score,
|
|
119
|
+
band: score < 20
|
|
120
|
+
? "G0_raw"
|
|
121
|
+
: score < 40
|
|
122
|
+
? "G1_extracted"
|
|
123
|
+
: score < 60
|
|
124
|
+
? "G2_canonical"
|
|
125
|
+
: score < 75
|
|
126
|
+
? "G3_pilot_ready"
|
|
127
|
+
: score < 90
|
|
128
|
+
? "G4_controlled_runtime_candidate"
|
|
129
|
+
: "G5_runtime_stable",
|
|
130
|
+
evidence,
|
|
131
|
+
blockers,
|
|
132
|
+
caps,
|
|
133
|
+
note: "Release-candidate readiness score; use as navigation, not approval."
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const packageDir = process.argv[2];
|
|
138
|
+
const targetModeIndex = process.argv.indexOf("--target-mode");
|
|
139
|
+
const writeFlagIndex = process.argv.indexOf("--write");
|
|
140
|
+
const targetMode = targetModeIndex >= 0 ? process.argv[targetModeIndex + 1] : "discovery";
|
|
141
|
+
const outputPath = writeFlagIndex >= 0 ? process.argv[writeFlagIndex + 1] : null;
|
|
142
|
+
|
|
143
|
+
if (!packageDir || (targetModeIndex >= 0 && !targetMode) || (writeFlagIndex >= 0 && !outputPath)) {
|
|
144
|
+
usage();
|
|
145
|
+
process.exit(2);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
try {
|
|
149
|
+
const result = scorePackage(path.resolve(packageDir), targetMode);
|
|
150
|
+
const output = JSON.stringify(result, null, 2);
|
|
151
|
+
|
|
152
|
+
if (outputPath) {
|
|
153
|
+
const resolvedOutputPath = path.resolve(outputPath);
|
|
154
|
+
fs.mkdirSync(path.dirname(resolvedOutputPath), { recursive: true });
|
|
155
|
+
fs.writeFileSync(resolvedOutputPath, `${output}\n`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
console.log(output);
|
|
159
|
+
} catch (error) {
|
|
160
|
+
console.error(error.message);
|
|
161
|
+
process.exit(1);
|
|
162
|
+
}
|