perttool 0.5.0 → 0.5.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/CHANGELOG.md +20 -1
- package/README.md +51 -28
- package/dist/cli.js +24 -0
- package/dist/cli.js.map +1 -1
- package/dist/command/actuals-discovery.d.ts.map +1 -1
- package/dist/command/actuals-discovery.js +68 -11
- package/dist/command/actuals-discovery.js.map +1 -1
- package/dist/history/git-probe.d.ts +4 -0
- package/dist/history/git-probe.d.ts.map +1 -1
- package/dist/history/git-probe.js +23 -14
- package/dist/history/git-probe.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schema/registry.d.ts +36 -0
- package/dist/schema/registry.d.ts.map +1 -0
- package/dist/schema/registry.js +156 -0
- package/dist/schema/registry.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -2
- package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +152 -0
- package/schemas/Perttool.AnalysisResult.v4.schema.json +124 -0
- package/schemas/Perttool.CheckResult.v3.schema.json +159 -0
- package/schemas/Perttool.CliError.v1.schema.json +83 -0
- package/schemas/Perttool.CommandHelpResult.v1.schema.json +165 -0
- package/schemas/Perttool.Common.v1.schema.json +508 -0
- package/schemas/Perttool.ExportResult.v1.schema.json +96 -0
- package/schemas/Perttool.FormatResult.v1.schema.json +82 -0
- package/schemas/Perttool.GuideResult.v1.schema.json +104 -0
- package/schemas/Perttool.ImportResult.v1.schema.json +111 -0
- package/schemas/Perttool.InitResult.v1.schema.json +70 -0
- package/schemas/Perttool.MutationResult.v3.schema.json +143 -0
- package/schemas/Perttool.NextResult.v5.schema.json +139 -0
- package/schemas/Perttool.OverrideDecision.v1.schema.json +170 -0
- package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +139 -0
- package/schemas/Perttool.ProjectResult.v3.schema.json +144 -0
- package/schemas/Perttool.SchemaResult.v1.schema.json +84 -0
- package/schemas/Perttool.UnitMigrationResult.v3.schema.json +205 -0
- package/schemas/Perttool.VelocityObservationResult.v1.schema.json +102 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.1] - 2026-07-30
|
|
8
|
+
|
|
9
|
+
Compatible CLI Contract 6 and Grammar 5 beta patch. This version adds
|
|
10
|
+
machine-readable result artifacts and corrects Git 2.54 UTC commit-time
|
|
11
|
+
handling without changing existing result identities or payload meanings.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added bundled Draft 2020-12 artifacts for every active Contract 6 command
|
|
16
|
+
result and public `Perttool.OverrideDecision.v1`, with a closed public
|
|
17
|
+
catalog, `perttool schema`, package-root lookup APIs, and isolated package
|
|
18
|
+
validation.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Accepted the strict ISO `Z` UTC form emitted by Git 2.54 for `%cI` commit
|
|
23
|
+
metadata while retaining fixed-offset validation.
|
|
24
|
+
|
|
7
25
|
## [0.5.0] - 2026-07-29
|
|
8
26
|
|
|
9
27
|
Contract 6 beta release. This version atomically publishes Grammar 5,
|
|
@@ -216,7 +234,8 @@ First public development preview. Intended to evaluate the DSL and CLI, read-onl
|
|
|
216
234
|
- Not published to the npm registry; use the GitHub Release asset
|
|
217
235
|
- Requires Node.js 24 or later
|
|
218
236
|
|
|
219
|
-
[Unreleased]: https://github.com/mako10k/perttool/compare/v0.5.
|
|
237
|
+
[Unreleased]: https://github.com/mako10k/perttool/compare/v0.5.1...HEAD
|
|
238
|
+
[0.5.1]: https://github.com/mako10k/perttool/compare/v0.5.0...v0.5.1
|
|
220
239
|
[0.5.0]: https://github.com/mako10k/perttool/compare/v0.4.0...v0.5.0
|
|
221
240
|
[0.4.0]: https://github.com/mako10k/perttool/compare/v0.3.0...v0.4.0
|
|
222
241
|
[0.3.0]: https://github.com/mako10k/perttool/compare/v0.2.0...v0.3.0
|
package/README.md
CHANGED
|
@@ -5,38 +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
|
-
|
|
8
|
+
Version `0.5.1` beta implements Grammar 5 and CLI Contract 6,
|
|
9
9
|
including explicit task work events, lifecycle commands, read-only Git
|
|
10
|
-
history, observed velocity, AnalysisResult v4, and NextResult v5.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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.
|
|
16
18
|
|
|
17
19
|
## Run without installing
|
|
18
20
|
|
|
19
21
|
Use `npx` for an occasional invocation and select Contract 6 explicitly:
|
|
20
22
|
|
|
21
23
|
```sh
|
|
22
|
-
npx --yes --package=perttool@0.5.
|
|
23
|
-
npx --yes --package=perttool@0.5.
|
|
24
|
-
npx --yes --package=perttool@0.5.
|
|
25
|
-
npx --yes --package=perttool@0.5.
|
|
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
|
|
26
28
|
```
|
|
27
29
|
|
|
28
30
|
The equivalent explicit `npm exec` form is:
|
|
29
31
|
|
|
30
32
|
```sh
|
|
31
|
-
npm exec --yes --package=perttool@0.5.
|
|
32
|
-
npm exec --yes --package=perttool@0.5.
|
|
33
|
-
npm exec --yes --package=perttool@0.5.
|
|
34
|
-
npm exec --yes --package=perttool@0.5.
|
|
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
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
`npx` and `npm exec` may download the selected package version into the npm
|
|
38
|
-
cache.
|
|
39
|
-
publication. Pinning `0.4.0` selects Contract 5 and therefore omits Grammar 5
|
|
40
|
+
cache. Pinning `0.4.0` selects Contract 5 and therefore omits Grammar 5
|
|
40
41
|
lifecycle and history; `0.3.0` selects Contract 4, and `0.2.0` selects
|
|
41
42
|
Contract 3.
|
|
42
43
|
|
|
@@ -45,16 +46,14 @@ Contract 3.
|
|
|
45
46
|
Install the CLI globally when it is used regularly:
|
|
46
47
|
|
|
47
48
|
```sh
|
|
48
|
-
npm install --global perttool@0.5.
|
|
49
|
+
npm install --global perttool@0.5.1
|
|
49
50
|
perttool --version
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
and Contract 3 remain available as exact pins `perttool@0.4.0`,
|
|
57
|
-
`perttool@0.3.0`, and `perttool@0.2.0`.
|
|
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`.
|
|
58
57
|
|
|
59
58
|
## Plan files
|
|
60
59
|
|
|
@@ -280,6 +279,7 @@ details.
|
|
|
280
279
|
| Goal | Command |
|
|
281
280
|
| --- | --- |
|
|
282
281
|
| Discover commands | `perttool help [resource [action]]` |
|
|
282
|
+
| Discover or read JSON Schemas | `perttool schema [schema-id]` |
|
|
283
283
|
| Read domain guidance | `perttool guide [topic [subtopic]]` |
|
|
284
284
|
| Validate a document | `perttool document check <file>` |
|
|
285
285
|
| Canonically format it | `perttool document format <file>` |
|
|
@@ -307,15 +307,36 @@ domain concepts. Both run without a document:
|
|
|
307
307
|
```sh
|
|
308
308
|
perttool task set --help
|
|
309
309
|
perttool help dag next --format json
|
|
310
|
+
perttool schema --format json
|
|
311
|
+
perttool schema Perttool.NextResult.v5 --format json
|
|
310
312
|
perttool guide editing --level detail --format json
|
|
311
313
|
```
|
|
312
314
|
|
|
315
|
+
### JSON Schema artifacts
|
|
316
|
+
|
|
317
|
+
`perttool schema --format json` returns the complete result-schema catalog.
|
|
318
|
+
Supplying a schema identity returns its Draft 2020-12 artifact in the
|
|
319
|
+
`schema` field of `Perttool.SchemaResult.v1`:
|
|
320
|
+
|
|
321
|
+
```sh
|
|
322
|
+
perttool schema Perttool.CheckResult.v3 --format json
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Packed installations also expose each artifact at
|
|
326
|
+
`perttool/schemas/<schema-id>.schema.json`; relative references resolve
|
|
327
|
+
against the bundled `Perttool.Common.v1.schema.json`. The stable `$id` is an
|
|
328
|
+
identifier only: validation does not require network access. Consumers must
|
|
329
|
+
select compatibility from each result's `schema_version`, not from
|
|
330
|
+
`tool_version`. See the
|
|
331
|
+
[JSON Schema Artifact Contract](docs/specs/json-schema.md) for the complete
|
|
332
|
+
18-result inventory and versioning rules.
|
|
333
|
+
|
|
313
334
|
## LLM and automation use
|
|
314
335
|
|
|
315
|
-
Use `--format json` for machine consumers.
|
|
316
|
-
check `cli_contract_version == 6`; consumers
|
|
317
|
-
|
|
318
|
-
|
|
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`.
|
|
319
340
|
In every case, check the result-specific `schema_version` before reading the
|
|
320
341
|
rest of a result.
|
|
321
342
|
A complete, known, non-truncated `Perttool.NextResult.v5` with temporal policy
|
|
@@ -335,6 +356,8 @@ diagnostics, and future or unavailable temporal eligibility must fail closed.
|
|
|
335
356
|
- [Temporal and Unit Interface Contract (CLI Contract 4)](docs/specs/temporal-unit-interface.md)
|
|
336
357
|
- [Owner-Aware Governance Interface Contract (CLI Contract 5)](docs/specs/governance-interface.md)
|
|
337
358
|
- [Project Actuals and Git History Contract (CLI Contract 6)](docs/specs/project-actuals.md)
|
|
359
|
+
- [JSON Schema Artifact Contract](docs/specs/json-schema.md)
|
|
360
|
+
- [JSON Schema source acceptance](docs/process/json-schema-acceptance.md)
|
|
338
361
|
- [Contract 5-to-6 migration](docs/process/cli-contract-6-migration.md)
|
|
339
362
|
- [Contract 4-to-5 migration](docs/process/cli-contract-5-migration.md)
|
|
340
363
|
- [Issue #4 governance implementation acceptance](docs/process/governance-acceptance.md)
|
package/dist/cli.js
CHANGED
|
@@ -31,6 +31,7 @@ import { convertWithVelocity, durationSuffix } from "./model/units.js";
|
|
|
31
31
|
import { recommendationInvariantExitCode } from "./recommendation/failure.js";
|
|
32
32
|
import { recommendationAnalysisToJson } from "./recommendation/json.js";
|
|
33
33
|
import { TARGET_GRAMMAR_5_CAPABILITY, } from "./parser/document-parser.js";
|
|
34
|
+
import { getJsonSchemaResult, renderJsonSchemaResult, serializeJsonSchemaResult, } from "./schema/registry.js";
|
|
34
35
|
import { TOOL_VERSION } from "./version.js";
|
|
35
36
|
class UsageError extends Error {
|
|
36
37
|
code = "PTCLI-001";
|
|
@@ -2541,6 +2542,27 @@ function runCommandHelp(args) {
|
|
|
2541
2542
|
}
|
|
2542
2543
|
return result.ok ? 0 : 1;
|
|
2543
2544
|
}
|
|
2545
|
+
function runJsonSchema(args) {
|
|
2546
|
+
const parsed = parseCommandOptions("schema", args);
|
|
2547
|
+
if (parsed.positionals.length > 1) {
|
|
2548
|
+
throw new UsageError("schema accepts at most one <schema-id>");
|
|
2549
|
+
}
|
|
2550
|
+
const format = outputFormat(parsed.values.get("format"));
|
|
2551
|
+
const result = getJsonSchemaResult(parsed.positionals[0] ?? null);
|
|
2552
|
+
if (format === "json") {
|
|
2553
|
+
process.stdout.write(serializeJsonSchemaResult(result));
|
|
2554
|
+
}
|
|
2555
|
+
else {
|
|
2556
|
+
const rendered = renderJsonSchemaResult(result);
|
|
2557
|
+
if (result.ok) {
|
|
2558
|
+
process.stdout.write(rendered);
|
|
2559
|
+
}
|
|
2560
|
+
else {
|
|
2561
|
+
process.stderr.write(rendered);
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
return result.ok ? 0 : 1;
|
|
2565
|
+
}
|
|
2544
2566
|
function runAgentHelp(args) {
|
|
2545
2567
|
const parsed = parseCommandOptions("agent.help", args);
|
|
2546
2568
|
if (parsed.positionals.length > 2) {
|
|
@@ -2587,6 +2609,8 @@ async function dispatchCommand(descriptor, args) {
|
|
|
2587
2609
|
switch (descriptor.operation) {
|
|
2588
2610
|
case "help":
|
|
2589
2611
|
return runCommandHelp(args);
|
|
2612
|
+
case "schema":
|
|
2613
|
+
return runJsonSchema(args);
|
|
2590
2614
|
case "guide":
|
|
2591
2615
|
return runGuide(args);
|
|
2592
2616
|
case "document.check":
|