semantic-atlas 2.1.1 → 2.1.3

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 (44) hide show
  1. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +111 -86
  2. package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +55 -0
  3. package/README.md +23 -9
  4. package/README.zh-CN.md +18 -9
  5. package/dist/cli/observation-commands.d.ts +2 -1
  6. package/dist/cli/observation-commands.d.ts.map +1 -1
  7. package/dist/cli/observation-commands.js +19 -1
  8. package/dist/cli/observation-commands.js.map +1 -1
  9. package/dist/cli/reconciliation-command.d.ts +2 -1
  10. package/dist/cli/reconciliation-command.d.ts.map +1 -1
  11. package/dist/cli/reconciliation-command.js +32 -8
  12. package/dist/cli/reconciliation-command.js.map +1 -1
  13. package/dist/cli/run-cli.d.ts.map +1 -1
  14. package/dist/cli/run-cli.js +20 -4
  15. package/dist/cli/run-cli.js.map +1 -1
  16. package/dist/contracts/cli.d.ts +10 -0
  17. package/dist/contracts/cli.d.ts.map +1 -1
  18. package/dist/contracts/observation.d.ts +110 -1
  19. package/dist/contracts/observation.d.ts.map +1 -1
  20. package/dist/contracts/observation.js +70 -0
  21. package/dist/contracts/observation.js.map +1 -1
  22. package/dist/contracts/reconciliation.d.ts +11 -1
  23. package/dist/contracts/reconciliation.d.ts.map +1 -1
  24. package/dist/index.d.ts +4 -4
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/observations/observation-application.d.ts +6 -0
  29. package/dist/observations/observation-application.d.ts.map +1 -1
  30. package/dist/observations/observation-application.js +34 -1
  31. package/dist/observations/observation-application.js.map +1 -1
  32. package/dist/observations/observation-store.d.ts +8 -1
  33. package/dist/observations/observation-store.d.ts.map +1 -1
  34. package/dist/observations/observation-store.js +22 -4
  35. package/dist/observations/observation-store.js.map +1 -1
  36. package/dist/reconciliation/reconciliation-service.d.ts +1 -0
  37. package/dist/reconciliation/reconciliation-service.d.ts.map +1 -1
  38. package/dist/reconciliation/reconciliation-service.js +56 -3
  39. package/dist/reconciliation/reconciliation-service.js.map +1 -1
  40. package/docs/architecture.md +49 -22
  41. package/docs/index.md +3 -3
  42. package/docs/observations.md +51 -19
  43. package/docs/product-contract.md +22 -8
  44. package/package.json +1 -1
@@ -1,95 +1,82 @@
1
1
  ---
2
2
  name: semantic-atlas-maintenance
3
- description: Reconcile retained Semantic Atlas map-update candidates for one business domain into a source-supported, normally reviewed docs/business-map YAML change, with or without an existing business map. Use for post-integration maintenance, initial-domain bootstrap, drift cleanup, candidate triage, and domain-scoped reconciliation in repositories with local observations.
3
+ description: Reconcile current Semantic Atlas candidates for one business domain into a source-supported reviewed map update or evidence conclusion, then record the result after integration. Use for post-integration maintenance, initial-domain bootstrap, drift cleanup, candidate triage, and domain-scoped reconciliation with or without an existing business map.
4
4
  compatibility: Requires Node.js 24+, Git, the current semantic-atlas CLI, retained local observations, and repository source access.
5
5
  ---
6
6
 
7
7
  # Semantic Atlas Maintenance
8
8
 
9
- Turn retained investigation leads into one bounded, current-evidence map change.
10
- The candidate report preserves why a correction was proposed; current source,
11
- tests, tracked product documents, and required runtime evidence decide whether
12
- the canonical map changes.
9
+ Turn current candidate leads for one business domain into one independently
10
+ reviewable map update or evidence conclusion. Current source, tests, tracked product documents,
11
+ and required runtime evidence decide the result. Candidate
12
+ provenance explains where to investigate; it does not authorize a map edit.
13
13
 
14
- ## Prepare The Candidate Set
14
+ Read [references/reconciliation.md](references/reconciliation.md) before
15
+ classifying candidates. It defines evidence meaning, durable-content tests,
16
+ duplicate handling, maintenance-observation fields, and stopping conditions.
17
+
18
+ ## Work Phase
19
+
20
+ ### Load Current Actionable Candidates
15
21
 
