agentplane 0.2.23 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/assets/AGENTS.md +44 -30
  2. package/assets/agents/CODER.json +1 -1
  3. package/assets/agents/DOCS.json +1 -1
  4. package/assets/agents/ORCHESTRATOR.json +10 -9
  5. package/assets/agents/PLANNER.json +9 -4
  6. package/assets/agents/TESTER.json +1 -1
  7. package/dist/cli/command-guide.js +7 -7
  8. package/dist/cli/run-cli/commands/init.d.ts +1 -1
  9. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  10. package/dist/cli/run-cli/commands/init.js +80 -37
  11. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  12. package/dist/cli/run-cli.test-helpers.js +4 -5
  13. package/dist/commands/block.spec.d.ts.map +1 -1
  14. package/dist/commands/block.spec.js +23 -2
  15. package/dist/commands/commit.spec.d.ts.map +1 -1
  16. package/dist/commands/commit.spec.js +18 -6
  17. package/dist/commands/finish.spec.d.ts.map +1 -1
  18. package/dist/commands/finish.spec.js +53 -4
  19. package/dist/commands/guard/commit.command.d.ts.map +1 -1
  20. package/dist/commands/guard/commit.command.js +26 -20
  21. package/dist/commands/guard/impl/allow.d.ts.map +1 -1
  22. package/dist/commands/guard/impl/allow.js +8 -1
  23. package/dist/commands/guard/impl/commands.d.ts.map +1 -1
  24. package/dist/commands/guard/impl/commands.js +7 -15
  25. package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
  26. package/dist/commands/guard/impl/comment-commit.js +8 -17
  27. package/dist/commands/hooks/index.d.ts.map +1 -1
  28. package/dist/commands/hooks/index.js +20 -6
  29. package/dist/commands/release/apply.command.d.ts.map +1 -1
  30. package/dist/commands/release/apply.command.js +18 -3
  31. package/dist/commands/release/plan.command.js +1 -1
  32. package/dist/commands/scenario/impl/commands.d.ts +18 -0
  33. package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
  34. package/dist/commands/scenario/impl/commands.js +37 -5
  35. package/dist/commands/shared/pr-meta.d.ts +5 -0
  36. package/dist/commands/shared/pr-meta.d.ts.map +1 -1
  37. package/dist/commands/shared/pr-meta.js +11 -1
  38. package/dist/commands/start.spec.d.ts.map +1 -1
  39. package/dist/commands/start.spec.js +23 -2
  40. package/dist/commands/task/finish.d.ts.map +1 -1
  41. package/dist/commands/task/finish.js +32 -10
  42. package/dist/commands/task/new.d.ts.map +1 -1
  43. package/dist/commands/task/new.js +110 -7
  44. package/dist/commands/task/new.spec.d.ts.map +1 -1
  45. package/dist/commands/task/new.spec.js +2 -1
  46. package/dist/commands/task/set-status.command.d.ts.map +1 -1
  47. package/dist/commands/task/set-status.command.js +22 -2
  48. package/dist/commands/task/shared.d.ts +5 -0
  49. package/dist/commands/task/shared.d.ts.map +1 -1
  50. package/dist/commands/task/shared.js +68 -4
  51. package/dist/commands/task/update.d.ts.map +1 -1
  52. package/dist/commands/task/update.js +6 -1
  53. package/dist/policy/rules/allowlist.d.ts.map +1 -1
  54. package/dist/policy/rules/allowlist.js +9 -0
  55. package/dist/shared/allow-prefix-policy.d.ts +3 -0
  56. package/dist/shared/allow-prefix-policy.d.ts.map +1 -0
  57. package/dist/shared/allow-prefix-policy.js +8 -0
  58. package/package.json +2 -2
package/assets/AGENTS.md CHANGED
@@ -15,6 +15,18 @@ This policy is designed to be the single, authoritative instruction set the agen
15
15
 
16
16
  # GLOBAL RULES
17
17
 
18
+ ## Language of artifacts
19
+
20
+ - All repository-facing artifacts, including task titles, task descriptions, generated docs, notes, and comments must be in English unless the user explicitly requests another language for a specific task.
21
+ - User-facing chat responses should follow the user's language preference (here: Russian), while disk artifacts remain English-first by default.
22
+
23
+ ## Cross-platform and encoding
24
+
25
+ - All textual files in this repository must use UTF-8.
26
+ - Repos should keep source text files normalized and portable; avoid OS-local path and shell assumptions in core runtime logic.
27
+ - Treat path handling and process invocation as platform-sensitive; abstract platform-specific behavior behind explicit utilities.
28
+ - Encode new scripts and docs using UTF-8 and avoid legacy code-page text in repository files.
29
+
18
30
  ## Sources of truth (priority order)
19
31
 
20
32
  1. `AGENTS.md` (this file)
@@ -26,7 +38,8 @@ If two sources conflict, prefer the higher-priority source.
26
38
 
27
39
  ## CLI invocation
28
40
 
29
- All commands in this policy are written as `agentplane ...` and MUST use the `agentplane` CLI available on `PATH`.
41
+ All commands in this policy are written as `agentplane ...`.
42
+ Use the `agentplane` CLI from `PATH` when available; if not, use the repo-local entrypoint (for example `node packages/agentplane/bin/agentplane.js ...`).
30
43
 
31
44
  ## Scope boundary
32
45
 
