semantic-atlas 0.1.0 → 0.1.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/.agents/skills/semantic-atlas/SKILL.md +133 -152
- package/.agents/skills/semantic-atlas/references/graph-patch.md +74 -10
- package/.agents/skills/semantic-atlas/references/snapshot-bootstrap.md +53 -0
- package/README.md +14 -12
- package/dist/cli/bin.js +9 -1
- package/dist/evaluation/contracts.d.ts +88 -0
- package/dist/evaluation/contracts.d.ts.map +1 -1
- package/dist/evaluation/contracts.js +139 -0
- package/docs/evaluation.md +46 -5
- package/docs/product-contract.md +16 -16
- package/package.json +15 -16
- package/schemas/evaluation-run-v1.schema.json +310 -19
|
@@ -1,172 +1,153 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: semantic-atlas
|
|
3
|
-
description: "Use Semantic Atlas
|
|
3
|
+
description: "Use Semantic Atlas as the required first business-understanding loop in supported TypeScript or JavaScript repositories before feature implementation, bug fixing, debugging, refactoring, behavior-changing review, business-flow tracing, invariant and test discovery, or dependency or impact analysis. Git-only release work, mechanical formatting, unrelated documentation, and unsupported repositories stay in normal workflows."
|
|
4
4
|
compatibility: "Requires Node.js 22.12 through 24 and the semantic-atlas CLI."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Semantic Atlas
|
|
8
8
|
|
|
9
|
-
Use the local, deterministic Atlas world map as the first
|
|
10
|
-
surface. Source code remains authoritative; Atlas
|
|
11
|
-
projection that supplies bounded
|
|
12
|
-
explicit structural limits.
|
|
13
|
-
|
|
14
|
-
The calling Agent owns
|
|
15
|
-
CLI accepts lexical
|
|
16
|
-
structured GraphPatch; it does not interpret
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
3.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
query returns an error envelope, warnings, no relevant results, or competing
|
|
88
|
-
candidates.
|
|
89
|
-
|
|
90
|
-
## Bounded source fallback
|
|
91
|
-
|
|
92
|
-
1. Assemble the smallest source seed set from current result locations,
|
|
93
|
-
evidence, structural IDs, unknown owners, and finite candidates.
|
|
94
|
-
2. Open the cited ranges and enough surrounding code to understand the owning
|
|
95
|
-
declaration. Follow only the imports, callers, callees, interfaces, data, or
|
|
96
|
-
tests required by the task.
|
|
97
|
-
3. Reformulate one Atlas query when source supplies a more precise business or
|
|
98
|
-
symbol term. This often reconnects the task to mapped context.
|
|
99
|
-
4. When Atlas supplies no usable seed, run a narrow ordinary source search for
|
|
100
|
-
the task's most distinctive identifier or contract, then continue the normal
|
|
101
|
-
source workflow from confirmed results.
|
|
102
|
-
5. Base the conclusion on source for every stale, hypothesis, unknown,
|
|
103
|
-
unsupported, ambiguous, or map-insufficient portion. Retain the boundary in
|
|
104
|
-
the answer when source inspection cannot resolve it.
|
|
105
|
-
|
|
106
|
-
This fallback bounds discovery without replacing the calling Agent's generic
|
|
107
|
-
source-reading and search capabilities.
|
|
9
|
+
Use the local, deterministic Atlas world map as the first business-understanding
|
|
10
|
+
surface for every supported task. Source code remains authoritative; Atlas is a
|
|
11
|
+
revision-aware projection that supplies bounded evidence, business context,
|
|
12
|
+
certainty, validity, and explicit structural limits.
|
|
13
|
+
|
|
14
|
+
The calling Agent owns task interpretation, source changes, tests, Git, and
|
|
15
|
+
review. The CLI accepts lexical queries, graph identifiers, snapshot identifiers,
|
|
16
|
+
and structured GraphPatch input; it does not interpret natural-language tasks.
|
|
17
|
+
|
|
18
|
+
## Required business-understanding loop
|
|
19
|
+
|
|
20
|
+
1. Identify the exact target Git worktree before any Atlas command. Run from
|
|
21
|
+
that worktree or pass its absolute path with `--repo <path>`, and confirm the
|
|
22
|
+
response `repository.root` is the intended worktree.
|
|
23
|
+
2. Run one Atlas CLI command at a time and wait for its complete response. The
|
|
24
|
+
worktree-local database and publication lifecycle form a serialized evidence
|
|
25
|
+
boundary.
|
|
26
|
+
3. Start with `semantic-atlas status` before broad source discovery. Read the
|
|
27
|
+
versioned envelope, `data.freshness`, snapshot, warnings, and
|
|
28
|
+
`data.backend.completeness` by stable fields and codes.
|
|
29
|
+
4. Complete the matching procedure in [Conditional references](#conditional-references)
|
|
30
|
+
as soon as the observed status needs indexing or bootstrap.
|
|
31
|
+
5. Query the current map with compact task vocabulary before broad source
|
|
32
|
+
search. Let map evidence, owners, candidates, and unknown boundaries define
|
|
33
|
+
the initial source seed set.
|
|
34
|
+
6. Classify the map response and complete every triggered reference before
|
|
35
|
+
source confirmation. Relevant structural nodes with no relevant business
|
|
36
|
+
node trigger snapshot bootstrap; weak, partial, unknown, unsupported, or
|
|
37
|
+
otherwise insufficient results trigger result routing.
|
|
38
|
+
7. Open cited ranges and confirm decisive behavior in authoritative source.
|
|
39
|
+
Follow only the dependencies, interfaces, data, invariants, or tests needed
|
|
40
|
+
to answer or change the behavior.
|
|
41
|
+
8. Perform implementation, debugging, testing, and review through the normal
|
|
42
|
+
engineering workflow.
|
|
43
|
+
9. Reconcile relevant source changes with Atlas, then make the mandatory
|
|
44
|
+
knowledge-capture decision before completing the task.
|
|
45
|
+
|
|
46
|
+
## Query before broad source discovery
|
|
47
|
+
|
|
48
|
+
Extract two to four compact concepts from the task: business vocabulary,
|
|
49
|
+
likely symbols, interfaces or data, and dependency or impact terms. Query them
|
|
50
|
+
in this order as useful:
|
|
51
|
+
|
|
52
|
+
1. Use `semantic-atlas map search <query> [--limit <n>]` for each distinct
|
|
53
|
+
lexical concept.
|
|
54
|
+
2. Use `semantic-atlas map show <node-id> [--depth <n>]` on promising business
|
|
55
|
+
or structural nodes. Begin at depth 1 and expand to 2 or 3 only for a needed
|
|
56
|
+
dependency path.
|
|
57
|
+
3. Use `semantic-atlas map children <node-id>` to descend business `part_of` or
|
|
58
|
+
structural `contains` hierarchies.
|
|
59
|
+
4. Use `semantic-atlas map roots` when the task crosses capabilities, the
|
|
60
|
+
initial vocabulary is weak, or the current map has no relevant business root.
|
|
61
|
+
|
|
62
|
+
When search and roots return relevant structural nodes but no relevant business
|
|
63
|
+
node, read snapshot bootstrap before opening source. That state starts the
|
|
64
|
+
incremental business-map path rather than the abnormal-result path alone.
|
|
65
|
+
|
|
66
|
+
Treat search score as ranking rather than certainty. Stop map traversal when it
|
|
67
|
+
identifies the necessary symbols, files, relationships, evidence, and explicit
|
|
68
|
+
uncertainty. If the map remains weak, use its best seeds for bounded source
|
|
69
|
+
inspection and route the observed weak state through the conditional reference.
|
|
70
|
+
|
|
71
|
+
## Source authority
|
|
72
|
+
|
|
73
|
+
Confirm every answer-controlling or change-controlling claim in source even
|
|
74
|
+
when Atlas reports `valid` plus `exact`. Keep structural support, business
|
|
75
|
+
certainty, and evidence validity separate:
|
|
76
|
+
|
|
77
|
+
- `exact` identifies uniquely supported structure or business evidence;
|
|
78
|
+
- `inferred` is supported Agent synthesis that remains distinguishable from an
|
|
79
|
+
exact fact;
|
|
80
|
+
- `hypothesis` remains an exploration lead;
|
|
81
|
+
- `stale`, `unknown`, `unsupported`, `partial`, and `insufficient` results bound
|
|
82
|
+
source fallback rather than authorizing a decisive claim.
|
|
83
|
+
|
|
84
|
+
Preserve every owner-linked unknown boundary with its reason, location, and
|
|
85
|
+
finite candidates. Source inspection may resolve the task while the Atlas
|
|
86
|
+
boundary remains honestly unknown.
|
|
108
87
|
|
|
109
88
|
## After source changes
|
|
110
89
|
|
|
111
|
-
1. Preserve the pre-change current snapshot ID when
|
|
112
|
-
|
|
113
|
-
2. Complete source
|
|
114
|
-
3. Run `semantic-atlas index` after relevant source changes
|
|
115
|
-
|
|
116
|
-
4. Run `semantic-atlas changes`;
|
|
117
|
-
`--to <snapshot-id>`
|
|
90
|
+
1. Preserve the pre-change current snapshot ID when impact or semantic change
|
|
91
|
+
matters.
|
|
92
|
+
2. Complete source changes and relevant tests through the normal workflow.
|
|
93
|
+
3. Run `semantic-atlas index` after relevant source changes and require a
|
|
94
|
+
current, complete publication before trusting the refreshed map.
|
|
95
|
+
4. Run `semantic-atlas changes`; use `--from <snapshot-id>` and
|
|
96
|
+
`--to <snapshot-id>` for an explicit persisted range.
|
|
118
97
|
5. Inspect node and relation additions, changes, removals, and
|
|
119
|
-
`staleAssertions`. Re-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
98
|
+
`staleAssertions`. Re-query affected concepts and confirm the result against
|
|
99
|
+
source and tests.
|
|
100
|
+
|
|
101
|
+
Treat a failed or incomplete publication as unavailable map state and retain
|
|
102
|
+
source as authority.
|
|
103
|
+
|
|
104
|
+
## Knowledge-capture decision
|
|
105
|
+
|
|
106
|
+
Before completing every supported task, classify the business meaning learned
|
|
107
|
+
during source confirmation:
|
|
108
|
+
|
|
109
|
+
- Persist every new durable, verified `Capability`, `Scenario`, `Operation`,
|
|
110
|
+
`Invariant`, `Interface`, or `Data` concept, plus every supported relationship
|
|
111
|
+
between them, when missing or insufficient Atlas knowledge caused the source
|
|
112
|
+
inspection.
|
|
113
|
+
- Keep transient or unverified observations only in task context. Examples
|
|
114
|
+
include debugging symptoms, one-off implementation notes, tentative runtime
|
|
115
|
+
paths, Git facts, and hypotheses that lack durable evidence.
|
|
116
|
+
- When current Atlas knowledge already expresses the verified business meaning,
|
|
117
|
+
reuse it and avoid a duplicate patch.
|
|
118
|
+
|
|
119
|
+
When durable knowledge exists, read GraphPatch authoring, recheck status, submit
|
|
120
|
+
one atomic patch with `semantic-atlas learn --stdin`, then run
|
|
121
|
+
`semantic-atlas map show <learned-key>` to verify current validity, certainty,
|
|
122
|
+
evidence, and relationships. The verified node must be reusable by a later
|
|
123
|
+
fresh task through normal map search and traversal.
|
|
124
|
+
|
|
125
|
+
## Conditional references
|
|
126
|
+
|
|
127
|
+
Load detailed procedures only after their matching observable state:
|
|
128
|
+
|
|
129
|
+
- Read [snapshot bootstrap](references/snapshot-bootstrap.md) only when status
|
|
130
|
+
reports `missing`, `stale`, or incomplete state; a current map has no relevant
|
|
131
|
+
business knowledge; or the user explicitly requests project initialization.
|
|
132
|
+
- Read [result routing](references/result-routing.md) only when a command returns
|
|
133
|
+
an error, warning, `hypothesis`, `unknown`, `unsupported`, `partial`, empty,
|
|
134
|
+
competing, or otherwise `insufficient` result.
|
|
135
|
+
- Read [GraphPatch authoring](references/graph-patch.md) only when the
|
|
136
|
+
knowledge-capture decision identifies durable verified knowledge to persist.
|
|
150
137
|
|
|
151
138
|
## Answer contract
|
|
152
139
|
|
|
153
|
-
Use Atlas internally as context rather than dumping raw envelopes.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
- identify stale, hypothesis, unknown, unsupported, ambiguous, or insufficient
|
|
159
|
-
portions and the source inspection used to handle them;
|
|
160
|
-
- cite the authoritative source and relevant verification for engineering
|
|
161
|
-
conclusions;
|
|
162
|
-
- mention reindexing, semantic changes, or learned knowledge when those actions
|
|
163
|
-
materially affect the result.
|
|
140
|
+
Use Atlas internally as context rather than dumping raw envelopes. State the
|
|
141
|
+
relevant business concepts, files, symbols, and relationships; distinguish
|
|
142
|
+
exact evidence from inference; identify unresolved boundaries and their source
|
|
143
|
+
fallback; cite authoritative source and verification; and mention reindexing,
|
|
144
|
+
semantic changes, or learned knowledge when they materially affect the result.
|
|
164
145
|
|
|
165
146
|
## Responsibility boundary
|
|
166
147
|
|
|
167
148
|
Semantic Atlas owns deterministic indexing, revision-aware map queries,
|
|
168
|
-
semantic change records, and evidence-bound business knowledge in local Atlas
|
|
169
|
-
|
|
149
|
+
semantic change records, and evidence-bound business knowledge in local Atlas data.
|
|
150
|
+
The calling Agent owns concept extraction, natural-language reasoning,
|
|
170
151
|
source editing, tests, Git operations, and review. Keep repository-specific
|
|
171
|
-
facts in Atlas or authoritative source
|
|
152
|
+
facts in Atlas or authoritative source and keep this Skill reusable across
|
|
172
153
|
repositories.
|
|
@@ -11,8 +11,9 @@ written to Semantic Atlas.
|
|
|
11
11
|
certainty, and evidence separately.
|
|
12
12
|
3. Current map output supplies every structural symbol ID, exact source range,
|
|
13
13
|
and file `contentHash` used as evidence.
|
|
14
|
-
4. The knowledge is reusable business meaning rather than a
|
|
15
|
-
implementation instruction, test result, Git fact,
|
|
14
|
+
4. The knowledge is durable, verified, reusable business meaning rather than a
|
|
15
|
+
task note, implementation instruction, test result, Git fact, debugging
|
|
16
|
+
symptom, or generic code summary.
|
|
16
17
|
|
|
17
18
|
Use the repository's `schemas/graph-patch-v1.schema.json` and
|
|
18
19
|
`docs/contracts/graph-patch-v1.md` as the normative contract when they are
|
|
@@ -20,20 +21,72 @@ available. The outline here is an authoring checklist.
|
|
|
20
21
|
|
|
21
22
|
## Patch shape
|
|
22
23
|
|
|
23
|
-
A patch is one strict JSON object
|
|
24
|
+
A patch is one strict JSON object. Every operation uses the discriminator `op`.
|
|
25
|
+
Relation endpoints are domain-tagged objects rather than key or ID strings:
|
|
24
26
|
|
|
25
27
|
```json
|
|
26
28
|
{
|
|
27
29
|
"schemaVersion": 1,
|
|
28
30
|
"baseSnapshotId": "<current 64-character snapshot ID>",
|
|
29
|
-
"nodeOperations": [
|
|
30
|
-
|
|
31
|
+
"nodeOperations": [
|
|
32
|
+
{
|
|
33
|
+
"op": "upsert",
|
|
34
|
+
"node": {
|
|
35
|
+
"key": "commerce/orders/place-order",
|
|
36
|
+
"kind": "Operation",
|
|
37
|
+
"label": "Place order",
|
|
38
|
+
"summary": "Creates and persists a customer order.",
|
|
39
|
+
"aliases": ["checkout"],
|
|
40
|
+
"certainty": "exact",
|
|
41
|
+
"evidence": [
|
|
42
|
+
{
|
|
43
|
+
"symbolId": "symbol:<current structural identity>",
|
|
44
|
+
"file": "src/orders/order.service.ts",
|
|
45
|
+
"range": {
|
|
46
|
+
"start": { "line": 18, "column": 3 },
|
|
47
|
+
"end": { "line": 24, "column": 4 }
|
|
48
|
+
},
|
|
49
|
+
"contentHash": "<current 64-character file hash>"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"relationOperations": [
|
|
56
|
+
{
|
|
57
|
+
"op": "upsert",
|
|
58
|
+
"relation": {
|
|
59
|
+
"from": {
|
|
60
|
+
"domain": "business",
|
|
61
|
+
"key": "commerce/orders/place-order"
|
|
62
|
+
},
|
|
63
|
+
"type": "realized_by",
|
|
64
|
+
"to": {
|
|
65
|
+
"domain": "structural",
|
|
66
|
+
"id": "symbol:<current structural identity>"
|
|
67
|
+
},
|
|
68
|
+
"certainty": "exact",
|
|
69
|
+
"evidence": [
|
|
70
|
+
{
|
|
71
|
+
"symbolId": "symbol:<current structural identity>",
|
|
72
|
+
"file": "src/orders/order.service.ts",
|
|
73
|
+
"range": {
|
|
74
|
+
"start": { "line": 18, "column": 3 },
|
|
75
|
+
"end": { "line": 24, "column": 4 }
|
|
76
|
+
},
|
|
77
|
+
"contentHash": "<current 64-character file hash>"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
31
83
|
}
|
|
32
84
|
```
|
|
33
85
|
|
|
34
|
-
Node
|
|
35
|
-
remove
|
|
36
|
-
|
|
86
|
+
Node removal uses `{ "op": "remove", "key": "..." }`. Relation removal uses
|
|
87
|
+
`op: "remove"` with the same domain-tagged `from`, `type`, and `to` selector but
|
|
88
|
+
without certainty or evidence. A single patch can create related nodes and
|
|
89
|
+
connect them atomically.
|
|
37
90
|
|
|
38
91
|
## Business vocabulary
|
|
39
92
|
|
|
@@ -55,10 +108,18 @@ Business relation types:
|
|
|
55
108
|
- `part_of`, `reads`, `writes`, `publishes`, `consumes`, and `constrained_by`
|
|
56
109
|
connect a business source to a business target;
|
|
57
110
|
- `realized_by` and `verified_by` connect a business source to a structural
|
|
58
|
-
|
|
111
|
+
`Symbol` or `Test` declaration returned by the current map. A `File` or
|
|
112
|
+
`Module` is navigation context, not a learned implementation or verification
|
|
113
|
+
target. When the backend exposes only a test file, cite that source in the
|
|
114
|
+
task result and omit `verified_by` until a declaration target is available.
|
|
59
115
|
|
|
60
116
|
Every learned relation originates at a business node.
|
|
61
117
|
|
|
118
|
+
- Every `from` is `{ "domain": "business", "key": "..." }`.
|
|
119
|
+
- A business target is `{ "domain": "business", "key": "..." }`.
|
|
120
|
+
- A structural target is `{ "domain": "structural", "id": "symbol:..." }` or
|
|
121
|
+
a current `test:...` declaration ID.
|
|
122
|
+
|
|
62
123
|
## Evidence
|
|
63
124
|
|
|
64
125
|
Every upserted node summary and relation includes at least one evidence item:
|
|
@@ -84,7 +145,10 @@ Certainty is independent from evidence freshness:
|
|
|
84
145
|
|
|
85
146
|
- `exact` means the evidence uniquely proves the assertion;
|
|
86
147
|
- `inferred` means the evidence supports an explicit Agent synthesis;
|
|
87
|
-
- `hypothesis`
|
|
148
|
+
- `hypothesis` is available in the GraphPatch contract for explicitly requested
|
|
149
|
+
exploratory records. The required task-completion capture keeps unverified
|
|
150
|
+
hypotheses in task context and persists only verified `exact` or `inferred`
|
|
151
|
+
knowledge.
|
|
88
152
|
|
|
89
153
|
Use one assertion per clear business meaning. Multiple source locations can
|
|
90
154
|
support one assertion; one nearby symbol should not stand in for an unproven
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Snapshot and business-map bootstrap
|
|
2
|
+
|
|
3
|
+
Read this reference after the required `status` call shows that the structural
|
|
4
|
+
snapshot needs publication, or after a current map proves that relevant
|
|
5
|
+
business knowledge is absent. Keep all commands serialized in the exact target
|
|
6
|
+
worktree.
|
|
7
|
+
|
|
8
|
+
## Publish structural state
|
|
9
|
+
|
|
10
|
+
1. For `missing`, `stale`, failed, or incomplete state, run
|
|
11
|
+
`semantic-atlas index` and inspect the returned envelope.
|
|
12
|
+
2. Run `semantic-atlas status` again. Continue with Atlas only when freshness is
|
|
13
|
+
`current` and backend completeness is `complete`.
|
|
14
|
+
3. Run `semantic-atlas map roots`. Structural `Module` roots are valid initial
|
|
15
|
+
navigation when no business `Capability` root exists.
|
|
16
|
+
4. Use source as authority while publication is unavailable. Read result routing
|
|
17
|
+
when the index or follow-up status contains warnings or errors.
|
|
18
|
+
|
|
19
|
+
## Bootstrap during a normal task
|
|
20
|
+
|
|
21
|
+
A normal task grows only the business area it actually verifies:
|
|
22
|
+
|
|
23
|
+
1. Search task vocabulary and inspect the closest structural owner, neighbors,
|
|
24
|
+
and finite unknown candidates.
|
|
25
|
+
2. Open the bounded source path required by the task and confirm the decisive
|
|
26
|
+
behavior.
|
|
27
|
+
3. Identify each durable business concept and relationship that the source now
|
|
28
|
+
proves but the current map lacks.
|
|
29
|
+
4. Follow GraphPatch authoring, submit those verified facts together, and verify
|
|
30
|
+
each learned entry through `semantic-atlas map show`.
|
|
31
|
+
5. Stop after the task-relevant capability is reusable. Leave unrelated roots
|
|
32
|
+
for later tasks.
|
|
33
|
+
|
|
34
|
+
## Bootstrap an explicitly requested project map
|
|
35
|
+
|
|
36
|
+
Treat project initialization as a bounded mapping task rather than an attempt
|
|
37
|
+
to describe every symbol:
|
|
38
|
+
|
|
39
|
+
1. Begin with `semantic-atlas map roots` and select the requested directories,
|
|
40
|
+
domains, or a small set of the most evidence-rich structural roots when the
|
|
41
|
+
request supplies no narrower boundary.
|
|
42
|
+
2. For each selected root, follow one representative path through public
|
|
43
|
+
interfaces, operations, data, invariants, and verification where present.
|
|
44
|
+
3. Confirm the controlling declarations in source and record the initialization
|
|
45
|
+
boundary in the task result.
|
|
46
|
+
4. Learn only durable verified capabilities and their supported child concepts
|
|
47
|
+
and relationships. Preserve unknown or unsupported behavior as boundaries,
|
|
48
|
+
not exact business facts.
|
|
49
|
+
5. Verify learned capability keys with `semantic-atlas map show`, then start a
|
|
50
|
+
fresh query from one learned term to prove the initial map is reusable.
|
|
51
|
+
|
|
52
|
+
Future tasks extend this initial map incrementally as they verify more business
|
|
53
|
+
behavior.
|
package/README.md
CHANGED
|
@@ -23,19 +23,19 @@ The installed runtime works offline. Indexing, graph queries, evidence validatio
|
|
|
23
23
|
|
|
24
24
|
## Install the Codex Skill
|
|
25
25
|
|
|
26
|
-
The Skill teaches Codex when to trust the map,
|
|
26
|
+
The Skill makes Atlas the required first business-understanding surface for supported TypeScript and JavaScript implementation, debugging, refactoring, behavior review, flow tracing, invariant discovery, and impact work. It teaches Codex when to trust the map, reindex, preserve unknown boundaries, inspect authoritative source, and capture newly verified business knowledge. In Codex, invoke the built-in installer with the repository-owned Skill URL:
|
|
27
27
|
|
|
28
28
|
```text
|
|
29
|
-
$skill-installer Install semantic-atlas from https://github.com/lzj960515/semantic-atlas/tree/v0.1.
|
|
29
|
+
$skill-installer Install semantic-atlas from https://github.com/lzj960515/semantic-atlas/tree/v0.1.1/.agents/skills/semantic-atlas
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
For repository development, Codex discovers the checked-in Skill automatically from `.agents/skills/semantic-atlas`. Codex detects newly installed skills automatically; restart Codex if it does not appear in the skill list.
|
|
33
33
|
|
|
34
|
-
Invoke it explicitly with `$semantic-atlas`, or let Codex select it
|
|
34
|
+
Invoke it explicitly with `$semantic-atlas`, or let Codex select it from the task through the Skill description. Git-only release work, mechanical formatting, unrelated documentation, and unsupported repositories remain normal workflows.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Required agent loop
|
|
37
37
|
|
|
38
|
-
Run
|
|
38
|
+
Run Atlas commands serially from the exact target worktree. `--repo <path>` can be supplied before the command when the current directory is elsewhere.
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
41
|
semantic-atlas status
|
|
@@ -45,14 +45,16 @@ semantic-atlas map search checkout --limit 10
|
|
|
45
45
|
semantic-atlas map show module:src --depth 1
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
For every supported business-behavior task, the agent loop is:
|
|
49
49
|
|
|
50
|
-
1. Check `status` before trusting stored knowledge.
|
|
51
|
-
2.
|
|
52
|
-
3.
|
|
53
|
-
4.
|
|
54
|
-
5. After source changes, reindex and inspect `changes
|
|
55
|
-
6.
|
|
50
|
+
1. Check `status` before broad source discovery or trusting stored knowledge.
|
|
51
|
+
2. Load the bootstrap procedure only when the snapshot needs publication, the current map lacks relevant business knowledge, or the user requests project initialization.
|
|
52
|
+
3. Query `map roots`, `map search`, `map children`, and `map show` to bound source exploration.
|
|
53
|
+
4. Confirm decisive behavior in authoritative source and preserve stale, unsupported, unresolved, ambiguous, or insufficient boundaries.
|
|
54
|
+
5. After relevant source changes, reindex and inspect `changes` before trusting the refreshed map.
|
|
55
|
+
6. Before completion, decide what source inspection taught: write every new durable verified business concept and relationship with `learn --stdin`, verify it through `map show`, and retain transient or unverified observations only in task context.
|
|
56
|
+
|
|
57
|
+
A normal task incrementally bootstraps only its relevant capability. An explicit project-initialization task starts at structural roots, inspects a stated bounded set of representative paths, and creates a reusable initial business map rather than attempting an exhaustive code inventory.
|
|
56
58
|
|
|
57
59
|
Every command writes one versioned JSON envelope to standard output. Diagnostics remain on standard error, so callers can parse output without scraping prose.
|
|
58
60
|
|
package/dist/cli/bin.js
CHANGED
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
const arguments_ = process.argv.slice(2);
|
|
5
|
-
if (
|
|
5
|
+
if (requiresSqliteCompatibilityProcess()) {
|
|
6
6
|
process.exitCode = await runWithExperimentalSqlite(arguments_);
|
|
7
7
|
}
|
|
8
8
|
else {
|
|
9
9
|
const { runCli } = await import("./main.js");
|
|
10
10
|
process.exitCode = await runCli(arguments_, { stdin: process.stdin, stdout: process.stdout, stderr: process.stderr }, process.cwd());
|
|
11
11
|
}
|
|
12
|
+
function requiresSqliteCompatibilityProcess() {
|
|
13
|
+
const nodeMajor = Number.parseInt(process.versions.node, 10);
|
|
14
|
+
const warningAlreadyDisabled = process.execArgv.some((argument) => (argument === "--no-warnings"
|
|
15
|
+
|| argument === "--disable-warning=ExperimentalWarning"));
|
|
16
|
+
if (nodeMajor < 24 && !warningAlreadyDisabled)
|
|
17
|
+
return true;
|
|
18
|
+
return process.getBuiltinModule("node:sqlite") === undefined;
|
|
19
|
+
}
|
|
12
20
|
async function runWithExperimentalSqlite(arguments_) {
|
|
13
21
|
const child = spawn(process.execPath, [
|
|
14
22
|
"--experimental-sqlite",
|