16
- 1. Resolve the repository root and keep the maintenance work in its assigned
17
- worktree.
18
- 2. Run the read-only report:
22
+ 1. Resolve the repository root and work only in the assigned worktree.
23
+ 2. Run:
19
24
 
20
25
  ```bash
21
26
  semantic-atlas reconcile candidates --repo <absolute-repository-root>
22
27
  ```
23
28
 
24
- 3. Confirm the response is the v1 `reconcile candidates` envelope. Read each
25
- candidate's business-domain ownership, task evidence, `confirmed`,
26
- `contradicted`, or `unresolved` disposition, duplicate provenance, and
27
- linked independent reviews.
28
- 4. When the report contains no candidates, finish with a no-change result. An
29
- empty report is a complete maintenance outcome.
30
-
31
- ## Select One Business Domain
32
-
33
- Choose one business domain for the run. Keep candidates from other domains in
34
- the retained report for later maintenance. Within the selected domain, use
35
- linked approved reviews and repeated provenance to prioritize investigation;
36
- they strengthen the trail but remain evidence to verify rather than automatic
37
- map authority.
38
-
39
- Read [references/reconciliation.md](references/reconciliation.md) before
40
- classifying candidates. It defines the evidence meaning, durable-content test,
41
- duplicate handling, and clean stopping conditions.
42
-
43
- ## Confirm Current Business Meaning
44
-
45
- 1. Determine whether the selected domain already has an owning
46
- `docs/business-map/*.yaml` file. Preserve a `MAP_NOT_FOUND` result as the
47
- explicit bootstrap state.
48
- 2. Open every decisive current source, test, or tracked product document named
49
- by the candidate origins. Follow current callers or collaborators when the
50
- proposed relation changes both business endpoints.
51
- 3. Classify each candidate for this maintenance run:
52
- - `accepted`: current evidence supports the proposed durable correction;
53
- - `refined`: current evidence supports a narrower or differently worded
54
- durable correction;
55
- - `discarded`: the observation is implementation-local, stale in a way that
56
- no longer matters, or unsupported by current evidence;
57
- - `unresolved`: available evidence cannot decide stable business meaning.
58
- 4. Keep discarded and unresolved candidates outside the canonical map. Record
59
- their evidence-based reason in the maintenance result.
60
-
61
- ## Resolve One Owning YAML
62
-
63
- Use the selected business domain as the ownership boundary:
64
-
65
- - When the domain already has an owning YAML file, edit that file.
66
- - When the graph exists but the selected domain has no owning file, create one
67
- domain-owned YAML file that participates in complete-graph validation.
29
+ 3. Confirm the v1 `reconcile candidates` envelope. Select one business domain
30
+ from `data.domains`. Read each origin's exact `taskObservationId` and
31
+ `candidateIndex`, task evidence, linked independent reviews, duplicate
32
+ provenance, and any earlier unresolved maintenance history.
33
+ Treat task-time `confirmed`, `contradicted`, and `unresolved` dispositions as
34
+ investigation inputs rather than maintenance conclusions.
35
+ 4. When `data.domains` is empty, finish with a no-change result. A positive
36
+ `waitingForEvidenceOccurrences` means prior investigation remains retained
37
+ but does not justify immediately repeating the same work.
38
+
39
+ ### Confirm Current Business Meaning
40
+
41
+ Open every decisive current source, test, or tracked product document named by
42
+ the selected origins. Follow current callers and collaborators when a proposed
43
+ relation changes both endpoints. Use runtime evidence when deployed state owns
44
+ the conclusion.
45
+
46
+ Classify every selected origin:
47
+
48
+ - `accepted`: current evidence supports the proposed durable correction;
49
+ - `refined`: current evidence supports a narrower or differently worded durable
50
+ correction;
51
+ - `discarded`: current evidence shows implementation-local, obsolete, or
52
+ unsupported meaning that does not belong in the shared map;
53
+ - `unresolved`: available evidence cannot yet establish stable business meaning.
54
+
55
+ Keep discarded and unresolved results outside the canonical map. A correct
56
+ discard or unresolved conclusion is a complete work result and may have no Git
57
+ change.
58
+
59
+ ### Resolve And Edit One Owning YAML
60
+
61
+ - Edit the selected domain's existing owning `docs/business-map/*.yaml` file.
62
+ - When the graph exists without an owning file for this domain, create one
63
+ domain-owned YAML that participates in complete-graph validation.
68
64
  - When no map documents exist, create one initial business-domain YAML under
