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.
- package/.onto/authority/core-lexicon.yaml +12 -0
- package/.onto/domains/software-engineering/competency_qs.md +192 -63
- package/.onto/domains/software-engineering/concepts.md +67 -5
- package/.onto/domains/software-engineering/conciseness_rules.md +22 -2
- package/.onto/domains/software-engineering/dependency_rules.md +78 -8
- package/.onto/domains/software-engineering/domain_scope.md +181 -150
- package/.onto/domains/software-engineering/extension_cases.md +318 -542
- package/.onto/domains/software-engineering/logic_rules.md +75 -3
- package/.onto/domains/software-engineering/problem_framing_profile.md +29 -2
- package/.onto/domains/software-engineering/prompt_interface.md +122 -0
- package/.onto/domains/software-engineering/structure_spec.md +53 -4
- package/.onto/principles/llm-native-development-guideline.md +20 -0
- package/.onto/principles/productization-charter.md +6 -0
- package/.onto/processes/evolve/material-kind-adapter-contract.md +6 -0
- package/.onto/processes/reconstruct/reconstruct-boundary-contract.md +468 -81
- package/.onto/processes/reconstruct/reconstruct-execution-ux-contract.md +177 -0
- package/.onto/processes/reconstruct/source-profile-contract.md +39 -6
- package/.onto/processes/reconstruct/top-level-concept-discovery-contract.md +387 -0
- package/.onto/processes/review/binding-contract.md +8 -0
- package/.onto/processes/review/lens-registry.md +16 -0
- package/.onto/processes/review/pre-dispatch-contracts.md +34 -13
- package/.onto/processes/review/productized-live-path.md +3 -1
- package/.onto/processes/shared/pipeline-execution-ledger-contract.md +185 -0
- package/.onto/processes/shared/target-material-kind-contract.md +24 -2
- package/.onto/roles/axiology.md +7 -2
- package/AGENTS.md +4 -2
- package/README.md +52 -29
- package/dist/core-api/reconstruct-api.js +92 -5
- package/dist/core-api/review-api.js +1744 -371
- package/dist/core-runtime/cli/mock-review-unit-executor.js +17 -0
- package/dist/core-runtime/cli/render-review-final-output.js +9 -0
- package/dist/core-runtime/cli/review-invoke.js +387 -55
- package/dist/core-runtime/cli/run-review-prompt-execution.js +361 -90
- package/dist/core-runtime/path-boundary.js +58 -0
- package/dist/core-runtime/pipeline-execution-ledger.js +100 -0
- package/dist/core-runtime/reconstruct/artifact-types.js +33 -1
- package/dist/core-runtime/reconstruct/materialize-preparation.js +54 -4
- package/dist/core-runtime/reconstruct/pipeline-execution-ledger.js +342 -0
- package/dist/core-runtime/reconstruct/post-seed-validation.js +630 -0
- package/dist/core-runtime/reconstruct/record.js +105 -1
- package/dist/core-runtime/reconstruct/run.js +1594 -38
- package/dist/core-runtime/reconstruct/seed-candidate-validation.js +29 -0
- package/dist/core-runtime/review/continuation-plan.js +160 -0
- package/dist/core-runtime/review/execution-plan-boundary.js +123 -0
- package/dist/core-runtime/review/materializers.js +8 -3
- package/dist/core-runtime/review/pipeline-execution-ledger.js +250 -0
- package/dist/core-runtime/review/review-artifact-utils.js +15 -2
- package/dist/core-runtime/review/review-invocation-runner.js +604 -0
- package/dist/core-runtime/target-material-kind.js +43 -5
- package/dist/mcp/server.js +289 -59
- package/dist/mcp/tool-schemas.js +28 -2
- package/package.json +4 -2
- package/.onto/domains/llm-native-development/competency_qs.md +0 -430
- package/.onto/domains/llm-native-development/concepts.md +0 -242
- package/.onto/domains/llm-native-development/conciseness_rules.md +0 -163
- package/.onto/domains/llm-native-development/dependency_rules.md +0 -216
- package/.onto/domains/llm-native-development/domain_scope.md +0 -197
- package/.onto/domains/llm-native-development/extension_cases.md +0 -474
- package/.onto/domains/llm-native-development/logic_rules.md +0 -123
- package/.onto/domains/llm-native-development/prompt_interface.md +0 -49
- package/.onto/domains/llm-native-development/structure_spec.md +0 -245
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Reconstruct Execution UX Contract
|
|
2
|
+
|
|
3
|
+
> Status: design contract.
|
|
4
|
+
> Purpose: define the user-visible reconstruct run experience without adding a
|
|
5
|
+
> separate UI implementation.
|
|
6
|
+
|
|
7
|
+
## 1. Position
|
|
8
|
+
|
|
9
|
+
`reconstruct` can take a long time because the host LLM must read source
|
|
10
|
+
observations, run reconstruct lens judgments, choose the next unjudged source
|
|
11
|
+
frontier, propose Seed meaning, assess competency questions, and explain
|
|
12
|
+
unresolved gaps. The user-facing experience must therefore expose new
|
|
13
|
+
information as it is discovered, not only meta status such as "still running".
|
|
14
|
+
|
|
15
|
+
The runtime owns structured facts, stage ids, artifact refs, liveness hints, and
|
|
16
|
+
deterministic counts. The host LLM owns the short explanation shown to the user.
|
|
17
|
+
|
|
18
|
+
No standalone HTML, web UI, or dashboard is required for this contract. MCP and
|
|
19
|
+
CLI hosts should render the same information from runtime status/result payloads
|
|
20
|
+
and reconstruct artifacts.
|
|
21
|
+
|
|
22
|
+
## 2. Opening Brief
|
|
23
|
+
|
|
24
|
+
At run start, the host should show a compact opening brief before expensive
|
|
25
|
+
work begins.
|
|
26
|
+
|
|
27
|
+
The brief must include:
|
|
28
|
+
|
|
29
|
+
- environment: project root or declared source boundary, session root, and
|
|
30
|
+
write policy
|
|
31
|
+
- method: MCP/runtime path, source profile, semantic author realization, and
|
|
32
|
+
confirmation provider realization
|
|
33
|
+
- execution profile: observer/gate slice, full integral exploration, or a
|
|
34
|
+
test/fixture-only profile if a non-product harness is running, with the
|
|
35
|
+
completion claim allowed for that profile
|
|
36
|
+
- model/provider: provider family or realization label without secrets
|
|
37
|
+
- domain: selected domain, no-domain mode, or pending domain-context selection
|
|
38
|
+
- material: `target_material_kind`, target input kind, and unsupported-material
|
|
39
|
+
status if known
|
|
40
|
+
- exploration loop: initial source frontier, round budget if any, and frontier
|
|
41
|
+
validation policy
|
|
42
|
+
- reconstruction direction: what the reconstruct run will try to explain, and
|
|
43
|
+
what it will treat as out of scope
|
|
44
|
+
- ownership boundary: runtime observes and validates; reconstruct lenses judge
|
|
45
|
+
meaning and source gaps; the user or host confirmation controls Seed
|
|
46
|
+
acceptance
|
|
47
|
+
- skipped or deferred stages that already narrow downstream authority, such as
|
|
48
|
+
live lens judgment, source-frontier exploration, domain-context selection,
|
|
49
|
+
user confirmation, or competency-question assessment
|
|
50
|
+
|
|
51
|
+
The opening brief should be declarative. It should not ask the user to approve
|
|
52
|
+
internal implementation details unless the target boundary, domain, or write
|
|
53
|
+
policy is ambiguous.
|
|
54
|
+
|
|
55
|
+
## 3. Progress Presentation
|
|
56
|
+
|
|
57
|
+
Progress is stepwise and round-aware. Each update should include the current
|
|
58
|
+
`ReconstructStageId`, exploration round id when applicable, a short label, a
|
|
59
|
+
liveness state, and one or two newly learned facts.
|
|
60
|
+
|
|
61
|
+
Recommended update shape:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
[round 2 | stage source_frontier_validation] source_frontier
|
|
65
|
+
Status: running
|
|
66
|
+
Learned: coverage requested billing service tests and rejected one already-seen helper.
|
|
67
|
+
Next: observe 3 accepted source refs inside the declared project boundary.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Progress updates should prefer facts such as:
|
|
71
|
+
|
|
72
|
+
- material kind and profile confidence
|
|
73
|
+
- scanned roots and skipped boundaries
|
|
74
|
+
- initial source frontier artifact ref and first-observation source refs
|
|
75
|
+
- source inventory counts by material-specific unit
|
|
76
|
+
- exploration round count and new observation count by round
|
|
77
|
+
- selected observation count and evidence-candidate rationale
|
|
78
|
+
- per-lens judgment status and newly named semantic gaps
|
|
79
|
+
- source frontier refs requested, accepted, rejected, already observed,
|
|
80
|
+
unsupported, or out of bounds
|
|
81
|
+
- domain context refs and snapshot id
|
|
82
|
+
- Seed claim count by entity, relation, action, property, and rule
|
|
83
|
+
- claim realization stance counts
|
|
84
|
+
- confirmation state counts
|
|
85
|
+
- competency question count and assessment status counts
|
|
86
|
+
- failure classification counts
|
|
87
|
+
- revision proposal action counts
|
|
88
|
+
- unresolved, deferred, and out-of-scope counts
|
|
89
|
+
- current halt reason and reusable artifact refs when halted
|
|
90
|
+
- skipped/deferred stage reason and downstream authority impact
|
|
91
|
+
|
|
92
|
+
Progress updates should avoid pretending that intermediate semantic claims are
|
|
93
|
+
final. Before Seed confirmation, claims are candidates. Before competency
|
|
94
|
+
question assessment, quality statements are preliminary.
|
|
95
|
+
|
|
96
|
+
## 4. Decision Points
|
|
97
|
+
|
|
98
|
+
User-facing prompts are needed only when a decision changes the product result
|
|
99
|
+
or the allowed boundary.
|
|
100
|
+
|
|
101
|
+
Decision points:
|
|
102
|
+
|
|
103
|
+
- target boundary is ambiguous or would require reading outside the bound root
|
|
104
|
+
- material kind is unsupported or mixed in a way that changes adapter behavior
|
|
105
|
+
- source frontier expansion would exceed the declared boundary, adapter support,
|
|
106
|
+
or round/cost budget
|
|
107
|
+
- domain context selection changes the interpretation standard
|
|
108
|
+
- Seed claim confirmation requires accepted, rejected, partial, or deferred
|
|
109
|
+
state
|
|
110
|
+
- unresolved material questions require a final direction: continue, defer, or
|
|
111
|
+
accept with disclosed limits
|
|
112
|
+
|
|
113
|
+
The host should phrase choices by outcome, not internal jargon.
|
|
114
|
+
|
|
115
|
+
## 5. Final Output
|
|
116
|
+
|
|
117
|
+
`final-output.md` must be decision-ready and artifact-tethered. It should
|
|
118
|
+
separate:
|
|
119
|
+
|
|
120
|
+
- confirmed Seed content
|
|
121
|
+
- claim realization summary
|
|
122
|
+
- competency question assessment summary
|
|
123
|
+
- material failures and unsafe-to-trust gaps
|
|
124
|
+
- revision proposals and action candidates
|
|
125
|
+
- unresolved, deferred, unsupported, or out-of-scope items
|
|
126
|
+
- artifact provenance: the owning ids and artifact refs behind the statements
|
|
127
|
+
- execution profile and completion scope: what actually ran, what was skipped,
|
|
128
|
+
and which downstream authority claims are therefore narrowed
|
|
129
|
+
|
|
130
|
+
The final output is not the authority for truth. It is a user-facing projection
|
|
131
|
+
of `reconstruct-record.yaml`, `reconstruct-run-manifest.yaml`, and the
|
|
132
|
+
stage-owned artifacts.
|
|
133
|
+
|
|
134
|
+
Full integral exploration wording is allowed only when the run manifest records
|
|
135
|
+
the full profile and the required exploration, domain-context, Seed,
|
|
136
|
+
confirmation, competency-question, assessment, failure, revision, metrics, stop,
|
|
137
|
+
and final-output stages are trusted or explicitly skipped with trusted reasons.
|
|
138
|
+
|
|
139
|
+
## 6. Halted Or Partial Runs
|
|
140
|
+
|
|
141
|
+
If a run halts, the output should still be useful:
|
|
142
|
+
|
|
143
|
+
- show the last completed stage id
|
|
144
|
+
- show which artifact refs are reusable
|
|
145
|
+
- show which stage failed and why
|
|
146
|
+
- show the strongest safe statement supported by completed artifacts
|
|
147
|
+
- show the latest accepted/rejected source frontier refs if the halt happened
|
|
148
|
+
inside exploration
|
|
149
|
+
- avoid summarizing missing stages as if they ran
|
|
150
|
+
- show the execution profile and the exact completion claim still supported by
|
|
151
|
+
trusted artifacts
|
|
152
|
+
|
|
153
|
+
A halted run may provide candidate Seed content only if the corresponding
|
|
154
|
+
artifact and validation refs exist. It may not imply Seed confirmation, CQ
|
|
155
|
+
assessment, failure classification, revision proposal, stop decision, or final
|
|
156
|
+
ontology direction unless those artifacts exist.
|
|
157
|
+
|
|
158
|
+
## 7. Runtime Payload Expectations
|
|
159
|
+
|
|
160
|
+
Future status/result payloads should expose enough facts for the host LLM to
|
|
161
|
+
render this contract without scraping prose:
|
|
162
|
+
|
|
163
|
+
- execution profile and allowed completion claim
|
|
164
|
+
- current stage id and total planned stage count
|
|
165
|
+
- current exploration round id, round state, and round budget if any
|
|
166
|
+
- stage state: pending, running, completed, skipped, or halted
|
|
167
|
+
- skipped/deferred stage reason and `authority_impact`
|
|
168
|
+
- stage artifact refs and owner
|
|
169
|
+
- liveness state and recommended polling interval
|
|
170
|
+
- deterministic count summaries from the latest completed artifacts
|
|
171
|
+
- latest source frontier summary and reusable trusted observation refs
|
|
172
|
+
- initial source frontier artifact ref
|
|
173
|
+
- unresolved/deferred/out-of-scope summaries
|
|
174
|
+
- opening, progress, halt, and final presentation prompts or facts
|
|
175
|
+
|
|
176
|
+
The payload may be compact. It should expose bounded facts and artifact refs,
|
|
177
|
+
not duplicate semantic authority.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Reconstruct Source Profile Contract
|
|
2
2
|
|
|
3
|
-
> Status: design contract,
|
|
3
|
+
> Status: design contract, partially wired runtime.
|
|
4
4
|
> Purpose: define target-material observation contracts for `reconstruct`.
|
|
5
5
|
|
|
6
6
|
## 1. Canonical Seat
|
|
@@ -15,6 +15,11 @@ The historical `explorers/` folder is archived and must not be revived as an
|
|
|
15
15
|
active runtime path. `SourceProfile` is the current name because the file guides
|
|
16
16
|
runtime observation. It is not an autonomous semantic explorer.
|
|
17
17
|
|
|
18
|
+
In the integral exploration design, source profiles still belong to the runtime
|
|
19
|
+
observation side. Reconstruct lenses may ask for additional source refs through
|
|
20
|
+
a validated source frontier, but the profile itself does not decide which source
|
|
21
|
+
is semantically important.
|
|
22
|
+
|
|
18
23
|
Source profiles are keyed by `target_material_kind`, the shared runtime axis
|
|
19
24
|
defined in `.onto/authority/core-lexicon.yaml`. They must not use `source_kind`
|
|
20
25
|
to mean code, spreadsheet, document, or database because review already uses
|
|
@@ -32,6 +37,8 @@ Current source profiles:
|
|
|
32
37
|
| `spreadsheet` | `.onto/processes/reconstruct/source-profiles/spreadsheet.md` |
|
|
33
38
|
| `database` | `.onto/processes/reconstruct/source-profiles/database.md` |
|
|
34
39
|
| `document` | `.onto/processes/reconstruct/source-profiles/document.md` |
|
|
40
|
+
| `mixed` | no standalone parser profile; requires per-member profiles or explicit unsupported/halt behavior |
|
|
41
|
+
| `unknown` | no profile; runtime must halt or ask for clarification |
|
|
35
42
|
|
|
36
43
|
## 2. Profile Responsibility
|
|
37
44
|
|
|
@@ -43,11 +50,13 @@ A source profile may define:
|
|
|
43
50
|
- detail location notation
|
|
44
51
|
- context questions
|
|
45
52
|
- scan targets
|
|
53
|
+
- safe frontier-ref shapes for this material kind
|
|
46
54
|
- correct and incorrect observation examples
|
|
47
55
|
- current support status and explicit unsupported cases
|
|
48
56
|
|
|
49
57
|
A source profile must not define rules that convert source structure into
|
|
50
|
-
ontology concepts
|
|
58
|
+
ontology concepts or rules that choose the next source based on ontology
|
|
59
|
+
meaning.
|
|
51
60
|
|
|
52
61
|
Examples:
|
|
53
62
|
|
|
@@ -65,11 +74,17 @@ return observations, but they do not interpret ontology meaning. The source
|
|
|
65
74
|
profile may guide observation scope, but the adapter schema is the runtime
|
|
66
75
|
contract that fixes returned fields and observation ids.
|
|
67
76
|
|
|
77
|
+
When a source adapter is invoked after the first round, it consumes only
|
|
78
|
+
runtime-validated source frontier refs. It must not accept lens prose or
|
|
79
|
+
semantic labels as source locations.
|
|
80
|
+
|
|
68
81
|
The future adapter contract must fail explicitly when:
|
|
69
82
|
|
|
70
83
|
- the target material kind cannot be resolved
|
|
71
84
|
- the source format is unsupported
|
|
72
85
|
- the target is outside the declared filesystem or connection boundary
|
|
86
|
+
- a requested source frontier ref is not a concrete source location for this
|
|
87
|
+
material kind
|
|
73
88
|
- an observation ref cited by a directive does not exist
|
|
74
89
|
- required parser/tool support is unavailable
|
|
75
90
|
|
|
@@ -86,13 +101,16 @@ Every profile must make the material-specific reading strategy visible:
|
|
|
86
101
|
| `spreadsheet` | Inspect workbook/sheet/range/formula/formatting structure without declaring accounting or business meaning. |
|
|
87
102
|
| `document` | Inspect sections, headings, quotes, tables, references, and definitions without choosing canonical business rules. |
|
|
88
103
|
| `database` | Inspect schemas, tables, columns, constraints, indexes, and queries without assigning business relation meaning. |
|
|
89
|
-
| `mixed` | Inventory each member with its own material kind and preserve cross-material refs without collapsing them into one parser. |
|
|
104
|
+
| `mixed` | Inventory each member with its own material kind and preserve cross-material refs without collapsing them into one parser. If a composite profile is not implemented, halt or ask before adapter dispatch. |
|
|
90
105
|
| `unknown` | Halt or ask for clarification; do not guess an adapter. |
|
|
91
106
|
|
|
92
107
|
Domain interpretation happens after observation. For example, an accounting
|
|
93
108
|
spreadsheet is `target_material_kind=spreadsheet` and may use `domain=accounting`;
|
|
94
109
|
the spreadsheet adapter reports cells and formulas, while the LLM interprets
|
|
95
|
-
accounting meaning from evidence and selected domain documents.
|
|
110
|
+
accounting meaning from evidence and selected domain documents. If that
|
|
111
|
+
interpretation shows that another sheet, range, document section, table, or code
|
|
112
|
+
file is needed, the host LLM writes a source frontier directive and runtime
|
|
113
|
+
validates it before any additional observation occurs.
|
|
96
114
|
|
|
97
115
|
## 5. Extension Rule
|
|
98
116
|
|
|
@@ -100,8 +118,23 @@ Adding a new target material kind requires:
|
|
|
100
118
|
|
|
101
119
|
1. A new source profile under `.onto/processes/reconstruct/source-profiles/`.
|
|
102
120
|
2. Runtime adapter support or an explicit unsupported status.
|
|
103
|
-
3. Tests for target material detection, observation shape,
|
|
104
|
-
and directive evidence-ref validation.
|
|
121
|
+
3. Tests for target material detection, observation shape, source frontier
|
|
122
|
+
validation, unsupported inputs, and directive evidence-ref validation.
|
|
105
123
|
4. MCP schema updates only after the runtime contract is implemented.
|
|
106
124
|
|
|
107
125
|
The source profile alone does not make a target material kind supported.
|
|
126
|
+
|
|
127
|
+
## 6. Mixed Material Rule
|
|
128
|
+
|
|
129
|
+
`mixed` is a public `TargetMaterialKind` value, but it is not a material parser.
|
|
130
|
+
Runtime must choose one of these behaviors before observation:
|
|
131
|
+
|
|
132
|
+
| Behavior | Requirement |
|
|
133
|
+
|---|---|
|
|
134
|
+
| supported composite | Runtime writes per-member material classification, dispatches only supported member profiles, and preserves cross-material refs in inventory and observations. |
|
|
135
|
+
| partial composite | Runtime observes supported members, records unsupported members separately, and exposes the downstream authority limit. |
|
|
136
|
+
| unsupported | Runtime halts or asks for clarification with a stable unsupported reason before adapter dispatch. |
|
|
137
|
+
|
|
138
|
+
No source profile may treat `mixed` as a shortcut for reading a bundle with one
|
|
139
|
+
adapter. Cross-material semantic meaning remains LLM-owned and must be grounded
|
|
140
|
+
in per-member observations plus validated cross-material refs.
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Reconstruct Top-Level Concept Discovery Contract
|
|
2
|
+
|
|
3
|
+
> Status: design contract.
|
|
4
|
+
> Purpose: define how `reconstruct` discovers purpose-relative top-level
|
|
5
|
+
> concepts for an ontology Seed without turning the Seed into a broad claim
|
|
6
|
+
> ledger or a full ontology draft.
|
|
7
|
+
|
|
8
|
+
## 1. Position
|
|
9
|
+
|
|
10
|
+
`reconstruct` Seed generation is a top-level concept discovery process.
|
|
11
|
+
|
|
12
|
+
The Seed is not the full ontology. It is not a complete list of entities,
|
|
13
|
+
relations, actions, properties, rules, implementation details, or all possible
|
|
14
|
+
evidence-backed claims. Its purpose is to identify the smallest stable set of
|
|
15
|
+
top-level concepts that explains the declared purpose of the target material,
|
|
16
|
+
with explicit boundaries, evidence, open questions, and deferred lower-level
|
|
17
|
+
details.
|
|
18
|
+
|
|
19
|
+
Top-level concepts are purpose-relative. They are not the highest possible
|
|
20
|
+
abstractions in a universal hierarchy. A concept is top-level for a reconstruct
|
|
21
|
+
run when it is the most useful stable axis for explaining the declared purpose
|
|
22
|
+
from the observed source evidence.
|
|
23
|
+
|
|
24
|
+
Example:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
RawIngestEvent
|
|
28
|
+
-> Usage Event
|
|
29
|
+
-> Usage Activity
|
|
30
|
+
-> User Behavior
|
|
31
|
+
-> Organizational Knowledge Flow
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For an AI usage dashboard Seed, `Usage Event` may be a top-level concept while
|
|
35
|
+
`Organizational Knowledge Flow` is too abstract and `RawIngestEvent` is usually
|
|
36
|
+
a lower-level implementation detail.
|
|
37
|
+
|
|
38
|
+
## 2. Ownership Boundary
|
|
39
|
+
|
|
40
|
+
Runtime owns material-aware observation, source inventories, artifact refs,
|
|
41
|
+
validation gates, deterministic metrics, and source frontier boundary checks.
|
|
42
|
+
|
|
43
|
+
The host LLM owns semantic grouping, abstraction-level judgment, top-level
|
|
44
|
+
concept naming, boundary explanation, relation interpretation, convergence
|
|
45
|
+
interpretation, and final user-facing explanation.
|
|
46
|
+
|
|
47
|
+
Runtime must not decide that a source symbol, spreadsheet range, document
|
|
48
|
+
section, database table, UI component, or service method is a top-level concept.
|
|
49
|
+
Runtime may validate that LLM-authored top-level concept artifacts cite known
|
|
50
|
+
evidence refs and preserve declared artifact shape.
|
|
51
|
+
|
|
52
|
+
## 3. Design-Local Terms
|
|
53
|
+
|
|
54
|
+
These names are design-contract terms until promoted through the concept
|
|
55
|
+
registration gate in `reconstruct-boundary-contract.md`.
|
|
56
|
+
|
|
57
|
+
| Term | Seat | Meaning |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `TopLevelConcept` | reconstruct-local semantic artifact candidate | Purpose-relative concept that explains multiple lower-level observations and remains stable across likely implementation changes. |
|
|
60
|
+
| `TopLevelConceptSet` | reconstruct-local semantic artifact candidate | Small selected set of top-level concepts for the declared purpose. |
|
|
61
|
+
| `LowerLevelDetail` | design shorthand | Source-specific field, method, component, rule, property, table, sheet, or claim that should support a top-level concept rather than become the Seed center. |
|
|
62
|
+
| `TopLevelnessPressure` | design shorthand | Unresolved reason that may change the selected concept set, concept boundary, or core relation. |
|
|
63
|
+
| `ConceptConvergence` | design shorthand | State where further source exploration is expected to refine evidence or details rather than materially change the top-level concept set, boundaries, or core relations. |
|
|
64
|
+
|
|
65
|
+
Do not introduce these names as TypeScript types, MCP fields, public artifact
|
|
66
|
+
fields, or enum values before the concept registration gate is explicitly
|
|
67
|
+
closed.
|
|
68
|
+
|
|
69
|
+
## 4. Discovery Strategy
|
|
70
|
+
|
|
71
|
+
Top-level concept discovery uses bottom-up observation, top-down purpose
|
|
72
|
+
constraint, and graph compression.
|
|
73
|
+
|
|
74
|
+
The process is not "keep climbing the hierarchy." It alternates between lifting
|
|
75
|
+
source details into candidate concepts and grounding those candidates back into
|
|
76
|
+
the declared purpose and observed evidence.
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
material-aware source observations
|
|
80
|
+
-> local semantic labels and gaps
|
|
81
|
+
-> candidate concept clusters
|
|
82
|
+
-> abstraction-level tests
|
|
83
|
+
-> top-level concept set
|
|
84
|
+
-> source frontier aligned to unresolved top-levelness pressure
|
|
85
|
+
-> convergence assessment
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4.1 Collect Local Candidates
|
|
89
|
+
|
|
90
|
+
The first semantic pass may name many local candidates from files, symbols,
|
|
91
|
+
tables, fields, formulas, headings, UI components, services, actions, states,
|
|
92
|
+
rules, and document claims. This pass should avoid deciding top-level status too
|
|
93
|
+
early.
|
|
94
|
+
|
|
95
|
+
Local candidates are evidence-bearing raw material for clustering. They are not
|
|
96
|
+
Seed output by default.
|
|
97
|
+
|
|
98
|
+
### 4.2 Cluster By Purpose Role
|
|
99
|
+
|
|
100
|
+
Local candidates should be clustered by the role they play in explaining the
|
|
101
|
+
declared purpose:
|
|
102
|
+
|
|
103
|
+
- shared lifecycle
|
|
104
|
+
- shared user-facing meaning
|
|
105
|
+
- shared source flow
|
|
106
|
+
- shared ownership or authority
|
|
107
|
+
- shared change fate
|
|
108
|
+
- repeated co-occurrence across material slices
|
|
109
|
+
- ability to explain multiple lower-level observations
|
|
110
|
+
|
|
111
|
+
Example for an AI usage dashboard:
|
|
112
|
+
|
|
113
|
+
| Local candidates | Candidate top-level concept |
|
|
114
|
+
|---|---|
|
|
115
|
+
| session row, session metrics, session context, session classification | `Usage Session` |
|
|
116
|
+
| raw payload, ingest event, fingerprint, deduplication status | `Usage Event` |
|
|
117
|
+
| billing aggregate, cost KPI, token cost, provider cost | `Usage Cost` |
|
|
118
|
+
| page, KPI cards, session table, analytics summary | `Dashboard View` |
|
|
119
|
+
|
|
120
|
+
### 4.3 Test Abstraction Level
|
|
121
|
+
|
|
122
|
+
Each candidate must pass both upward and downward tests.
|
|
123
|
+
|
|
124
|
+
Upward test:
|
|
125
|
+
|
|
126
|
+
- Does this candidate explain multiple lower-level observations?
|
|
127
|
+
- Does it survive likely implementation changes?
|
|
128
|
+
- Is it necessary to explain the declared purpose?
|
|
129
|
+
- Can a user understand it without reading implementation names?
|
|
130
|
+
|
|
131
|
+
Downward test:
|
|
132
|
+
|
|
133
|
+
- Is it still grounded in concrete evidence?
|
|
134
|
+
- Does it avoid becoming a generic business abstraction?
|
|
135
|
+
- Does it preserve enough boundary detail to guide later ontology work?
|
|
136
|
+
- Does it avoid hiding materially different concepts that must be split?
|
|
137
|
+
|
|
138
|
+
The target is the stable middle level that explains the purpose, not the most
|
|
139
|
+
abstract reachable parent.
|
|
140
|
+
|
|
141
|
+
### 4.4 Select A Small Concept Set
|
|
142
|
+
|
|
143
|
+
The Seed should prefer a compact top-level concept set. The normal target range
|
|
144
|
+
is small enough for a user to inspect in one pass, usually 3-7 concepts for a
|
|
145
|
+
bounded product slice.
|
|
146
|
+
|
|
147
|
+
The concept set may be larger when the declared purpose or target bundle is
|
|
148
|
+
explicitly broad, but growth must be justified by purpose coverage, not by
|
|
149
|
+
implementation surface area.
|
|
150
|
+
|
|
151
|
+
### 4.5 Demote Lower-Level Detail
|
|
152
|
+
|
|
153
|
+
Implementation details, fields, service methods, UI widgets, spreadsheet cells,
|
|
154
|
+
schema columns, narrow rules, and action-level claims should be demoted unless
|
|
155
|
+
they independently satisfy the top-level tests.
|
|
156
|
+
|
|
157
|
+
Demotion does not discard evidence. The detail should be attached to one of:
|
|
158
|
+
|
|
159
|
+
- `included_lower_concepts`
|
|
160
|
+
- `supporting_evidence`
|
|
161
|
+
- `deferred_detail_candidates`
|
|
162
|
+
- `open_questions`
|
|
163
|
+
- `boundary_notes`
|
|
164
|
+
|
|
165
|
+
## 5. Top-Levelness Criteria
|
|
166
|
+
|
|
167
|
+
A top-level concept candidate is strong when it satisfies most of the criteria
|
|
168
|
+
below.
|
|
169
|
+
|
|
170
|
+
| Criterion | Question |
|
|
171
|
+
|---|---|
|
|
172
|
+
| Purpose criticality | Would the declared purpose become hard to explain without this concept? |
|
|
173
|
+
| Explanatory compression | Does it explain multiple lower-level observations without losing important distinctions? |
|
|
174
|
+
| Boundary clarity | Can the run state what belongs under this concept and what is excluded or deferred? |
|
|
175
|
+
| Relation centrality | Does it participate in core relations with other selected concepts? |
|
|
176
|
+
| Material grounding | Is it supported by concrete source observations from the current material boundary? |
|
|
177
|
+
| User-facing intelligibility | Can the concept be named in service language, not only implementation language? |
|
|
178
|
+
| Evolution stability | Would the concept likely survive refactors, UI rewrites, schema reshaping, or source-format changes? |
|
|
179
|
+
| Split pressure | Is there no unresolved material reason to split it now? |
|
|
180
|
+
| Merge pressure | Is there no unresolved material reason to merge it with another selected concept now? |
|
|
181
|
+
|
|
182
|
+
No single criterion is sufficient. Frequent source mentions or central code
|
|
183
|
+
location do not by themselves make a concept top-level.
|
|
184
|
+
|
|
185
|
+
## 6. Source Frontier Alignment
|
|
186
|
+
|
|
187
|
+
Source frontier selection must align to top-level concept convergence.
|
|
188
|
+
|
|
189
|
+
The frontier should not ask "what else can be read?" It should ask "what source
|
|
190
|
+
could materially change the selected top-level concept set, concept boundaries,
|
|
191
|
+
core relations, or convergence confidence?"
|
|
192
|
+
|
|
193
|
+
Each LLM-authored frontier ref should carry the decision pressure it is meant
|
|
194
|
+
to resolve.
|
|
195
|
+
|
|
196
|
+
Recommended semantic payload:
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
frontier_refs:
|
|
200
|
+
- source_ref: src/services/usage-mart.service.ts
|
|
201
|
+
frontier_question: Is UsageMart a top-level concept or a lower-level read model under Usage Cost or Dashboard View?
|
|
202
|
+
target_concepts:
|
|
203
|
+
- Usage Cost
|
|
204
|
+
- Dashboard View
|
|
205
|
+
- Usage Mart
|
|
206
|
+
pressure_type: split_or_demote
|
|
207
|
+
expected_decision_impact: May demote UsageMart from top-level concept to supporting detail.
|
|
208
|
+
priority: high
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
The exact public artifact field names remain subject to the registration gate.
|
|
212
|
+
Until then, runtime may preserve this information inside existing rationale
|
|
213
|
+
fields or design-local prompt payloads.
|
|
214
|
+
|
|
215
|
+
Valid frontier pressure categories:
|
|
216
|
+
|
|
217
|
+
| Pressure | Use when |
|
|
218
|
+
|---|---|
|
|
219
|
+
| `missing_axis` | The declared purpose may require a top-level concept not yet represented. |
|
|
220
|
+
| `split_or_merge` | Two candidates may be the same concept, or one candidate may hide two materially different concepts. |
|
|
221
|
+
| `boundary` | The concept's included and excluded lower-level details are unclear. |
|
|
222
|
+
| `core_relation` | The relation between selected concepts may be wrong or incomplete. |
|
|
223
|
+
| `abstraction_level` | A candidate may be too implementation-specific or too generic. |
|
|
224
|
+
| `evidence_saturation` | The run needs to know whether additional source will introduce new top-level concepts or only reinforce existing ones. |
|
|
225
|
+
|
|
226
|
+
Frontier requests that only gather lower-level implementation detail are valid
|
|
227
|
+
only when that detail can resolve one of these pressures.
|
|
228
|
+
|
|
229
|
+
## 7. Convergence Conditions
|
|
230
|
+
|
|
231
|
+
Top-level concept discovery converges when further source exploration is
|
|
232
|
+
expected to refine evidence, properties, rules, or lower-level details, but is
|
|
233
|
+
not expected to materially change the selected top-level concept set, each
|
|
234
|
+
concept's boundary, or the core relations between concepts for the declared
|
|
235
|
+
purpose.
|
|
236
|
+
|
|
237
|
+
Convergence is not the absence of all issues. It is a bounded claim about the
|
|
238
|
+
stability of the top-level concept set.
|
|
239
|
+
|
|
240
|
+
The run may report one of three convergence states:
|
|
241
|
+
|
|
242
|
+
| State | Meaning | Typical next action |
|
|
243
|
+
|---|---|---|
|
|
244
|
+
| `not_converged` | Top-level concept candidates, boundaries, or relations are still changing materially. | Continue source frontier exploration. |
|
|
245
|
+
| `provisionally_converged` | The main concept set is stable, but some split, merge, boundary, or deferred-detail questions remain. | Present Seed with disclosed limits and revision proposals. |
|
|
246
|
+
| `converged_for_seed` | Purpose coverage, concept boundaries, and core relations are stable enough for Seed handoff. | Present Seed as the current top-level concept discovery result. |
|
|
247
|
+
|
|
248
|
+
Signals for convergence:
|
|
249
|
+
|
|
250
|
+
- selected concept set is stable across the latest exploration round
|
|
251
|
+
- new observations map into existing concepts rather than creating new top-level
|
|
252
|
+
concepts
|
|
253
|
+
- remaining issues concern evidence depth, properties, rules, or lower-level
|
|
254
|
+
details
|
|
255
|
+
- no lens raises a material objection that a selected concept is too broad, too
|
|
256
|
+
narrow, too generic, too implementation-specific, missing, or duplicated
|
|
257
|
+
- next frontier value is expected to improve confidence rather than change the
|
|
258
|
+
concept set
|
|
259
|
+
|
|
260
|
+
Signals against convergence:
|
|
261
|
+
|
|
262
|
+
- a new source slice introduces a previously missing purpose axis
|
|
263
|
+
- selected concepts repeatedly require split or merge
|
|
264
|
+
- relation direction between selected concepts changes
|
|
265
|
+
- a selected concept cannot state included and excluded detail
|
|
266
|
+
- a concept is only a code artifact, UI widget, schema artifact, spreadsheet
|
|
267
|
+
range, or document section with no purpose-level role
|
|
268
|
+
- the concept set explains source structure but not the declared purpose
|
|
269
|
+
|
|
270
|
+
## 8. Seed Output Shape
|
|
271
|
+
|
|
272
|
+
The Seed should center top-level concepts. Current artifacts may continue to use
|
|
273
|
+
existing Seed claim fields while the contract migrates, but the semantic shape
|
|
274
|
+
should project to:
|
|
275
|
+
|
|
276
|
+
```yaml
|
|
277
|
+
purpose:
|
|
278
|
+
claim_id:
|
|
279
|
+
name:
|
|
280
|
+
statement:
|
|
281
|
+
evidence_refs:
|
|
282
|
+
top_level_concepts:
|
|
283
|
+
- concept_id:
|
|
284
|
+
name:
|
|
285
|
+
definition:
|
|
286
|
+
why_top_level:
|
|
287
|
+
evidence_refs:
|
|
288
|
+
included_lower_concepts:
|
|
289
|
+
excluded_or_deferred_details:
|
|
290
|
+
core_relations:
|
|
291
|
+
open_questions:
|
|
292
|
+
confidence:
|
|
293
|
+
top_level_relations:
|
|
294
|
+
- relation_id:
|
|
295
|
+
source_concept_id:
|
|
296
|
+
target_concept_id:
|
|
297
|
+
relation:
|
|
298
|
+
statement:
|
|
299
|
+
evidence_refs:
|
|
300
|
+
deferred_detail_candidates:
|
|
301
|
+
- name:
|
|
302
|
+
belongs_to_concept_id:
|
|
303
|
+
reason_deferred:
|
|
304
|
+
evidence_refs:
|
|
305
|
+
convergence:
|
|
306
|
+
state:
|
|
307
|
+
rationale:
|
|
308
|
+
remaining_pressures:
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
If existing `entities`, `relations`, `actions`, `properties`, and `rules`
|
|
312
|
+
fields are used before schema migration, they must be interpreted narrowly:
|
|
313
|
+
|
|
314
|
+
- `entities` should contain only top-level concept candidates or explicitly
|
|
315
|
+
marked provisional top-level entities.
|
|
316
|
+
- `relations` should contain only relations between top-level concepts.
|
|
317
|
+
- `actions`, `properties`, and `rules` should be sparse and limited to
|
|
318
|
+
purpose-level facts that affect top-level concept boundaries or relations.
|
|
319
|
+
- lower-level actions, properties, rules, fields, methods, UI elements, and
|
|
320
|
+
schema details should move to deferred detail or supporting notes.
|
|
321
|
+
|
|
322
|
+
## 9. Lens Responsibilities
|
|
323
|
+
|
|
324
|
+
Reconstruct lenses should evaluate top-level concept discovery rather than
|
|
325
|
+
merely collecting claim improvements.
|
|
326
|
+
|
|
327
|
+
| Lens | Discovery question |
|
|
328
|
+
|---|---|
|
|
329
|
+
| semantics | Are the concept names and definitions meaningfully distinct and grounded? |
|
|
330
|
+
| structure | Is the concept set neither over-split nor over-merged? |
|
|
331
|
+
| dependency | Do selected concepts have stable dependency and flow relations? |
|
|
332
|
+
| pragmatics | Can target users understand and act on this concept set? |
|
|
333
|
+
| evolution | Will the concepts survive likely implementation and material changes? |
|
|
334
|
+
| coverage | Does the set cover the declared purpose without missing a major axis? |
|
|
335
|
+
| logic | Are relations and boundaries coherent and non-contradictory? |
|
|
336
|
+
| conciseness | Is the Seed compact enough to serve as a Seed rather than a full ontology? |
|
|
337
|
+
| axiology | Does the concept set preserve what matters for trust, value, and declared purpose? |
|
|
338
|
+
|
|
339
|
+
Lens disagreement should be represented as split, merge, boundary, abstraction,
|
|
340
|
+
or missing-axis pressure when it can affect top-level convergence.
|
|
341
|
+
|
|
342
|
+
## 10. Validation Expectations
|
|
343
|
+
|
|
344
|
+
Runtime validation should remain deterministic. It can validate:
|
|
345
|
+
|
|
346
|
+
- artifact shape
|
|
347
|
+
- required fields
|
|
348
|
+
- known evidence refs
|
|
349
|
+
- duplicate ids
|
|
350
|
+
- relation endpoints referencing known top-level concepts
|
|
351
|
+
- every top-level concept having at least one evidence ref
|
|
352
|
+
- every top-level concept having a boundary statement
|
|
353
|
+
- convergence state being one of the allowed values once promoted
|
|
354
|
+
|
|
355
|
+
Runtime should not validate semantic truth such as whether `Usage Session` is
|
|
356
|
+
really the right top-level concept. That remains LLM-authored and lens-reviewed.
|
|
357
|
+
|
|
358
|
+
## 11. Non-Goals
|
|
359
|
+
|
|
360
|
+
This contract does not require:
|
|
361
|
+
|
|
362
|
+
- a full ontology graph
|
|
363
|
+
- exhaustive entity extraction
|
|
364
|
+
- automatic semantic repair by runtime
|
|
365
|
+
- a universal hierarchy of concepts
|
|
366
|
+
- reading every source file
|
|
367
|
+
- turning every source detail into a Seed claim
|
|
368
|
+
- declaring lower-level implementation details final
|
|
369
|
+
|
|
370
|
+
## 12. Implementation Path
|
|
371
|
+
|
|
372
|
+
Recommended implementation order:
|
|
373
|
+
|
|
374
|
+
1. Update the Seed author prompt to make top-level concept discovery the primary
|
|
375
|
+
objective.
|
|
376
|
+
2. Add compact prompt payloads that pass candidate labels, gaps, evidence ids,
|
|
377
|
+
and unresolved top-levelness pressure rather than full artifacts.
|
|
378
|
+
3. Add a design-local top-level concept projection in final output before
|
|
379
|
+
changing public schema.
|
|
380
|
+
4. Add Seed validation checks for required `name`, boundary, evidence, compact
|
|
381
|
+
concept set, and relation endpoints.
|
|
382
|
+
5. Add frontier rationale fields or prompt requirements that align every
|
|
383
|
+
source frontier request to top-level concept pressure.
|
|
384
|
+
6. Add convergence projection to metrics and final output.
|
|
385
|
+
7. Promote stable names through `.onto/authority/core-lexicon.yaml` only after
|
|
386
|
+
the artifact shape has stabilized.
|
|
387
|
+
|
|
@@ -226,6 +226,14 @@ binding_notes:
|
|
|
226
226
|
recommendation, explicit token, 주체자 확인 결과를
|
|
227
227
|
최종 값으로 materialize한 결과여야 한다.
|
|
228
228
|
|
|
229
|
+
단, interpretation/config 단계에서 explicit domain이 없고 configured domain도
|
|
230
|
+
없으면 runtime은 review target의 path/content/intent와 available domain 문서의
|
|
231
|
+
bounded signal을 비교해 `domain_final_selection`을 자동 materialize할 수 있다.
|
|
232
|
+
이 경우 `selection_mode`는 target 기반 자동 선택임을 드러내야 하며,
|
|
233
|
+
왜 해당 domain을 골랐는지는 `binding_notes`에 사용자에게 설명 가능한 문장으로
|
|
234
|
+
남긴다. 충분한 signal이 없어서 `none`으로 가는 경우도 같은 방식으로 이유를
|
|
235
|
+
남긴다.
|
|
236
|
+
|
|
229
237
|
---
|
|
230
238
|
|
|
231
239
|
## 7. Prompt / MCP / Runtime Effect
|