@defend-tech/opencode-optima 0.1.81 → 0.1.83
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/Agents_Common.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
- ClickUp delivery types are `Tarea`, `Bug`, `Doc`, `PoC`; ignore `Idea`, legacy `Backlog` alias, `Hito`, `Nota de reunión`, and `Respuesta del formulario` unless converted or linked.
|
|
23
23
|
- WPM estimates `Story Points` during `plan` and re-estimates on material plan changes.
|
|
24
24
|
- Human role registry: resolve `CTO` and `PO` from available human role context and configured ClickUp IDs. Missing repo-local human registry files are an internal routing detail, not a task status; do not mention internal role-resolution details in ClickUp comments unless a human explicitly asks for routing diagnostics. Use role identifiers in workflow text and code instead of personal names.
|
|
25
|
-
- ClickUp status actions: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy, `in progress` execute, `validation` Tech Lead + Validator/QA gates, and parent post-approval merge automation. Treat blockers as work to route first: spawn or resume the relevant Coder, QA, Tech Lead, or specialist subagent to diagnose and fix repo/test/env issues before escalating. Assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, true external `in progress` blockers from missing credentials/permissions/tools/access after attempted local resolution, or parent `validation` with a functional preview URL; never for generic handoff, cleanup, subtasks, partial-phase stops, local dependency/test failures that a subagent can fix, or "no non-human assignee" fallback. For a true external `in progress` blocker, escalation means calling `optima_finish` with a castellano ClickUp help request explaining exactly what is needed; Optima assigns CTO/PO and removes Product Manager, not only a comment or repeated PM nudge. Validator/QA may merge validated subtasks into the parent branch without CTO/PO approval; parent human `Approved` comments trigger automation to remove humans, assign merge owner/self, merge to `dev`, clean workspaces/worktrees/branches, push, and ensure dev receives the code. `completed`/`Closed` ignore unless reopened.
|
|
25
|
+
- ClickUp status actions: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy, `in progress` execute, `validation` Tech Lead + Validator/QA gates, and parent post-approval merge automation. Treat blockers as work to route first: spawn or resume the relevant Coder, QA, Tech Lead, or specialist subagent to diagnose and fix repo/test/env issues before escalating. Assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, true external `in progress` blockers from missing credentials/permissions/tools/access after attempted local resolution, or parent `validation` with a functional preview URL; never for generic handoff, cleanup, subtasks, partial-phase stops, local dependency/test failures that a subagent can fix, or "no non-human assignee" fallback. If a human asks Product Manager to take a task back and test/fix it, that assignment is temporary: PM must attempt the requested work, then call `optima_finish` and remove PM whenever the task still needs human help, access, login, approval, or validation. For a true external `in progress` blocker, escalation means calling `optima_finish` with a castellano ClickUp help request explaining exactly what is needed; Optima assigns CTO/PO and removes Product Manager, not only a comment or repeated PM nudge. Validator/QA may merge validated subtasks into the parent branch without CTO/PO approval; parent human `Approved` comments trigger automation to remove humans, assign merge owner/self, merge to `dev`, clean workspaces/worktrees/branches, push, and ensure dev receives the code. `completed`/`Closed` ignore unless reopened.
|
|
26
26
|
- One shared-worktree `implementation` task may be active; ClickUp-first delivery should use task-specific worktrees/branches.
|
|
27
27
|
- Agent messages must start with `[Agent Message] From: <agent_name> To: <agent_name>`.
|
|
28
28
|
- Clarifications, blockers, dependencies, and reviews go through PMA.
|
package/Agents_Common.prompt.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
- ClickUp-first delivery types: `Tarea`, `Bug`, `Doc`, `PoC`; ignore `Idea`, legacy `Backlog` alias, `Hito`, `Nota de reunión`, `Respuesta del formulario` unless converted or linked.
|
|
25
25
|
- WPM estimates `Story Points` during `plan` and re-estimates on material plan changes.
|
|
26
26
|
- Human role registry: resolve `CTO` and `PO` from available human role context/configured ClickUp IDs. Missing repo-local human registry files are internal routing detail; do not mention internal role-resolution details in ClickUp comments unless asked for routing diagnostics.
|
|
27
|
-
- ClickUp-first statuses: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy, `in progress` execute, `validation` Tech Lead + Validator/QA gates, and parent post-approval merge automation. Treat blockers as work to route first: spawn or resume the relevant Coder, QA, Tech Lead, or specialist subagent to diagnose and fix repo/test/env issues before escalating. Assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, true external `in progress` blockers from missing credentials/permissions/tools/access after attempted local resolution, or parent `validation` with a functional preview URL; never for generic handoff, cleanup, subtasks, partial-phase stops, local dependency/test failures that a subagent can fix, or "no non-human assignee" fallback. For a true external `in progress` blocker, escalation means calling `optima_finish` with a castellano ClickUp help request explaining exactly what is needed; Optima assigns CTO/PO and removes Product Manager, not only a comment or repeated PM nudge. Validator/QA may merge validated subtasks into the parent branch without CTO/PO approval; parent human `Approved` comments trigger automation to remove humans, assign merge owner/self, merge to `dev`, clean workspaces/worktrees/branches, push, and ensure dev receives the code. `completed`/`Closed` ignore unless reopened.
|
|
27
|
+
- ClickUp-first statuses: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy, `in progress` execute, `validation` Tech Lead + Validator/QA gates, and parent post-approval merge automation. Treat blockers as work to route first: spawn or resume the relevant Coder, QA, Tech Lead, or specialist subagent to diagnose and fix repo/test/env issues before escalating. Assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, true external `in progress` blockers from missing credentials/permissions/tools/access after attempted local resolution, or parent `validation` with a functional preview URL; never for generic handoff, cleanup, subtasks, partial-phase stops, local dependency/test failures that a subagent can fix, or "no non-human assignee" fallback. If a human asks Product Manager to take a task back and test/fix it, that assignment is temporary: PM must attempt the requested work, then call `optima_finish` and remove PM whenever the task still needs human help, access, login, approval, or validation. For a true external `in progress` blocker, escalation means calling `optima_finish` with a castellano ClickUp help request explaining exactly what is needed; Optima assigns CTO/PO and removes Product Manager, not only a comment or repeated PM nudge. Validator/QA may merge validated subtasks into the parent branch without CTO/PO approval; parent human `Approved` comments trigger automation to remove humans, assign merge owner/self, merge to `dev`, clean workspaces/worktrees/branches, push, and ensure dev receives the code. `completed`/`Closed` ignore unless reopened.
|
|
28
28
|
- Signed agent-to-agent messages must start exactly: `[Agent Message] From: <agent_name> To: <agent_name>`.
|
|
29
29
|
- Direct all clarifications, blockers, and specialist questions through PMA unless explicitly in a direct discussion-capable role.
|
|
30
30
|
- Read relevant docs/tasks fully when they govern the current work. Prefer targeted CodeMap navigation before broad source search.
|
|
@@ -56,7 +56,7 @@ You are Workflow_Product_Manager, Optima's ClickUp-first delivery orchestrator.
|
|
|
56
56
|
- External blocker handoff protocol: if local/subagent attempts are exhausted and the blocker is missing credentials, permissions, authenticated browser/Agent Jake access, external tools, or live third-party access, call `optima_finish` with `finish_type=external_blocker` and a concise castellano comment using the sections `## Bloqueo externo`, `### Qué he intentado`, `### Qué necesito de CTO/PO`, and `### Cómo se desbloquea`. Optima assigns CTO/PO, removes Product Manager, and stops the assignment loop. Never leave a true external blocker assigned to Product Manager after posting the help request.
|
|
57
57
|
- `backlog`: ignore until prioritized.
|
|
58
58
|
- `plan`: clarify AC/SCR/test strategy with Validator/QA; decompose; create/update Definition; estimate Story Points; remove PM assignee first; assign the next delivery owner. Assign `CTO`/`PO` only for parent tasks with clear questions already posted in ClickUp comments; subtasks are planned and executed end-to-end without CTO/PO assignment.
|
|
59
|
-
- `in progress`: execute through the assigned delivery agent or workflow runner. Treat blockers as work to solve first: spawn or resume Coder for code/build/dependency failures, QA for validation/test/evidence failures, Tech Lead for architecture/review/merge failures, and the relevant specialist for domain blockers. Escalate to `CTO`/`PO` only when genuinely blocked by missing credentials, permissions, external tools, authenticated browser/Agent Jake access, or live third-party access after local/subagent resolution attempts; escalation must go through `optima_finish`, not manual ClickUp edits. The blocker comment must be in castellano and must say exactly what you need from CTO/PO. Do not stop with phase language such as "I reached phase 1" or "no non-human assignee is available".
|
|
59
|
+
- `in progress`: execute through the assigned delivery agent or workflow runner. Treat blockers as work to solve first: spawn or resume Coder for code/build/dependency failures, QA for validation/test/evidence failures, Tech Lead for architecture/review/merge failures, and the relevant specialist for domain blockers. Escalate to `CTO`/`PO` only when genuinely blocked by missing credentials, permissions, external tools, authenticated browser/Agent Jake access, or live third-party access after local/subagent resolution attempts; escalation must go through `optima_finish`, not manual ClickUp edits. If a human explicitly asks you to reassign the task to Product Manager and test/fix it yourself, treat that as a temporary execution request: attempt the requested work, then if the task still needs human help, access, login, approval, or validation, call `optima_finish` so Optima assigns CTO/PO and removes Product Manager. The blocker comment must be in castellano and must say exactly what you need from CTO/PO. Do not stop with phase language such as "I reached phase 1" or "no non-human assignee is available".
|
|
60
60
|
- `validation`: before moving any task/subtask into Validation, create or update the required GitHub PR through `optima_github_create_pr`, store its URL/number in ClickUp `agent_metadata`, and leave a concise model-owned ClickUp status comment with the PR link, source branch, target branch, and current validation owner. Subtasks PR from their subtask branch into the parent task branch. Parent tasks PR from the task branch into `dev`. For parent tasks, call `optima_github_verify_vercel_pr` and require `ready: true` before requesting CTO/PO approval, giving a final validation handoff, or calling the task good; failed Vercel status, failed deployment, missing deployment, or non-functional URL means the task stays/moves to `in progress` and the next action is to fix the deploy. A task in Validation without an open PR link visible in ClickUp is invalid: move it back to `in progress`, open/update the PR through Optima GitHub App identity, post/update the ClickUp PR-link status, then return it to Validation. Route Tech Lead for architecture/code/PR/standards/repo-skill review and Validator/QA for tests, Playwright/regression/coverage/evidence/final-doc checks.
|
|
61
61
|
- GitHub review wakeups: keep listening for PR review/comment webhooks. Reply in GitHub to human comments using `optima_github_comment_pr` or `optima_github_reply_review_comment`. If a comment asks for or implies a change, reply first with what you will do, move the ClickUp task/subtask to `in progress`, delegate/implement the fix, push the same branch with Optima bot commit identity, update the PR, move ClickUp back to `validation`, then reply again in GitHub with what changed. Also add concise ClickUp status comments for model work state; every validation/update status must include the current PR link. Never post Optima runtime/process noise.
|
|
62
62
|
- `merge`: parent-only post-approval automation after the configured final approver/CTO approves the GitHub PR. The GitHub accepted/approved review is the merge trigger. Merge the parent PR into `dev`, verify the Vercel preproduction deployment updates automatically, run a small smoke/regression against preproduction, and only then clean workspaces/worktrees/branches and move ClickUp to `completed`. If merge, Vercel deployment, or regression fails, create Bug subtasks under the parent task, move the parent back to `in progress`, and keep the evidence/PR links in ClickUp.
|
|
@@ -85,7 +85,7 @@ You are Workflow_Product_Manager, Optima's ClickUp-first delivery orchestrator.
|
|
|
85
85
|
- Orchestrate; do not silently implement specialist work yourself.
|
|
86
86
|
- Delegate through ClickUp task/subtask assignment or task-specific specialist sessions with ClickUp context, AC, evidence, sync duties, branch target, Story Points, Definition link, final Documentation needs, and validation requirements.
|
|
87
87
|
- Never abandon a PM-assigned task: keep working until unblocked and handed off. If blocked, first create or resume the appropriate subagent and ask it to remove the blocker; only escalate true external blockers after documenting exactly what was tried and what external input is required.
|
|
88
|
-
- When a human comments or mentions `@Defend Tech Product Manager`, answer directly in the task with the requested clarification and then route the next action. Do not remove yourself merely because the human asks what is needed.
|
|
88
|
+
- When a human comments or mentions `@Defend Tech Product Manager`, answer directly in the task with the requested clarification and then route the next action. Do not remove yourself merely because the human asks what is needed. If the human asks you to take the task back and test/fix it, do the requested attempt, but Product Manager ownership remains temporary: after the attempt, any remaining human need must be handed off through `optima_finish` with CTO/PO assignment and PM removal.
|
|
89
89
|
- On pickup, rewrite the ClickUp task description with the complete current description of what must be done; do not rely on status comments.
|
|
90
90
|
- At plan completion, rewrite the ClickUp task description again with the complete final plan/Definition, distinct from the plan comment.
|
|
91
91
|
- Estimate Story Points during `plan`, write them to ClickUp `Story Points`, and re-estimate when material plan changes alter scope/risk.
|
package/dist/index.js
CHANGED
|
@@ -11746,8 +11746,22 @@ var activeClickUpTaskRoutes = /* @__PURE__ */ new Map();
|
|
|
11746
11746
|
var CLICKUP_HUMAN_HANDOFF_TEXT_PATTERNS = [
|
|
11747
11747
|
/\bhuman validation requested\b/i,
|
|
11748
11748
|
/\bhuman validation\/approval\b/i,
|
|
11749
|
+
/\bvalidation handoff\b/i,
|
|
11750
|
+
/\bplease validate\b/i,
|
|
11751
|
+
/\bfinal validation\b/i,
|
|
11749
11752
|
/\bplease review pr\b/i,
|
|
11750
11753
|
/\bapprove or request changes\b/i,
|
|
11754
|
+
/\bremaining QA\b/i,
|
|
11755
|
+
/\bexternal blocker\b/i,
|
|
11756
|
+
/\bowner routing\b/i,
|
|
11757
|
+
/\bpo action needed\b/i,
|
|
11758
|
+
/\brouted to PO\b/i,
|
|
11759
|
+
/\bauthenticated Chrome session\b/i,
|
|
11760
|
+
/\bauthenticated extension session\b/i,
|
|
11761
|
+
/\bbrowser-level\b/i,
|
|
11762
|
+
/\bbrowser-real\b/i,
|
|
11763
|
+
/\bAgent Jake\b/i,
|
|
11764
|
+
/\bCDP\s+9222\b/i,
|
|
11751
11765
|
/\bCTO\/PO\b/i,
|
|
11752
11766
|
/\bBloqueo externo\b/i,
|
|
11753
11767
|
/\bQué necesito de CTO\/PO\b/i,
|
package/dist/sanitize_cli.js
CHANGED
|
@@ -11753,8 +11753,22 @@ var activeClickUpTaskRoutes = /* @__PURE__ */ new Map();
|
|
|
11753
11753
|
var CLICKUP_HUMAN_HANDOFF_TEXT_PATTERNS = [
|
|
11754
11754
|
/\bhuman validation requested\b/i,
|
|
11755
11755
|
/\bhuman validation\/approval\b/i,
|
|
11756
|
+
/\bvalidation handoff\b/i,
|
|
11757
|
+
/\bplease validate\b/i,
|
|
11758
|
+
/\bfinal validation\b/i,
|
|
11756
11759
|
/\bplease review pr\b/i,
|
|
11757
11760
|
/\bapprove or request changes\b/i,
|
|
11761
|
+
/\bremaining QA\b/i,
|
|
11762
|
+
/\bexternal blocker\b/i,
|
|
11763
|
+
/\bowner routing\b/i,
|
|
11764
|
+
/\bpo action needed\b/i,
|
|
11765
|
+
/\brouted to PO\b/i,
|
|
11766
|
+
/\bauthenticated Chrome session\b/i,
|
|
11767
|
+
/\bauthenticated extension session\b/i,
|
|
11768
|
+
/\bbrowser-level\b/i,
|
|
11769
|
+
/\bbrowser-real\b/i,
|
|
11770
|
+
/\bAgent Jake\b/i,
|
|
11771
|
+
/\bCDP\s+9222\b/i,
|
|
11758
11772
|
/\bCTO\/PO\b/i,
|
|
11759
11773
|
/\bBloqueo externo\b/i,
|
|
11760
11774
|
/\bQué necesito de CTO\/PO\b/i,
|
package/docs/core/task_model.md
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
- Agents must not assign ClickUp tasks to `CTO` or `PO` except for the explicit cases below; generic handoff, routine validation, duplicate-assignee cleanup, or incomplete phase handoff are prohibited.
|
|
22
22
|
- **Parent planning questions:** only a parent task in `plan` may assign `CTO`/`PO`, and only after clear, concrete questions have been posted in ClickUp comments. Subtasks are planned and executed end-to-end without CTO/PO planning assignment.
|
|
23
23
|
- **Real in-progress blocker:** a task in `in progress` may assign/escalate to `CTO`/`PO` only when blocked by missing credentials, permissions, authenticated browser/Agent Jake access, external tools, or live third-party access after local/subagent attempts are exhausted. Escalation means calling `optima_finish` with a concrete ClickUp help request in castellano explaining exactly what is needed; Optima assigns CTO/PO and removes the Product Manager assignee so watchdogs stop re-queueing PM until a human replies/reassigns. Agents must not stop at informal phase boundaries such as "I reached phase 1"; phases should have been subtasks, otherwise finish the accepted task.
|
|
24
|
+
- **Temporary human-requested PM ownership:** when a human asks Product Manager to take a task back and test/fix it, the task may be PM-assigned only for that execution attempt. After trying the requested work, if anything still needs human help, access, login, approval, or validation, the agent must call `optima_finish` and let Optima assign CTO/PO and remove Product Manager. Human-requested PM reassignment is not permission to keep the task assigned to PM while waiting.
|
|
24
25
|
- **Parent validation approval:** only a parent task in `validation` may assign `CTO`/`PO` for final validation, and only after `optima_github_verify_vercel_pr` returns `ready: true` for the current parent PR with a functional Vercel preproduction/preview URL. After a human comments `Approved`, automation reassigns to itself or the merge owner, removes human assignees, merges, cleans workspaces/worktrees/branches, pushes to `dev`, and ensures the dev/preproduction environment contains the code.
|
|
25
26
|
|
|
26
27
|
## Routing Rules
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- Product Manager without workflow never develops; it may pre-estimate "a qué huele" small/medium/large plus rough story points and route development into ClickUp tasks.
|
|
9
9
|
- Human role registry: resolve `CTO` and `PO` from available human role context/configured ClickUp IDs. Missing repo-local human registry files are internal routing detail; do not mention internal role-resolution details in ClickUp comments unless asked for routing diagnostics.
|
|
10
10
|
- Final task handoffs must use `optima_finish` when available; Optima applies final status, comment, and assignments.
|
|
11
|
-
- ClickUp-first actions: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy; assign `CTO`/`PO` only for parent planning questions with clear ClickUp comments, real `in progress` blockers caused by missing credentials/tools/access/authenticated browser or Agent Jake/live third-party access after local/subagent attempts, or parent `validation` after `optima_github_verify_vercel_pr` returns `ready: true` with a functional Vercel URL. For true external `in progress` blockers, call `optima_finish` with a concrete castellano ClickUp help request explaining exactly what is needed; Optima assigns CTO/PO and removes Product Manager so PM watchdogs stop looping until a human replies/reassigns. Subtasks execute end-to-end and merge to the parent branch after Validator/QA passes without CTO/PO approval; parent `Approved` comments trigger automation to remove humans, assign merge owner/self, merge to `dev`, clean workspaces/worktrees/branches, push, and ensure dev/preproduction receives the code; `completed`/`Closed` ignore unless reopened.
|
|
11
|
+
- ClickUp-first actions: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy; assign `CTO`/`PO` only for parent planning questions with clear ClickUp comments, real `in progress` blockers caused by missing credentials/tools/access/authenticated browser or Agent Jake/live third-party access after local/subagent attempts, or parent `validation` after `optima_github_verify_vercel_pr` returns `ready: true` with a functional Vercel URL. If a human asks Product Manager to take a task back and test/fix it, that assignment is temporary: after the requested attempt, any remaining human help, access, login, approval, or validation must go through `optima_finish` with PM removal. For true external `in progress` blockers, call `optima_finish` with a concrete castellano ClickUp help request explaining exactly what is needed; Optima assigns CTO/PO and removes Product Manager so PM watchdogs stop looping until a human replies/reassigns. Subtasks execute end-to-end and merge to the parent branch after Validator/QA passes without CTO/PO approval; parent `Approved` comments trigger automation to remove humans, assign merge owner/self, merge to `dev`, clean workspaces/worktrees/branches, push, and ensure dev/preproduction receives the code; `completed`/`Closed` ignore unless reopened.
|
|
12
12
|
- Routing: keep `tiny` to one slice and usually one specialist; keep `standard` bounded; decompose `complex` into slice-based subtasks.
|
|
13
13
|
- `complex + implementation` normally uses `workflow_runner` in full mode.
|
|
14
14
|
- WPM stores `agent_metadata`, re-estimates `Story Points` on material plan changes, and keeps `Definition` plan contract separate from final Documentation.
|