69
65
  `docs/business-map/`. Establish its stable domain ID, title, summary, root
70
- node, and bounded accepted concepts from current evidence.
66
+ node, and only the bounded accepted or refined meaning supported by current
67
+ evidence. Preserve `MAP_NOT_FOUND` as the explicit bootstrap condition.
71
68
 
72
69
  Limit the initial map to stable meaning supported by the selected candidates and current evidence.
73
- Retain cross-domain relations as unresolved until both durable endpoints and
74
- their owning domains can participate in one valid graph. The first map is a
75
- reviewable business-domain seed rather than a taxonomy inferred from repository
76
- structure.
77
-
78
- ## Edit One Owning YAML
79
-
80
- Apply accepted and refined corrections to one owning YAML surface for the
81
- selected business domain. This surface can be an existing domain file or the
82
- new initial domain file. Preserve stable node IDs when business identity is
83
- unchanged, use the source concept's owning file for directed relations, and keep
84
- anchors as navigation hints rather than current-behavior claims.
85
70
 
86
- Repeated origins for one duplicate candidate produce one map edit. Preserve
87
- all originating task and review IDs in the maintenance result so independent
88
- review can trace why the edit exists.
71
+ Limit the run to one owning YAML. Preserve stable node IDs when business
72
+ identity is unchanged, declare directed relations from the source concept's
73
+ owning file, and keep anchors as navigation hints. One duplicate candidate
74
+ group produces one map edit while its maintenance draft retains every exact
75
+ origin.
89
76
 
90
- ## Validate The Normal Git Change
77
+ ### Validate And Prepare The Review Candidate
91
78
 
92
- Run the supported product boundaries after the edit:
79
+ When the map changes, run:
93
80
 
94
81
  ```bash
95
82
  semantic-atlas validate --repo <absolute-repository-root>
@@ -99,18 +86,56 @@ git diff --check
99
86
  git diff -- docs/business-map/<owning-file>.yaml
100
87
  ```
101
88
 
102
- Inspect the rendered projection for the changed neighborhood. For an initial
103
- map, confirm that the Viewer presents one bounded business domain rather than a
104
- repository structure. Confirm the Git diff changes one owning YAML surface and
105
- leaves retained observations unchanged. Submit the ordinary map change for
106
- independent review; the reviewer checks durable business meaning, relation
107
- direction, evidence support, complete graph validity, and the one-domain
108
- boundary.
109
-
110
- ## Report The Result
111
-
112
- Report the selected business domain, candidate origins, each maintenance
113
- classification and decisive evidence, the owning YAML file, validation and
114
- render results, whether this is an initial map or an update, the Git diff, and
115
- any discarded or unresolved leads. Separate the proposed map change from
116
- independent-review approval and later merge.
89
+ Inspect the changed neighborhood in the Viewer. Confirm the Git diff changes at
90
+ most one owning YAML and leaves retained observations unchanged. Commit the map
91
+ candidate through the host workflow.
92
+
93
+ Prepare, but do not record, one maintenance-observation JSON document. It
94
+ contains the maintenance task/run identity, selected `businessDomainId`, every
95
+ exact candidate source, classification, reason, and current evidence. Accepted
96
+ or refined results reserve `mapChange.owningMapPath`; the Integration Phase adds
97
+ the real `mergedCommit`.
98
+
99
+ Do not record a terminal maintenance observation during the Work Phase. At this
100
+ point the classification and YAML are proposals that have not completed
101
+ independent review and integration.
102
+
103
+ Report the selected domain, origins, classifications, evidence, owning YAML,
104
+ validation and render results, Git candidate, and the prepared observation to
105
+ the host workflow.
106
+
107
+ ## Review Phase
108
+
109
+ Use the host workflow's ordinary independent review. Review durable business
110
+ meaning, relation direction, evidence support, complete-graph validity, exact
111
+ candidate coverage, one-domain ownership, and whether discarded or unresolved
112
+ conclusions correctly avoid a map edit.
113
+
114
+ Changes requested return to the normal Work Phase. Approval authorizes the host
115
+ workflow to enter Integration Phase; it does not itself consume candidates.
116
+
117
+ ## Integration Phase
118
+
119
+ 1. Re-read the approved work and review evidence.
120
+ 2. When a map candidate exists, merge it through the repository's normal Git
121
+ flow and capture the actual `mergedCommit`. Put that commit and the one
122
+ `owningMapPath` into `mapChange`.
123
+ 3. When every result is discarded or unresolved, keep `mapChange` absent and
124
+ continue only after the no-change conclusion has passed independent review.
125
+ 4. Send the complete JSON document through standard input:
126
+
127
+ ```bash
128
+ semantic-atlas observe maintenance --stdin --repo <absolute-repository-root>
129
+ ```
130
+
131
+ 5. Require a `recorded` or `idempotent` success response before reporting the
132
+ maintenance task complete. Reuse the exact observation ID and document on an
133
+ uncertain retry. The same ID with changed content is a conflict.
134
+ 6. Rerun `semantic-atlas reconcile candidates --repo` when confirming the
135
+ result. Accepted, refined, and discarded origins disappear from actionable
136
+ candidates. Unresolved origins remain retained as waiting for new evidence
137
+ and do not immediately schedule the same work again.
138
+
139
+ If the map merged but observation recording failed, preserve the merged Git
140
+ result and keep the task incomplete. Resume or retry the Integration Phase with
141
+ the exact same observation document until the idempotent record succeeds.
@@ -14,6 +14,8 @@ Every origin retains:
14
14
  - the task's map queries and current-evidence dispositions;
