onto-mcp 0.3.0 → 0.3.2

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.
Files changed (61) hide show
  1. package/.onto/authority/core-lexicon.yaml +12 -0
  2. package/.onto/domains/software-engineering/competency_qs.md +192 -63
  3. package/.onto/domains/software-engineering/concepts.md +67 -5
  4. package/.onto/domains/software-engineering/conciseness_rules.md +22 -2
  5. package/.onto/domains/software-engineering/dependency_rules.md +78 -8
  6. package/.onto/domains/software-engineering/domain_scope.md +181 -150
  7. package/.onto/domains/software-engineering/extension_cases.md +318 -542
  8. package/.onto/domains/software-engineering/logic_rules.md +75 -3
  9. package/.onto/domains/software-engineering/problem_framing_profile.md +29 -2
  10. package/.onto/domains/software-engineering/prompt_interface.md +122 -0
  11. package/.onto/domains/software-engineering/structure_spec.md +53 -4
  12. package/.onto/principles/llm-native-development-guideline.md +20 -0
  13. package/.onto/principles/productization-charter.md +6 -0
  14. package/.onto/processes/evolve/material-kind-adapter-contract.md +6 -0
  15. package/.onto/processes/reconstruct/reconstruct-boundary-contract.md +468 -81
  16. package/.onto/processes/reconstruct/reconstruct-execution-ux-contract.md +177 -0
  17. package/.onto/processes/reconstruct/source-profile-contract.md +39 -6
  18. package/.onto/processes/reconstruct/top-level-concept-discovery-contract.md +387 -0
  19. package/.onto/processes/review/binding-contract.md +8 -0
  20. package/.onto/processes/review/lens-registry.md +16 -0
  21. package/.onto/processes/review/pre-dispatch-contracts.md +34 -13
  22. package/.onto/processes/review/productized-live-path.md +3 -1
  23. package/.onto/processes/shared/pipeline-execution-ledger-contract.md +185 -0
  24. package/.onto/processes/shared/target-material-kind-contract.md +24 -2
  25. package/.onto/roles/axiology.md +7 -2
  26. package/AGENTS.md +4 -2
  27. package/README.md +52 -29
  28. package/dist/core-api/reconstruct-api.js +92 -5
  29. package/dist/core-api/review-api.js +1744 -371
  30. package/dist/core-runtime/cli/mock-review-unit-executor.js +17 -0
  31. package/dist/core-runtime/cli/render-review-final-output.js +9 -0
  32. package/dist/core-runtime/cli/review-invoke.js +387 -55
  33. package/dist/core-runtime/cli/run-review-prompt-execution.js +361 -90
  34. package/dist/core-runtime/path-boundary.js +58 -0
  35. package/dist/core-runtime/pipeline-execution-ledger.js +100 -0
  36. package/dist/core-runtime/reconstruct/artifact-types.js +33 -1
  37. package/dist/core-runtime/reconstruct/materialize-preparation.js +54 -4
  38. package/dist/core-runtime/reconstruct/pipeline-execution-ledger.js +342 -0
  39. package/dist/core-runtime/reconstruct/post-seed-validation.js +630 -0
  40. package/dist/core-runtime/reconstruct/record.js +105 -1
  41. package/dist/core-runtime/reconstruct/run.js +1594 -38
  42. package/dist/core-runtime/reconstruct/seed-candidate-validation.js +29 -0
  43. package/dist/core-runtime/review/continuation-plan.js +160 -0
  44. package/dist/core-runtime/review/execution-plan-boundary.js +123 -0
  45. package/dist/core-runtime/review/materializers.js +8 -3
  46. package/dist/core-runtime/review/pipeline-execution-ledger.js +250 -0
  47. package/dist/core-runtime/review/review-artifact-utils.js +15 -2
  48. package/dist/core-runtime/review/review-invocation-runner.js +604 -0
  49. package/dist/core-runtime/target-material-kind.js +43 -5
  50. package/dist/mcp/server.js +289 -59
  51. package/dist/mcp/tool-schemas.js +28 -2
  52. package/package.json +4 -2
  53. package/.onto/domains/llm-native-development/competency_qs.md +0 -430
  54. package/.onto/domains/llm-native-development/concepts.md +0 -242
  55. package/.onto/domains/llm-native-development/conciseness_rules.md +0 -163
  56. package/.onto/domains/llm-native-development/dependency_rules.md +0 -216
  57. package/.onto/domains/llm-native-development/domain_scope.md +0 -197
  58. package/.onto/domains/llm-native-development/extension_cases.md +0 -474
  59. package/.onto/domains/llm-native-development/logic_rules.md +0 -123
  60. package/.onto/domains/llm-native-development/prompt_interface.md +0 -49
  61. package/.onto/domains/llm-native-development/structure_spec.md +0 -245