@@ -35,8 +48,8 @@ All commands in this policy are written as `agentplane ...` and MUST use the `ag
35
48
 
36
49
  ## Agent roles (authority boundaries)
37
50
 
38
- - **ORCHESTRATOR**: the only role allowed to initiate a run; owns user-facing plan + approval gates; may create exactly one top-level tracking task after the user approves the overall plan.
39
- - **PLANNER**: the sole creator of downstream tasks; may reprioritize tasks; may adjust decomposition (within approved scope).
51
+ - **ORCHESTRATOR**: the only role allowed to initiate a run; owns user-facing plan + approval gates; does not create task artifacts.
52
+ - **PLANNER**: the sole creator of executable tasks; may reprioritize tasks; may adjust task graph planning (within approved scope).
40
53
  - **CREATOR**: creates a new specialized agent definition only when required by the approved plan.
41
54
  - **INTEGRATOR**: the only role allowed to integrate/merge into base branch (for `branch_pr`), finish tasks on base, and run exports.
42
55
 
@@ -46,17 +59,17 @@ No other role may assume another role’s authority.
46
59
 
47
60
  Execution agents are defined by JSON files under `.agentplane/agents/*.json`. The file basename (without `.json`) is the agent ID (e.g. `CODER`, `TESTER`, `REVIEWER`, `DOCS`).
48
61
 
49
- **Contract (downstream task assignment):**
62
+ **Contract (executable task assignment):**
50
63
 
51
- - Every downstream task created by PLANNER MUST set `owner` to an existing execution agent ID from `.agentplane/agents/*.json`.
64
+ - Every executable task created by PLANNER MUST set `owner` to an existing execution agent ID from `.agentplane/agents/*.json`.
52
65
  - If no suitable execution agent exists, PLANNER MUST:
53
66
  - create a dedicated CREATOR task to add the missing agent definition, and
54
67
  - make all tasks that require that new agent depend on the CREATOR task via `depends_on: [<creator-task-id>]`.
55
68
 
56
69
  **Enforcement status:**
57
70
 
58
- - Current: warn-only in CLI (`task new` / `task update`) when `owner` does not exist in `.agentplane/agents`.
59
- - Planned: upgrade to lint/CI gate once the workflow is stable.
71
+ - Current: hard validation in CLI (`task new` / `task update`) when `owner` does not exist in `.agentplane/agents` (command fails with `E_VALIDATION`).
72
+ - Planned: keep the CLI gate and add CI lint for drift detection/reporting.
60
73
 
61
74
  ## Definitions (remove ambiguity)
62
75
 
@@ -150,7 +163,7 @@ Trigger:
150
163
  Protocol:
151
164
 
152
165
  1. ORCHESTRATOR runs the upgrade (or coordinates whoever runs it) and identifies the upgrade run artifacts directory (for example `.agentplane/.upgrade/agent/<runId>/`).
153
- 2. If the upgrade review report indicates semantic conflicts (`needsSemanticReview: true` for any file), ORCHESTRATOR instructs PLANNER to create a downstream task owned by `UPGRADER`.
166
+ 2. If the upgrade review report indicates semantic conflicts (`needsSemanticReview: true` for any file), ORCHESTRATOR instructs PLANNER to create an executable task owned by `UPGRADER`.
154
167
  3. UPGRADER performs semantic reconciliation of `AGENTS.md` and `.agentplane/agents/*.json`:
155
168
  - `AGENTS.md` remains the canonical policy source (highest priority).
156
169
  - Preserve local customizations via the Local Overrides block (`<!-- AGENTPLANE:LOCAL-START/END -->`) where feasible.
@@ -174,10 +187,10 @@ Done when:
174
187
  # NON-NEGOTIABLE PIPELINE
175
188
 
176
189
  1. **Preflight** (ORCHESTRATOR, mandatory; read-only)
177
- 2. **Plan + decomposition** (no execution; read-only)
190
+ 2. **Plan + task graph planning** (no execution; read-only)
178
191
  3. **Explicit user approval** (overall plan + any requested overrides)
179
- 4. **Create tracking task** (one top-level task)
180
- 5. **Create and plan downstream tasks** (PLANNER)
192
+ 4. **Create executable task graph** (PLANNER)
193
+ 5. **Plan and document created tasks**
181
194
  6. **Execute tasks under mode-specific workflow**
182
195
  7. **Verify**
183
196
  8. **Finish**
@@ -246,7 +259,7 @@ Do not output the full contents of config or quickstart unless the user explicit
246
259
  # STARTUP RULE
247
260
 
248
261
  - Always begin work by engaging ORCHESTRATOR.
249
- - ORCHESTRATOR starts by producing a top-level plan + task decomposition.
262
+ - ORCHESTRATOR starts by producing an execution plan + task graph plan.
250
263
  - **Before explicit user approval, do not perform mutating actions.**
251
264
  - Allowed: read-only inspection (including preflight).
252
265
  - Prohibited: creating/updating tasks, editing files, starting/finishing tasks, commits, branching, verify runs that mutate task state, network use, outside-repo access.
@@ -255,7 +268,7 @@ Do not output the full contents of config or quickstart unless the user explicit
255
268
 
256
269
  # ORCHESTRATION FLOW
257
270
 
258
- ## 1) Plan & decomposition (no execution)
271
+ ## 1) Plan & task graph planning (no execution)
259
272
 
260
273
  ORCHESTRATOR MUST produce:
261
274
 
@@ -266,8 +279,11 @@ ORCHESTRATOR MUST produce:
266
279
  - Only if required; each assumption must be testable/confirmable
267
280
  - **Steps**
268
281
  - Ordered, executable steps
269
- - **Decomposition**
270
- - Atomic tasks assignable to existing agents
282
+ - **Task graph planning**
283
+ - Atomic tasks, each with one specific owner from existing agent IDs
284
+ - Prefer the minimum number of executable tasks; do not split work by role labels alone
285
+ - Split only when there is an independent deliverable, a different required owner, or a real dependency/verification boundary
286
+ - Do not create executable tasks solely for scaffolding/docs handoffs/status bookkeeping
271
287
  - **Approvals**
272
288
  - Whether network and/or outside-repo actions will be needed
273
289
  - Any requested overrides (see Override Protocol)
@@ -278,13 +294,15 @@ ORCHESTRATOR MUST produce:
278
294
  - **Drift triggers**
279
295
  - Conditions that require re-approval (see DRIFT POLICY)
280
296
 
281
- ## 2) After user approval (tracking task is mandatory)
297
+ ## 2) After user approval (task graph is mandatory)
282
298
 
283
- - ORCHESTRATOR creates exactly **one** top-level tracking task via agentplane.
284
- - PLANNER creates any additional tasks from the approved decomposition.
299
+ - PLANNER creates executable tasks directly from the approved task graph plan.
300
+ - If task graph planning yields exactly one work item, create exactly one executable task.
301
+ - If task graph planning yields multiple work items, create only executable tasks and connect them with `depends_on`.
302
+ - Before creating a new task, PLANNER must check open tasks (`TODO|DOING|BLOCKED`) and reuse/update a matching task when scope and owner align.
285
303
  - Task IDs are referenced in comments/notes for traceability.
286
304
 
287
- **Task tracking is mandatory** for any work that changes repo state. Exceptions require explicit user approval (Override Protocol).
305
+ **Task traceability is mandatory** for any work that changes repo state and must be captured on executable tasks. Exceptions require explicit user approval (Override Protocol).
288
306
 
289
307
  ---
290
308
 
@@ -304,7 +322,7 @@ Common overridable guardrails:
304
322
 
305
323
  - **Network**: allow network access even when `require_network=true`.
306
324
  - **Outside-repo**: allow reading/writing outside the repo (scoped).
307
- - **Pipeline**: skip/relax steps (e.g., skip task tracking for analysis-only; skip exports).
325
+ - **Pipeline**: skip/relax steps (e.g., skip task traceability for analysis-only; skip exports).
308
326
  - **Tooling**: allow direct `git` operations when no agentplane command exists (commit/push).
309
327
  - **Force flags**: allow `--force` status transitions / dependency bypass.
310
328
 
@@ -323,8 +341,7 @@ The user must respond explicitly approving (or rejecting) the override(s).
323
341
 
324
342
  Any approved override MUST be recorded:
325
343
 
326
- - In the top-level tracking task under `## Notes` → `### Approvals / Overrides`.
327
- - And in the relevant task’s `## Notes` if the override affects execution of that task.
344
+ - In the task(s) executing the approved scope under `## Notes` → `### Approvals / Overrides`.
328
345
 
329
346
  ---
330
347
 
@@ -334,13 +351,10 @@ Any approved override MUST be recorded:
334
351
 
335
352
  If an agent changes repo state, that work must be traceable to a task ID and a filled task README.
336
353
 
337
- ## Scaffold is mandatory
338
-
339
- Immediately after creating a task, run:
340
-
341
- - `agentplane task scaffold <task-id>`
354
+ ## Task scaffold policy
342
355
 
343
- This ensures all standard sections exist and are normalized.
356
+ - `agentplane task new` seeds standard README sections automatically.
357
+ - Use `agentplane task scaffold <task-id>` only for backfill/import/manual repair flows.
344
358
 
345
359
  ## Who fills the README
346
360
 
@@ -519,7 +533,7 @@ Rules:
519
533
  - Do all work in the current checkout.
520
534
  - In `direct` (single working directory), agentplane uses a single-stream workflow in the current checkout. `agentplane work start <task-id> --agent <ROLE> --slug <slug>` records the active task and keeps the current branch (no task branches).
521
535
  - Do not use worktrees in `direct`. `agentplane work start ... --worktree` is `branch_pr`-only.
522
- - If you only need artifacts/docs without switching branches, prefer `agentplane task scaffold <task-id>`.
536
+ - Use `agentplane task scaffold <task-id>` only for backfill/import/manual repair; for normal updates use `agentplane task doc set` / `agentplane task plan set`.
523
537
 
524
538
  Recommended cadence:
525
539
 
@@ -570,7 +584,7 @@ Exports:
570
584
  Re-approval is required if any of the following becomes true:
571
585
 
572
586
  - Scope expands beyond the approved in-scope paths/artifacts.
573
- - New tasks are needed that were not in the approved decomposition.
587
+ - New tasks are needed that were not in the approved task graph plan.
574
588
  - Any network or outside-repo access becomes necessary (and was not approved).
575
589
  - Verification criteria change materially.
576
590
  - Plan changes materially for an in-flight task (update plan -> plan approval returns to pending).
@@ -22,7 +22,7 @@
22
22
  "Document edits with before/after snippets and cite the exact files touched.",
23
23
  "Run necessary commands (tests/linters/formatters) and summarize key output lines only.",
24
24
  "Prefer declared verify commands; record ad-hoc results via PR notes or request PLANNER to update verify lists.",
25
- "Coordinate handoffs to TESTER/REVIEWER/DOCS with task ID, changed files, and expected behavior.",
25
+ "Coordinate handoffs to TESTER/REVIEWER/DOCS only when those roles already have explicit executable tasks; otherwise keep notes and verification in the same task.",
26
26
  "Avoid task closure in branch_pr; keep commits task-scoped and update status via agentplane."
27
27
  ]
28
28
  }
@@ -20,6 +20,6 @@
20
20
  "Create/update task README content via agentplane task doc set; required sections are config-driven (check config if they differ).",
21
21
  "Update user/developer docs minimally to reflect behavior and match existing tone.",
22
22
  "Keep PR artifact docs and notes current when required; add handoff notes for INTEGRATOR.",
23
- "Avoid extra commits unless the task is doc-only."
23
+ "Avoid extra commits and standalone docs-only tasks unless documentation itself is the independent deliverable."
24
24
  ]
25
25
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "id": "ORCHESTRATOR",
3
3
  "role": "Default agent that initiates runs, builds the plan, and coordinates execution across agents.",
4
- "description": "Turns user requests into top-level plans, secures explicit approval once, then orchestrates execution across the JSON-defined agents with minimal further gating.",
4
+ "description": "Turns user requests into execution plans, secures explicit approval once, then orchestrates execution across the JSON-defined agents with minimal further gating.",
5
5
  "inputs": ["Free-form user requests describing goals, context, and constraints."],
6
6
  "outputs": [
7
- "A numbered top-level plan mapping steps to agent IDs, noting task IDs or the need to create them.",
7
+ "A numbered execution plan mapping steps to agent IDs, noting task IDs or the need to create them.",
8
8
  "A direct approval prompt offering Approve plan / Edit plan / Cancel, treated as the go-ahead until new scope or risks emerge.",
9
- "A post-approval note confirming task creation (unless the user opted out), including the single top-level task requirement.",
9
+ "A post-approval note confirming executable task planning, including resulting task IDs.",
10
10
  "Progress summaries after each major step, including affected task IDs."
11
11
  ],
12
12
  "permissions": [
@@ -16,16 +16,17 @@
16
16
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
17
17
  "Before planning or execution, load .agentplane/config.json and `agentplane quickstart` / `agentplane role <ROLE>` output; do not output their contents, only report that they were loaded.",
18
18
  "Use `agentplane config show|set` for config changes (workflow_mode, branch/task settings); avoid manual edits.",
19
- "Convert the first user message into a top-level plan; do not create tasks until the user approves it.",
20
- "Restate the user goal and constraints, then draft a numbered top-level plan with agent assignments and expected outcomes.",
21
- "Decompose the top-level plan into atomic tasks, assign each to an existing agent ID, and schedule CREATOR if a required agent is missing.",
22
- "For development work, sequence CODER -> TESTER -> REVIEWER -> INTEGRATOR, with DOCS updating task artifacts before closure.",
19
+ "Convert the first user message into an execution plan; do not create tasks until the user approves it.",
20
+ "Restate the user goal and constraints, then draft a numbered execution plan with agent assignments and expected outcomes.",
21
+ "Build a task graph from the approved plan: split into atomic tasks, each with one specific owner from existing agent IDs; schedule CREATOR if a required agent is missing.",
22
+ "For development work, select the minimal role set needed for risk and workflow mode; do not split work by role labels alone.",
23
+ "Use TESTER/REVIEWER/INTEGRATOR as independent tasks only when risk, mode (`branch_pr`), or a hard verification/integration boundary requires it; otherwise keep work in one executable task.",
23
24
  "If the user explicitly requests agent optimization, invoke UPDATER and pause until its analysis is complete.",
24
25
  "Await plan approval before executing steps, then proceed autonomously unless new scope, risks, or constraints require another check-in.",
25
26
  "After plan approval, if recipes are in scope, request confirmation to refresh the recipe index via `agentplane recipes list-remote --refresh`, then use `agentplane recipes list` / `agentplane recipes explain <id>` to select recipes. For scenarios, use `agentplane scenario list` and `agentplane scenario run <recipe:scenario>`.",
26
- "After approval, create exactly one top-level tracking task via agentplane unless the user explicitly opts out; do not create downstream tasks (PLANNER owns downstream task creation).",
27
+ "After approval, PLANNER creates executable tasks directly from the approved task graph plan.",
27
28
  "Execute step by step and summarize task IDs plus commit hashes after each major step.",
28
- "If the user opts out of task creation, track progress against the approved plan in replies.",
29
+ "If task creation is explicitly waived via approved override, keep traceability in run summaries.",
29
30
  "Before any final task-closing commit, check `closure_commit_requires_approval` in .agentplane/config.json; request user approval when true, otherwise proceed without confirmation. Finalize with a concise summary and next steps."
30
31
  ]
31
32
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "PLANNER",
3
3
  "role": "Own the task backlog via agentplane and keep it aligned with every plan.",
4
- "description": "Converts goals into atomic tasks and keeps the canonical backend aligned with the plan.",
4
+ "description": "Converts goals into an executable task graph of atomic single-owner tasks and keeps the canonical backend aligned with the plan.",
5
5
  "inputs": [
6
6
  "High-level goals, features, bugs, or refactors to plan.",
7
7
  "Optional constraints such as deadlines, priority, or components."
@@ -17,11 +17,16 @@
17
17
  "workflow": [
18
18
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
19
19
  "Review the backlog before changes to avoid duplicates or conflicts.",
20
- "After overall plan approval, create downstream tasks for the approved decomposition (top-level tracking task creation is owned by ORCHESTRATOR).",
21
- "Decompose goals into atomic tasks with a single owner; set depends_on explicitly (use [] for none).",
20
+ "After overall plan approval, create executable tasks directly from the approved task graph plan.",
21
+ "If task graph planning yields exactly one work item, create exactly one task and keep full traceability there.",
22
+ "Split goals into atomic tasks with one specific owner each; set depends_on explicitly (use [] for none).",
23
+ "Create tasks with valid parameters: non-empty title/description/owner, at least one meaningful tag, deduped depends_on/verify.",
24
+ "Before creating a new task, check open tasks (`TODO|DOING|BLOCKED`) and reuse/update a matching task when scope and owner align.",
25
+ "Do not create separate tasks for role handoffs unless there is an independent deliverable, a different required owner, or an explicit dependency boundary.",
26
+ "Do not create standalone tasks for scaffolding/doc bookkeeping/status transitions; keep those updates inside the executable task unless there is a real deliverable boundary.",
22
27
  "Assign each task to an existing agent ID or schedule CREATOR if no suitable agent exists.",
23
28
  "Create new tasks via task new (reserve task add for pre-existing IDs); include at least one tag and keep tags minimal.",
24
- "Scaffold task artifacts via agentplane when creating tasks; return a structured summary of touched IDs and status changes.",
29
+ "Rely on `task new` auto-scaffolding for new tasks; use `task scaffold` only for backfill/import/manual repair flows.",
25
30
  "Provide a numbered plan in replies when work spans multiple steps."
26
31
  ]
27
32
  }
@@ -22,6 +22,6 @@
22
22
  "Add the smallest set of high-value tests (happy path + edge/regression).",
23
23
  "Keep tests deterministic and fast; avoid network calls and time-based flakiness.",
24
24
  "Run targeted tests first and summarize only the key output lines.",
25
- "If test infrastructure is missing, document the blocker and request a PLANNER task."
25
+ "If test infrastructure is missing, document the blocker in the same task first; request a PLANNER task only if it is a separate, independent deliverable."
26
26
  ]
27
27
  }
@@ -16,8 +16,8 @@ const CHEAT_SHEET_ROWS = [
16
16
  command: "`agentplane task add <task-id> ...` / `agentplane task update <task-id> ...`",
17
17
  },
18
18
  {
19
- operation: "PLANNER: scaffold artifact",
20
- command: "`agentplane task scaffold <task-id>`",
19
+ operation: "PLANNER: backfill/repair scaffold",
20
+ command: "`agentplane task scaffold <task-id>` (backfill/import/manual repair only)",
21
21
  },
22
22
  {
23
23
  operation: "PLANNER: derive implementation from spike",
@@ -69,8 +69,8 @@ const ROLE_GUIDES = [
69
69
  role: "ORCHESTRATOR",
70
70
  lines: [
71
71
  "- Plan intake: `agentplane task list` / `agentplane task show <task-id>`",
72
- '- After plan approval (unless the user opts out): create exactly one tracking task: `agentplane task new --title "..." --description "..." --priority med --owner ORCHESTRATOR --depends-on "[]" --tag <tag>`',
73
- "- Optional scaffold: `agentplane task scaffold <task-id>`",
72
+ "- After plan approval: ask PLANNER to create executable tasks directly from the approved task graph.",
73
+ "- If task graph has exactly one work item, create exactly one executable task.",
74
74
  "- Two-stage verification: `## Verify Steps` is the ex-ante contract; `agentplane verify ...` appends an ex-post entry into `## Verification`.",
75
75
  ],
76
76
  },
@@ -80,7 +80,7 @@ const ROLE_GUIDES = [
80
80
  '- TODO scan: `agentplane task list` / `agentplane task search "..."` / `agentplane task next`',
81
81
  '- Create tasks: `agentplane task new --title "..." --description "..." --priority med --owner <ROLE> --depends-on "[]" --tag <tag>` (tags are required; use `task add` only for imported IDs)',
82
82
  '- Update tasks: `agentplane task update <task-id> --title "..." --description "..." --priority med --owner <ROLE> --depends-on <task-id>`',
83
- "- Scaffold artifacts: `agentplane task scaffold <task-id>`",
83
+ "- `task new` auto-seeds README sections; use `task scaffold` only for backfill/import/manual repair.",
84
84
  '- Plan lifecycle: `agentplane task plan set <task-id> --text "..." --updated-by <ROLE>` -> `agentplane task plan approve <task-id> --by <id>`',
85
85
  "- Verify Steps discipline: if a task primary tag is verify-required (default: code/data/ops), fill `## Verify Steps` before plan approval.",
86
86
  '- Task docs (when planning needs it): `agentplane task doc set <task-id> --section Summary --text "..."`',
@@ -89,7 +89,7 @@ const ROLE_GUIDES = [
89
89
  {
90
90
  role: "CODER",
91
91
  lines: [
92
- "- direct mode: single-stream in the current checkout; `agentplane work start <task-id> --agent <ROLE> --slug <slug>` records the active task and keeps the current branch (no task branches). Use `agentplane task scaffold <task-id>` for docs without switching context.",
92
+ "- direct mode: single-stream in the current checkout; `agentplane work start <task-id> --agent <ROLE> --slug <slug>` records the active task and keeps the current branch (no task branches). Use `task doc set` / `task plan set` for normal docs updates.",
93
93
  "- branch_pr: `agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree`",
94
94
  '- Status updates: `agentplane start <task-id> --author <ROLE> --body "Start: ..."` / `agentplane block <task-id> --author <ROLE> --body "Blocked: ..."`',
95
95
  "- Verify Steps: `agentplane task verify-show <task-id>` (use as the verification contract before recording results).",
@@ -101,7 +101,7 @@ const ROLE_GUIDES = [
101
101
  {
102
102
  role: "TESTER",
103
103
  lines: [
104
- "- direct mode: single-stream in the current checkout; `agentplane work start <task-id> --agent <ROLE> --slug <slug>` records the active task and keeps the current branch (no task branches). Use `agentplane task scaffold <task-id>` for docs without switching context.",
104
+ "- direct mode: single-stream in the current checkout; `agentplane work start <task-id> --agent <ROLE> --slug <slug>` records the active task and keeps the current branch (no task branches). Use `task doc set` / `task plan set` for normal docs updates.",
105
105
  "- branch_pr: `agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree`",
106
106
  '- Status updates: `agentplane start <task-id> --author <ROLE> --body "Start: ..."` / `agentplane block <task-id> --author <ROLE> --body "Blocked: ..."`',
107
107
  "- Verify Steps: `agentplane task verify-show <task-id>` (treat as the verification contract).",
@@ -1,7 +1,7 @@
1
1
  import type { CommandHandler, CommandSpec } from "../../spec/spec.js";
2
2
  import { type ExecutionProfile } from "@agentplaneorg/core";
3
3
  type InitFlags = {
4
- setupProfile?: "prod" | "dev";
4
+ setupProfile?: "developer" | "vibecoder" | "manager" | "enterprise";
5
5
  ide?: "codex" | "cursor" | "windsurf";
6
6
  workflow?: "direct" | "branch_pr";
7
7
  backend?: "local" | "redmine";
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/run-cli/commands/init.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItE,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAa7B,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,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AE,QAAQ,GAAG,WAAW,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAmFF,KAAK,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;AAE5D,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,UAAU,CAwL5C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,UAAU,CACmB,CAAC"}
@@ -19,29 +19,45 @@ import { ensureInitGitignore } from "./init/write-gitignore.js";
19
19
  import { ensureInitRedmineEnvTemplate } from "./init/write-env.js";
20
20
  import { renderInitSection, renderInitWelcome } from "./init/ui.js";
21
21
  const setupProfilePresets = {
22
- prod: {
23
- mode: "prod",
24
- description: "Production bootstrap: compact flow with default managed-file and approval settings.",
25
- defaultHooks: false,
26
- defaultStrictUnsafeConfirm: false,
27
- },
28
- "prod-strict": {
29
- mode: "prod",
30
- description: "Production bootstrap + strict defaults for safer installs (hooks on, strict unsafe confirmations).",
22
+ developer: {
23
+ mode: "full",
24
+ description: "I am Developer (full setup questionnaire; hooks on; explicit unsafe confirmations on).",
31
25
  defaultHooks: true,
32
26
  defaultStrictUnsafeConfirm: true,
27
+ defaultRequirePlanApproval: true,
28
+ defaultRequireNetworkApproval: true,
29
+ defaultRequireVerifyApproval: true,
30
+ defaultExecutionProfile: "balanced",
33
31
  },
34
- dev: {
35
- mode: "dev",
36
- description: "Developer bootstrap: full questionnaire for every init aspect.",
32
+ vibecoder: {
33
+ mode: "compact",
34
+ description: "I am Vibecoder (compact setup; hooks off; approvals off; aggressive execution defaults).",
37
35
  defaultHooks: false,
38
36
  defaultStrictUnsafeConfirm: false,
37
+ defaultRequirePlanApproval: false,
38
+ defaultRequireNetworkApproval: false,
39
+ defaultRequireVerifyApproval: false,
40
+ defaultExecutionProfile: "aggressive",
39
41
  },
40
- "dev-safe": {
41
- mode: "dev",
42
- description: "Developer bootstrap with explicit unsafe-action confirmation by default.",
42
+ manager: {
43
+ mode: "compact",
44
+ description: "I am Manager / Product owner (compact setup; oversight defaults with approvals on, hooks off).",
43
45
  defaultHooks: false,
46
+ defaultStrictUnsafeConfirm: false,
47
+ defaultRequirePlanApproval: true,
48
+ defaultRequireNetworkApproval: true,
49
+ defaultRequireVerifyApproval: true,
50
+ defaultExecutionProfile: "balanced",
51
+ },
52
+ enterprise: {
53
+ mode: "full",
54
+ description: "I am Enterprise / Regulated team (full setup; strict approvals, hooks on, conservative execution).",
55
+ defaultHooks: true,
44
56
  defaultStrictUnsafeConfirm: true,
57
+ defaultRequirePlanApproval: true,
58
+ defaultRequireNetworkApproval: true,
59
+ defaultRequireVerifyApproval: true,
60
+ defaultExecutionProfile: "conservative",
45
61
  },
46
62
  };
47
63
  function parseBooleanValueForInit(flag, value) {
@@ -74,9 +90,9 @@ export const initSpec = {
74
90
  {
75
91
  kind: "string",
76
92
  name: "setup-profile",
77
- valueHint: "<prod|dev>",
78
- choices: ["prod", "dev"],
79
- description: "Interactive preset. prod is the default and asks only essential questions; dev asks the full setup questionnaire.",
93
+ valueHint: "<developer|vibecoder|manager|enterprise>",
94
+ choices: ["developer", "vibecoder", "manager", "enterprise"],
95
+ description: "Persona preset for init defaults and dialog depth (compact vs full questionnaire).",
80
96
  },
81
97
  {
82
98
  kind: "string",
@@ -171,6 +187,10 @@ export const initSpec = {
171
187
  ],
172
188
  examples: [
173
189
  { cmd: "agentplane init", why: "Interactive setup (prompts for missing values)." },
190
+ {
191
+ cmd: "agentplane init --setup-profile vibecoder --yes",
192
+ why: "Non-interactive fast setup for autonomous defaults (hooks off, approvals off).",
193
+ },
174
194
  {
175
195
  cmd: "agentplane init --workflow direct --backend local --hooks false --require-plan-approval true --require-network-approval true --require-verify-approval true --yes",
176
196
  why: "Non-interactive setup with explicit policy flags.",
@@ -260,8 +280,10 @@ async function cmdInit(opts) {
260
280
  let requireVerifyApproval = flags.requireVerifyApproval ?? defaults.requireVerifyApproval;
261
281
  let executionProfile = flags.executionProfile ?? defaults.executionProfile;
262
282
  let strictUnsafeConfirm = flags.strictUnsafeConfirm ?? defaults.strictUnsafeConfirm;
263
- let setupProfile = flags.setupProfile ?? "prod";
264
- let setupProfilePreset = flags.setupProfile ?? "prod";
283
+ let setupProfile = flags.setupProfile
284
+ ? setupProfilePresets[flags.setupProfile].mode
285
+ : "compact";
286
+ let setupProfilePreset = flags.setupProfile ?? "manager";
265
287
  const isInteractive = process.stdin.isTTY && !flags.yes;
266
288
  if (!process.stdin.isTTY &&
267
289
  !flags.yes &&
@@ -294,13 +316,13 @@ async function cmdInit(opts) {
294
316
  };
295
317
  process.stdout.write(renderInitWelcome());
296
318
  const presetLines = Object.entries(setupProfilePresets).map(([id, preset]) => `- ${id}: ${preset.description}`);
297
- process.stdout.write(renderInitSection("Setup Preset", "Choose a bootstrap preset. It controls what questions are shown and safe defaults used."));
319
+ process.stdout.write(renderInitSection("Who Are You?", "Pick the persona that best matches your working style. This sets defaults and controls compact vs full questionnaire."));
298
320
  process.stdout.write(`${presetLines.join("\n")}\n\n`);
299
321
  if (flags.setupProfile) {
300
322
  setupProfilePreset = flags.setupProfile;
301
323
  }
302
324
  else {
303
- const selected = await askChoice("Setup preset", ["prod", "prod-strict", "dev", "dev-safe"], "prod");
325
+ const selected = await askChoice("Who are you?", ["developer", "vibecoder", "manager", "enterprise"], "manager");
304
326
  setupProfilePreset = selected;
305
327
  }
306
328
  const selectedPreset = setupProfilePresets[setupProfilePreset];
@@ -310,17 +332,34 @@ async function cmdInit(opts) {
310
332
  if (flags.strictUnsafeConfirm === undefined) {
311
333
  strictUnsafeConfirm = selectedPreset.defaultStrictUnsafeConfirm;
312
334
  }
313
- process.stdout.write(renderInitSection("Workflow", "Choose how this repository will be orchestrated: direct means one branch, branch_pr means PR-first tasks."));
335
+ if (flags.requirePlanApproval === undefined) {
336
+ requirePlanApproval = selectedPreset.defaultRequirePlanApproval;
337
+ }
338
+ if (flags.requireNetworkApproval === undefined) {
339
+ requireNetworkApproval = selectedPreset.defaultRequireNetworkApproval;
340
+ }
341
+ if (flags.requireVerifyApproval === undefined) {
342
+ requireVerifyApproval = selectedPreset.defaultRequireVerifyApproval;
343
+ }
344
+ if (!flags.executionProfile) {
345
+ executionProfile = selectedPreset.defaultExecutionProfile;
346
+ }
347
+ const shouldPromptWorkflow = !flags.workflow && setupProfile === "full";
348
+ const shouldPromptBackend = !flags.backend;
314
349
  ide = flags.ide ?? defaults.ide;
315
- if (!flags.workflow && setupProfile === "dev") {
350
+ if (shouldPromptWorkflow) {
351
+ process.stdout.write(renderInitSection("Workflow", "Choose how this repository will be orchestrated: direct means one branch, branch_pr means PR-first tasks."));
316
352
  const choice = await askChoice("Workflow mode", ["direct", "branch_pr"], workflow);
317
353
  workflow = choice === "branch_pr" ? "branch_pr" : "direct";
318
354
  }
319
- if (!flags.backend) {
355
+ if (shouldPromptBackend) {
356
+ if (shouldPromptWorkflow || setupProfile === "full") {
357
+ process.stdout.write(renderInitSection("Task Backend", "Choose where task data is stored and managed."));
358
+ }
320
359
  const choice = await askChoice("Task backend", ["local", "redmine"], backend);
321
360
  backend = choice === "redmine" ? "redmine" : "local";
322
361
  }
323
- if (setupProfile === "dev") {
362
+ if (setupProfile === "full") {
324
363
  if (flags.hooks === undefined) {
325
364
  hooks = await askYesNo("Install managed git hooks now?", hooks);
326
365
  }
@@ -356,25 +395,29 @@ async function cmdInit(opts) {
356
395
  else {
357
396
  hooks = flags.hooks ?? selectedPreset.defaultHooks;
358
397
  recipes = flags.recipes ?? defaults.recipes;
359
- requirePlanApproval = flags.requirePlanApproval ?? defaults.requirePlanApproval;
360
- requireNetworkApproval = flags.requireNetworkApproval ?? defaults.requireNetworkApproval;
361
- requireVerifyApproval = flags.requireVerifyApproval ?? defaults.requireVerifyApproval;
362
- executionProfile = flags.executionProfile ?? defaults.executionProfile;
398
+ requirePlanApproval = flags.requirePlanApproval ?? selectedPreset.defaultRequirePlanApproval;
399
+ requireNetworkApproval =
400
+ flags.requireNetworkApproval ?? selectedPreset.defaultRequireNetworkApproval;
401
+ requireVerifyApproval =
402
+ flags.requireVerifyApproval ?? selectedPreset.defaultRequireVerifyApproval;
403
+ executionProfile = flags.executionProfile ?? selectedPreset.defaultExecutionProfile;
363
404
  strictUnsafeConfirm = flags.strictUnsafeConfirm ?? selectedPreset.defaultStrictUnsafeConfirm;
364
- process.stdout.write(renderInitSection("Defaults Applied", "Using compact prod defaults for hooks, approvals, execution profile, and recipes."));
405
+ process.stdout.write(renderInitSection("Defaults Applied", `Using compact ${setupProfilePreset} defaults for hooks, approvals, execution profile, and recipes.`));
365
406
  }
366
407
  }
367
408
  if (flags.yes) {
409
+ const yesPreset = setupProfilePresets[setupProfilePreset];
368
410
  ide = flags.ide ?? defaults.ide;
369
411
  workflow = flags.workflow ?? defaults.workflow;
370
412
  backend = flags.backend ?? defaults.backend;
371
- hooks = flags.hooks ?? defaults.hooks;
413
+ hooks = flags.hooks ?? yesPreset.defaultHooks;
372
414
  recipes = flags.recipes ?? defaults.recipes;
373
- requirePlanApproval = flags.requirePlanApproval ?? defaults.requirePlanApproval;
374
- requireNetworkApproval = flags.requireNetworkApproval ?? defaults.requireNetworkApproval;
375
- requireVerifyApproval = flags.requireVerifyApproval ?? defaults.requireVerifyApproval;
376
- executionProfile = flags.executionProfile ?? defaults.executionProfile;
377
- strictUnsafeConfirm = flags.strictUnsafeConfirm ?? defaults.strictUnsafeConfirm;
415
+ requirePlanApproval = flags.requirePlanApproval ?? yesPreset.defaultRequirePlanApproval;
416
+ requireNetworkApproval =
417
+ flags.requireNetworkApproval ?? yesPreset.defaultRequireNetworkApproval;
418
+ requireVerifyApproval = flags.requireVerifyApproval ?? yesPreset.defaultRequireVerifyApproval;
419
+ executionProfile = flags.executionProfile ?? yesPreset.defaultExecutionProfile;
420
+ strictUnsafeConfirm = flags.strictUnsafeConfirm ?? yesPreset.defaultStrictUnsafeConfirm;
378
421
  }
379
422
  validateBundledRecipesSelection(recipes);
380
423
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"run-cli.test-helpers.d.ts","sourceRoot":"","sources":["../../src/cli/run-cli.test-helpers.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAkDpD,wBAAgB,sBAAsB,IAAI,IAAI,CA8C7C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAEjD;AAED,wBAAgB,YAAY;;;;EAgC3B;AAED,wBAAgB,YAAY,IAAI,MAAM,IAAI,CAkBzC;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlE;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAMrD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAIjD;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKpE;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAKhE;A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AM,CAAC,CAI7E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlE;AAED,wBAAgB,WAAW,IAAI,MAAM,CAAC,UAAU,CAS/C;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYpF;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5E;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzE"}
@@ -217,7 +217,7 @@ export async function createRecipeArchive(opts) {
217
217
  description: opts?.description ?? "Provides a local viewer for task artifacts.",
218
218
  agents: [{ id: "RECIPE_AGENT", summary: "Recipe agent", file: "agents/recipe.json" }],
219
219
  tools: [
220
- { id: "RECIPE_TOOL", summary: "Recipe tool", runtime: "bash", entrypoint: "tools/run.sh" },
220
+ { id: "RECIPE_TOOL", summary: "Recipe tool", runtime: "node", entrypoint: "tools/run.js" },
221
221
  ],
222
222
  scenarios: [{ id: "RECIPE_SCENARIO", summary: "Recipe scenario" }],
223
223
  };
@@ -234,10 +234,9 @@ export async function createRecipeArchive(opts) {
234
234
  }, null, 2), "utf8");
235
235
  const toolsDir = path.join(recipeDir, "tools");
236
236
  await mkdir(toolsDir, { recursive: true });
237
- await writeFile(path.join(toolsDir, "run.sh"), [
238
- "#!/usr/bin/env bash",
239
- "set -euo pipefail",
240
- 'echo "ok" > "$AGENTPLANE_RUN_DIR/artifact.txt"',
237
+ await writeFile(path.join(toolsDir, "run.js"), [
238
+ 'const fs = require("node:fs");',
239
+ 'fs.writeFileSync(process.env.AGENTPLANE_RUN_DIR + "/artifact.txt", "ok");',
241
240
  ].join("\n"), "utf8");
242
241
  const scenariosDir = path.join(recipeDir, "scenarios");
243
242
  await mkdir(scenariosDir, { recursive: true });
@@ -1 +1 @@
1
- {"version":3,"file":"block.spec.d.ts","sourceRoot":"","sources":["../../src/commands/block.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,WAAW,CA0H9C,CAAC"}
1
+ {"version":3,"file":"block.spec.d.ts","sourceRoot":"","sources":["../../src/commands/block.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASvD,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAA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