perttool 0.1.0-alpha.2 → 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 +78 -28
- package/README.md +173 -95
- package/dist/application/agent-help.d.ts +3 -0
- package/dist/application/agent-help.d.ts.map +1 -0
- package/dist/application/agent-help.js +5 -0
- package/dist/application/agent-help.js.map +1 -0
- 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 +28 -15
- package/dist/application/mutate.js.map +1 -1
- package/dist/application/project.d.ts +25 -0
- package/dist/application/project.d.ts.map +1 -0
- package/dist/application/project.js +54 -0
- package/dist/application/project.js.map +1 -0
- package/dist/cli.js +419 -331
- 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/guidance/profile.d.ts +6 -0
- package/dist/guidance/profile.d.ts.map +1 -0
- package/dist/guidance/profile.js +1158 -0
- package/dist/guidance/profile.js.map +1 -0
- package/dist/guidance/projection.d.ts +16 -0
- package/dist/guidance/projection.d.ts.map +1 -0
- package/dist/guidance/projection.js +276 -0
- package/dist/guidance/projection.js.map +1 -0
- package/dist/guidance/query.d.ts +4 -0
- package/dist/guidance/query.d.ts.map +1 -0
- package/dist/guidance/query.js +178 -0
- package/dist/guidance/query.js.map +1 -0
- package/dist/guidance/text.d.ts +4 -0
- package/dist/guidance/text.d.ts.map +1 -0
- package/dist/guidance/text.js +118 -0
- package/dist/guidance/text.js.map +1 -0
- package/dist/guidance/types.d.ts +227 -0
- package/dist/guidance/types.d.ts.map +1 -0
- package/dist/guidance/types.js +54 -0
- package/dist/guidance/types.js.map +1 -0
- package/dist/guidance/validator.d.ts +8 -0
- package/dist/guidance/validator.d.ts.map +1 -0
- package/dist/guidance/validator.js +383 -0
- package/dist/guidance/validator.js.map +1 -0
- 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.map +1 -1
- package/dist/help/registry.js +76 -67
- package/dist/help/registry.js.map +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- 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.d.ts +5 -0
- package/dist/mutation/project.d.ts.map +1 -0
- package/dist/mutation/project.js +148 -0
- package/dist/mutation/project.js.map +1 -0
- 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 +46 -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.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,53 +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
|
+
|
|
39
|
+
## [0.1.0] - 2026-07-23
|
|
40
|
+
|
|
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`.
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
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
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
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
|
|
53
|
+
- Adopted English as the canonical repository language without i18n and added a phased, post-beta migration plan for legacy Japanese surfaces
|
|
54
|
+
|
|
7
55
|
## [0.1.0-alpha.2] - 2026-07-23
|
|
8
56
|
|
|
9
|
-
|
|
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.
|
|
10
58
|
|
|
11
59
|
### Added
|
|
12
60
|
|
|
13
|
-
- `dsl format
|
|
14
|
-
-
|
|
15
|
-
- `exportMermaid` Core
|
|
16
|
-
- `importMermaid` Core
|
|
17
|
-
- canonical keep/remove
|
|
18
|
-
- exact typed
|
|
19
|
-
-
|
|
20
|
-
- feasible
|
|
21
|
-
- complete
|
|
22
|
-
- 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
|
|
23
71
|
|
|
24
72
|
### Changed
|
|
25
73
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
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
|
|
28
76
|
|
|
29
77
|
## [0.1.0-alpha.1] - 2026-07-21
|
|
30
78
|
|
|
31
|
-
|
|
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.
|
|
32
80
|
|
|
33
81
|
### Added
|
|
34
82
|
|
|
35
|
-
- Activity-on-Arrow DSL
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
- `active
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- `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
|
|
42
90
|
|
|
43
91
|
### Known limitations
|
|
44
92
|
|
|
45
|
-
- `dsl format
|
|
46
|
-
- Mermaid import/export
|
|
47
|
-
-
|
|
48
|
-
- npm registry
|
|
49
|
-
- 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
|
|
50
98
|
|
|
51
|
-
[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
|
|
101
|
+
[0.1.0]: https://github.com/mako10k/perttool/compare/v0.1.0-alpha.2...v0.1.0
|
|
52
102
|
[0.1.0-alpha.2]: https://github.com/mako10k/perttool/compare/v0.1.0-alpha.1...v0.1.0-alpha.2
|
|
53
103
|
[0.1.0-alpha.1]: https://github.com/mako10k/perttool/releases/tag/v0.1.0-alpha.1
|
package/README.md
CHANGED
|
@@ -1,134 +1,212 @@
|
|
|
1
1
|
# perttool
|
|
2
2
|
|
|
3
|
-
PERT
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- [操作系M1-M4実装計画](plans/operations.pert)
|
|
34
|
-
- [Recommendation実装計画](plans/recommendation.pert)
|
|
35
|
-
- [AI 開発ガイド](docs/process/ai-development.md)
|
|
36
|
-
|
|
37
|
-
基本方針は次のとおりです。
|
|
38
|
-
|
|
39
|
-
- Activity-on-Arrow とし、タスクを DAG のエッジ、マイルストーンをノードとして扱う
|
|
40
|
-
- 独自 DSL 文書をプロジェクト状態の正本とする
|
|
41
|
-
- PERT/CPM 計算と「次のタスク」の判定を機械的かつ決定的に行う
|
|
42
|
-
- 相対見積り`p`を基準に保持し、明示したproject-wide velocityで`d`または`h`の予測へexact換算する
|
|
43
|
-
- 共有resourceのcapacityから排他実行と並列実行可能数を扱う
|
|
44
|
-
- Mermaid との相互変換、CLI、構造化ヘルプ、AI向けJSON操作導線を同じ共通コア上に提供する
|
|
45
|
-
- MVPはCLIをprimary interfaceとし、MCP/LSP adapterはMVP後に追加する
|
|
46
|
-
- 現行文書は現在と未来を表し、過去は Git 履歴で追跡する
|
|
47
|
-
- 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.
|
|
7
|
+
|
|
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
|
|
13
|
+
|
|
14
|
+
Use `npx` for an occasional invocation and select Contract 3 explicitly:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
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
|
|
28
|
+
```
|
|
29
|
+
|
|
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.
|
|
48
33
|
|
|
49
34
|
## Install
|
|
50
35
|
|
|
51
|
-
|
|
36
|
+
Install the CLI globally when it is used regularly:
|
|
52
37
|
|
|
53
38
|
```sh
|
|
54
|
-
npm install --global perttool@
|
|
39
|
+
npm install --global perttool@0.2.0
|
|
55
40
|
perttool --version
|
|
56
41
|
```
|
|
57
42
|
|
|
58
|
-
|
|
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
|
|
62
|
+
|
|
63
|
+
milestone DONE:
|
|
64
|
+
title "Done"
|
|
65
|
+
|
|
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:
|
|
59
72
|
|
|
60
73
|
```sh
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
perttool --version
|
|
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
|
|
66
78
|
```
|
|
67
79
|
|
|
68
|
-
|
|
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.
|
|
69
84
|
|
|
70
|
-
##
|
|
85
|
+
## Maintain a plan through the CLI
|
|
71
86
|
|
|
72
|
-
|
|
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:
|
|
73
91
|
|
|
74
92
|
```sh
|
|
75
|
-
|
|
76
|
-
|
|
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
|
|
77
107
|
```
|
|
78
108
|
|
|
79
|
-
|
|
109
|
+
For an existing plan:
|
|
80
110
|
|
|
81
111
|
```sh
|
|
82
|
-
|
|
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.
|
|
116
|
+
perttool project show PLAN.pert --format json
|
|
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
|
|
83
128
|
```
|
|
84
129
|
|
|
85
|
-
|
|
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:
|
|
86
133
|
|
|
87
134
|
```sh
|
|
88
|
-
perttool
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
perttool dsl format PLAN.pert --check
|
|
92
|
-
perttool dsl format PLAN.pert --diff
|
|
93
|
-
perttool dsl format PLAN.pert --write --expect-digest "$EXPECTED_DIGEST"
|
|
94
|
-
perttool dsl help syntax estimate --level detail --format json
|
|
95
|
-
perttool dsl help syntax velocity --level detail --format json
|
|
96
|
-
perttool dag analyze docs/examples/point-velocity.pert --format json
|
|
97
|
-
perttool dag analyze docs/examples/parallel.pert
|
|
98
|
-
perttool dag analyze docs/examples/parallel.pert --capacity DEVELOPERS=3 --capacity TEST_ENV=2 --format json
|
|
99
|
-
perttool dag next docs/examples/parallel.pert
|
|
100
|
-
perttool dag next docs/examples/parallel.pert --capacity DEVELOPERS=3 --format json
|
|
101
|
-
perttool dag advance docs/examples/advance-partial-before.pert --diff
|
|
102
|
-
perttool dag advance PLAN.pert --write --expect-digest "$EXPECTED_DIGEST"
|
|
103
|
-
perttool dag render docs/examples/parallel.pert --to mermaid --analysis both
|
|
104
|
-
perttool dag render docs/examples/parallel.pert --to mermaid --analysis resource --capacity TEST_ENV=2 --out parallel.mmd
|
|
105
|
-
perttool dag import parallel.mmd --from mermaid
|
|
106
|
-
perttool dag import parallel.mmd --from mermaid --strict-loss --out parallel.pert
|
|
107
|
-
perttool task set docs/examples/minimal.pert WORK --status active --diff
|
|
108
|
-
perttool task set PLAN.pert WORK --status active --write --expect-digest "$EXPECTED_DIGEST"
|
|
109
|
-
perttool resource set docs/examples/parallel.pert TEST_ENV --capacity 2 --format json
|
|
110
|
-
perttool mutation apply docs/examples/minimal.pert --request changes.json --diff
|
|
111
|
-
perttool mutation apply PLAN.pert --request changes.json --out UPDATED.pert
|
|
135
|
+
perttool gate add PLAN.pert APPROVAL NOW DONE \
|
|
136
|
+
--reason "Approval required" \
|
|
137
|
+
--diff
|
|
112
138
|
```
|
|
113
139
|
|
|
114
|
-
`
|
|
140
|
+
Use `batch apply` when several changes must become valid atomically:
|
|
115
141
|
|
|
116
|
-
|
|
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
|
+
```
|
|
117
149
|
|
|
118
|
-
|
|
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:
|
|
119
175
|
|
|
120
|
-
|
|
176
|
+
```sh
|
|
177
|
+
perttool task set --help
|
|
178
|
+
perttool help dag next --format json
|
|
179
|
+
perttool guide editing --level detail --format json
|
|
180
|
+
```
|
|
121
181
|
|
|
122
|
-
|
|
182
|
+
## LLM and automation use
|
|
123
183
|
|
|
124
|
-
`
|
|
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.
|
|
125
189
|
|
|
126
|
-
|
|
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.
|
|
127
194
|
|
|
128
|
-
|
|
195
|
+
## Documentation
|
|
129
196
|
|
|
130
|
-
|
|
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)
|
|
131
207
|
|
|
132
208
|
## Security and license
|
|
133
209
|
|
|
134
|
-
|
|
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-help.d.ts","sourceRoot":"","sources":["../../src/application/agent-help.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,wBAAgB,YAAY,CAC1B,KAAK,GAAE,kBAAuB,GAC7B,mBAAmB,CAErB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-help.js","sourceRoot":"","sources":["../../src/application/agent-help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAM/D,MAAM,UAAU,YAAY,CAC1B,KAAK,GAAuB,EAAE;IAE9B,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -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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AE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC;QAC3B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,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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