agentplane 0.3.1 → 0.3.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.
- package/assets/AGENTS.md +5 -4
- package/assets/agents/CODER.json +4 -3
- package/assets/agents/DOCS.json +1 -1
- package/assets/agents/INTEGRATOR.json +1 -1
- package/assets/agents/ORCHESTRATOR.json +1 -0
- package/assets/agents/PLANNER.json +1 -0
- package/assets/agents/TESTER.json +3 -1
- package/assets/policy/dod.code.md +2 -2
- package/assets/policy/dod.core.md +16 -2
- package/assets/policy/dod.docs.md +2 -2
- package/assets/policy/incidents.md +44 -1
- package/assets/policy/workflow.direct.md +10 -5
- package/bin/agentplane.js +116 -18
- package/bin/dist-guard.js +78 -10
- package/bin/runtime-context.d.ts +23 -0
- package/bin/runtime-context.js +94 -0
- package/bin/runtime-watch.d.ts +26 -0
- package/bin/runtime-watch.js +116 -0
- package/bin/stale-dist-policy.d.ts +6 -0
- package/bin/stale-dist-policy.js +44 -0
- package/dist/.build-manifest.json +2480 -5
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +9 -12
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +23 -18
- package/dist/backends/task-backend/shared/constants.d.ts +1 -0
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +1 -0
- package/dist/backends/task-backend/shared/doc.d.ts +1 -0
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +4 -1
- package/dist/backends/task-backend/shared/export.js +3 -3
- package/dist/cli/bootstrap-guide.d.ts +16 -0
- package/dist/cli/bootstrap-guide.d.ts.map +1 -0
- package/dist/cli/bootstrap-guide.js +112 -0
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +62 -203
- package/dist/cli/command-snippets.d.ts +2 -2
- package/dist/cli/command-snippets.js +2 -2
- package/dist/cli/run-cli/catalog.d.ts +7 -0
- package/dist/cli/run-cli/catalog.d.ts.map +1 -0
- package/dist/cli/run-cli/catalog.js +22 -0
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +11 -0
- package/dist/cli/run-cli/commands/core.js +1 -1
- package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-config.js +2 -0
- package/dist/cli/run-cli/commands/init.js +5 -14
- package/dist/cli/run-cli/error-guidance.d.ts +9 -0
- package/dist/cli/run-cli/error-guidance.d.ts.map +1 -0
- package/dist/cli/run-cli/error-guidance.js +180 -0
- package/dist/cli/run-cli/globals.d.ts +22 -0
- package/dist/cli/run-cli/globals.d.ts.map +1 -0
- package/dist/cli/run-cli/globals.js +197 -0
- package/dist/cli/run-cli/update-warning.d.ts +6 -0
- package/dist/cli/run-cli/update-warning.d.ts.map +1 -0
- package/dist/cli/run-cli/update-warning.js +64 -0
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +5 -476
- package/dist/cli/spec/docs-render.d.ts.map +1 -1
- package/dist/cli/spec/docs-render.js +14 -1
- package/dist/commands/doctor/archive.d.ts +4 -0
- package/dist/commands/doctor/archive.d.ts.map +1 -0
- package/dist/commands/doctor/archive.js +211 -0
- package/dist/commands/doctor/fixes.d.ts +9 -0
- package/dist/commands/doctor/fixes.d.ts.map +1 -0
- package/dist/commands/doctor/fixes.js +40 -0
- package/dist/commands/doctor/layering.d.ts +2 -0
- package/dist/commands/doctor/layering.d.ts.map +1 -0
- package/dist/commands/doctor/layering.js +87 -0
- package/dist/commands/doctor/runtime.d.ts +4 -0
- package/dist/commands/doctor/runtime.d.ts.map +1 -0
- package/dist/commands/doctor/runtime.js +56 -0
- package/dist/commands/doctor/workflow.d.ts +6 -0
- package/dist/commands/doctor/workflow.d.ts.map +1 -0
- package/dist/commands/doctor/workflow.js +62 -0
- package/dist/commands/doctor/workspace.d.ts +2 -0
- package/dist/commands/doctor/workspace.d.ts.map +1 -0
- package/dist/commands/doctor/workspace.js +165 -0
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +16 -305
- package/dist/commands/doctor.spec.d.ts +1 -0
- package/dist/commands/doctor.spec.d.ts.map +1 -1
- package/dist/commands/doctor.spec.js +15 -1
- package/dist/commands/finish.run.d.ts.map +1 -1
- package/dist/commands/finish.run.js +1 -0
- package/dist/commands/finish.spec.d.ts +1 -0
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +23 -2
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +19 -0
- package/dist/commands/release/apply.command.d.ts +2 -7
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +159 -382
- package/dist/commands/release/apply.mutation.d.ts +7 -0
- package/dist/commands/release/apply.mutation.d.ts.map +1 -0
- package/dist/commands/release/apply.mutation.js +107 -0
- package/dist/commands/release/apply.preflight.d.ts +25 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -0
- package/dist/commands/release/apply.preflight.js +338 -0
- package/dist/commands/release/apply.reporting.d.ts +4 -0
- package/dist/commands/release/apply.reporting.d.ts.map +1 -0
- package/dist/commands/release/apply.reporting.js +24 -0
- package/dist/commands/release/apply.types.d.ts +46 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -0
- package/dist/commands/release/apply.types.js +1 -0
- package/dist/commands/runtime.command.d.ts +28 -0
- package/dist/commands/runtime.command.d.ts.map +1 -0
- package/dist/commands/runtime.command.js +169 -0
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +7 -3
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +3 -33
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +2 -2
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +2 -2
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +2 -2
- package/dist/commands/task/comment.js +2 -2
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +3 -3
- package/dist/commands/task/doc-template.d.ts +10 -0
- package/dist/commands/task/doc-template.d.ts.map +1 -0
- package/dist/commands/task/doc-template.js +104 -0
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +36 -1
- package/dist/commands/task/finish.d.ts +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +26 -10
- package/dist/commands/task/migrate-doc.command.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.command.js +5 -1
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +136 -2
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +4 -110
- package/dist/commands/task/new.spec.js +3 -3
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +5 -4
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +7 -52
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +2 -2
- package/dist/commands/task/shared/dependencies.d.ts +15 -0
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -0
- package/dist/commands/task/shared/dependencies.js +143 -0
- package/dist/commands/task/shared/docs.d.ts +21 -0
- package/dist/commands/task/shared/docs.d.ts.map +1 -0
- package/dist/commands/task/shared/docs.js +121 -0
- package/dist/commands/task/shared/listing.d.ts +20 -0
- package/dist/commands/task/shared/listing.d.ts.map +1 -0
- package/dist/commands/task/shared/listing.js +127 -0
- package/dist/commands/task/shared/tags.d.ts +24 -0
- package/dist/commands/task/shared/tags.d.ts.map +1 -0
- package/dist/commands/task/shared/tags.js +177 -0
- package/dist/commands/task/shared/transitions.d.ts +42 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -0
- package/dist/commands/task/shared/transitions.js +175 -0
- package/dist/commands/task/shared.d.ts +5 -106
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +5 -681
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +7 -5
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +9 -25
- package/dist/commands/task/verify-show.command.d.ts.map +1 -1
- package/dist/commands/task/verify-show.command.js +5 -1
- package/dist/commands/upgrade/apply.d.ts +44 -0
- package/dist/commands/upgrade/apply.d.ts.map +1 -0
- package/dist/commands/upgrade/apply.js +180 -0
- package/dist/commands/upgrade/report.d.ts +21 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -0
- package/dist/commands/upgrade/report.js +81 -0
- package/dist/commands/upgrade/source.d.ts +35 -0
- package/dist/commands/upgrade/source.d.ts.map +1 -0
- package/dist/commands/upgrade/source.js +109 -0
- package/dist/commands/upgrade/types.d.ts +31 -0
- package/dist/commands/upgrade/types.d.ts.map +1 -0
- package/dist/commands/upgrade/types.js +1 -0
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +11 -7
- package/dist/commands/upgrade.d.ts +1 -35
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +54 -320
- package/dist/shared/diagnostics.d.ts +23 -0
- package/dist/shared/diagnostics.d.ts.map +1 -0
- package/dist/shared/diagnostics.js +57 -0
- package/dist/shared/errors.d.ts +2 -0
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +2 -0
- package/dist/shared/repo-cli-version.d.ts +13 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -0
- package/dist/shared/repo-cli-version.js +63 -0
- package/dist/shared/runtime-source.d.ts +33 -0
- package/dist/shared/runtime-source.d.ts.map +1 -0
- package/dist/shared/runtime-source.js +156 -0
- package/dist/shared/version-compare.d.ts +7 -0
- package/dist/shared/version-compare.d.ts.map +1 -0
- package/dist/shared/version-compare.js +30 -0
- package/package.json +2 -2
|
@@ -1,183 +1,98 @@
|
|
|
1
1
|
import { COMMAND_SNIPPETS } from "./command-snippets.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
operation: "PLANNER: set/approve/reject plan",
|
|
9
|
-
command: '`agentplane task plan set <task-id> --text "..." --updated-by <id>` / `agentplane task plan approve <task-id> --by <id> --note "OK"`',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
operation: "PLANNER: create task (auto ID)",
|
|
13
|
-
command: '`agentplane task new --title "..." --description "..." --priority med --owner CODER --tag <tag> [--depends-on <task-id|json>]`',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
operation: "PLANNER: add/update task",
|
|
17
|
-
command: "`agentplane task add <task-id> ...` / `agentplane task update <task-id> ...`",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
operation: "PLANNER: backfill/repair scaffold",
|
|
21
|
-
command: "`agentplane task scaffold <task-id>` (backfill/import/manual repair only)",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
operation: "PLANNER: derive implementation from spike",
|
|
25
|
-
command: '`agentplane task derive <spike-id> --title "..." --description "..." --priority med --owner CODER --tag code`',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
operation: "Config: show/set",
|
|
29
|
-
command: "`agentplane config show` / `agentplane config set <key> <value>`",
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
operation: "CODER/TESTER/DOCS: start checkout (branch_pr)",
|
|
33
|
-
command: "`agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree`",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
operation: "CODER/TESTER: start task deterministically",
|
|
37
|
-
command: '`agentplane task start-ready <task-id> --author <ROLE> --body "Start: ..."` (run after successful `task plan approve`; do not run in parallel)',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
operation: "CODER/TESTER/DOCS: update PR artifacts",
|
|
41
|
-
command: "`agentplane pr update <task-id>`",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
operation: "CODER/TESTER/DOCS/REVIEWER: add handoff note",
|
|
45
|
-
command: '`agentplane pr note <task-id> --author <ROLE> --body "..."`',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
operation: "CODER/TESTER: verify task",
|
|
49
|
-
command: '`agentplane verify <task-id> --ok|--rework --by <id> --note "..."` (record-only; appends to README)',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
operation: "CODER/TESTER: print Verify Steps",
|
|
53
|
-
command: "`agentplane task verify-show <task-id>`",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
operation: "REVIEWER: check PR artifacts",
|
|
57
|
-
command: "`agentplane pr check <task-id>`",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
operation: "INTEGRATOR: integrate task",
|
|
61
|
-
command: "`agentplane integrate <task-id> --branch task/<task-id>/<slug> --merge-strategy squash --run-verify`",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
operation: "INTEGRATOR: finish task(s)",
|
|
65
|
-
command: '`agentplane finish <task-id> [<task-id> ...] --commit <git-rev> --author INTEGRATOR --body "Verified: ..." [--result "<one line>"] [--close-commit] [--close-unstage-others]`',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
operation: "INTEGRATOR: commit closure",
|
|
69
|
-
command: "Preferred: `agentplane finish <task-id> --close-commit` (single command). Legacy/manual: `agentplane commit <task-id> --close [--check-only] [--unstage-others]` / duplicate no-op close: `agentplane task close-duplicate <task-id> --of <canonical-task-id> --author <ROLE>`",
|
|
70
|
-
},
|
|
71
|
-
];
|
|
2
|
+
import { AGENT_BOOTSTRAP_DOC_PATH, BOOTSTRAP_PREFLIGHT_COMMANDS, BOOTSTRAP_TASK_PREP_COMMANDS, } from "./bootstrap-guide.js";
|
|
3
|
+
const CLI_REFERENCE_DOC_PATH = "docs/user/cli-reference.generated.mdx";
|
|
4
|
+
function renderQuickstartCommandBlock(commands) {
|
|
5
|
+
return ["```bash", ...commands, "```"];
|
|
6
|
+
}
|
|
72
7
|
const ROLE_GUIDES = [
|
|
73
8
|
{
|
|
74
9
|
role: "ORCHESTRATOR",
|
|
75
10
|
lines: [
|
|
76
|
-
|
|
77
|
-
"-
|
|
78
|
-
"-
|
|
79
|
-
"- Two-stage verification: `## Verify Steps` is the ex-ante contract; `agentplane verify ...` appends an ex-post entry into `## Verification`.",
|
|
11
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
12
|
+
"- Owns preflight, plan summaries, approvals, and scope checkpoints.",
|
|
13
|
+
"- Does not create non-executable tasks or bypass lifecycle guardrails.",
|
|
80
14
|
],
|
|
81
15
|
},
|
|
82
16
|
{
|
|
83
17
|
role: "PLANNER",
|
|
84
18
|
lines: [
|
|
85
|
-
|
|
86
|
-
'- Create tasks
|
|
87
|
-
'-
|
|
88
|
-
"-
|
|
89
|
-
'- Plan lifecycle: `agentplane task plan set <task-id> --text "..." --updated-by <ROLE>` -> `agentplane task plan approve <task-id> --by <id>`',
|
|
90
|
-
"- Verify Steps discipline: if a task primary tag is verify-required (default: code/data/ops), fill `## Verify Steps` before plan approval.",
|
|
91
|
-
"- Doc quality gate: `task plan approve` and `finish` fail when required agent-filled sections (`Summary/Scope/Plan/Risks/Rollback Plan`, per config) are empty/TODO placeholders.",
|
|
92
|
-
'- Task docs (when planning needs it): `agentplane task doc set <task-id> --section Summary --text "..."`; if `--text`/`--file` contains multiple known headings, the command applies it as one batched full-doc update.',
|
|
19
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
20
|
+
'- Create executable tasks with `agentplane task new --title "..." --description "..." --priority med --owner <ROLE> --tag <tag>`.',
|
|
21
|
+
'- Fill docs with `agentplane task doc set <task-id> --section <name> --text "..."` and set plan text with `agentplane task plan set <task-id> --text "..." --updated-by <ROLE>`.',
|
|
22
|
+
"- Approve plan only after required sections and Verify Steps are ready.",
|
|
93
23
|
],
|
|
94
24
|
},
|
|
95
25
|
{
|
|
96
26
|
role: "CODER",
|
|
97
27
|
lines: [
|
|
98
|
-
|
|
99
|
-
"-
|
|
100
|
-
|
|
101
|
-
'-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
'- PR artifacts (branch_pr): `agentplane pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>` / `agentplane pr update <task-id>` / `agentplane pr note <task-id> --author <ROLE> --body "..."`',
|
|
105
|
-
'- Commit: `agentplane guard commit <task-id> -m "<emoji> <suffix> <scope>: <summary>"` / `agentplane commit <task-id> -m "<emoji> <suffix> <scope>: <summary>" --allow <path-prefix>` / preferred close path: `agentplane finish <task-id> --close-commit [--close-unstage-others]`',
|
|
28
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
29
|
+
"- direct: stay in the current checkout; branch_pr: start a task branch/worktree first.",
|
|
30
|
+
`- Start deterministically with \`${COMMAND_SNIPPETS.core.startTask}\` after plan approval.`,
|
|
31
|
+
'- Treat `agentplane task verify-show <task-id>` as the verification contract, then record `agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."`.',
|
|
32
|
+
`- Preferred direct close path: \`${COMMAND_SNIPPETS.core.finishTask}\` with \`--result "..." \`; add \`--no-close-commit\` only for explicit manual close handling.`,
|
|
33
|
+
"- For manual close or allowlist detail, use `agentplane help finish` and `agentplane help commit` on demand.",
|
|
106
34
|
],
|
|
107
35
|
},
|
|
108
36
|
{
|
|
109
37
|
role: "TESTER",
|
|
110
38
|
lines: [
|
|
111
|
-
|
|
112
|
-
"-
|
|
113
|
-
'-
|
|
114
|
-
|
|
115
|
-
"-
|
|
116
|
-
'- Verify: `agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."`',
|
|
117
|
-
'- PR artifacts (branch_pr): `agentplane pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>` / `agentplane pr update <task-id>` / `agentplane pr note <task-id> --author <ROLE> --body "..."`',
|
|
118
|
-
'- Commit: `agentplane guard commit <task-id> -m "<emoji> <suffix> <scope>: <summary>"` / `agentplane commit <task-id> -m "<emoji> <suffix> <scope>: <summary>" --allow <path-prefix>` / preferred close path: `agentplane finish <task-id> --close-commit [--close-unstage-others]`',
|
|
39
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
40
|
+
"- Start only after plan approval and explicit Verify Steps exist.",
|
|
41
|
+
'- Use `agentplane task verify-show <task-id>` before running checks, then record `agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."`.',
|
|
42
|
+
`- In direct mode, close with \`${COMMAND_SNIPPETS.core.finishTask}\` plus \`--result "..." \` when you own final verification.`,
|
|
43
|
+
"- For mixed-state recovery or runtime ambiguity, use `agentplane doctor` and `agentplane runtime explain` instead of relying on the short quickstart screen.",
|
|
119
44
|
],
|
|
120
45
|
},
|
|
121
46
|
{
|
|
122
47
|
role: "DOCS",
|
|
123
48
|
lines: [
|
|
124
|
-
|
|
125
|
-
'-
|
|
126
|
-
|
|
49
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
50
|
+
'- Keep task docs and user docs aligned with runtime behavior via `agentplane task doc set <task-id> --section <name> --text "..."`.',
|
|
51
|
+
"- For implementation tasks, verify generated/help surfaces after changing CLI-facing text.",
|
|
52
|
+
`- Treat \`${CLI_REFERENCE_DOC_PATH}\` as the deep reference surface; keep first-screen help intentionally shorter.`,
|
|
127
53
|
],
|
|
128
54
|
},
|
|
129
55
|
{
|
|
130
56
|
role: "REVIEWER",
|
|
131
57
|
lines: [
|
|
132
|
-
|
|
133
|
-
|
|
58
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
59
|
+
"- Review artifacts with `agentplane task show <task-id>` and `agentplane pr check <task-id>` when relevant.",
|
|
60
|
+
"- Focus on regressions, lifecycle drift, and missing verification evidence.",
|
|
134
61
|
],
|
|
135
62
|
},
|
|
136
63
|
{
|
|
137
64
|
role: "INTEGRATOR",
|
|
138
65
|
lines: [
|
|
139
|
-
|
|
140
|
-
'-
|
|
141
|
-
|
|
66
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
67
|
+
'- branch_pr: `agentplane pr check <task-id>` -> `agentplane integrate <task-id> --branch task/<task-id>/<slug> --merge-strategy squash --run-verify` -> `agentplane finish <task-id> --commit <git-rev> --author INTEGRATOR --body "Verified: ..." --result "..." --close-commit`.',
|
|
68
|
+
`- direct: the task owner normally closes with \`${COMMAND_SNIPPETS.core.finishTask}\` plus \`--result "..." \`.`,
|
|
69
|
+
"- For branch-level flags and branch/base diagnostics, use `agentplane help work start`, `agentplane help integrate`, and `agentplane help branch base`.",
|
|
142
70
|
],
|
|
143
71
|
},
|
|
144
72
|
{
|
|
145
73
|
role: "CREATOR",
|
|
146
74
|
lines: [
|
|
147
|
-
|
|
148
|
-
|
|
75
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
76
|
+
`- Use \`${COMMAND_SNIPPETS.core.startTask}\` only when the new-agent creation task is approved and ready.`,
|
|
77
|
+
"- Keep commits scoped to the created agent artifacts and task docs.",
|
|
149
78
|
],
|
|
150
79
|
},
|
|
151
80
|
{
|
|
152
81
|
role: "REDMINE",
|
|
153
82
|
lines: [
|
|
154
|
-
`-
|
|
155
|
-
|
|
83
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
84
|
+
`- Sync explicitly with \`${COMMAND_SNIPPETS.sync.pullRedmineExplicit}\` / \`${COMMAND_SNIPPETS.sync.pushRedmineExplicitWithYes}\`.`,
|
|
85
|
+
"- After sync, follow the same task/bootstrap lifecycle as local backends.",
|
|
156
86
|
],
|
|
157
87
|
},
|
|
158
88
|
{
|
|
159
89
|
role: "UPDATER",
|
|
160
90
|
lines: [
|
|
161
|
-
|
|
91
|
+
`- Shared bootstrap path: \`${COMMAND_SNIPPETS.core.quickstart}\` -> \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
92
|
+
"- Read-only role: inspect state, do not mutate task or workflow artifacts.",
|
|
162
93
|
],
|
|
163
94
|
},
|
|
164
95
|
];
|
|
165
|
-
function renderCheatSheet(rows) {
|
|
166
|
-
const lines = ["Operation | Command", "--- | ---"];
|
|
167
|
-
for (const row of rows) {
|
|
168
|
-
lines.push(`${row.operation} | ${row.command}`);
|
|
169
|
-
}
|
|
170
|
-
return lines;
|
|
171
|
-
}
|
|
172
|
-
function renderRoleSection() {
|
|
173
|
-
const lines = [];
|
|
174
|
-
for (const guide of ROLE_GUIDES) {
|
|
175
|
-
lines.push(`### ${guide.role}`, ...guide.lines, "");
|
|
176
|
-
}
|
|
177
|
-
if (lines.at(-1) === "")
|
|
178
|
-
lines.pop();
|
|
179
|
-
return lines;
|
|
180
|
-
}
|
|
181
96
|
export function listRoles() {
|
|
182
97
|
return ROLE_GUIDES.map((guide) => guide.role);
|
|
183
98
|
}
|
|
@@ -195,92 +110,36 @@ export function renderQuickstart() {
|
|
|
195
110
|
return [
|
|
196
111
|
"# agentplane quickstart",
|
|
197
112
|
"",
|
|
198
|
-
"The policy gateway file (AGENTS.md or CLAUDE.md) is the source of truth for workflow/process policy
|
|
113
|
+
"The policy gateway file (AGENTS.md or CLAUDE.md) is the source of truth for workflow/process policy.",
|
|
114
|
+
"Keep this first screen short: use it for startup only, then go deeper with `agentplane role <ROLE>` or `agentplane help <command>`.",
|
|
199
115
|
"Do not edit `.agentplane/tasks.json` by hand.",
|
|
116
|
+
"If the repository is not initialized yet, stop and run `agentplane init` first.",
|
|
200
117
|
"",
|
|
201
|
-
|
|
202
|
-
"",
|
|
203
|
-
"## Project setup",
|
|
204
|
-
"",
|
|
205
|
-
"- `agentplane init` (bootstrap `.agentplane/`)",
|
|
206
|
-
"- `agentplane config show` / `agentplane config set <key> <value>`",
|
|
207
|
-
"- `agentplane mode get` / `agentplane mode set <direct|branch_pr>`",
|
|
208
|
-
"- `agentplane ide sync` (regenerate IDE entrypoints)",
|
|
209
|
-
"",
|
|
210
|
-
"## Daily task workflow",
|
|
211
|
-
"",
|
|
212
|
-
`- \`${COMMAND_SNIPPETS.core.taskList}\` / \`${COMMAND_SNIPPETS.core.taskShow}\``,
|
|
213
|
-
`- \`${COMMAND_SNIPPETS.core.taskNew}\``,
|
|
214
|
-
`- \`${COMMAND_SNIPPETS.core.startTask}\``,
|
|
215
|
-
`- \`${COMMAND_SNIPPETS.core.verifyTask}\``,
|
|
216
|
-
`- \`${COMMAND_SNIPPETS.core.finishTask}\``,
|
|
217
|
-
"",
|
|
218
|
-
"## Harness engeneering loop",
|
|
219
|
-
"",
|
|
220
|
-
"- Constrain: policy + workflow contract first.",
|
|
221
|
-
"- Execute: small explicit transitions.",
|
|
222
|
-
"- Observe: structured artifacts and diagnostics.",
|
|
223
|
-
"- Recover: deterministic fallback before manual repair.",
|
|
224
|
-
"",
|
|
225
|
-
"## Branch workflow (branch_pr)",
|
|
226
|
-
"",
|
|
227
|
-
"- `agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree`",
|
|
228
|
-
"- `agentplane pr open <task-id>` / `agentplane pr update <task-id>` / `agentplane pr check <task-id>`",
|
|
229
|
-
"- `agentplane integrate <task-id> --branch task/<task-id>/<slug> --run-verify`",
|
|
230
|
-
"",
|
|
231
|
-
"## Workflow operations (core)",
|
|
232
|
-
"- `agentplane workflow debug`",
|
|
233
|
-
"- `agentplane workflow sync`",
|
|
234
|
-
"- `agentplane workflow land`",
|
|
235
|
-
"",
|
|
236
|
-
"## Recipes and scenarios (extensions)",
|
|
237
|
-
"",
|
|
238
|
-
"- `agentplane recipes list`",
|
|
239
|
-
"- `agentplane recipes list --tag <tag>`",
|
|
240
|
-
"- `agentplane recipes explain <id>`",
|
|
241
|
-
"- `agentplane scenario list`",
|
|
242
|
-
"- `agentplane scenario run <recipe:scenario>`",
|
|
243
|
-
"",
|
|
244
|
-
"## More guidance",
|
|
245
|
-
"",
|
|
246
|
-
`- \`${COMMAND_SNIPPETS.core.quickstart}\` and \`${COMMAND_SNIPPETS.core.role}\` show command guidance.`,
|
|
247
|
-
"",
|
|
248
|
-
"## Agent cheat sheet",
|
|
249
|
-
"",
|
|
250
|
-
...renderCheatSheet(CHEAT_SHEET_ROWS),
|
|
251
|
-
"",
|
|
252
|
-
"## Config management",
|
|
253
|
-
"",
|
|
254
|
-
"- Show the current config: `agentplane config show`",
|
|
255
|
-
"- Set a value by dotted key: `agentplane config set workflow_mode branch_pr`",
|
|
256
|
-
'- Set JSON values (lists/objects): `agentplane config set tasks.verify.require_steps_for_primary \'["code","data","ops"]\'`',
|
|
118
|
+
`Canonical bootstrap doc: \`${AGENT_BOOTSTRAP_DOC_PATH}\`.`,
|
|
257
119
|
"",
|
|
258
|
-
"##
|
|
120
|
+
"## First screen",
|
|
259
121
|
"",
|
|
260
|
-
"
|
|
122
|
+
"Run preflight:",
|
|
261
123
|
"",
|
|
262
|
-
...
|
|
124
|
+
...renderQuickstartCommandBlock(BOOTSTRAP_PREFLIGHT_COMMANDS),
|
|
263
125
|
"",
|
|
264
|
-
"
|
|
126
|
+
"Default direct route:",
|
|
265
127
|
"",
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
"-
|
|
269
|
-
"- `--help` / `-h`: show help",
|
|
270
|
-
"- `--version`: show version",
|
|
271
|
-
"- `--no-update-check`: skip checking npm for a newer CLI version",
|
|
128
|
+
`- Task setup: \`${BOOTSTRAP_TASK_PREP_COMMANDS[0]}\` -> \`${BOOTSTRAP_TASK_PREP_COMMANDS[1]}\` -> \`${BOOTSTRAP_TASK_PREP_COMMANDS[2]}\`.`,
|
|
129
|
+
`- Execution: \`${COMMAND_SNIPPETS.core.startTask}\` -> \`agentplane task verify-show <task-id>\` -> \`${COMMAND_SNIPPETS.core.verifyTask}\` -> \`${COMMAND_SNIPPETS.core.finishTask}\` with \`--result "..." \`.`,
|
|
130
|
+
"- In `direct`, `finish` creates the deterministic close commit by default.",
|
|
272
131
|
"",
|
|
273
|
-
"
|
|
274
|
-
"- `AGENTPLANE_OUTPUT=json` enables global JSON output mode for agent runtimes.",
|
|
275
|
-
"- `.env` at the repo root is loaded automatically (without overwriting existing environment variables).",
|
|
132
|
+
"## Go deeper",
|
|
276
133
|
"",
|
|
277
|
-
|
|
134
|
+
`- \`${COMMAND_SNIPPETS.core.role}\` for role-specific deltas and mode-specific ownership rules.`,
|
|
135
|
+
"- `agentplane help <command>` for flags, examples, and exceptional/manual flows.",
|
|
136
|
+
`- \`${AGENT_BOOTSTRAP_DOC_PATH}\` for the full startup path instead of repeating it on the first screen.`,
|
|
137
|
+
`- \`${CLI_REFERENCE_DOC_PATH}\` for the generated full command reference.`,
|
|
278
138
|
"",
|
|
279
|
-
"
|
|
139
|
+
"## Non-default",
|
|
280
140
|
"",
|
|
281
|
-
"
|
|
282
|
-
"-
|
|
283
|
-
"-
|
|
284
|
-
"- Comment-driven commit bodies are structured: `Task`, `Primary`, `Status`, `Comment`.",
|
|
141
|
+
"- `branch_pr`: use `agentplane help work start`, `agentplane help pr`, and `agentplane help integrate`.",
|
|
142
|
+
"- Recovery/mixed state: use `agentplane doctor`, `agentplane upgrade`, and `agentplane runtime explain`.",
|
|
143
|
+
"- Manual close or allowlist details belong in command-specific help, not on this first screen.",
|
|
285
144
|
].join("\n");
|
|
286
145
|
}
|
|
@@ -2,10 +2,10 @@ export declare const COMMAND_SNIPPETS: {
|
|
|
2
2
|
readonly core: {
|
|
3
3
|
readonly taskList: "agentplane task list";
|
|
4
4
|
readonly taskShow: "agentplane task show <task-id>";
|
|
5
|
-
readonly taskNew: "agentplane task new --title \"...\" --description \"...\" --priority med --owner
|
|
5
|
+
readonly taskNew: "agentplane task new --title \"...\" --description \"...\" --priority med --owner <ROLE> --tag <tag>";
|
|
6
6
|
readonly startTask: "agentplane task start-ready <task-id> --author <ROLE> --body \"Start: ...\"";
|
|
7
7
|
readonly verifyTask: "agentplane verify <task-id> --ok|--rework --by <ROLE> --note \"...\"";
|
|
8
|
-
readonly finishTask: "agentplane finish <task-id> --author <ROLE> --body \"Verified: ...\" --commit <git-rev>
|
|
8
|
+
readonly finishTask: "agentplane finish <task-id> --author <ROLE> --body \"Verified: ...\" --commit <git-rev>";
|
|
9
9
|
readonly quickstart: "agentplane quickstart";
|
|
10
10
|
readonly role: "agentplane role <ROLE>";
|
|
11
11
|
};
|
|
@@ -2,10 +2,10 @@ export const COMMAND_SNIPPETS = {
|
|
|
2
2
|
core: {
|
|
3
3
|
taskList: "agentplane task list",
|
|
4
4
|
taskShow: "agentplane task show <task-id>",
|
|
5
|
-
taskNew: 'agentplane task new --title "..." --description "..." --priority med --owner
|
|
5
|
+
taskNew: 'agentplane task new --title "..." --description "..." --priority med --owner <ROLE> --tag <tag>',
|
|
6
6
|
startTask: 'agentplane task start-ready <task-id> --author <ROLE> --body "Start: ..."',
|
|
7
7
|
verifyTask: 'agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."',
|
|
8
|
-
finishTask: 'agentplane finish <task-id> --author <ROLE> --body "Verified: ..." --commit <git-rev>
|
|
8
|
+
finishTask: 'agentplane finish <task-id> --author <ROLE> --body "Verified: ..." --commit <git-rev>',
|
|
9
9
|
quickstart: "agentplane quickstart",
|
|
10
10
|
role: "agentplane role <ROLE>",
|
|
11
11
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { COMMANDS } from "./command-catalog.js";
|
|
2
|
+
export type CatalogMatch = {
|
|
3
|
+
entry: (typeof COMMANDS)[number];
|
|
4
|
+
consumed: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function matchCommandCatalog(tokens: readonly string[]): CatalogMatch | null;
|
|
7
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/cli/run-cli/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,GAAG,IAAI,CAkBlF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { COMMANDS } from "./command-catalog.js";
|
|
2
|
+
export function matchCommandCatalog(tokens) {
|
|
3
|
+
let best = null;
|
|
4
|
+
for (const entry of COMMANDS) {
|
|
5
|
+
const id = entry.spec.id;
|
|
6
|
+
if (tokens.length < id.length)
|
|
7
|
+
continue;
|
|
8
|
+
let ok = true;
|
|
9
|
+
for (const [i, seg] of id.entries()) {
|
|
10
|
+
if (tokens[i] !== seg) {
|
|
11
|
+
ok = false;
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (!ok)
|
|
16
|
+
continue;
|
|
17
|
+
if (!best || id.length > best.consumed) {
|
|
18
|
+
best = { entry, consumed: id.length };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return best;
|
|
22
|
+
}
|
|
@@ -15,5 +15,5 @@ export type CommandEntry = {
|
|
|
15
15
|
needsConfig: boolean;
|
|
16
16
|
needsTaskContext: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const COMMANDS: readonly [CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry];
|
|
18
|
+
export declare const COMMANDS: readonly [CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry];
|
|
19
19
|
//# sourceMappingURL=command-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../../src/cli/run-cli/command-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../../src/cli/run-cli/command-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAmHvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEzE,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,CAAC,sBAAsB,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACpE,kBAAkB,EAAE,CAAC,sBAAsB,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACjF,eAAe,EAAE,CAAC,sBAAsB,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3E,kBAAkB,EAAE,MAAM,SAAS,QAAQ,EAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAgBF,eAAO,MAAM,QAAQ,+5CA6iBuB,CAAC"}
|
|
@@ -67,6 +67,7 @@ import { workflowBuildSpec } from "../../commands/workflow-build.command.js";
|
|
|
67
67
|
import { workflowRestoreSpec } from "../../commands/workflow-restore.command.js";
|
|
68
68
|
import { workflowDebugSpec, workflowLandSpec, workflowSyncSpec, } from "../../commands/workflow-playbook.command.js";
|
|
69
69
|
import { docsCliSpec } from "../../commands/docs/cli.command.js";
|
|
70
|
+
import { runtimeExplainSpec, runtimeSpec } from "../../commands/runtime.command.js";
|
|
70
71
|
import { hooksSpec } from "../../commands/hooks/hooks.command.js";
|
|
71
72
|
import { hooksInstallSpec } from "../../commands/hooks/install.command.js";
|
|
72
73
|
import { hooksUninstallSpec } from "../../commands/hooks/uninstall.command.js";
|
|
@@ -124,6 +125,16 @@ export const COMMANDS = [
|
|
|
124
125
|
needsConfig: false,
|
|
125
126
|
needsTaskContext: false,
|
|
126
127
|
}),
|
|
128
|
+
entry(runtimeSpec, () => import("../../commands/runtime.command.js").then((m) => m.runRuntime), {
|
|
129
|
+
needsProject: false,
|
|
130
|
+
needsConfig: false,
|
|
131
|
+
needsTaskContext: false,
|
|
132
|
+
}),
|
|
133
|
+
entry(runtimeExplainSpec, () => import("../../commands/runtime.command.js").then((m) => m.runRuntimeExplain), {
|
|
134
|
+
needsProject: false,
|
|
135
|
+
needsConfig: false,
|
|
136
|
+
needsTaskContext: false,
|
|
137
|
+
}),
|
|
127
138
|
entry(roleSpec, () => import("./commands/core.js").then((m) => m.runRole), {
|
|
128
139
|
needsProject: false,
|
|
129
140
|
needsConfig: false,
|
|
@@ -15,7 +15,7 @@ import { wrapCommand } from "./wrap-command.js";
|
|
|
15
15
|
export const quickstartSpec = {
|
|
16
16
|
id: ["quickstart"],
|
|
17
17
|
group: "Core",
|
|
18
|
-
summary: "Print
|
|
18
|
+
summary: "Print the canonical agent bootstrap path and startup guidance.",
|
|
19
19
|
options: [
|
|
20
20
|
{
|
|
21
21
|
kind: "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-config.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/write-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"write-config.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/write-config.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;IACpD,gBAAgB,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC5C,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,yCAAyC,EAAE,MAAM,EAAE,CAAC;CACrD,CAAC;AAEF,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,OAAO,GAAG,SAAS,GAC3B,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,sBAAsB,EAAE,OAAO,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,mBAAmB,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BhB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBhB"}
|
|
@@ -2,6 +2,7 @@ import { mkdir } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { defaultConfig, saveConfig, setByDottedKey } from "@agentplaneorg/core";
|
|
4
4
|
import { writeJsonStableIfChanged } from "../../../../shared/write-if-changed.js";
|
|
5
|
+
import { getVersion } from "../../../../meta/version.js";
|
|
5
6
|
export async function ensureAgentplaneDirs(agentplaneDir, backend) {
|
|
6
7
|
await mkdir(agentplaneDir, { recursive: true });
|
|
7
8
|
await mkdir(path.join(agentplaneDir, "tasks"), { recursive: true });
|
|
@@ -21,6 +22,7 @@ export async function writeInitConfig(opts) {
|
|
|
21
22
|
setByDottedKey(rawConfig, "agents.approvals.require_plan", String(opts.requirePlanApproval));
|
|
22
23
|
setByDottedKey(rawConfig, "agents.approvals.require_network", String(opts.requireNetworkApproval));
|
|
23
24
|
setByDottedKey(rawConfig, "agents.approvals.require_verify", String(opts.requireVerifyApproval));
|
|
25
|
+
setByDottedKey(rawConfig, "framework.cli.expected_version", getVersion());
|
|
24
26
|
setByDottedKey(rawConfig, "execution", JSON.stringify(opts.execution));
|
|
25
27
|
await saveConfig(opts.agentplaneDir, rawConfig);
|
|
26
28
|
}
|
|
@@ -220,8 +220,8 @@ export const initSpec = {
|
|
|
220
220
|
why: "Non-interactive setup with flexible defaults.",
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
cmd: "agentplane init --workflow direct --backend local --hooks true --require-
|
|
224
|
-
why: "Non-interactive setup with explicit
|
|
223
|
+
cmd: "agentplane init --workflow direct --backend local --hooks true --require-network-approval true --yes",
|
|
224
|
+
why: "Non-interactive setup with profile defaults plus an explicit network-approval override.",
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
cmd: "agentplane init --force --yes",
|
|
@@ -318,14 +318,11 @@ async function cmdInit(opts) {
|
|
|
318
318
|
const isInteractive = process.stdin.isTTY && !flags.yes;
|
|
319
319
|
if (!process.stdin.isTTY &&
|
|
320
320
|
!flags.yes &&
|
|
321
|
-
(!flags.workflow ||
|
|
322
|
-
flags.requirePlanApproval === undefined ||
|
|
323
|
-
flags.requireNetworkApproval === undefined ||
|
|
324
|
-
flags.requireVerifyApproval === undefined)) {
|
|
321
|
+
(!flags.workflow || flags.requireNetworkApproval === undefined)) {
|
|
325
322
|
throw usageError({
|
|
326
323
|
spec: initSpec,
|
|
327
324
|
command: "init",
|
|
328
|
-
message: "Non-interactive init requires --yes or explicit values for: --workflow, --require-
|
|
325
|
+
message: "Non-interactive init requires --yes or explicit values for: --workflow, --require-network-approval.",
|
|
329
326
|
});
|
|
330
327
|
}
|
|
331
328
|
if (isInteractive) {
|
|
@@ -406,16 +403,10 @@ async function cmdInit(opts) {
|
|
|
406
403
|
if (flags.strictUnsafeConfirm === undefined) {
|
|
407
404
|
strictUnsafeConfirm = await askYesNo("Require strict explicit confirmation for extra unsafe actions?", strictUnsafeConfirm);
|
|
408
405
|
}
|
|
409
|
-
process.stdout.write(renderInitSection("
|
|
410
|
-
if (flags.requirePlanApproval === undefined) {
|
|
411
|
-
requirePlanApproval = await askYesNo("Require plan approval before work starts?", requirePlanApproval);
|
|
412
|
-
}
|
|
406
|
+
process.stdout.write(renderInitSection("Network Approval", "Control whether network actions require explicit approval by default. Plan and verification approvals follow the selected setup profile unless you override them with explicit flags."));
|
|
413
407
|
if (flags.requireNetworkApproval === undefined) {
|
|
414
408
|
requireNetworkApproval = await askYesNo("Require explicit approval for network actions?", requireNetworkApproval);
|
|
415
409
|
}
|
|
416
|
-
if (flags.requireVerifyApproval === undefined) {
|
|
417
|
-
requireVerifyApproval = await askYesNo("Require explicit approval before recording verification?", requireVerifyApproval);
|
|
418
|
-
}
|
|
419
410
|
process.stdout.write(renderInitSection("Recipes", "Optional: install recipe packs now (comma-separated IDs) or choose none."));
|
|
420
411
|
if (!flags.recipes) {
|
|
421
412
|
process.stdout.write(`${renderBundledRecipesHint()}\n`);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CliError } from "../../shared/errors.js";
|
|
2
|
+
export type NextAction = {
|
|
3
|
+
command: string;
|
|
4
|
+
reason: string;
|
|
5
|
+
reasonCode?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function writeError(err: CliError, jsonErrors: boolean): void;
|
|
8
|
+
export declare function resolveAgentplaneHome(): string;
|
|
9
|
+
//# sourceMappingURL=error-guidance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-guidance.d.ts","sourceRoot":"","sources":["../../../src/cli/run-cli/error-guidance.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGvD,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AASF,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CA4CnE;AAID,wBAAgB,qBAAqB,IAAI,MAAM,CAI9C"}
|