15
15
  - any task or review human correction;
16
16
  - every linked independent review and its accuracy assessment.
17
+ - earlier unresolved maintenance classifications and current evidence, when
18
+ the candidate group has become actionable again through a new origin.
17
19
 
18
20
  `confirmed` says task-time evidence supported the proposed correction.
19
21
  `contradicted` says current evidence contradicted the mapped statement that the
@@ -60,3 +62,56 @@ relation endpoints and containment remain repository-wide even when the Git
60
62
  diff is local. Render the changed graph and inspect the selected neighborhood.
61
63
  The final Git diff is the independent review surface; retained observation
62
64
  artifacts stay unchanged.
65
+
66
+ ## Record The Reviewed Outcome
67
+
68
+ One maintenance result identifies an exact source with both
69
+ `taskObservationId` and zero-based `candidateIndex`. Repeated summaries do not
70
+ replace this identity. The command rejects a missing source or a source owned by
71
+ another `businessDomainId`.
72
+
73
+ Use this shape after independent review and integration:
74
+
75
+ ```json
76
+ {
77
+ "schemaVersion": 1,
78
+ "id": "maintenance-observation-id",
79
+ "recordedAt": "2026-08-31T08:00:00.000Z",
80
+ "maintenance": {
81
+ "taskId": "maintenance-task-id",
82
+ "runId": "integration-run-id"
83
+ },
84
+ "businessDomainId": "commerce",
85
+ "results": [
86
+ {
87
+ "candidate": {
88
+ "taskObservationId": "task-observation-id",
89
+ "candidateIndex": 0
90
+ },
91
+ "status": "accepted",
92
+ "reason": "Current source confirms the durable business meaning.",
93
+ "evidence": [
94
+ { "kind": "source", "reference": "src/orders/place-order.ts" }
95
+ ]
96
+ }
97
+ ],
98
+ "mapChange": {
99
+ "owningMapPath": "docs/business-map/commerce.yaml",
100
+ "mergedCommit": "MERGED_COMMIT_HEX"
101
+ }
102
+ }
103
+ ```
104
+
105
+ Replace `MERGED_COMMIT_HEX` with the full hexadecimal commit that actually
106
+ merged the reviewed map change before submitting the observation.
107
+
108
+ `accepted` and `refined` require `mapChange`; a document containing only
109
+ `discarded` and `unresolved` results omits it. Every result needs a concise
110
+ reason and at least one current evidence reference. One document lists each
111
+ exact candidate source once.
112
+
113
+ The reconciliation report exposes only actionable groups in `domains`.
114
+ `waitingForEvidenceOccurrences` counts unresolved sources for which no new
115
+ origin has appeared. A new origin with the same domain, kind, and summary makes
116
+ the group actionable again and returns the earlier unresolved history beside
117
+ the new evidence.
package/README.md CHANGED
@@ -145,11 +145,13 @@ maps through Git.
145
145
  ## Accuracy Observations
146
146
 
147
147
  Every business-changing task records task evidence without changing the
148
- business map. An independent review records its separate review evidence:
148
+ business map. Independent review records separate review evidence, and a
149
+ reviewed maintenance run records what happened to each exact candidate origin:
149
150
 
