perttool 0.5.1 → 0.5.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 (36) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +58 -25
  3. package/dist/cli.js +18 -1
  4. package/dist/cli.js.map +1 -1
  5. package/dist/command/actuals-discovery.d.ts.map +1 -1
  6. package/dist/command/actuals-discovery.js +26 -4
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/command/target-governance-discovery.js +2 -2
  9. package/dist/command/target-governance-discovery.js.map +1 -1
  10. package/dist/help/target-governance-guide.js +2 -2
  11. package/dist/help/target-governance-guide.js.map +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/schema/registry.d.ts +19 -2
  16. package/dist/schema/registry.d.ts.map +1 -1
  17. package/dist/schema/registry.js +194 -4
  18. package/dist/schema/registry.js.map +1 -1
  19. package/dist/version.d.ts +1 -1
  20. package/dist/version.js +1 -1
  21. package/package.json +1 -1
  22. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +461 -6
  23. package/schemas/Perttool.AnalysisResult.v4.schema.json +685 -19
  24. package/schemas/Perttool.CheckResult.v3.schema.json +46 -2
  25. package/schemas/Perttool.CliError.v1.schema.json +40 -4
  26. package/schemas/Perttool.CommandHelpResult.v1.schema.json +218 -6
  27. package/schemas/Perttool.Common.v1.schema.json +1460 -75
  28. package/schemas/Perttool.GuideResult.v1.schema.json +36 -2
  29. package/schemas/Perttool.MutationResult.v3.schema.json +57 -6
  30. package/schemas/Perttool.NextResult.v5.schema.json +1137 -12
  31. package/schemas/Perttool.OverrideDecision.v1.schema.json +236 -4
  32. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +204 -60
  33. package/schemas/Perttool.ProjectResult.v3.schema.json +74 -1
  34. package/schemas/Perttool.SchemaResult.v1.schema.json +56 -3
  35. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +152 -14
  36. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +201 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,42 @@ This project records its notable changes here. The format is based on [Keep a Ch
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.3] - 2026-07-30
8
+
9
+ Compatible CLI Contract 6 and Grammar 5 beta patch. This version retires the
10
+ obsolete alpha publication path and tightens the caller workflow for loose
11
+ owner-confirmation assertions without changing command, option, result,
12
+ schema, or runtime payload identities.
13
+
14
+ ### Changed
15
+
16
+ - Retired the obsolete npm `alpha` distribution channel and restricted the
17
+ maintainer publication guard to `beta`. Historical alpha packages remain
18
+ available by exact version pin.
19
+ - Tightened loose owner-confirmation guidance so callers begin with an
20
+ assertion-free preview, explicitly identify affected scopes, review
21
+ human-readable timestamps, sizes, and diffs before supplemental digests, and
22
+ never carry `--accepted-by-owner` into ordinary maintenance or a later
23
+ candidate.
24
+
25
+ ## [0.5.2] - 2026-07-30
26
+
27
+ Compatible CLI Contract 6 and Grammar 5 beta patch. This version completes
28
+ the bundled result schemas and adds selectable full and reference-based
29
+ outline projections without changing existing result identities or runtime
30
+ payload meanings.
31
+
32
+ ### Added
33
+
34
+ - Added full and reference-based outline views to `perttool schema`, including
35
+ separate lookup of one bundled `$ref` detail without changing default
36
+ complete-artifact output.
37
+
38
+ ### Fixed
39
+
40
+ - Replaced underspecified nested JSON Schema object placeholders with complete
41
+ closed record definitions and added nested unknown-field rejection coverage.
42
+
7
43
  ## [0.5.1] - 2026-07-30
8
44
 
9
45
  Compatible CLI Contract 6 and Grammar 5 beta patch. This version adds
@@ -234,7 +270,9 @@ First public development preview. Intended to evaluate the DSL and CLI, read-onl
234
270
  - Not published to the npm registry; use the GitHub Release asset
235
271
  - Requires Node.js 24 or later
236
272
 
237
- [Unreleased]: https://github.com/mako10k/perttool/compare/v0.5.1...HEAD
273
+ [Unreleased]: https://github.com/mako10k/perttool/compare/v0.5.3...HEAD
274
+ [0.5.3]: https://github.com/mako10k/perttool/compare/v0.5.2...v0.5.3
275
+ [0.5.2]: https://github.com/mako10k/perttool/compare/v0.5.1...v0.5.2
238
276
  [0.5.1]: https://github.com/mako10k/perttool/compare/v0.5.0...v0.5.1
239
277
  [0.5.0]: https://github.com/mako10k/perttool/compare/v0.4.0...v0.5.0
240
278
  [0.4.0]: https://github.com/mako10k/perttool/compare/v0.3.0...v0.4.0
package/README.md CHANGED
@@ -5,35 +5,39 @@ It validates an Activity-on-Arrow plan, calculates precedence and
5
5
  resource-constrained schedules, recommends the next task, and applies
6
6
  source-preserving changes through preview-first commands.
7
7
 
8
- Version `0.5.1` beta implements Grammar 5 and CLI Contract 6,
8
+ Version `0.5.3` beta implements Grammar 5 and CLI Contract 6,
9
9
  including explicit task work events, lifecycle commands, read-only Git
