ucn 5.5.3 → 5.6.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/.claude/skills/ucn/SKILL.md +37 -12
- package/.claude/skills/ucn/references/commands.md +18 -14
- package/.claude/skills/ucn/references/resolution-rules.md +4 -0
- package/.claude/skills/ucn/references/trust-contract.md +4 -4
- package/CHANGELOG.md +485 -0
- package/README.md +66 -29
- package/cli/flags.js +184 -0
- package/cli/index.js +137 -324
- package/core/account.js +44 -87
- package/core/analysis.js +274 -108
- package/core/ast-analysis.js +2 -0
- package/core/bridge.js +14 -0
- package/core/cache.js +103 -16
- package/core/call-fit.js +130 -0
- package/core/callers.js +353 -71
- package/core/capture.js +363 -0
- package/core/change-kinds.js +1107 -0
- package/core/check.js +1150 -139
- package/core/command-contracts.js +8 -7
- package/core/constructed-class.js +1195 -0
- package/core/contract-membership.js +142 -0
- package/core/deadcode.js +455 -106
- package/core/deletion.js +421 -0
- package/core/discovery.js +104 -9
- package/core/entrypoint-toml.js +110 -0
- package/core/entrypoints.js +12 -6
- package/core/evidence-bands.js +68 -0
- package/core/evidence-bands.json +44 -0
- package/core/execute.js +172 -161
- package/core/hot-summary.js +241 -0
- package/core/index-ir.js +5 -3
- package/core/ir.js +6 -2
- package/core/member-signatures.js +789 -0
- package/core/outgoing-check.js +116 -0
- package/core/output/analysis-ext.js +20 -10
- package/core/output/analysis.js +98 -60
- package/core/output/check.js +101 -37
- package/core/output/doctor.js +34 -1
- package/core/output/find.js +2 -1
- package/core/output/lines.js +63 -3
- package/core/output/public.js +29 -11
- package/core/output/refactoring.js +32 -0
- package/core/output/reporting.js +19 -2
- package/core/output/search.js +14 -2
- package/core/output/tracing.js +36 -8
- package/core/output-budget.js +146 -61
- package/core/parallel-build.js +3 -3
- package/core/project.js +106 -23
- package/core/provenance-type.js +12 -5
- package/core/public-command.js +35 -9
- package/core/python-binding-identity.js +707 -0
- package/core/python-modules.js +6 -0
- package/core/reflection.js +248 -31
- package/core/registry.js +623 -72
- package/core/reporting.js +69 -34
- package/core/review-items.js +75 -0
- package/core/runtime-entrypoints.js +159 -0
- package/core/search.js +148 -164
- package/core/shared.js +0 -45
- package/core/snapshot.js +350 -0
- package/core/source-universe.js +707 -0
- package/core/test-units.js +3698 -0
- package/core/tracing.js +270 -658
- package/core/verify.js +63 -22
- package/languages/adapter.js +8 -3
- package/languages/c-family.js +12 -0
- package/languages/csharp.js +634 -0
- package/languages/go.js +120 -0
- package/languages/index.js +466 -4
- package/languages/java.js +712 -0
- package/languages/javascript.js +1498 -6
- package/languages/lexical-scope.js +68 -0
- package/languages/python.js +1708 -3
- package/languages/rust.js +209 -104
- package/languages/static-js.js +88 -0
- package/mcp/server.js +44 -110
- package/package.json +11 -5
|
@@ -52,7 +52,7 @@ const COMMAND_CONTRACTS = Object.freeze({
|
|
|
52
52
|
{ name: 'definition', when: 'Default or `type` is a symbol kind such as function/class.', answer: 'Matching indexed definitions with location and signature metadata.' },
|
|
53
53
|
{ name: 'type lookup', when: '`type=type`.', answer: 'Type-definition records rather than general name matches.' },
|
|
54
54
|
],
|
|
55
|
-
defaults: ['Substring matching unless `exact=true`.', '
|
|
55
|
+
defaults: ['Substring matching unless `exact=true`.', 'Test definitions included unless `includeTests=false`.', '`limit` is the single result cap; `withSource=true` attaches exact bodies.'],
|
|
56
56
|
truth: 'Results are exact records from the static symbol index; usage counts are static indexed occurrences.',
|
|
57
57
|
nonGoals: ['Text search inside comments or configuration.', 'Compiler overload resolution across external dependencies.'],
|
|
58
58
|
invalidCombinations: ['A missing name is rejected.'],
|
|
@@ -183,9 +183,9 @@ const COMMAND_CONTRACTS = Object.freeze({
|
|
|
183
183
|
target: 'Optional symbol/handle. Omitting it selects diff/precommit mode.',
|
|
184
184
|
modes: [
|
|
185
185
|
{ name: 'symbol', when: 'A symbol target is supplied; `base` names the revision whose declaration its call sites were written against.', answer: 'Argument-count compatibility, uncertain sites, and the caller account.' },
|
|
186
|
-
{ name: 'diff', when: 'No target is supplied; `base` or `staged` selects changes.', answer: '
|
|
186
|
+
{ name: 'diff', when: 'No target is supplied; `base` or `staged` selects changes.', answer: 'A verdict per changed symbol by what the change did: blocked (a break was observed, every site listed), review (change exposure or call requirements not settled, reason named) or ready (no unresolved exposure in the modeled checks, not compiler or runtime proof); TRUST is the worst of them. Affected tests.' },
|
|
187
187
|
],
|
|
188
|
-
defaults: ['Symbol mode checks static arity, not compiler type compatibility.', '`base` defaults to HEAD in both modes.'],
|
|
188
|
+
defaults: ['Symbol mode checks static arity, not compiler type compatibility.', '`base` defaults to HEAD in both modes.', 'Diff mode: `staged` reads the staged tree from the git index, never the worktree; `strict` makes REVIEW_REQUIRED fail as BLOCKED does.'],
|
|
189
189
|
truth: 'Findings are static diagnostics with explicit uncertainty; a clean result is not a compiler/test pass.',
|
|
190
190
|
nonGoals: ['Full type checking.', 'Linting or executing project tests.'],
|
|
191
191
|
invalidCombinations: [
|
|
@@ -193,24 +193,25 @@ const COMMAND_CONTRACTS = Object.freeze({
|
|
|
193
193
|
'`base` and `staged` cannot both select the diff.',
|
|
194
194
|
],
|
|
195
195
|
examples: ['ucn check publishOrderCreated', 'ucn check publishOrderCreated --base=main', 'ucn check --staged'],
|
|
196
|
-
jsonData: 'Symbol mode returns signature, valid/mismatched/uncertain sites and accounting; diff mode returns
|
|
196
|
+
jsonData: 'Symbol mode returns signature, valid/mismatched/uncertain sites and accounting; diff mode returns each changed symbol with `verdict` and `reasons`, and `trust` with `status` and `passes`.',
|
|
197
197
|
output: 'Broad diagnostic; scope to a symbol or focused Git diff.',
|
|
198
198
|
next: ['Run the language compiler/type checker and selected tests.', 'Use `plan` before a signature refactor.'],
|
|
199
199
|
benchmark: 'A10',
|
|
200
200
|
}),
|
|
201
201
|
plan: contract({
|
|
202
202
|
question: 'What exact indexed edits would this proposed refactor require?',
|
|
203
|
-
purpose: 'Preview rename or parameter-shape edits without mutating files.',
|
|
203
|
+
purpose: 'Preview rename or parameter-shape edits, or assess a deletion, without mutating files.',
|
|
204
204
|
target: 'Required symbol name or stable handle plus one refactor operation.',
|
|
205
205
|
modes: [
|
|
206
206
|
{ name: 'rename', when: '`renameTo` is supplied.', answer: 'Selected declaration plus indexed call/reference/import/export edit previews and source-text review items.' },
|
|
207
207
|
{ name: 'add parameter', when: '`addParam` is supplied.', answer: 'Selected declaration and call-site preview, optionally with a default.' },
|
|
208
208
|
{ name: 'remove parameter', when: '`removeParam` is supplied.', answer: 'Selected declaration and affected call-site preview.' },
|
|
209
|
+
{ name: 'delete', when: '`delete` is supplied.', answer: 'A deletion assessment of the selected declaration: `no-static-dependents`, `has-static-dependents` or `review`, with the reason. The same rule the dead-code audit applies to every name.' },
|
|
209
210
|
],
|
|
210
211
|
defaults: ['Preview only; no file writes.'],
|
|
211
212
|
truth: 'Changes are derived from indexed definitions/usages, include the selected declaration, and retain unverified/blocked or needs-review evidence separately; non-source files receive an explicit exact-text search handoff.',
|
|
212
|
-
nonGoals: ['Applying edits.', 'Guaranteeing the preview compiles.'],
|
|
213
|
-
invalidCombinations: ['Exactly one of rename, add-parameter,
|
|
213
|
+
nonGoals: ['Applying edits.', 'Guaranteeing the preview compiles.', 'Guaranteeing a deletion is safe: a deletion assessment is static evidence.'],
|
|
214
|
+
invalidCombinations: ['Exactly one of rename, add-parameter, remove-parameter, or delete is required.', '`defaultValue` only applies to add-parameter.'],
|
|
214
215
|
examples: ['ucn plan parseRequest --rename-to=parseIncoming', 'ucn plan parseRequest --add-param=context --default-value=null'],
|
|
215
216
|
jsonData: 'Before/after signatures, concrete declaration/call/reference/import/export previews, changeSummary, reviewItems, non-source handoff, unverified sites, and account metadata.',
|
|
216
217
|
output: 'Targeted refactor preview; inspect every unverified or warning entry.',
|