150
151
  ```bash
151
152
  semantic-atlas observe task --stdin --repo /path/to/repository
152
153
  semantic-atlas observe review --stdin --repo /path/to/repository
154
+ semantic-atlas observe maintenance --stdin --repo /path/to/repository
153
155
  semantic-atlas insights summary --repo /path/to/repository --period 4w
154
156
  ```
155
157
 
@@ -158,8 +160,10 @@ classifications, candidate map corrections, and explicit human corrections. An
158
160
  empty candidate list is valid when knowledge is already represented,
159
161
  implementation-local, or unresolved. The task never grades its own accuracy.
160
162
  An independent review observation owns correctness, impact, required-rework,
161
- and map-regression judgments. IDs are immutable: an exact replay is idempotent
162
- and changed content conflicts.
163
+ and map-regression judgments. A maintenance observation records `accepted`,
164
+ `refined`, `discarded`, or `unresolved` results only after review and
165
+ integration. IDs are immutable: an exact replay is idempotent and changed
166
+ content conflicts.
163
167
 
164
168
  See [accuracy observations](docs/observations.md) for the schemas and evidence
165
169
  semantics.
@@ -167,15 +171,25 @@ semantics.
167
171
  ## Reconciliation
168
172
 
169
173
  ```bash
174
+ semantic-atlas reconcile status --repo /path/to/repository
170
175
  semantic-atlas reconcile candidates --repo /path/to/repository
171
176
  ```
172
177
 
173
- The command groups retained candidates by explicit business-domain ownership
174
- while preserving each origin, evidence disposition, and linked independent
175
- review. It is read-only. The maintenance Skill then confirms one domain against
176
- current evidence and submits any accepted map correction through an ordinary
177
- Git diff and independent review. When no map exists, a supported candidate can
178
- seed one bounded business-domain YAML instead of a repository-wide taxonomy.
178
+ `reconcile status` returns only whether the repository currently has at least
179
+ one actionable candidate. It reads task and maintenance observations, leaving
180
+ candidate details, Review evidence, and business-domain selection inside the
181
+ maintenance workflow. This is the narrow orchestration contract.
182
+
183
+ `reconcile candidates` returns current actionable candidates by explicit
184
+ business-domain ownership while preserving each origin, evidence disposition,
185
+ linked independent review, and earlier unresolved investigation. Accepted, refined,
186
+ and discarded origins are terminal. An unresolved origin waits for new evidence
187
+ instead of immediately producing the same task again. Both commands are read-only.
188
+ The maintenance Skill then confirms one domain against current evidence,
189
+ submits any accepted map correction through an ordinary Git diff and independent
190
+ review, and records the reviewed outcome after integration. When no map exists,
191
+ a supported candidate can seed one bounded business-domain YAML instead of a
192
+ repository-wide taxonomy.
179
193
  Post-integration maintenance is the normal freshness path; periodic
180
194
  reconciliation recovers missed observations, accumulated drift, and changes
181
195
  outside the normal engineering workflow.
package/README.zh-CN.md CHANGED
@@ -133,34 +133,43 @@ semantic-atlas web --repo /path/to/api /path/to/frontend --port 4310 --no-open
133
133
  ## 准确性观测
134
134
 
135
135
  每个业务改动任务都会保存自己的调查证据,而不直接修改业务地图。独立审查会另外
136
- 保存审查证据:
136
+ 保存审查证据;完成审查和合入的维护任务还会记录每个精确候选来源的处理结果:
137
137
 
138
138
  ```bash
139
139
  semantic-atlas observe task --stdin --repo /path/to/repository
140
140
  semantic-atlas observe review --stdin --repo /path/to/repository
141
+ semantic-atlas observe maintenance --stdin --repo /path/to/repository
141
142
  semantic-atlas insights summary --repo /path/to/repository --period 4w
142
143
  ```
143
144
 
144
145
  任务观测记录包括 `map_not_found` 在内的查询结果、当前证据分类、地图修正候选
145
146
  和明确的人类纠正。业务知识已经覆盖、改动只涉及实现细节或稳定含义尚不明确时,
146
147
  候选列表可以为空。任务不会给自己的准确性打分;独立审查观测负责记录正确性、