10
10
  history, observed velocity, AnalysisResult v4, and NextResult v5. It adds
11
- Draft 2020-12 artifacts for every active Contract 6 result and the public
12
- OverrideDecision result, plus Git 2.54 UTC compatibility. npm `beta` resolves
13
- to `0.5.1`, while `latest` remains on Contract 5 `0.4.0`. Beta releases may
14
- contain breaking CLI or schema changes. Version `0.5.1` requires Node.js 22
15
- or later. The compatible pre-schema Contract 6 artifact remains available by
16
- pinning `0.5.0`; Contract 5, Contract 4, and Contract 3 remain available by
17
- pinning `0.4.0`, `0.3.0`, and `0.2.0`, respectively.
11
+ complete Draft 2020-12 artifacts for every active Contract 6 result and the
12
+ public OverrideDecision result, selectable full and outline schema views,
13
+ Git 2.54 UTC compatibility, and scope-bound human-readable confirmation
14
+ guidance. npm `beta` resolves to `0.5.3`; `latest`
15
+ remains on the separately accepted `0.5.1`. Beta releases may contain
16
+ breaking CLI or schema changes. Version `0.5.3` requires Node.js 22 or later.
17
+ The complete-schema Contract 6 artifact remains available by pinning `0.5.2`,
18
+ and the first machine-schema Contract 6 artifact remains available by pinning
19
+ `0.5.1`; Contract 5, Contract 4, and Contract 3 remain available by pinning
20
+ `0.4.0`, `0.3.0`, and `0.2.0`, respectively. npm has no maintained `alpha`
21
+ dist-tag; historical `0.1.0-alpha.2` remains available by exact pin.
18
22
 
19
23
  ## Run without installing
20
24
 
21
25
  Use `npx` for an occasional invocation and select Contract 6 explicitly:
22
26
 
23
27
  ```sh
24
- npx --yes --package=perttool@0.5.1 -- perttool --version
25
- npx --yes --package=perttool@0.5.1 -- perttool document check PLAN.pert
26
- npx --yes --package=perttool@0.5.1 -- perttool dag next PLAN.pert --format json
27
- npx --yes --package=perttool@0.5.1 -- perttool project history PLAN.pert --format json
28
+ npx --yes --package=perttool@0.5.3 -- perttool --version
29
+ npx --yes --package=perttool@0.5.3 -- perttool document check PLAN.pert
30
+ npx --yes --package=perttool@0.5.3 -- perttool dag next PLAN.pert --format json
31
+ npx --yes --package=perttool@0.5.3 -- perttool project history PLAN.pert --format json
28
32
  ```
29
33
 
30
34
  The equivalent explicit `npm exec` form is:
31
35
 
32
36
  ```sh
33
- npm exec --yes --package=perttool@0.5.1 -- perttool --version
34
- npm exec --yes --package=perttool@0.5.1 -- perttool document check PLAN.pert
35
- npm exec --yes --package=perttool@0.5.1 -- perttool dag analyze PLAN.pert
36
- npm exec --yes --package=perttool@0.5.1 -- perttool project history PLAN.pert --format json
37
+ npm exec --yes --package=perttool@0.5.3 -- perttool --version
38
+ npm exec --yes --package=perttool@0.5.3 -- perttool document check PLAN.pert
39
+ npm exec --yes --package=perttool@0.5.3 -- perttool dag analyze PLAN.pert
40
+ npm exec --yes --package=perttool@0.5.3 -- perttool project history PLAN.pert --format json
37
41
  ```
38
42
 
39
43
  `npx` and `npm exec` may download the selected package version into the npm
@@ -46,14 +50,17 @@ Contract 3.
46
50
  Install the CLI globally when it is used regularly:
47
51
 
48
52
  ```sh
49
- npm install --global perttool@0.5.1
53
+ npm install --global perttool
50
54
  perttool --version
51
55
  ```
52
56
 
53
- npm `beta` resolves to Contract 6 `0.5.1`, while `latest` remains on
54
- Contract 5 `0.4.0`. The prior Contract 6 artifact remains available as
55
- `perttool@0.5.0`; Contract 5, Contract 4, and Contract 3 remain available as
56
- exact pins `perttool@0.4.0`, `perttool@0.3.0`, and `perttool@0.2.0`.
57
+ npm `beta` resolves to Contract 6 `0.5.3`; `latest` remains on accepted
58
+ Contract 6 `0.5.1`. The pre-schema Contract 6 artifact remains available as
59
+ `perttool@0.5.0`; Contract 5,
60
+ Contract 4, and Contract 3 remain available as exact pins
61
+ `perttool@0.4.0`, `perttool@0.3.0`, and `perttool@0.2.0`. The retired alpha
62
+ preview remains installable only as the exact pin
63
+ `perttool@0.1.0-alpha.2`.
57
64
 
58
65
  ## Plan files
59
66
 
@@ -184,6 +191,17 @@ pre-change document determines owners and delegates, and an atomic batch must
184
191
  satisfy every affected scope. These assertions are not authentication,
