perttool 0.1.0 → 0.2.0
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 +66 -33
- package/README.md +172 -110
- package/dist/application/analyze.js +5 -5
- package/dist/application/analyze.js.map +1 -1
- package/dist/application/init.d.ts +42 -0
- package/dist/application/init.d.ts.map +1 -0
- package/dist/application/init.js +217 -0
- package/dist/application/init.js.map +1 -0
- package/dist/application/mutate.d.ts.map +1 -1
- package/dist/application/mutate.js +13 -9
- package/dist/application/mutate.js.map +1 -1
- package/dist/cli.js +245 -372
- package/dist/cli.js.map +1 -1
- package/dist/command/discovery.d.ts +30 -0
- package/dist/command/discovery.d.ts.map +1 -0
- package/dist/command/discovery.js +625 -0
- package/dist/command/discovery.js.map +1 -0
- package/dist/command/registry.d.ts +84 -0
- package/dist/command/registry.d.ts.map +1 -0
- package/dist/command/registry.js +951 -0
- package/dist/command/registry.js.map +1 -0
- package/dist/command/usage.d.ts +42 -0
- package/dist/command/usage.d.ts.map +1 -0
- package/dist/command/usage.js +337 -0
- package/dist/command/usage.js.map +1 -0
- package/dist/conversion/mermaid-import.js +56 -56
- package/dist/conversion/mermaid-import.js.map +1 -1
- package/dist/conversion/mermaid.js +1 -1
- package/dist/conversion/mermaid.js.map +1 -1
- package/dist/help/guide.d.ts +12 -0
- package/dist/help/guide.d.ts.map +1 -0
- package/dist/help/guide.js +103 -0
- package/dist/help/guide.js.map +1 -0
- package/dist/help/registry.d.ts +0 -6
- package/dist/help/registry.d.ts.map +1 -1
- package/dist/help/registry.js +69 -80
- package/dist/help/registry.js.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/io/safe-write.js +17 -17
- package/dist/io/safe-write.js.map +1 -1
- package/dist/mutation/gate.d.ts +5 -0
- package/dist/mutation/gate.d.ts.map +1 -0
- package/dist/mutation/gate.js +156 -0
- package/dist/mutation/gate.js.map +1 -0
- package/dist/mutation/milestone.js +26 -26
- package/dist/mutation/milestone.js.map +1 -1
- package/dist/mutation/project.js +14 -14
- package/dist/mutation/project.js.map +1 -1
- package/dist/mutation/resource.js +22 -22
- package/dist/mutation/resource.js.map +1 -1
- package/dist/mutation/task.js +40 -40
- package/dist/mutation/task.js.map +1 -1
- package/dist/mutation/types.d.ts +26 -1
- package/dist/mutation/types.d.ts.map +1 -1
- package/dist/parser/document-parser.js +17 -17
- package/dist/parser/document-parser.js.map +1 -1
- package/dist/semantic/validator.js +41 -41
- package/dist/semantic/validator.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,70 +1,103 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This project records its notable changes here. The format is based on [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/lang/ja/).
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.0] - 2026-07-25
|
|
8
|
+
|
|
9
|
+
Contract 3 beta release. This version intentionally replaces the Contract 2
|
|
10
|
+
command names and JSON envelope while retaining suffix-free `0.x.x` beta
|
|
11
|
+
product maturity.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Activated CLI Contract 3 as one breaking source-level cutover: `document
|
|
16
|
+
check|format`, `guide`, and `batch apply` replace the Contract 2 `dsl` and
|
|
17
|
+
`mutation` spellings; every CLI JSON envelope now identifies contract 3;
|
|
18
|
+
command dispatch, validation, and text/JSON help share the active typed
|
|
19
|
+
registry; and obsolete spellings fail with structured usage recovery.
|
|
20
|
+
- Accepted the complete file-first Contract 3 workflow from an isolated
|
|
21
|
+
installed tarball, covering initialization, direct file inspection, every
|
|
22
|
+
project/task/gate/milestone/resource field, analysis, recommendation,
|
|
23
|
+
completion, advance, and final validation without manual `.pert` rewriting.
|
|
24
|
+
- Selected suffix-free beta `0.2.0` as the first Contract 3 package target and
|
|
25
|
+
added a gated release plan that separates local preparation from explicitly
|
|
26
|
+
authorized Git, GitHub, and npm distribution; package, lockfile, and CLI
|
|
27
|
+
identity are prepared as `0.2.0`.
|
|
28
|
+
- Promoted the accepted `perttool@0.1.0` beta to npm `latest` through an explicit post-release dist-tag operation. This changes the default install target without changing beta product maturity.
|
|
29
|
+
- Lowered the source and next-release runtime baseline from Node.js 24 to maintained Node.js 22, with CI coverage for Node.js 22 and 24.
|
|
30
|
+
- Reworked the root README as a user guide with `npx` and `npm exec` examples, and moved repository setup and verification to `docs/development.md`.
|
|
31
|
+
- Recorded the complete English-surface inventory, Unicode allowlist, CLI/LLM surface review, and the structured-help, project-init, and gate-mutation backlog.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Public `help` command discovery, separate `guide` domain topics,
|
|
36
|
+
preview-first `project init`, and direct source-preserving
|
|
37
|
+
`gate add|set|remove` commands.
|
|
38
|
+
|
|
7
39
|
## [0.1.0] - 2026-07-23
|
|
8
40
|
|
|
9
41
|
First beta release. This suffix-free `0.x.x` series remains prerelease product maturity, permits intentional alpha incompatibility, and publishes through the npm `beta` dist-tag without moving `latest`.
|
|
10
42
|
|
|
11
43
|
### Added
|
|
12
44
|
|
|
13
|
-
- Codex
|
|
14
|
-
-
|
|
15
|
-
-
|
|
45
|
+
- Read-only `agent help`, which exposes offline profiles for Codex, GitHub Copilot, Claude Code, Grok Build, and Antigravity from the same Core as index/quick/detail text/JSON
|
|
46
|
+
- `project show`, which retrieves complete project metadata including velocity as text/JSON; preview-first `project set` for localized updates; and `project.set` for atomic batches
|
|
47
|
+
- An explicit independent post-first-beta backlog for an LSP server, a VSIX with syntax highlighting/LSP client, and an MCP server
|
|
16
48
|
|
|
17
49
|
### Changed
|
|
18
50
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
51
|
+
- Defined the first beta as suffix-free `0.1.0` and subsequent `0.x.x` releases as beta, removing strict compatibility from alpha and additional soak time from the beta gate
|
|
52
|
+
- Added the read-only AI Agent Guidance Registry from Issue #2 to beta acceptance criteria and macro/detail plans
|
|
21
53
|
- Adopted English as the canonical repository language without i18n and added a phased, post-beta migration plan for legacy Japanese surfaces
|
|
22
54
|
|
|
23
55
|
## [0.1.0-alpha.2] - 2026-07-23
|
|
24
56
|
|
|
25
|
-
|
|
57
|
+
Second public development preview. Adds safe editing and advance operations, Mermaid round trips, and explainable task recommendations, and distributes the same artifact to GitHub Releases and npm's `alpha` tag.
|
|
26
58
|
|
|
27
59
|
### Added
|
|
28
60
|
|
|
29
|
-
- `dsl format
|
|
30
|
-
-
|
|
31
|
-
- `exportMermaid` Core
|
|
32
|
-
- `importMermaid` Core
|
|
33
|
-
- canonical keep/remove
|
|
34
|
-
- exact typed
|
|
35
|
-
-
|
|
36
|
-
- feasible
|
|
37
|
-
- complete
|
|
38
|
-
- npm publish normalization
|
|
61
|
+
- `dsl format`; atomic `--write` for task/milestone/resource/batch mutation; exclusive `--out`; and `--expect-digest`
|
|
62
|
+
- Semantic records, integrity digests, fail-closed import design contracts, and normative artifacts for `Perttool.MermaidProfile.v1`
|
|
63
|
+
- `exportMermaid` Core and lossless/plain profiles, analysis annotations, strict loss, and exclusive `--out` for `dag render --to mermaid`
|
|
64
|
+
- `importMermaid` Core and fail-closed profile restoration, plain loss reports, strict loss, and exclusive `--out` for `dag import --from mermaid`
|
|
65
|
+
- Pure `planAdvance` Core guaranteeing canonical keep/remove sets, partial joins, and idempotence, plus preview-first `dag advance` CLI
|
|
66
|
+
- Complete recommendation graph with exact typed facts, comparisons, decision traces, and canonical descriptions, plus the public `NextResultV3` Core type
|
|
67
|
+
- Recommendation shadow gate and golden tests that inspect the v3 contract, byte determinism, operational compatibility, and structured why-not across five self-use plans
|
|
68
|
+
- Read-only `validateOverride` Core returning feasible replacements, `PTOVR-101` through `PTOVR-106`, caller-asserted human reasons, normal-trace references, and deterministic `Perttool.OverrideDecision.v1`
|
|
69
|
+
- Shared instructions, help, and unknown-version safe-stop dry run that adopt complete, known `NextResult.v3` as the normal AI task-selection authority
|
|
70
|
+
- Package preflight that checks npm publish normalization, a maintainer script that fail-closed publishes the identical tarball, and fixed `alpha` dist-tag
|
|
39
71
|
|
|
40
72
|
### Changed
|
|
41
73
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
74
|
+
- Changed the default `dag next` JSON from `Perttool.NextResult.v2` to `Perttool.NextResult.v3` as a pre-release breaking change, publishing Core, CLI JSON/text, help, and package atomically
|
|
75
|
+
- Corrected `bin.perttool` to canonical `dist/cli.js` so npm does not remove the CLI entry point
|
|
44
76
|
|
|
45
77
|
## [0.1.0-alpha.1] - 2026-07-21
|
|
46
78
|
|
|
47
|
-
|
|
79
|
+
First public development preview. Intended to evaluate the DSL and CLI, read-only plan checking and analysis, and next-task selection. It is not a stable MVP and may include incompatible changes.
|
|
48
80
|
|
|
49
81
|
### Added
|
|
50
82
|
|
|
51
|
-
- Activity-on-Arrow DSL
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- `active
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
- `npm link
|
|
83
|
+
- Activity-on-Arrow DSL parser, semantic/graph validation, and multiple-error recovery
|
|
84
|
+
- PERT/CPM precedence analysis and critical-path enumeration using exact Rational values
|
|
85
|
+
- Deterministic `parallel-sgs` heuristic schedule handling renewable resource capacity
|
|
86
|
+
- Mechanical determination of `active`, `ready`, `runnable_now`, `blocked_now`, and `upcoming`
|
|
87
|
+
- Day/hour forecasts from point estimates and project-wide velocity
|
|
88
|
+
- Text/JSON CLI, structured help, stable diagnostic codes, and source spans
|
|
89
|
+
- CLI installation through `npm link` and GitHub Release tarballs
|
|
58
90
|
|
|
59
91
|
### Known limitations
|
|
60
92
|
|
|
61
|
-
- `dsl format
|
|
62
|
-
- Mermaid import/export
|
|
63
|
-
-
|
|
64
|
-
- npm registry
|
|
65
|
-
- Node.js 24
|
|
93
|
+
- `dsl format`, task/milestone/resource mutation, and `dag advance` are unimplemented
|
|
94
|
+
- Mermaid import/export is unimplemented
|
|
95
|
+
- The resource schedule is a heuristic with `optimal=false`, not an exact optimum
|
|
96
|
+
- Not published to the npm registry; use the GitHub Release asset
|
|
97
|
+
- Requires Node.js 24 or later
|
|
66
98
|
|
|
67
|
-
[Unreleased]: https://github.com/mako10k/perttool/compare/v0.
|
|
99
|
+
[Unreleased]: https://github.com/mako10k/perttool/compare/v0.2.0...HEAD
|
|
100
|
+
[0.2.0]: https://github.com/mako10k/perttool/compare/v0.1.0...v0.2.0
|
|
68
101
|
[0.1.0]: https://github.com/mako10k/perttool/compare/v0.1.0-alpha.2...v0.1.0
|
|
69
102
|
[0.1.0-alpha.2]: https://github.com/mako10k/perttool/compare/v0.1.0-alpha.1...v0.1.0-alpha.2
|
|
70
103
|
[0.1.0-alpha.1]: https://github.com/mako10k/perttool/releases/tag/v0.1.0-alpha.1
|
package/README.md
CHANGED
|
@@ -1,150 +1,212 @@
|
|
|
1
1
|
# perttool
|
|
2
2
|
|
|
3
|
-
PERT
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`0.1.0` is the first beta release. Suffix-free `0.x.x` versions are the beta series, and strict compatibility with the alpha series is not guaranteed. This release includes the read-only AI Agent Guidance Registry from Issue #2.
|
|
8
|
-
|
|
9
|
-
- [要件定義](docs/requirements.md)
|
|
10
|
-
- [基本設計](docs/basic-design.md)
|
|
11
|
-
- [DSL 文法仕様](docs/specs/dsl-grammar.md)
|
|
12
|
-
- [Graph Semantics 仕様](docs/specs/graph-semantics.md)
|
|
13
|
-
- [Analysis 仕様](docs/specs/analysis.md)
|
|
14
|
-
- [Mutation Semantics 仕様](docs/specs/mutation.md)
|
|
15
|
-
- [Mermaid Profile 仕様](docs/specs/mermaid-profile.md)
|
|
16
|
-
- [Recommendation Semantics 仕様](docs/specs/recommendation.md)
|
|
17
|
-
- [Recommendation Ranking Policy 仕様](docs/specs/recommendation-ranking.md)
|
|
18
|
-
- [Recommendation Reason Taxonomy 仕様](docs/specs/recommendation-reasons.md)
|
|
19
|
-
- [Recommendation Structured Explanation 仕様](docs/specs/recommendation-explanation.md)
|
|
20
|
-
- [Recommendation Interface Contract 仕様](docs/specs/recommendation-interface.md)
|
|
21
|
-
- [Recommendation Human Override Contract 仕様](docs/specs/recommendation-override.md)
|
|
22
|
-
- [Recommendation 規範例](docs/examples/recommendation.md)
|
|
23
|
-
- [AI Agent Guidance Registry 仕様](docs/specs/agent-guidance.md)
|
|
24
|
-
- [AI Agent Guidance Registry 規範例](docs/examples/agent-guidance.md)
|
|
25
|
-
- [Mermaid Profile 規範例](docs/examples/mermaid-profile.md)
|
|
26
|
-
- [Recommendation 実装・自己利用migration](docs/process/recommendation-migration.md)
|
|
27
|
-
- [NextResult.v3 consumer migration guide](docs/process/next-v3-consumer-migration.md)
|
|
28
|
-
- [Recommendation 設計受け入れレビュー](docs/process/recommendation-design-review.md)
|
|
29
|
-
- [MVP release readiness監査](docs/process/mvp-release-readiness.md)
|
|
30
|
-
- [Beta versioning ADR](docs/adr/0003-beta-versioning.md)
|
|
31
|
-
- [Beta release手順](docs/process/beta-release.md)
|
|
32
|
-
- [English repository baseline ADR](docs/adr/0004-english-repository-baseline.md)
|
|
33
|
-
- [CLI Interface 仕様](docs/specs/interfaces.md)
|
|
34
|
-
- [Architecture Decision Records](docs/adr/0001-activity-on-arrow.md)
|
|
35
|
-
- [DSL サンプル](docs/examples/README.md)
|
|
36
|
-
- [自己利用計画](docs/process/self-use.md)
|
|
37
|
-
- [MVPからbetaへのmacro計画](plans/mvp.pert)
|
|
38
|
-
- [現在の文法作業計画](plans/grammar.pert)
|
|
39
|
-
- [AI工程制御設計計画](plans/control-plane.pert)
|
|
40
|
-
- [操作系M1-M4実装計画](plans/operations.pert)
|
|
41
|
-
- [Recommendation実装計画](plans/recommendation.pert)
|
|
42
|
-
- [AI Agent Guidance実装計画](plans/agent-guidance.pert)
|
|
43
|
-
- [English baseline migration plan](plans/english-baseline.pert)
|
|
44
|
-
- [AI 開発ガイド](docs/process/ai-development.md)
|
|
45
|
-
|
|
46
|
-
基本方針は次のとおりです。
|
|
47
|
-
|
|
48
|
-
- Activity-on-Arrow とし、タスクを DAG のエッジ、マイルストーンをノードとして扱う
|
|
49
|
-
- 独自 DSL 文書をプロジェクト状態の正本とする
|
|
50
|
-
- PERT/CPM 計算と「次のタスク」の判定を機械的かつ決定的に行う
|
|
51
|
-
- 相対見積り`p`を基準に保持し、明示したproject-wide velocityで`d`または`h`の予測へexact換算する
|
|
52
|
-
- 共有resourceのcapacityから排他実行と並列実行可能数を扱う
|
|
53
|
-
- Mermaid との相互変換、CLI、構造化ヘルプ、AI向けJSON操作導線を同じ共通コア上に提供する
|
|
54
|
-
- MVPはCLIをprimary interfaceとし、LSP server、コードハイライト/LSP clientを持つVSIX、MCP serverは最初のbeta後の独立backlogとして追加する
|
|
55
|
-
- 現行文書は現在と未来を表し、過去は Git 履歴で追跡する
|
|
56
|
-
- parser・check・analyze・next が安定した時点で、文法作業の計画から自己利用を開始する
|
|
3
|
+
`perttool` is a local CLI for keeping PERT/CPM plans in reviewable text files.
|
|
4
|
+
It validates an Activity-on-Arrow plan, calculates precedence and
|
|
5
|
+
resource-constrained schedules, recommends the next task, and applies
|
|
6
|
+
source-preserving changes through preview-first commands.
|
|
57
7
|
|
|
58
|
-
|
|
8
|
+
The current Contract 3 version is `0.2.0`. Beta releases may contain breaking
|
|
9
|
+
CLI or schema changes. Version `0.2.0` requires Node.js 22 or later. The prior
|
|
10
|
+
`0.1.0` artifact uses CLI Contract 2 and declares Node.js 24.
|
|
11
|
+
|
|
12
|
+
## Run without installing
|
|
59
13
|
|
|
60
|
-
|
|
14
|
+
Use `npx` for an occasional invocation and select Contract 3 explicitly:
|
|
61
15
|
|
|
62
16
|
```sh
|
|
63
|
-
|
|
64
|
-
perttool --
|
|
17
|
+
npx --yes --package=perttool@0.2.0 -- perttool --version
|
|
18
|
+
npx --yes --package=perttool@0.2.0 -- perttool document check PLAN.pert
|
|
19
|
+
npx --yes --package=perttool@0.2.0 -- perttool dag next PLAN.pert --format json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The equivalent explicit `npm exec` form is:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npm exec --yes --package=perttool@0.2.0 -- perttool --version
|
|
26
|
+
npm exec --yes --package=perttool@0.2.0 -- perttool document check PLAN.pert
|
|
27
|
+
npm exec --yes --package=perttool@0.2.0 -- perttool dag analyze PLAN.pert
|
|
65
28
|
```
|
|
66
29
|
|
|
67
|
-
|
|
30
|
+
`npx` and `npm exec` may download the selected package version into the npm
|
|
31
|
+
cache. Pinning `0.1.0` selects the prior Contract 2 interface and therefore
|
|
32
|
+
does not accept the commands in this README.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
Install the CLI globally when it is used regularly:
|
|
68
37
|
|
|
69
38
|
```sh
|
|
70
|
-
|
|
71
|
-
cd perttool
|
|
72
|
-
npm ci
|
|
73
|
-
npm link
|
|
39
|
+
npm install --global perttool@0.2.0
|
|
74
40
|
perttool --version
|
|
75
41
|
```
|
|
76
42
|
|
|
77
|
-
`
|
|
43
|
+
npm `beta` resolves to Contract 3 `0.2.0`. npm `latest` remains on Contract 2
|
|
44
|
+
`0.1.0` unless a later, separately authorized promotion occurs.
|
|
45
|
+
`perttool@beta` is an alternative to the exact `0.2.0` pin.
|
|
46
|
+
|
|
47
|
+
## Plan files
|
|
48
|
+
|
|
49
|
+
A `.pert` file is the source of truth and is intended to remain directly
|
|
50
|
+
readable. This minimal plan has one one-day task:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
project EXAMPLE:
|
|
54
|
+
version 1
|
|
55
|
+
title "Example plan"
|
|
56
|
+
duration_unit day
|
|
57
|
+
finish DONE
|
|
58
|
+
|
|
59
|
+
milestone NOW:
|
|
60
|
+
title "Current frontier"
|
|
61
|
+
state reached
|
|
78
62
|
|
|
79
|
-
|
|
63
|
+
milestone DONE:
|
|
64
|
+
title "Done"
|
|
80
65
|
|
|
81
|
-
|
|
66
|
+
task WORK NOW -> DONE:
|
|
67
|
+
title "Do the work"
|
|
68
|
+
duration 1d
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Save it as `PLAN.pert`, then inspect it with:
|
|
82
72
|
|
|
83
73
|
```sh
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
perttool document check PLAN.pert
|
|
75
|
+
perttool project show PLAN.pert
|
|
76
|
+
perttool dag analyze PLAN.pert
|
|
77
|
+
perttool dag next PLAN.pert --format json
|
|
86
78
|
```
|
|
87
79
|
|
|
88
|
-
|
|
80
|
+
Task duration can use deterministic `day`, `hour`, or relative `point` units.
|
|
81
|
+
Point plans declare a project-wide velocity such as `20p/10d`. Analysis keeps
|
|
82
|
+
the exact point result and reports the time conversion separately as a velocity
|
|
83
|
+
forecast.
|
|
84
|
+
|
|
85
|
+
## Maintain a plan through the CLI
|
|
86
|
+
|
|
87
|
+
Read the file for its complete human-facing state. Use CLI maintenance commands
|
|
88
|
+
so that each candidate is parsed and semantically checked before it can be
|
|
89
|
+
written. To bootstrap a plan without hand-authoring syntax, preview the
|
|
90
|
+
smallest valid document and then create a new file exclusively:
|
|
89
91
|
|
|
90
92
|
```sh
|
|
91
|
-
|
|
93
|
+
perttool project init EXAMPLE \
|
|
94
|
+
--title "Example plan" \
|
|
95
|
+
--duration-unit day \
|
|
96
|
+
--initial-milestone NOW \
|
|
97
|
+
--initial-milestone-title "Current frontier" \
|
|
98
|
+
--finish NOW
|
|
99
|
+
|
|
100
|
+
perttool project init EXAMPLE \
|
|
101
|
+
--title "Example plan" \
|
|
102
|
+
--duration-unit day \
|
|
103
|
+
--initial-milestone NOW \
|
|
104
|
+
--initial-milestone-title "Current frontier" \
|
|
105
|
+
--finish NOW \
|
|
106
|
+
--out PLAN.pert
|
|
92
107
|
```
|
|
93
108
|
|
|
94
|
-
|
|
109
|
+
For an existing plan:
|
|
95
110
|
|
|
96
111
|
```sh
|
|
97
|
-
|
|
98
|
-
perttool
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
perttool dsl format PLAN.pert --diff
|
|
102
|
-
perttool dsl format PLAN.pert --write --expect-digest "$EXPECTED_DIGEST"
|
|
103
|
-
perttool dsl help syntax estimate --level detail --format json
|
|
104
|
-
perttool dsl help syntax velocity --level detail --format json
|
|
105
|
-
perttool agent help
|
|
106
|
-
perttool agent help codex enforcement --level detail --format json
|
|
112
|
+
# Preview a source-preserving change.
|
|
113
|
+
perttool task set PLAN.pert WORK --status active --diff
|
|
114
|
+
|
|
115
|
+
# Obtain the current digest for optimistic locking.
|
|
107
116
|
perttool project show PLAN.pert --format json
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
perttool
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
perttool
|
|
117
|
-
perttool dag
|
|
118
|
-
perttool dag
|
|
119
|
-
perttool dag import parallel.mmd --from mermaid
|
|
120
|
-
perttool dag import parallel.mmd --from mermaid --strict-loss --out parallel.pert
|
|
121
|
-
perttool task set docs/examples/minimal.pert WORK --status active --diff
|
|
122
|
-
perttool task set PLAN.pert WORK --status active --write --expect-digest "$EXPECTED_DIGEST"
|
|
123
|
-
perttool resource set docs/examples/parallel.pert TEST_ENV --capacity 2 --format json
|
|
124
|
-
perttool mutation apply docs/examples/minimal.pert --request changes.json --diff
|
|
125
|
-
perttool mutation apply PLAN.pert --request changes.json --out UPDATED.pert
|
|
117
|
+
|
|
118
|
+
# Apply the reviewed change atomically.
|
|
119
|
+
perttool task set PLAN.pert WORK \
|
|
120
|
+
--status active \
|
|
121
|
+
--write \
|
|
122
|
+
--expect-digest 'sha256:...'
|
|
123
|
+
|
|
124
|
+
# Finish a task, inspect the new frontier, then remove completed history.
|
|
125
|
+
perttool task finish PLAN.pert WORK --diff
|
|
126
|
+
perttool dag next PLAN.pert --format json
|
|
127
|
+
perttool dag advance PLAN.pert --diff
|
|
126
128
|
```
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
All formatter and mutation commands preview by default. `--write` replaces the
|
|
131
|
+
input through the safe-write path, while `--out` exclusively creates a new
|
|
132
|
+
file. Gate maintenance uses the same controls:
|
|
129
133
|
|
|
130
|
-
|
|
134
|
+
```sh
|
|
135
|
+
perttool gate add PLAN.pert APPROVAL NOW DONE \
|
|
136
|
+
--reason "Approval required" \
|
|
137
|
+
--diff
|
|
138
|
+
```
|
|
131
139
|
|
|
132
|
-
`
|
|
140
|
+
Use `batch apply` when several changes must become valid atomically:
|
|
133
141
|
|
|
134
|
-
|
|
142
|
+
```sh
|
|
143
|
+
perttool batch apply PLAN.pert --request changes.json --diff
|
|
144
|
+
perttool batch apply PLAN.pert \
|
|
145
|
+
--request changes.json \
|
|
146
|
+
--write \
|
|
147
|
+
--expect-digest 'sha256:...'
|
|
148
|
+
```
|
|
135
149
|
|
|
136
|
-
|
|
150
|
+
## Command map
|
|
151
|
+
|
|
152
|
+
| Goal | Command |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| Discover commands | `perttool help [resource [action]]` |
|
|
155
|
+
| Read domain guidance | `perttool guide [topic [subtopic]]` |
|
|
156
|
+
| Validate a document | `perttool document check <file>` |
|
|
157
|
+
| Canonically format it | `perttool document format <file>` |
|
|
158
|
+
| Initialize a project | `perttool project init ...` |
|
|
159
|
+
| Read project metadata | `perttool project show <file>` |
|
|
160
|
+
| Change project metadata | `perttool project set <file> ...` |
|
|
161
|
+
| Analyze schedules | `perttool dag analyze <file>` |
|
|
162
|
+
| Select next work | `perttool dag next <file>` |
|
|
163
|
+
| Remove completed history | `perttool dag advance <file>` |
|
|
164
|
+
| Export or import Mermaid | `perttool dag render`, `perttool dag import` |
|
|
165
|
+
| Maintain tasks | `perttool task add|set|remove|finish` |
|
|
166
|
+
| Maintain gates | `perttool gate add|set|remove` |
|
|
167
|
+
| Maintain milestones | `perttool milestone add|set|remove` |
|
|
168
|
+
| Maintain resources | `perttool resource add|set|remove` |
|
|
169
|
+
| Apply an atomic batch | `perttool batch apply` |
|
|
170
|
+
| Read coding-agent guidance | `perttool agent help` |
|
|
171
|
+
|
|
172
|
+
Run `perttool --help` for the text command catalog. `help` is the complete
|
|
173
|
+
command contract for humans and machine consumers, while `guide` explains
|
|
174
|
+
domain concepts. Both run without a document:
|
|
175
|
+
|
|
176
|
+
```sh
|
|
177
|
+
perttool task set --help
|
|
178
|
+
perttool help dag next --format json
|
|
179
|
+
perttool guide editing --level detail --format json
|
|
180
|
+
```
|
|
137
181
|
|
|
138
|
-
|
|
182
|
+
## LLM and automation use
|
|
139
183
|
|
|
140
|
-
`
|
|
184
|
+
Use `--format json` for machine consumers. Check both
|
|
185
|
+
`cli_contract_version == 3` and the result-specific `schema_version` before
|
|
186
|
+
reading the rest of a result. A complete, known `Perttool.NextResult.v3`
|
|
187
|
+
recommendation graph is the task-selection authority; do not infer authority
|
|
188
|
+
from the text summary or from `ready` alone.
|
|
141
189
|
|
|
142
|
-
|
|
190
|
+
Mutation JSON returns the candidate text, unified diff, UTF-16 text edits,
|
|
191
|
+
source digest, updated digest, diagnostics, and write result in one envelope.
|
|
192
|
+
Unknown schema versions, incomplete recommendation traces, and `PTREC-*`
|
|
193
|
+
diagnostics must fail closed.
|
|
143
194
|
|
|
144
|
-
|
|
195
|
+
## Documentation
|
|
145
196
|
|
|
146
|
-
|
|
197
|
+
- [CLI Contract 3](docs/specs/cli-contract-3.md)
|
|
198
|
+
- [Migration from CLI Contract 2](docs/process/cli-contract-3-migration.md)
|
|
199
|
+
- [DSL grammar](docs/specs/dsl-grammar.md)
|
|
200
|
+
- [Graph semantics](docs/specs/graph-semantics.md)
|
|
201
|
+
- [Analysis semantics](docs/specs/analysis.md)
|
|
202
|
+
- [Mutation semantics](docs/specs/mutation.md)
|
|
203
|
+
- [Recommendation semantics](docs/specs/recommendation.md)
|
|
204
|
+
- [Examples](docs/examples/README.md)
|
|
205
|
+
- [Developer guide](docs/development.md)
|
|
206
|
+
- [Product backlog](docs/backlog.md)
|
|
147
207
|
|
|
148
208
|
## Security and license
|
|
149
209
|
|
|
150
|
-
|
|
210
|
+
Report vulnerabilities privately according to [SECURITY.md](SECURITY.md).
|
|
211
|
+
perttool is released under the [MIT License](LICENSE). See
|
|
212
|
+
[CHANGELOG.md](CHANGELOG.md) for release changes and known limitations.
|
|
@@ -19,7 +19,7 @@ function validateCapacityOverrides(graph, overrides) {
|
|
|
19
19
|
const diagnostics = [];
|
|
20
20
|
for (const [id] of overrides) {
|
|
21
21
|
if (!graph.resources.has(id)) {
|
|
22
|
-
diagnostics.push(diagnostic("PTSEM-206", "error", `
|
|
22
|
+
diagnostics.push(diagnostic("PTSEM-206", "error", `resource ${id} in capacity override is undefined`, id));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
if (hasErrors(diagnostics))
|
|
@@ -32,7 +32,7 @@ function validateCapacityOverrides(graph, overrides) {
|
|
|
32
32
|
diagnostics.push({
|
|
33
33
|
code: "PTSEM-208",
|
|
34
34
|
severity: "error",
|
|
35
|
-
message: `requirement ${requirement.units}
|
|
35
|
+
message: `requirement ${requirement.units} exceeds what-if capacity ${effective.get(requirement.resourceId)}`,
|
|
36
36
|
entityId: declaration.id,
|
|
37
37
|
span: requirement.unitsSpan,
|
|
38
38
|
helpTopic: "analysis.resources",
|
|
@@ -50,7 +50,7 @@ function validateCapacityOverrides(graph, overrides) {
|
|
|
50
50
|
diagnostics.push({
|
|
51
51
|
code: "PTRES-202",
|
|
52
52
|
severity: "error",
|
|
53
|
-
message: `what-if capacity ${effective.get(id)}
|
|
53
|
+
message: `what-if capacity ${effective.get(id)} is less than active usage ${usage}`,
|
|
54
54
|
entityId: id,
|
|
55
55
|
span: fieldNamed(resource.declaration, "capacity").valueSpan,
|
|
56
56
|
helpTopic: "analysis.resources",
|
|
@@ -118,10 +118,10 @@ export function analyzeDocument(text, options = {}) {
|
|
|
118
118
|
: analyzeResources(graph, internalPrecedence, overrides, maxPaths);
|
|
119
119
|
const precedence = mode === "resource" ? null : internalPrecedence;
|
|
120
120
|
if (precedence?.critical.pathsTruncated === true || resource?.scheduleCritical.pathsTruncated === true) {
|
|
121
|
-
diagnostics.push(diagnostic("PTDAG-302", "warning", `critical path
|
|
121
|
+
diagnostics.push(diagnostic("PTDAG-302", "warning", `critical path enumeration was truncated at max-paths ${maxPaths}`, undefined, undefined, "analysis"));
|
|
122
122
|
}
|
|
123
123
|
if (resource?.conditionalOnBlocksResolved === true) {
|
|
124
|
-
diagnostics.push(diagnostic("PTRES-303", "warning", "blocked
|
|
124
|
+
diagnostics.push(diagnostic("PTRES-303", "warning", "resource schedule is conditional on blocked tasks being resolved at time 0", resource.blockedTaskIds[0]));
|
|
125
125
|
}
|
|
126
126
|
const limited = limitDiagnostics(sortDiagnostics(diagnostics), maxDiagnostics);
|
|
127
127
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/application/analyze.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA6B3C,SAAS,UAAU,CACjB,IAAY,EACZ,QAA6B,EAC7B,OAAe,EACf,QAAiB,EACjB,OAAoC,EACpC,SAAS,GAAG,oBAAoB;IAEhC,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,OAAO;QACP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,OAAO,CAAC,SAAS;QACvE,IAAI;QACJ,SAAS;QACT,iBAAiB,EAAE,SAAS;QAC5B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,gBAAgB,EAAE,wBAAwB,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC;QAC9E,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,UAAU;QACV,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { DocumentWriteResult } from "../io/safe-write.js";
|
|
2
|
+
import type { Diagnostic } from "../model/diagnostics.js";
|
|
3
|
+
import type { TextEdit } from "../mutation/text-edits.js";
|
|
4
|
+
export type ProjectInitDurationUnit = "day" | "hour" | "point";
|
|
5
|
+
export interface ProjectInitRequest {
|
|
6
|
+
readonly projectId: string;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly durationUnit: ProjectInitDurationUnit;
|
|
9
|
+
readonly initialMilestone: string;
|
|
10
|
+
readonly initialMilestoneTitle: string;
|
|
11
|
+
readonly finish: string;
|
|
12
|
+
readonly version?: number;
|
|
13
|
+
readonly asOf?: string;
|
|
14
|
+
readonly velocity?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ProjectInitWrite {
|
|
17
|
+
readonly mode: "preview" | "out";
|
|
18
|
+
readonly target: string | null;
|
|
19
|
+
readonly written: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ProjectInitResult {
|
|
22
|
+
readonly schemaVersion: "Perttool.InitResult.v1";
|
|
23
|
+
readonly cliContractVersion: 3;
|
|
24
|
+
readonly toolVersion: string;
|
|
25
|
+
readonly operation: "project.init";
|
|
26
|
+
readonly ok: boolean;
|
|
27
|
+
readonly documentId: string | null;
|
|
28
|
+
readonly source: null;
|
|
29
|
+
readonly sourceDigest: null;
|
|
30
|
+
readonly candidateText: string | null;
|
|
31
|
+
readonly candidateDigest: string | null;
|
|
32
|
+
readonly edits: readonly TextEdit[];
|
|
33
|
+
readonly write: ProjectInitWrite;
|
|
34
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
35
|
+
readonly diagnosticsTruncated: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare function planProjectInit(request: unknown): ProjectInitResult;
|
|
38
|
+
export declare function withProjectInitOutput(value: ProjectInitResult, output: DocumentWriteResult): ProjectInitResult;
|
|
39
|
+
export declare function projectInitResultToJson(value: ProjectInitResult): Readonly<Record<string, unknown>>;
|
|
40
|
+
export declare function serializeProjectInitResult(value: ProjectInitResult): string;
|
|
41
|
+
export declare function renderProjectInitResult(value: ProjectInitResult): string;
|
|
42
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/application/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAI1D,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE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