147
- 影响完整性、是否需要返工,以及地图是否导致了错误结论。观测 ID 不可变:完全
148
- 相同的重放是幂等的,内容发生变化则会报告冲突。
148
+ 影响完整性、是否需要返工,以及地图是否导致了错误结论。维护观测只在审查和
149
+ 合入完成后记录 `accepted`、`refined`、`discarded` 或 `unresolved`。观测 ID
150
+ 不可变:完全相同的重放是幂等的,内容发生变化则会报告冲突。
149
151
 
150
152
  具体 schema 和证据语义见[准确性观测](docs/observations.md)。
151
153
 
152
154
  ## 地图校准
153
155
 
154
156
  ```bash
157
+ semantic-atlas reconcile status --repo /path/to/repository
155
158
  semantic-atlas reconcile candidates --repo /path/to/repository
156
159
  ```
157
160
 
158
- 该命令按明确的业务域归属对保留候选进行分组,同时保留每个来源、证据判断和
159
- 关联的独立审查。命令本身只读。随后,维护 Skill 会选择一个业务域,使用当前
160
- 证据重新确认候选,并把被接受的地图修正作为普通 Git 差异提交独立审查。如果
161
- 仓库还没有地图,有充分证据的候选可以建立第一份有边界的业务域 YAML,而不是
162
- 一次推断整个仓库。代码合入后的维护是正常的保鲜路径;定期校准负责补回遗漏
163
- 观测、累计漂移和常规流程以外的变更。
161
+ `reconcile status` 只回答当前仓库是否至少存在一个可行动候选。它只读取任务观测和
162
+ 维护观测,把候选详情、Review 证据和业务域选择留在维护流程内部;这是提供给任务
163
+ 编排器的最小契约。
164
+
165
+ `reconcile candidates` 按明确的业务域归属返回当前可行动候选,同时保留每个来源、
166
+ 证据判断、关联的独立审查和之前未解决的调查。已接受、已细化和已丢弃的来源会进入终态;
167
+ 未解决的来源会等待新证据,而不会立刻重复生成相同任务。两个命令都只读。随后,
168
+ 维护 Skill 会选择一个业务域,使用当前证据重新确认候选,把被接受的地图修正
169
+ 作为普通 Git 差异提交独立审查,并在合入后记录处理结果。如果仓库还没有地图,
170
+ 有充分证据的候选可以建立第一份有边界的业务域 YAML,而不是一次推断整个仓库。
171
+ 代码合入后的维护是正常的保鲜路径;定期校准负责补回遗漏观测、累计漂移和常规
172
+ 流程以外的变更。
164
173
 
165
174
  ## 本地数据与隐私
166
175
 
@@ -1,4 +1,4 @@
1
- import type { InsightsSummaryEnvelope, ObserveReviewEnvelope, ObserveTaskEnvelope } from "../contracts/cli.js";
1
+ import type { InsightsSummaryEnvelope, ObserveMaintenanceEnvelope, ObserveReviewEnvelope, ObserveTaskEnvelope } from "../contracts/cli.js";
2
2
  import { InsightService } from "../insights/insight-service.js";
3
3
  import { ObservationApplication } from "../observations/observation-application.js";
