agentplane 0.2.25 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/assets/AGENTS.md +123 -526
- package/assets/agents/UPGRADER.json +10 -9
- package/assets/framework.manifest.json +112 -7
- package/assets/policy/check-routing.mjs +180 -0
- package/assets/policy/dod.code.md +25 -0
- package/assets/policy/dod.core.md +32 -0
- package/assets/policy/dod.docs.md +32 -0
- package/assets/policy/examples/migration-note.md +6 -0
- package/assets/policy/examples/pr-note.md +16 -0
- package/assets/policy/examples/unit-test-pattern.md +19 -0
- package/assets/policy/governance.md +37 -0
- package/assets/policy/incidents.md +36 -0
- package/assets/policy/security.must.md +7 -0
- package/assets/policy/workflow.branch_pr.md +34 -0
- package/assets/policy/workflow.direct.md +46 -0
- package/assets/policy/workflow.md +9 -0
- package/assets/policy/workflow.release.md +31 -0
- package/assets/policy/workflow.upgrade.md +20 -0
- package/bin/agentplane.js +47 -57
- package/bin/dist-guard.js +124 -0
- package/dist/.build-manifest.json +11 -0
- package/dist/agents/agents-template.d.ts +7 -0
- package/dist/agents/agents-template.d.ts.map +1 -1
- package/dist/agents/agents-template.js +41 -2
- package/dist/backends/task-backend/local-backend.d.ts +2 -0
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +12 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +26 -1
- package/dist/backends/task-backend/redmine-backend.d.ts +4 -0
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +92 -9
- package/dist/backends/task-backend/shared/types.d.ts +1 -0
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +8 -1
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +39 -17
- package/dist/cli/command-snippets.d.ts +24 -0
- package/dist/cli/command-snippets.d.ts.map +1 -0
- package/dist/cli/command-snippets.js +23 -0
- package/dist/cli/reason-codes.d.ts +9 -0
- package/dist/cli/reason-codes.d.ts.map +1 -0
- package/dist/cli/reason-codes.js +79 -0
- package/dist/cli/recipes-bundled.d.ts +1 -0
- package/dist/cli/recipes-bundled.d.ts.map +1 -1
- package/dist/cli/recipes-bundled.js +4 -1
- 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 +40 -1
- package/dist/cli/run-cli/commands/config.d.ts +5 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +86 -1
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +57 -2
- package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/ide.js +8 -3
- package/dist/cli/run-cli/commands/init/recipes.d.ts +5 -1
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +24 -4
- package/dist/cli/run-cli/commands/init/ui.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/ui.js +1 -2
- package/dist/cli/run-cli/commands/init/write-agents.d.ts +2 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-agents.js +24 -5
- package/dist/cli/run-cli/commands/init/write-workflow.d.ts +12 -0
- package/dist/cli/run-cli/commands/init/write-workflow.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/write-workflow.js +58 -0
- package/dist/cli/run-cli/commands/init.d.ts +4 -1
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +126 -48
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +195 -8
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +7 -6
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +2 -0
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +107 -16
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +12 -6
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +36 -13
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
- package/dist/commands/recipes/impl/scenario.js +25 -0
- package/dist/commands/recipes/impl/types.d.ts +4 -0
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +9 -4
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +9 -3
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +74 -3
- package/dist/commands/scenario/impl/report.d.ts +8 -0
- package/dist/commands/scenario/impl/report.d.ts.map +1 -1
- package/dist/commands/scenario/impl/report.js +1 -0
- package/dist/commands/shared/reconcile-check.d.ts +7 -0
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -0
- package/dist/commands/shared/reconcile-check.js +60 -0
- package/dist/commands/sync.command.d.ts.map +1 -1
- package/dist/commands/sync.command.js +9 -2
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +32 -0
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +11 -1
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +2 -1
- package/dist/commands/task/list.spec.d.ts.map +1 -1
- package/dist/commands/task/list.spec.js +7 -0
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +41 -4
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +2 -1
- package/dist/commands/task/next.spec.d.ts.map +1 -1
- package/dist/commands/task/next.spec.js +7 -0
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +7 -1
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +2 -1
- package/dist/commands/task/search.spec.d.ts.map +1 -1
- package/dist/commands/task/search.spec.js +7 -0
- package/dist/commands/task/shared.d.ts +14 -0
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +58 -1
- package/dist/commands/task/start-ready.js +1 -1
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +2 -0
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +2 -2
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +263 -294
- package/dist/commands/workflow-build.command.d.ts +8 -0
- package/dist/commands/workflow-build.command.d.ts.map +1 -0
- package/dist/commands/workflow-build.command.js +103 -0
- package/dist/commands/workflow-playbook.command.d.ts +10 -0
- package/dist/commands/workflow-playbook.command.d.ts.map +1 -0
- package/dist/commands/workflow-playbook.command.js +173 -0
- package/dist/commands/workflow-restore.command.d.ts +5 -0
- package/dist/commands/workflow-restore.command.d.ts.map +1 -0
- package/dist/commands/workflow-restore.command.js +30 -0
- package/dist/commands/workflow.command.d.ts +6 -0
- package/dist/commands/workflow.command.d.ts.map +1 -0
- package/dist/commands/workflow.command.js +36 -0
- package/dist/harness/dynamic-tool-contract.d.ts +29 -0
- package/dist/harness/dynamic-tool-contract.d.ts.map +1 -0
- package/dist/harness/dynamic-tool-contract.js +86 -0
- package/dist/harness/hooks-lifecycle.d.ts +27 -0
- package/dist/harness/hooks-lifecycle.d.ts.map +1 -0
- package/dist/harness/hooks-lifecycle.js +67 -0
- package/dist/harness/index.d.ts +9 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +8 -0
- package/dist/harness/reconcile.d.ts +37 -0
- package/dist/harness/reconcile.d.ts.map +1 -0
- package/dist/harness/reconcile.js +42 -0
- package/dist/harness/retry-policy.d.ts +31 -0
- package/dist/harness/retry-policy.d.ts.map +1 -0
- package/dist/harness/retry-policy.js +33 -0
- package/dist/harness/scheduler.d.ts +18 -0
- package/dist/harness/scheduler.d.ts.map +1 -0
- package/dist/harness/scheduler.js +55 -0
- package/dist/harness/state-machine.d.ts +17 -0
- package/dist/harness/state-machine.d.ts.map +1 -0
- package/dist/harness/state-machine.js +70 -0
- package/dist/harness/token-accounting.d.ts +19 -0
- package/dist/harness/token-accounting.d.ts.map +1 -0
- package/dist/harness/token-accounting.js +77 -0
- package/dist/harness/workspace-safety.d.ts +14 -0
- package/dist/harness/workspace-safety.d.ts.map +1 -0
- package/dist/harness/workspace-safety.js +62 -0
- package/dist/recipes/bundled-recipes.d.ts +4 -0
- package/dist/recipes/bundled-recipes.d.ts.map +1 -1
- package/dist/recipes/bundled-recipes.js +11 -0
- package/dist/shared/errors.d.ts +6 -0
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +1 -0
- package/dist/shared/policy-gateway.d.ts +15 -0
- package/dist/shared/policy-gateway.d.ts.map +1 -0
- package/dist/shared/policy-gateway.js +49 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +1 -0
- package/dist/shared/runtime-artifacts.d.ts +2 -2
- package/dist/shared/runtime-artifacts.d.ts.map +1 -1
- package/dist/shared/runtime-artifacts.js +4 -0
- package/dist/workflow-runtime/build.d.ts +4 -0
- package/dist/workflow-runtime/build.d.ts.map +1 -0
- package/dist/workflow-runtime/build.js +126 -0
- package/dist/workflow-runtime/enforcement.d.ts +3 -0
- package/dist/workflow-runtime/enforcement.d.ts.map +1 -0
- package/dist/workflow-runtime/enforcement.js +10 -0
- package/dist/workflow-runtime/file-ops.d.ts +11 -0
- package/dist/workflow-runtime/file-ops.d.ts.map +1 -0
- package/dist/workflow-runtime/file-ops.js +248 -0
- package/dist/workflow-runtime/fix.d.ts +9 -0
- package/dist/workflow-runtime/fix.d.ts.map +1 -0
- package/dist/workflow-runtime/fix.js +107 -0
- package/dist/workflow-runtime/index.d.ts +11 -0
- package/dist/workflow-runtime/index.d.ts.map +1 -0
- package/dist/workflow-runtime/index.js +10 -0
- package/dist/workflow-runtime/markdown.d.ts +10 -0
- package/dist/workflow-runtime/markdown.d.ts.map +1 -0
- package/dist/workflow-runtime/markdown.js +147 -0
- package/dist/workflow-runtime/observability.d.ts +12 -0
- package/dist/workflow-runtime/observability.d.ts.map +1 -0
- package/dist/workflow-runtime/observability.js +14 -0
- package/dist/workflow-runtime/paths.d.ts +3 -0
- package/dist/workflow-runtime/paths.d.ts.map +1 -0
- package/dist/workflow-runtime/paths.js +11 -0
- package/dist/workflow-runtime/template.d.ts +7 -0
- package/dist/workflow-runtime/template.d.ts.map +1 -0
- package/dist/workflow-runtime/template.js +94 -0
- package/dist/workflow-runtime/types.d.ts +68 -0
- package/dist/workflow-runtime/types.d.ts.map +1 -0
- package/dist/workflow-runtime/types.js +1 -0
- package/dist/workflow-runtime/validate.d.ts +8 -0
- package/dist/workflow-runtime/validate.d.ts.map +1 -0
- package/dist/workflow-runtime/validate.js +331 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finish.d.ts","sourceRoot":"","sources":["../../../src/commands/task/finish.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"finish.d.ts","sourceRoot":"","sources":["../../../src/commands/task/finish.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAoCnC,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,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,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,OAAO,CAAC;IAClC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsWlB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ensureDocSections } from "@agentplaneorg/core";
|
|
1
2
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
2
3
|
import { invalidValueMessage, successMessage } from "../../cli/output.js";
|
|
3
4
|
import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
|
|
@@ -6,10 +7,11 @@ import { readFile, rm } from "node:fs/promises";
|
|
|
6
7
|
import path from "node:path";
|
|
7
8
|
import { buildGitCommitEnv, cmdCommit, commitFromComment } from "../guard/index.js";
|
|
8
9
|
import { ensureActionApproved } from "../shared/approval-requirements.js";
|
|
10
|
+
import { ensureReconciledBeforeMutation } from "../shared/reconcile-check.js";
|
|
9
11
|
import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
10
12
|
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
11
13
|
import { readDirectWorkLock } from "../../shared/direct-work-lock.js";
|
|
12
|
-
import { appendTaskEvent, defaultCommitEmojiForStatus, enforceStatusCommitPolicy, ensureVerificationSatisfiedIfRequired, nowIso, readCommitInfo, readHeadCommit, requireStructuredComment, resolvePrimaryTag, toStringArray, } from "./shared.js";
|
|
14
|
+
import { appendTaskEvent, defaultCommitEmojiForStatus, enforceStatusCommitPolicy, ensureAgentFilledRequiredDocSections, ensureVerificationSatisfiedIfRequired, nowIso, readCommitInfo, readHeadCommit, requireStructuredComment, resolvePrimaryTag, toStringArray, } from "./shared.js";
|
|
13
15
|
async function clearDirectWorkLockIfMatches(opts) {
|
|
14
16
|
const lockPath = path.join(opts.agentplaneDir, "cache", "direct-work.json");
|
|
15
17
|
try {
|
|
@@ -30,6 +32,7 @@ export async function cmdFinish(opts) {
|
|
|
30
32
|
try {
|
|
31
33
|
const ctx = opts.ctx ??
|
|
32
34
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
35
|
+
await ensureReconciledBeforeMutation({ ctx, command: "finish" });
|
|
33
36
|
if (opts.force) {
|
|
34
37
|
await ensureActionApproved({
|
|
35
38
|
action: "force_action",
|
|
@@ -137,6 +140,13 @@ export async function cmdFinish(opts) {
|
|
|
137
140
|
primaryTag = resolvePrimaryTag(toStringArray(task.tags), ctx).primary;
|
|
138
141
|
}
|
|
139
142
|
ensureVerificationSatisfiedIfRequired(task, ctx.config);
|
|
143
|
+
const normalizedDoc = ensureDocSections(typeof task.doc === "string" ? task.doc : "", ctx.config.tasks.doc.required_sections);
|
|
144
|
+
ensureAgentFilledRequiredDocSections({
|
|
145
|
+
task,
|
|
146
|
+
config: ctx.config,
|
|
147
|
+
doc: normalizedDoc,
|
|
148
|
+
action: "finish task",
|
|
149
|
+
});
|
|
140
150
|
if (taskId === metaTaskId) {
|
|
141
151
|
const tags = Array.isArray(task.tags)
|
|
142
152
|
? task.tags.filter((t) => typeof t === "string")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEnG,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEnG,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CA6ClB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CAElB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
2
2
|
import { listTasksMemo, loadCommandContext } from "../shared/task-backend.js";
|
|
3
|
-
import { buildDependencyState, dedupeStrings, formatTaskLine, toStringArray, } from "./shared.js";
|
|
3
|
+
import { buildDependencyState, dedupeStrings, formatTaskLine, handleTaskListWarnings, toStringArray, } from "./shared.js";
|
|
4
4
|
export async function cmdTaskListWithFilters(opts) {
|
|
5
5
|
try {
|
|
6
6
|
const ctx = opts.ctx ??
|
|
7
7
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
8
8
|
const tasks = await listTasksMemo(ctx);
|
|
9
|
+
handleTaskListWarnings({ backend: ctx.taskBackend, strictRead: opts.filters.strictRead });
|
|
9
10
|
const depState = buildDependencyState(tasks);
|
|
10
11
|
let filtered = tasks;
|
|
11
12
|
if (opts.filters.status.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"list.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAuDpD,CAAC"}
|
|
@@ -26,6 +26,12 @@ export const taskListSpec = {
|
|
|
26
26
|
repeatable: true,
|
|
27
27
|
description: "Repeatable. Filter by tag.",
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
kind: "boolean",
|
|
31
|
+
name: "strict-read",
|
|
32
|
+
default: false,
|
|
33
|
+
description: "Fail if task scan skips malformed/unreadable task files.",
|
|
34
|
+
},
|
|
29
35
|
{ kind: "boolean", name: "quiet", default: false, description: "Suppress summary output." },
|
|
30
36
|
],
|
|
31
37
|
examples: [
|
|
@@ -46,6 +52,7 @@ export const taskListSpec = {
|
|
|
46
52
|
owner: toStringList(raw.opts.owner),
|
|
47
53
|
tag: toStringList(raw.opts.tag),
|
|
48
54
|
quiet: raw.opts.quiet === true,
|
|
55
|
+
strictRead: raw.opts["strict-read"] === true,
|
|
49
56
|
},
|
|
50
57
|
}),
|
|
51
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/commands/task/new.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AASpF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/commands/task/new.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AASpF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA6LF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoFlB"}
|
|
@@ -66,7 +66,35 @@ function insertMarkdownSectionBefore(opts) {
|
|
|
66
66
|
const out = [...lines.slice(0, beforeIdx), ...sectionLines, ...lines.slice(beforeIdx)];
|
|
67
67
|
return `${out.join("\n").trimEnd()}\n`;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function buildDefaultSummary(opts) {
|
|
70
|
+
return `${opts.title}\n\n${opts.description}`;
|
|
71
|
+
}
|
|
72
|
+
function buildDefaultScope(opts) {
|
|
73
|
+
return [
|
|
74
|
+
`- In scope: ${opts.description}.`,
|
|
75
|
+
`- Out of scope: unrelated refactors not required for "${opts.title}".`,
|
|
76
|
+
].join("\n");
|
|
77
|
+
}
|
|
78
|
+
function buildDefaultPlan(opts) {
|
|
79
|
+
return [
|
|
80
|
+
`1. Implement the change for "${opts.title}".`,
|
|
81
|
+
"2. Run required checks and capture verification evidence.",
|
|
82
|
+
"3. Finalize task notes and finish with traceable commit metadata.",
|
|
83
|
+
].join("\n");
|
|
84
|
+
}
|
|
85
|
+
function buildDefaultRisks() {
|
|
86
|
+
return [
|
|
87
|
+
"- Risk: hidden regressions in touched paths.",
|
|
88
|
+
"- Mitigation: run required checks before finish and record evidence.",
|
|
89
|
+
].join("\n");
|
|
90
|
+
}
|
|
91
|
+
function buildDefaultRollbackPlan() {
|
|
92
|
+
return [
|
|
93
|
+
"- Revert task-related commit(s).",
|
|
94
|
+
"- Re-run required checks to confirm rollback safety.",
|
|
95
|
+
].join("\n");
|
|
96
|
+
}
|
|
97
|
+
function defaultTaskDoc(opts) {
|
|
70
98
|
const verifyStepsTemplate = [
|
|
71
99
|
"<!-- TODO: FILL VERIFY STEPS -->",
|
|
72
100
|
"",
|
|
@@ -93,14 +121,19 @@ function defaultTaskDoc(requiredSections) {
|
|
|
93
121
|
"<!-- BEGIN VERIFICATION RESULTS -->",
|
|
94
122
|
"<!-- END VERIFICATION RESULTS -->",
|
|
95
123
|
].join("\n");
|
|
96
|
-
const baseDoc = ensureDocSections("", requiredSections);
|
|
124
|
+
const baseDoc = ensureDocSections("", opts.requiredSections);
|
|
97
125
|
const withVerifySteps = insertMarkdownSectionBefore({
|
|
98
126
|
body: baseDoc,
|
|
99
127
|
section: "Verify Steps",
|
|
100
128
|
text: verifyStepsTemplate,
|
|
101
129
|
beforeSection: "Verification",
|
|
102
130
|
});
|
|
103
|
-
|
|
131
|
+
const withVerification = setMarkdownSection(withVerifySteps, "Verification", verificationTemplate);
|
|
132
|
+
const withSummary = setMarkdownSection(withVerification, "Summary", buildDefaultSummary({ title: opts.title, description: opts.description }));
|
|
133
|
+
const withScope = setMarkdownSection(withSummary, "Scope", buildDefaultScope({ title: opts.title, description: opts.description }));
|
|
134
|
+
const withPlan = setMarkdownSection(withScope, "Plan", buildDefaultPlan({ title: opts.title }));
|
|
135
|
+
const withRisks = setMarkdownSection(withPlan, "Risks", buildDefaultRisks());
|
|
136
|
+
return setMarkdownSection(withRisks, "Rollback Plan", buildDefaultRollbackPlan());
|
|
104
137
|
}
|
|
105
138
|
function buildDefaultVerifyStepsSection(opts) {
|
|
106
139
|
const checks = opts.verifyCommands.length > 0
|
|
@@ -150,7 +183,11 @@ export async function runTaskNewParsed(opts) {
|
|
|
150
183
|
doc_updated_at: nowIso(),
|
|
151
184
|
doc_updated_by: p.owner,
|
|
152
185
|
id_source: "generated",
|
|
153
|
-
doc: defaultTaskDoc(
|
|
186
|
+
doc: defaultTaskDoc({
|
|
187
|
+
requiredSections: ctx.config.tasks.doc.required_sections,
|
|
188
|
+
title: p.title,
|
|
189
|
+
description: p.description,
|
|
190
|
+
}),
|
|
154
191
|
};
|
|
155
192
|
const spikeTag = (ctx.config.tasks.verify.spike_tag ?? "spike").trim().toLowerCase();
|
|
156
193
|
const primary = resolvePrimaryTag(p.tags, ctx);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/commands/task/next.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/commands/task/next.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CA6ClB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
2
2
|
import { loadCommandContext } from "../shared/task-backend.js";
|
|
3
|
-
import { buildDependencyState, dedupeStrings, formatTaskLine, toStringArray, } from "./shared.js";
|
|
3
|
+
import { buildDependencyState, dedupeStrings, formatTaskLine, handleTaskListWarnings, toStringArray, } from "./shared.js";
|
|
4
4
|
export async function cmdTaskNext(opts) {
|
|
5
5
|
try {
|
|
6
6
|
const ctx = opts.ctx ??
|
|
7
7
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
8
8
|
const tasks = await ctx.taskBackend.listTasks();
|
|
9
|
+
handleTaskListWarnings({ backend: ctx.taskBackend, strictRead: opts.filters.strictRead });
|
|
9
10
|
const depState = buildDependencyState(tasks);
|
|
10
11
|
const statuses = opts.filters.status.length > 0
|
|
11
12
|
? new Set(opts.filters.status.map((s) => s.trim().toUpperCase()))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/next.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"next.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/next.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAyEpD,CAAC"}
|
|
@@ -26,6 +26,12 @@ export const taskNextSpec = {
|
|
|
26
26
|
repeatable: true,
|
|
27
27
|
description: "Repeatable. Filter by tag.",
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
kind: "boolean",
|
|
31
|
+
name: "strict-read",
|
|
32
|
+
default: false,
|
|
33
|
+
description: "Fail if task scan skips malformed/unreadable task files.",
|
|
34
|
+
},
|
|
29
35
|
{ kind: "string", name: "limit", valueHint: "<n>", description: "Max rows to print." },
|
|
30
36
|
{ kind: "boolean", name: "quiet", default: false, description: "Suppress summary output." },
|
|
31
37
|
],
|
|
@@ -64,6 +70,7 @@ export const taskNextSpec = {
|
|
|
64
70
|
tag: toStringList(raw.opts.tag),
|
|
65
71
|
limit: typeof raw.opts.limit === "string" ? Number.parseInt(raw.opts.limit, 10) : undefined,
|
|
66
72
|
quiet: raw.opts.quiet === true,
|
|
73
|
+
strictRead: raw.opts["strict-read"] === true,
|
|
67
74
|
},
|
|
68
75
|
}),
|
|
69
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAoDnC,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6ElB;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAsFlB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAuDlB"}
|
|
@@ -6,7 +6,7 @@ import { backendNotSupportedMessage } from "../../cli/output.js";
|
|
|
6
6
|
import { CliError } from "../../shared/errors.js";
|
|
7
7
|
import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
8
8
|
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
9
|
-
import { extractDocSection, isVerifyStepsFilled, nowIso, requiresVerifyStepsByPrimary, toStringArray, } from "./shared.js";
|
|
9
|
+
import { ensureAgentFilledRequiredDocSections, extractDocSection, isVerifyStepsFilled, nowIso, requiresVerifyStepsByPrimary, toStringArray, } from "./shared.js";
|
|
10
10
|
async function loadPlanTask(opts) {
|
|
11
11
|
const ctx = opts.ctx ??
|
|
12
12
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
@@ -129,6 +129,12 @@ export async function cmdTaskPlanApprove(opts) {
|
|
|
129
129
|
message: `${task.id}: cannot approve plan: ## Plan section is missing or empty`,
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
+
ensureAgentFilledRequiredDocSections({
|
|
133
|
+
task,
|
|
134
|
+
config,
|
|
135
|
+
doc: baseDoc,
|
|
136
|
+
action: "approve plan",
|
|
137
|
+
});
|
|
132
138
|
const enforceVerifySteps = config.tasks.verify.enforce_on_plan_approve !== false;
|
|
133
139
|
if (enforceVerifySteps) {
|
|
134
140
|
const tags = toStringArray(task.tags);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/task/search.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/task/search.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,EAOL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CA8DlB"}
|
|
@@ -2,7 +2,7 @@ import { mapBackendError } from "../../cli/error-map.js";
|
|
|
2
2
|
import { invalidValueMessage } from "../../cli/output.js";
|
|
3
3
|
import { CliError } from "../../shared/errors.js";
|
|
4
4
|
import { loadCommandContext } from "../shared/task-backend.js";
|
|
5
|
-
import { buildDependencyState, dedupeStrings, formatTaskLine, taskTextBlob, toStringArray, } from "./shared.js";
|
|
5
|
+
import { buildDependencyState, dedupeStrings, formatTaskLine, handleTaskListWarnings, taskTextBlob, toStringArray, } from "./shared.js";
|
|
6
6
|
export async function cmdTaskSearch(opts) {
|
|
7
7
|
const query = opts.query.trim();
|
|
8
8
|
if (!query) {
|
|
@@ -16,6 +16,7 @@ export async function cmdTaskSearch(opts) {
|
|
|
16
16
|
const ctx = opts.ctx ??
|
|
17
17
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
18
18
|
const tasks = await ctx.taskBackend.listTasks();
|
|
19
|
+
handleTaskListWarnings({ backend: ctx.taskBackend, strictRead: opts.filters.strictRead });
|
|
19
20
|
const depState = buildDependencyState(tasks);
|
|
20
21
|
let filtered = tasks;
|
|
21
22
|
if (opts.filters.status.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/search.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"search.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/search.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAmFxD,CAAC"}
|
|
@@ -28,6 +28,12 @@ export const taskSearchSpec = {
|
|
|
28
28
|
repeatable: true,
|
|
29
29
|
description: "Repeatable. Filter by tag.",
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
kind: "boolean",
|
|
33
|
+
name: "strict-read",
|
|
34
|
+
default: false,
|
|
35
|
+
description: "Fail if task scan skips malformed/unreadable task files.",
|
|
36
|
+
},
|
|
31
37
|
{ kind: "string", name: "limit", valueHint: "<n>", description: "Max rows to print." },
|
|
32
38
|
],
|
|
33
39
|
examples: [
|
|
@@ -74,6 +80,7 @@ export const taskSearchSpec = {
|
|
|
74
80
|
tag: toStringList(raw.opts.tag),
|
|
75
81
|
limit: typeof raw.opts.limit === "string" ? Number.parseInt(raw.opts.limit, 10) : undefined,
|
|
76
82
|
quiet: true,
|
|
83
|
+
strictRead: raw.opts["strict-read"] === true,
|
|
77
84
|
},
|
|
78
85
|
}),
|
|
79
86
|
};
|
|
@@ -8,6 +8,13 @@ export declare function nowIso(): string;
|
|
|
8
8
|
export declare const VERIFY_STEPS_PLACEHOLDER = "<!-- TODO: FILL VERIFY STEPS -->";
|
|
9
9
|
export declare function extractDocSection(doc: string, sectionName: string): string | null;
|
|
10
10
|
export declare function isVerifyStepsFilled(sectionText: string | null): boolean;
|
|
11
|
+
export declare function isDocSectionFilled(sectionText: string | null): boolean;
|
|
12
|
+
export declare function ensureAgentFilledRequiredDocSections(opts: {
|
|
13
|
+
task: Pick<TaskData, "id">;
|
|
14
|
+
config: AgentplaneConfig;
|
|
15
|
+
doc: string;
|
|
16
|
+
action: string;
|
|
17
|
+
}): void;
|
|
11
18
|
export declare function normalizeDependsOnInput(value: string): string[];
|
|
12
19
|
export declare function normalizeTaskStatus(value: string): string;
|
|
13
20
|
export declare function toStringArray(value: unknown): string[];
|
|
@@ -86,9 +93,16 @@ export type TaskListFilters = {
|
|
|
86
93
|
tag: string[];
|
|
87
94
|
limit?: number;
|
|
88
95
|
quiet: boolean;
|
|
96
|
+
strictRead?: boolean;
|
|
89
97
|
};
|
|
90
98
|
export declare function parseTaskListFilters(args: string[], opts?: {
|
|
91
99
|
allowLimit?: boolean;
|
|
92
100
|
}): TaskListFilters;
|
|
101
|
+
export declare function handleTaskListWarnings(opts: {
|
|
102
|
+
backend: {
|
|
103
|
+
getLastListWarnings?: () => string[];
|
|
104
|
+
};
|
|
105
|
+
strictRead?: boolean;
|
|
106
|
+
}): void;
|
|
93
107
|
export declare function taskTextBlob(task: TaskData): string;
|
|
94
108
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/task/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAK9C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAq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
+
const DOC_SECTIONS_AUTO_MANAGED = new Set(["verification"]);
|
|
62
|
+
const DOC_SECTIONS_CONDITIONAL = new Set(["verify steps", "notes"]);
|
|
63
|
+
export function isDocSectionFilled(sectionText) {
|
|
64
|
+
const normalized = (sectionText ?? "").trim();
|
|
65
|
+
if (!normalized)
|
|
66
|
+
return false;
|
|
67
|
+
if (DOC_PLACEHOLDER_RE.test(normalized))
|
|
68
|
+
return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
export function ensureAgentFilledRequiredDocSections(opts) {
|
|
72
|
+
const required = dedupeStrings((opts.config.tasks.doc.required_sections ?? [])
|
|
73
|
+
.map((section) => String(section ?? "").trim())
|
|
74
|
+
.filter(Boolean));
|
|
75
|
+
const missing = [];
|
|
76
|
+
for (const section of required) {
|
|
77
|
+
const normalizedSection = section.trim().toLowerCase();
|
|
78
|
+
if (DOC_SECTIONS_AUTO_MANAGED.has(normalizedSection))
|
|
79
|
+
continue;
|
|
80
|
+
if (DOC_SECTIONS_CONDITIONAL.has(normalizedSection))
|
|
81
|
+
continue;
|
|
82
|
+
const sectionText = extractDocSection(opts.doc, section);
|
|
83
|
+
if (!isDocSectionFilled(sectionText)) {
|
|
84
|
+
missing.push(section);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (missing.length === 0)
|
|
88
|
+
return;
|
|
89
|
+
const sectionList = missing.map((section) => `## ${section}`).join(", ");
|
|
90
|
+
throw new CliError({
|
|
91
|
+
exitCode: 3,
|
|
92
|
+
code: "E_VALIDATION",
|
|
93
|
+
message: `${opts.task.id}: cannot ${opts.action}: required task doc sections are missing/empty: ${sectionList} ` +
|
|
94
|
+
`(fill via \`agentplane task doc set ${opts.task.id} --section <name> --text "..."\`)`,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
60
97
|
export function normalizeDependsOnInput(value) {
|
|
61
98
|
const trimmed = value.trim();
|
|
62
99
|
if (!trimmed || trimmed === "[]")
|
|
@@ -521,7 +558,7 @@ export async function defaultCommitEmojiForAgentId(ctx, agentId) {
|
|
|
521
558
|
return await resolveCommitEmojiForAgent({ agentsDirAbs: agentsDir, agentId });
|
|
522
559
|
}
|
|
523
560
|
export function parseTaskListFilters(args, opts) {
|
|
524
|
-
const out = { status: [], owner: [], tag: [], quiet: false };
|
|
561
|
+
const out = { status: [], owner: [], tag: [], quiet: false, strictRead: false };
|
|
525
562
|
for (let i = 0; i < args.length; i++) {
|
|
526
563
|
const arg = args[i];
|
|
527
564
|
if (!arg)
|
|
@@ -530,6 +567,10 @@ export function parseTaskListFilters(args, opts) {
|
|
|
530
567
|
out.quiet = true;
|
|
531
568
|
continue;
|
|
532
569
|
}
|
|
570
|
+
if (arg === "--strict-read") {
|
|
571
|
+
out.strictRead = true;
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
533
574
|
if (arg === "--status") {
|
|
534
575
|
const next = args[i + 1];
|
|
535
576
|
if (!next) {
|
|
@@ -600,6 +641,22 @@ export function parseTaskListFilters(args, opts) {
|
|
|
600
641
|
}
|
|
601
642
|
return out;
|
|
602
643
|
}
|
|
644
|
+
export function handleTaskListWarnings(opts) {
|
|
645
|
+
const warnings = opts.backend.getLastListWarnings?.() ?? [];
|
|
646
|
+
if (warnings.length === 0)
|
|
647
|
+
return;
|
|
648
|
+
const preview = warnings.slice(0, 3).join("; ");
|
|
649
|
+
const suffix = warnings.length > 3 ? `; +${warnings.length - 3} more` : "";
|
|
650
|
+
const message = `skipped ${warnings.length} task files during scan (${preview}${suffix})`;
|
|
651
|
+
if (opts.strictRead) {
|
|
652
|
+
throw new CliError({
|
|
653
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
654
|
+
code: "E_VALIDATION",
|
|
655
|
+
message: `task scan strict mode failed: ${message}`,
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
process.stderr.write(`${warnMessage(message)}\n`);
|
|
659
|
+
}
|
|
603
660
|
export function taskTextBlob(task) {
|
|
604
661
|
const parts = [];
|
|
605
662
|
for (const key of ["id", "title", "description", "status", "priority", "owner"]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-record.d.ts","sourceRoot":"","sources":["../../../src/commands/task/verify-record.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-record.d.ts","sourceRoot":"","sources":["../../../src/commands/task/verify-record.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAKnC,KAAK,WAAW,GAAG,IAAI,GAAG,cAAc,CAAC;AAkKzC,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ClB;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ClB;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ClB"}
|
|
@@ -5,6 +5,7 @@ import { ensureDocSections, setMarkdownSection } from "@agentplaneorg/core";
|
|
|
5
5
|
import { mapBackendError, mapCoreError } from "../../cli/error-map.js";
|
|
6
6
|
import { backendNotSupportedMessage } from "../../cli/output.js";
|
|
7
7
|
import { CliError } from "../../shared/errors.js";
|
|
8
|
+
import { ensureReconciledBeforeMutation } from "../shared/reconcile-check.js";
|
|
8
9
|
import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
9
10
|
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
10
11
|
import { appendTaskEvent, extractDocSection, nowIso } from "./shared.js";
|
|
@@ -68,6 +69,7 @@ function sha256Hex(text) {
|
|
|
68
69
|
async function recordVerificationResult(opts) {
|
|
69
70
|
const ctx = opts.ctx ??
|
|
70
71
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
72
|
+
await ensureReconciledBeforeMutation({ ctx, command: "verify" });
|
|
71
73
|
const backend = ctx.taskBackend;
|
|
72
74
|
const config = ctx.config;
|
|
73
75
|
const resolved = ctx.resolvedProject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.command.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"upgrade.command.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,CA2JlD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,aAAa,CACsB,CAAC"}
|
|
@@ -4,7 +4,7 @@ export const upgradeSpec = {
|
|
|
4
4
|
id: ["upgrade"],
|
|
5
5
|
group: "Setup",
|
|
6
6
|
summary: "Upgrade the local agentplane framework bundle in the repo.",
|
|
7
|
-
description: "Upgrades the local agentplane framework bundle in the repo using a strict manifest of managed files. By default, upgrade generates an agent-assisted plan from the locally installed agentplane package assets (no network) and does not modify files. Use --auto to apply changes. Use --remote to fetch a GitHub release bundle; network access is gated by config approvals.",
|
|
7
|
+
description: "Upgrades the local agentplane framework bundle in the repo using a strict manifest of managed files. By default, upgrade generates an agent-assisted plan from the locally installed agentplane package assets (no network) and does not modify files. Use --auto to apply changes and create a dedicated upgrade commit. Use --remote to fetch a GitHub release bundle; network access is gated by config approvals.",
|
|
8
8
|
options: [
|
|
9
9
|
{
|
|
10
10
|
kind: "boolean",
|
|
@@ -16,7 +16,7 @@ export const upgradeSpec = {
|
|
|
16
16
|
kind: "boolean",
|
|
17
17
|
name: "auto",
|
|
18
18
|
default: false,
|
|
19
|
-
description: "Apply the upgrade automatically (writes managed files).",
|
|
19
|
+
description: "Apply the upgrade automatically (writes managed files) and create a dedicated upgrade commit.",
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
kind: "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAqCA,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAiGF,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,GAAG;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB,CAWA;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE;IACtD,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,GAC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