185
192
  verified identity, signatures, or a durable approval audit.
186
193
 
194
+ Treat each `--accepted-by-owner` value as a single-candidate, scope-bound
195
+ caller assertion rather than workstream or session authority. First preview
196
+ without it. Omit it when the result reports `governance.applicable=false`.
197
+ Before a non-direct governed write, identify the operation, affected scopes,
198
+ required owners, available modification time, byte size before and after, diff
199
+ counts, and semantic candidate summary. Keep source and candidate digests as
200
+ supplemental machine identity rather than the primary human explanation;
201
+ never copy the assertion to later maintenance, a changed candidate, or the
202
+ next `dag advance`. See the
203
+ [loose assertion scope experiment](docs/process/governance-assertion-scope-experiment.md).
204
+
187
205
  Contract 5 previews may still omit actor and owner confirmation. A Contract 4
188
206
  runtime fails closed on Grammar 4 and governance options; there is no
189
207
  `--cli-contract 4` switch, compatibility alias, or environment toggle. Pin
@@ -309,6 +327,7 @@ perttool task set --help
309
327
  perttool help dag next --format json
310
328
  perttool schema --format json
311
329
  perttool schema Perttool.NextResult.v5 --format json
330
+ perttool schema Perttool.NextResult.v5 --view outline --format json
312
331
  perttool guide editing --level detail --format json
313
332
  ```
314
333
 
@@ -322,6 +341,17 @@ Supplying a schema identity returns its Draft 2020-12 artifact in the
322
341
  perttool schema Perttool.CheckResult.v3 --format json
323
342
  ```
324
343
 
344
+ The default and `--view full` return the complete artifact. For a shorter
345
+ outer shape, `--view outline` replaces complex nested records with absolute
346
+ references to the complete bundled artifact. Pass one local, relative, or
347
+ copied absolute reference back with `--ref` to display that internal layer:
348
+
349
+ ```sh
350
+ perttool schema Perttool.NextResult.v5 --view outline --format json
351
+ perttool schema Perttool.NextResult.v5 --view outline \
352
+ --ref '#/$defs/recommendation' --format json
353
+ ```
354
+
325
355
  Packed installations also expose each artifact at
326
356
  `perttool/schemas/<schema-id>.schema.json`; relative references resolve
327
357
  against the bundled `Perttool.Common.v1.schema.json`. The stable `$id` is an
@@ -333,10 +363,13 @@ select compatibility from each result's `schema_version`, not from
333
363
 
334
364
  ## LLM and automation use
335
365
 
336
- Use `--format json` for machine consumers. `0.5.1` and `0.5.0` consumers must
337
- check `cli_contract_version == 6`; consumers pinned to `0.4.0` must continue
338
- to require Contract 5, and consumers pinned to `0.3.0` must require Contract
339
- 4. Bundled machine-readable result artifacts require `0.5.1`.
366
+ Use `--format json` for machine consumers. `0.5.3`, `0.5.2`, `0.5.1`, and `0.5.0`
367
+ consumers must check `cli_contract_version == 6`; consumers pinned to `0.4.0`
368
+ must continue to require Contract 5, and consumers pinned to `0.3.0` must
369
+ require Contract 4. Bundled machine-readable result artifacts require
370
+ `0.5.1`; complete nested records and outline/detail views require `0.5.2`.
371
+ Scope-bound, human-readable loose owner-confirmation guidance requires
372
+ `0.5.3`.
340
373
  In every case, check the result-specific `schema_version` before reading the
341
374
  rest of a result.
342
375
  A complete, known, non-truncated `Perttool.NextResult.v5` with temporal policy
package/dist/cli.js CHANGED
@@ -2547,8 +2547,25 @@ function runJsonSchema(args) {
2547
2547
  if (parsed.positionals.length > 1) {
2548
2548
  throw new UsageError("schema accepts at most one <schema-id>");
2549
2549
  }
2550
+ const viewValue = parsed.values.get("view");
2551
+ const view = viewValue === undefined || viewValue === "full" || viewValue === "outline"
2552
+ ? viewValue
2553
+ : (() => {
2554
+ throw new UsageError("--view must be full or outline");
2555
+ })();
2556
+ const reference = parsed.values.get("ref");
2557
+ if (parsed.positionals.length === 0 &&
2558
+ (view !== undefined || reference !== undefined)) {
2559
+ throw new UsageError("schema view selection requires one <schema-id>");
2560
+ }
2561
+ if (reference !== undefined && view !== "outline") {
2562
+ throw new UsageError("--ref requires --view outline");
2563
+ }
2550
2564
  const format = outputFormat(parsed.values.get("format"));
2551
- const result = getJsonSchemaResult(parsed.positionals[0] ?? null);
2565
+ const result = getJsonSchemaResult(parsed.positionals[0] ?? null, {
2566
+ ...(view === undefined ? {} : { view }),
2567
+ ...(reference === undefined ? {} : { ref: reference }),
2568
+ });
2552
2569
  if (format === "json") {
2553
2570
  process.stdout.write(serializeJsonSchemaResult(result));
2554
2571
  }