4
4
  export interface ObservationCliRuntime {
@@ -9,6 +9,7 @@ export interface ObservationCliRuntime {
9
9
  }
10
10
  export declare function runObserveTaskCommand(runtime: ObservationCliRuntime, repositoryPath: string): Promise<ObserveTaskEnvelope>;
11
11
  export declare function runObserveReviewCommand(runtime: ObservationCliRuntime, repositoryPath: string): Promise<ObserveReviewEnvelope>;
12
+ export declare function runObserveMaintenanceCommand(runtime: ObservationCliRuntime, repositoryPath: string): Promise<ObserveMaintenanceEnvelope>;
12
13
  export declare function runInsightsSummaryCommand(runtime: ObservationCliRuntime, options: {
13
14
  readonly repo: string;
14
15
  readonly period?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"observation-commands.d.ts","sourceRoot":"","sources":["../../src/cli/observation-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,uBAAuB,EAEvB,qBAAqB,EACrB,mBAAmB,EAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EAEf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,sBAAsB,EAGvB,MAAM,4CAA4C,CAAC;AAOpD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IACxD,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,IAAI,IAAI,CAAC;CACb;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,qBAAqB,EAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,mBAAmB,CAAC,CAQ9B;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,qBAAqB,EAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,qBAAqB,CAAC,CAQhC;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3D,OAAO,CAAC,uBAAuB,CAAC,CA4BlC"}
1
+ {"version":3,"file":"observation-commands.d.ts","sourceRoot":"","sources":["../../src/cli/observation-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,uBAAuB,EAEvB,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EAEf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,sBAAsB,EAGvB,MAAM,4CAA4C,CAAC;AAOpD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IACxD,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,IAAI,IAAI,CAAC;CACb;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,qBAAqB,EAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,mBAAmB,CAAC,CAQ9B;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,qBAAqB,EAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,qBAAqB,CAAC,CAQhC;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,qBAAqB,EAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,0BAA0B,CAAC,CAWrC;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3D,OAAO,CAAC,uBAAuB,CAAC,CA4BlC"}
@@ -1,5 +1,5 @@
1
1
  import { InsightService, InvalidInsightPeriodError, } from "../insights/insight-service.js";
2
- import { ObservationApplication, ObservationInputError, TaskObservationNotFoundError, } from "../observations/observation-application.js";
2
+ import { MaintenanceCandidateError, ObservationApplication, ObservationInputError, TaskObservationNotFoundError, } from "../observations/observation-application.js";
3
3
  import { ObservationConflictError, ObservationStorageError, } from "../observations/observation-store.js";
4
4
  import { RepositoryIdentityError } from "../observations/repository-identity.js";
5
5
  export async function runObserveTaskCommand(runtime, repositoryPath) {
@@ -22,6 +22,16 @@ export async function runObserveReviewCommand(runtime, repositoryPath) {
22
22
  return observationError("observe review", error);
23
23
  }
24
24
  }
25
+ export async function runObserveMaintenanceCommand(runtime, repositoryPath) {
26
+ try {
27
+ const input = await readObservationInput(runtime);
28
+ const result = await runtime.observationApplication.recordMaintenance(repositoryPath, input);
29
+ return observationSuccess("observe maintenance", result);
30
+ }
31
+ catch (error) {
32
+ return observationError("observe maintenance", error);
33
+ }
34
+ }
25
35
  export async function runInsightsSummaryCommand(runtime, options) {
26
36
  try {
27
37
  const result = await runtime.insightService.summarize(options.repo, options.period, runtime.now());
@@ -88,6 +98,14 @@ function observationError(command, error) {
88
98
  taskObservationId: error.taskObservationId,
89
99
  };
90
100
  }
101
+ else if (error instanceof MaintenanceCandidateError) {
102
+ cliError = {
103
+ code: "MAINTENANCE_CANDIDATE_INVALID",
104
+ message: error.message,
105
+ taskObservationId: error.taskObservationId,
106
+ candidateIndex: error.candidateIndex,
107
+ };
108
+ }
91
109
  else {
92
110
  cliError = repositoryOrStorageError(error, "OBSERVATION_STORAGE_FAILED");
93
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"observation-commands.js","sourceRoot":"","sources":["../../src/cli/observation-commands.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AASjF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAA8B,EAC9B,cAAsB;IAEtB,IAAI,CAAC;QACH,MA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AG;YACT,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,wBAAwB,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO;QACL,aAAa,EAAE,CAAC;QAChB,EAAE,EAAE,KAAK;QACT,OAAO;QACP,KAAK,EAAE,QAAQ;KAChB,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAC/B,KAAc,EACd,YAAmE;IAKnE,IAAI,KAAK,YAAY,uBAAuB,EAAE,CAAC;QAC7C,OAAO;YACL,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK,YAAY,uBAAuB;YAC/C,CAAC,CAAC,KAAK,CAAC,OAAO;YACf,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC;KAIxB,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAAC;AACnF,CAAC"}
1
+ {"version":3,"file":"observation-commands.js","sourceRoot":"","sources":["../../src/cli/observation-commands.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,cAAc,EACd,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AASjF,MAAM,CAAC,KAAK,UAAU,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C;IACJ,CAAC;IACD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK,YAAY,uBAAuB;YAC/C,CAAC,CAAC,KAAK,CAAC,OAAO;YACf,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC;KAIxB,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAAC;AACnF,CAAC"}
@@ -1,7 +1,8 @@
1
- import type { ReconciliationCandidatesEnvelope } from "../contracts/cli.js";
1
+ import type { ReconciliationCandidatesEnvelope, ReconciliationStatusEnvelope } from "../contracts/cli.js";
2
2
  import { ReconciliationService } from "../reconciliation/reconciliation-service.js";
3
3
  export interface ReconciliationCliRuntime {
4
4
  readonly reconciliationService: ReconciliationService;
5
5
  }
6
6
  export declare function runReconciliationCandidatesCommand(runtime: ReconciliationCliRuntime, repositoryPath: string): Promise<ReconciliationCandidatesEnvelope>;
7
+ export declare function runReconciliationStatusCommand(runtime: ReconciliationCliRuntime, repositoryPath: string): Promise<ReconciliationStatusEnvelope>;
7
8
  //# sourceMappingURL=reconciliation-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reconciliation-command.d.ts","sourceRoot":"","sources":["../../src/cli/reconciliation-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAG5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;CACvD;AAED,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,wBAAwB,EACjC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,gCAAgC,CAAC,CAwB3C"}
1
+ {"version":3,"file":"reconciliation-command.d.ts","sourceRoot":"","sources":["../../src/cli/reconciliation-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;CACvD;AAED,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,wBAAwB,EACjC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,gCAAgC,CAAC,CAiB3C;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,wBAAwB,EACjC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,4BAA4B,CAAC,CAqBvC"}
@@ -11,14 +11,7 @@ export async function runReconciliationCandidatesCommand(runtime, repositoryPath
11
11
  };
12
12
  }
13
13
  catch (error) {
14
- const cliError = error instanceof RepositoryIdentityError
15
- ? { code: "REPOSITORY_INVALID", message: error.message }
16
- : {
17
- code: "RECONCILIATION_READ_FAILED",
18
- message: error instanceof ObservationStorageError
19
- ? error.message
20
- : errorMessage(error),
21
- };
14
+ const cliError = reconciliationError(error);
22
15
  return {
23
16
  schemaVersion: 1,
24
17
  ok: false,
@@ -27,6 +20,37 @@ export async function runReconciliationCandidatesCommand(runtime, repositoryPath
27
20
  };
28
21
  }
29
22
  }
23
+ export async function runReconciliationStatusCommand(runtime, repositoryPath) {
24
+ try {
25
+ return {
26
+ schemaVersion: 1,
27
+ ok: true,
28
+ command: "reconcile status",
29
+ data: {
30
+ required: await runtime.reconciliationService.maintenanceRequired(repositoryPath),
31
+ },
32
+ };
33
+ }
34
+ catch (error) {
35
+ const cliError = reconciliationError(error);
36
+ return {
37
+ schemaVersion: 1,
38
+ ok: false,
39
+ command: "reconcile status",
40
+ error: cliError,
41
+ };
42
+ }
43
+ }
44
+ function reconciliationError(error) {
45
+ return error instanceof RepositoryIdentityError
46
+ ? { code: "REPOSITORY_INVALID", message: error.message }
47
+ : {
48
+ code: "RECONCILIATION_READ_FAILED",
49
+ message: error instanceof ObservationStorageError
50
+ ? error.message
51
+ : errorMessage(error),
52
+ };
53
+ }
30
54
  function errorMessage(error) {
31
55
  return error instanceof Error ? error.message : "Unexpected reconciliation failure";
32
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"reconciliation-command.js","sourceRoot":"","sources":["../../src/cli/reconciliation-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAMpF,MAAM,CAAC,KAAK,UAAU,kCAAkC,CACtD,OAAiC,EACjC,cAAsB;IAEtB,IAAI,CAAC;QACH,OAAO;YACL,aAAa,EAAE,CAAC;YAChB,EAAE,EAAE,IAAI;YACR,OAAO,EAAE,sBAAsB;YAC/B,IAAI,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,cAAc,CAAC,cAAc,CAAC;SACzE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,QAAQ,GAAG,KAAK,YAAY,uBAAuB;YACvD,CAAC,CAAC,EAAE,IAAI,EAAE,oBAA6B,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;YACjE,CAAC,CAAC;gBACE,IAAI,EAAE,4BAAqC;gBAC3C,OAAO,EAAE,KAAK,YAAY,uBAAuB;oBAC/C,CAAC,CAAC,KAAK,CAAC,OAAO;oBACf,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC;aACxB,CAAC;QACN,OAAO;YACL,aAAa,EAAE,CAAC;YAChB,EAAE,EAAE,KAAK;YACT,OAAO,EAAE,sBAAsB;YAC/B,KAAK,EAAE,QAAQ;SAChB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,Y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