@@ -10,6 +10,15 @@ function requireString(value, optionName) {
10
10
  }
11
11
  return value;
12
12
  }
13
+ function parseOptionalNonNegativeInteger(value) {
14
+ if (value === undefined || value.trim().length === 0)
15
+ return 0;
16
+ const parsed = Number.parseInt(value, 10);
17
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
18
+ }
19
+ function delay(ms) {
20
+ return new Promise((resolve) => setTimeout(resolve, ms));
21
+ }
13
22
  function renderLensOutput(unitId, packetPath) {
14
23
  return `# ${unitId} Review Result
15
24
 
@@ -258,6 +267,14 @@ export async function runMockReviewUnitExecutorCli(argv) {
258
267
  ? await readYamlDocument(path.join(sessionRoot, "execution-plan.yaml"))
259
268
  : null;
260
269
  const participatingLensIds = executionPlan?.lens_prompt_packet_seats.map((seat) => seat.lens_id) ?? [];
270
+ const delayMs = parseOptionalNonNegativeInteger(process.env.ONTO_REVIEW_MOCK_UNIT_DELAY_MS);
271
+ if (delayMs > 0) {
272
+ await delay(delayMs);
273
+ }
274
+ const warningMessage = process.env.ONTO_REVIEW_MOCK_ENV_WARNING;
275
+ if (warningMessage && warningMessage.trim().length > 0) {
276
+ console.warn(warningMessage.trim());
277
+ }
261
278
  const outputText = unitKind === "synthesize"
262
279
  ? renderSynthesizeOutput(packetPath)
263
280
  : unitKind === "deliberation"
@@ -74,6 +74,12 @@ function renderTargetSummary(bindingArtifact, projectRoot) {
74
74
  .map((resolvedRef) => `- \`${toRelativePath(resolvedRef, projectRoot)}\``)
75
75
  .join("\n");
76
76
  }
77
+ function renderDomainSelectionNotes(bindingArtifact) {
78
+ const notes = bindingArtifact.binding_notes ?? [];
79
+ return notes.length > 0
80
+ ? notes.map((note) => `- ${note}`).join("\n")
81
+ : "- none";
82
+ }
77
83
  function renderConsensusHeading(participatingLensCount, plannedLensCount, reviewMode) {
78
84
  if (reviewMode === "full") {
79
85
  return `### Consensus (${participatingLensCount}/${plannedLensCount})`;
@@ -279,6 +285,9 @@ ${renderTargetSummary(bindingArtifact, projectRoot)}
279
285
  - Source artifact: ${synthesisExecuted ? `\`${toRelativePath(sourcePath, projectRoot)}\`` : "not produced"}
280
286
  - Execution status: ${executionStatus}
281
287
 
288
+ ### Domain Selection
289
+ ${renderDomainSelectionNotes(bindingArtifact)}
290
+
282
291
  ### Final Review Result
283
292
  #### Review Basis
284
293
  - Execution status: ${executionStatus}