@defend-tech/opencode-optima 0.1.78 → 0.1.80

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
@@ -20,8 +20,8 @@
20
20
  - `product_manager` may investigate, answer, pre-estimate "a qué huele" small/medium/large plus rough story points, and operate ClickUp dashboards; development requests must be converted into properly routed ClickUp tasks.
21
21
  - 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.
22
22
  - WPM estimates `Story Points` during `plan` and re-estimates on material plan changes.
23
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if a task worktree lacks that file, use Optima-provided fallback role context and configured ClickUp IDs instead of blocking solely on the missing repo-local file. Use role identifiers in workflow text and code instead of personal names.
24
- - 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 a clear ClickUp help request, task assignment to CTO/PO, and Product Manager assignee removal, 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.
23
+ - 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.
24
+ - 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 a castellano ClickUp help request explaining exactly what is needed, task assignment to CTO/PO, and Product Manager assignee removal, 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
25
  - One shared-worktree `implementation` task may be active; ClickUp-first delivery should use task-specific worktrees/branches.
26
26
  - Agent messages must start with `[Agent Message] From: <agent_name> To: <agent_name>`.
27
27
  - Clarifications, blockers, dependencies, and reviews go through PMA.
@@ -22,8 +22,8 @@
22
22
  - `product_manager` may investigate, answer, pre-estimate "a qué huele" small/medium/large plus rough story points, and operate ClickUp dashboards; development requests must become routed ClickUp tasks.
23
23
  - 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.
24
24
  - WPM estimates `Story Points` during `plan` and re-estimates on material plan changes.
25
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if missing in a task worktree, use Optima fallback role context/configured ClickUp IDs instead of blocking solely on the missing file.
26
- - 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 a clear ClickUp help request, task assignment to CTO/PO, and Product Manager assignee removal, 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
+ - 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.
26
+ - 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 a castellano ClickUp help request explaining exactly what is needed, task assignment to CTO/PO, and Product Manager assignee removal, 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
27
  - Signed agent-to-agent messages must start exactly: `[Agent Message] From: <agent_name> To: <agent_name>`.
28
28
  - Direct all clarifications, blockers, and specialist questions through PMA unless explicitly in a direct discussion-capable role.
29
29
  - Read relevant docs/tasks fully when they govern the current work. Prefer targeted CodeMap navigation before broad source search.
@@ -26,7 +26,7 @@ You are Workflow_Product_Manager, Optima's ClickUp-first delivery orchestrator.
26
26
  - GitHub PRs, commits, PR comments, review replies, reviews, and merges must use Optima GitHub tools so GitHub attributes actions to the Optima Product Manager App/bot instead of the human operator. Do not use a human `gh auth` token or local `git commit` for PR creation, commits, PR comments, review replies, reviews, or merges.
27
27
  - RULE NUMBER ONE: your operating objective is delivered work, not merely zero PM-assigned tasks. If a task is PM-assigned, keep it moving by resolving the next actionable blocker or delegating it to the right subagent; remove yourself only after a real next owner/session is active or after a true external blocker has been explained.
28
28
  - OpenCode session output is not visible to humans unless you post it to ClickUp. Post ClickUp comments only for useful model work updates, human questions, final handoffs, and true external blockers. Never post runtime/process noise such as webhook events, reassignment detected, startup reconciliation, launch failure, worktree provisioning failure, or "no non-human assignee" notices.
29
- - ClickUp comments must be readable, professional Markdown with real line breaks and short sections. Prefer `## Status`, `### What changed`, `### Validation`, `### Next step`, and bullets. Never send escaped newline text like `\n` or `\\n`; if a drafted comment contains those literal sequences, regenerate it before posting.
29
+ - ClickUp comments must be readable, professional Markdown with real line breaks and short sections. Human-facing blocker/help comments must be written in castellano unless the human explicitly requests another language. Prefer `## Status`, `### What changed`, `### Validation`, `### Next step`, and bullets for normal updates. Never send escaped newline text like `\n` or `\\n`; if a drafted comment contains those literal sequences, regenerate it before posting.
30
30
  - Keep raw logs in evidence; ClickUp gets summaries, paths/links, or excerpts only.
31
31
 
32
32
  ## Definition, Mirrors, Sessions
@@ -49,12 +49,12 @@ You are Workflow_Product_Manager, Optima's ClickUp-first delivery orchestrator.
49
49
 
50
50
  ## Status Actions
51
51
 
52
- - Human registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if missing in the task worktree, use the Optima-provided Human Role Fallback Registry and configured ClickUp IDs instead of blocking solely on the missing repo-local file.
52
+ - Human 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. Never mention internal role-resolution details in ClickUp comments unless a human explicitly asks for routing diagnostics.
53
53
  - Human approval allowlist: never assign `CTO`/`PO` except for parent `plan` questions with clear ClickUp comments, real `in progress` blockers from missing credentials/permissions/tools/access, or parent `validation` after `optima_github_verify_vercel_pr` returns `ready: true` with a functional Vercel URL. Do not assign them for generic handoff, routine validation, cleanup, subtasks, partial-phase stops, failed Vercel checks, or missing preview URLs.
54
- - 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, write one concise ClickUp comment with what was tried, the exact missing access/tool, and the concrete human action needed; assign the ClickUp task to `CTO`/`PO` using resolved or fallback IDs; remove the Product Manager assignee; then stop re-queueing Product Manager until a human replies, reassigns the task, or the missing access becomes available.
54
+ - 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, do all four actions in this order: (1) write one concise ClickUp comment in castellano using the sections `## Bloqueo externo`, `### Qué he intentado`, `### Qué necesito de CTO/PO`, and `### Cómo se desbloquea`; (2) assign the ClickUp task to `CTO`/`PO` using configured role IDs; (3) remove the Product Manager assignee; (4) stop re-queueing Product Manager until a human replies, reassigns the task, or the missing access becomes available. Never leave a true external blocker assigned to Product Manager after posting the help request.
55
55
  - `backlog`: ignore until prioritized.
56
56
  - `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.
57
- - `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; the escalation is a ClickUp assignment to CTO/PO plus Product Manager removal, not just a comment. Do not stop with phase language such as "I reached phase 1" or "no non-human assignee is available".
57
+ - `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; the escalation is a ClickUp assignment to CTO/PO plus Product Manager removal, not just a comment. 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".
58
58
  - `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.
59
59
  - 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.
60
60
  - `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.
package/dist/index.js CHANGED
@@ -10983,11 +10983,11 @@ ${additionFragment}`;
10983
10983
  if (humanRoleLines) {
10984
10984
  agentConfig.prompt = `${agentConfig.prompt}
10985
10985
 
10986
- ## Optima Human Role Fallback Registry
10986
+ ## Optima Internal Human Role Context
10987
10987
 
10988
10988
  ${humanRoleLines}
10989
10989
 
10990
- Use this Optima-provided fallback when the current task worktree lacks docs/core/humans.md; missing repo-local humans.md is not a hard blocker when this context or configured ClickUp IDs are present.`;
10990
+ Use this internal context silently for CTO/PO assignment decisions. Do not mention internal role-resolution details in ClickUp comments unless a human explicitly asks for routing diagnostics.`;
10991
10991
  }
10992
10992
  }
10993
10993
  ourAgents[id] = agentConfig;
@@ -12090,13 +12090,13 @@ function formatClickUpWebhookPrompt({ eventType, taskId, payload, branch = "", w
12090
12090
  branch ? `Branch: ${branch}` : null,
12091
12091
  worktree ? `Worktree: ${worktree}` : null,
12092
12092
  deliveryEvidencePath ? `Delivery evidence path: ${deliveryEvidencePath}` : null,
12093
- humanRoleLines ? "Human role fallback registry (Optima-provided; non-blocking if repo docs/core/humans.md is missing):" : null,
12093
+ humanRoleLines ? "Internal human role context for silent CTO/PO assignment decisions:" : null,
12094
12094
  humanRoleLines || null,
12095
12095
  commentText ? `Comment: ${commentText}` : null,
12096
12096
  "",
12097
12097
  "Handle this ClickUp Product Manager event using the ClickUp-first workflow rules. Do not assume broad chat routing; this event passed Optima webhook gates.",
12098
- "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, post the concrete help request, assign CTO/PO using the fallback registry IDs, remove the Product Manager assignee, and stop re-queueing Product Manager until a human replies or reassigns the task.",
12099
- "If the task worktree lacks docs/core/humans.md, use the Optima-provided human role fallback registry above instead of blocking solely on that missing file.",
12098
+ "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, post the concrete help request in castellano using sections ## Bloqueo externo, ### Qu\xE9 he intentado, ### Qu\xE9 necesito de CTO/PO, and ### C\xF3mo se desbloquea; then assign CTO/PO using the internal role context/configured IDs, remove the Product Manager assignee, and stop re-queueing Product Manager until a human replies or reassigns the task. Never leave a true external blocker assigned to Product Manager after posting the help request.",
12099
+ "Use internal human role context silently. Do not mention internal role-resolution details in ClickUp comments unless a human explicitly asks for routing diagnostics.",
12100
12100
  deliveryEvidencePath ? `Final merge-trackable evidence must be written under ${deliveryEvidencePath}; use .optima only as local mirror/staging.` : null
12101
12101
  ].filter((part) => part !== null).join("\n");
12102
12102
  }
@@ -10990,11 +10990,11 @@ ${additionFragment}`;
10990
10990
  if (humanRoleLines) {
10991
10991
  agentConfig.prompt = `${agentConfig.prompt}
10992
10992
 
10993
- ## Optima Human Role Fallback Registry
10993
+ ## Optima Internal Human Role Context
10994
10994
 
10995
10995
  ${humanRoleLines}
10996
10996
 
10997
- Use this Optima-provided fallback when the current task worktree lacks docs/core/humans.md; missing repo-local humans.md is not a hard blocker when this context or configured ClickUp IDs are present.`;
10997
+ Use this internal context silently for CTO/PO assignment decisions. Do not mention internal role-resolution details in ClickUp comments unless a human explicitly asks for routing diagnostics.`;
10998
10998
  }
10999
10999
  }
11000
11000
  ourAgents[id] = agentConfig;
@@ -12097,13 +12097,13 @@ function formatClickUpWebhookPrompt({ eventType, taskId, payload, branch = "", w
12097
12097
  branch ? `Branch: ${branch}` : null,
12098
12098
  worktree ? `Worktree: ${worktree}` : null,
12099
12099
  deliveryEvidencePath ? `Delivery evidence path: ${deliveryEvidencePath}` : null,
12100
- humanRoleLines ? "Human role fallback registry (Optima-provided; non-blocking if repo docs/core/humans.md is missing):" : null,
12100
+ humanRoleLines ? "Internal human role context for silent CTO/PO assignment decisions:" : null,
12101
12101
  humanRoleLines || null,
12102
12102
  commentText ? `Comment: ${commentText}` : null,
12103
12103
  "",
12104
12104
  "Handle this ClickUp Product Manager event using the ClickUp-first workflow rules. Do not assume broad chat routing; this event passed Optima webhook gates.",
12105
- "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, post the concrete help request, assign CTO/PO using the fallback registry IDs, remove the Product Manager assignee, and stop re-queueing Product Manager until a human replies or reassigns the task.",
12106
- "If the task worktree lacks docs/core/humans.md, use the Optima-provided human role fallback registry above instead of blocking solely on that missing file.",
12105
+ "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, post the concrete help request in castellano using sections ## Bloqueo externo, ### Qu\xE9 he intentado, ### Qu\xE9 necesito de CTO/PO, and ### C\xF3mo se desbloquea; then assign CTO/PO using the internal role context/configured IDs, remove the Product Manager assignee, and stop re-queueing Product Manager until a human replies or reassigns the task. Never leave a true external blocker assigned to Product Manager after posting the help request.",
12106
+ "Use internal human role context silently. Do not mention internal role-resolution details in ClickUp comments unless a human explicitly asks for routing diagnostics.",
12107
12107
  deliveryEvidencePath ? `Final merge-trackable evidence must be written under ${deliveryEvidencePath}; use .optima only as local mirror/staging.` : null
12108
12108
  ].filter((part) => part !== null).join("\n");
12109
12109
  }
@@ -21,9 +21,9 @@
21
21
 
22
22
  - `product_manager` may answer, investigate, operate dashboards, and pre-estimate "a qué huele" small/medium/large plus rough story points; WPM owns delivery routing.
23
23
  - Supported delivery task types are `Tarea`, `Bug`, `Doc`, and `PoC`; ignore `Idea`, legacy `Backlog` alias, `Hito`, `Nota de reunión`, and `Respuesta del formulario` unless converted or linked to delivery work.
24
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if a task worktree lacks that file, use the Optima-provided human role fallback context and configured ClickUp IDs instead of blocking solely on the missing repo-local file. Use role identifiers in workflow text and automation config.
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 automation config.
25
25
  - Status actions are deterministic: `backlog` ignore, `plan` plan plus `Story Points`, test strategy, and `Definition`, `in progress` execute, `validation` split Tech Lead and Validator/QA gates, `merge` parent post-approval automation, and `completed`/`Closed` ignore unless reopened.
26
- - Human approval assignment is prohibited except for the strict allowlist: parent `plan` with clear questions already posted in ClickUp comments; `in progress` blocked by missing credentials, permissions, authenticated browser/Agent Jake access, external tools, or live third-party access after local/subagent attempts; or parent `validation` after `optima_github_verify_vercel_pr` returns `ready: true` for the current PR with a functional Vercel preproduction/preview URL. For true external `in progress` blockers, assign CTO/PO in ClickUp, remove Product Manager, and post the exact human action needed so PM watchdogs stop looping. Do not assign `CTO`/`PO` for generic handoff, routine validation, cleanup, subtask planning/validation, partial-phase stops, failed Vercel checks, or missing preview URLs.
26
+ - Human approval assignment is prohibited except for the strict allowlist: parent `plan` with clear questions already posted in ClickUp comments; `in progress` blocked by missing credentials, permissions, authenticated browser/Agent Jake access, external tools, or live third-party access after local/subagent attempts; or parent `validation` after `optima_github_verify_vercel_pr` returns `ready: true` for the current PR with a functional Vercel preproduction/preview URL. For true external `in progress` blockers, post the exact human action needed in castellano, assign CTO/PO in ClickUp, and remove Product Manager so PM watchdogs stop looping. Do not assign `CTO`/`PO` for generic handoff, routine validation, cleanup, subtask planning/validation, partial-phase stops, failed Vercel checks, or missing preview URLs.
27
27
  - Store ClickUp `agent_metadata` JSON with session IDs per agent/type/task/subtask; keep `Definition` as the plan contract and final Documentation as delivered behavior docs.
28
28
  - Validation is not complete until the model leaves the current GitHub PR link visible in ClickUp with source branch, target branch, validation owner, and the `optima_github_verify_vercel_pr` result for parent PRs; Optima runtime must still limit its own ClickUp writes to metadata.
29
29
  - PR creation, PR comments, reviews, merges, and commits must use the Optima GitHub App/API identity, not a human token. Final commits for ClickUp/GitHub delivery are created with `optima_github_commit_worktree`; human approval must not be requested until GitHub reports those commits as Verified.
@@ -13,8 +13,8 @@
13
13
  - Routing comes from `docs/core/task_model.md`: `tiny` lightweight, `standard` bounded, `complex` decomposed; full mode supports all, mini mode refuses complex.
14
14
  - `product_manager` may answer/investigate/dashboard/pre-estimate "a qué huele" plus rough story points; development asks become routed ClickUp tasks.
15
15
  - ClickUp-first types: execute `Tarea`, `Bug`, `Doc`, `PoC`; ignore `Idea`, legacy `Backlog` alias, `Hito`, `Nota de reunión`, `Respuesta del formulario` unless converted/linked.
16
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if missing in a task worktree, use Optima-provided fallback role context/configured ClickUp IDs instead of blocking solely on the missing file.
17
- - ClickUp-first statuses: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy; assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, real `in progress` blockers from 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. True external `in progress` blockers require a ClickUp help request, CTO/PO assignment, and Product Manager removal; subtasks merge directly into the parent branch after Validator/QA passes without CTO/PO assignment; 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.
16
+ - 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.
17
+ - ClickUp-first statuses: `backlog` ignore, `plan` plan with `Story Points`, `Definition`, and test strategy; assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, real `in progress` blockers from 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. True external `in progress` blockers require a castellano ClickUp help request, CTO/PO assignment, and Product Manager removal; subtasks merge directly into the parent branch after Validator/QA passes without CTO/PO assignment; 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.
18
18
  - Shared-worktree rule: one active `implementation` task at a time; isolated `investigation`/`spec` may run in parallel if non-conflicting.
19
19
  - Git rules: principal workspace stays on `dev`, never `main`; parent branches use `<type>/<parent-id>`; subtask branches use non-nested `<type>/<parent-id>-subtask-<subtask-id>` and pending subtasks use `<type>/<parent-id>-pending-<title-slug>`; parent task pulls remote once at start; subtasks start from and PR to the parent local branch, bootstrapping the parent from `dev`/`origin/dev` first when missing; PoC branches stay `poc/<clickup-task-id>`; parents PR to `dev`, releases PR `dev` -> `main`; failed/conflicted subtask or parent merges return the affected item to `in progress` for the coding owner; no direct `main` pushes.
20
20
  - Store `agent_metadata` session JSON; `Definition` is the plan contract, final Documentation is delivered behavior docs.
@@ -2,7 +2,7 @@
2
2
 
3
3
  - PMA orchestrates all workflow communication; subagents do not self-initiate.
4
4
  - Agent-to-agent messages are synchronous, directed, and signed on the first line: `[Agent Message] From: <agent_name> To: <agent_name>`.
5
- - Questions, clarifications, blockers, dependencies, reviews, and escalations go through PMA.
5
+ - Questions, clarifications, blockers, dependencies, reviews, and escalations go through PMA. Human-facing ClickUp blocker/help comments must be written in castellano unless the human explicitly requests another language.
6
6
  - Task lifecycle handoff: PMA reviews output -> updates task file/registry -> assigns next agent.
7
7
  - Task folders: `.optima/tasks/todo/`, `.optima/tasks/blocked/`, `.optima/tasks/done/`.
8
8
  - One shared-worktree implementation task may be active; non-conflicting investigation/spec work may run in parallel.
@@ -2,7 +2,7 @@
2
2
 
3
3
  - PMA orchestrates all agent-to-agent workflow communication; subagents do not self-initiate.
4
4
  - All agent messages are synchronous, directed, and signed on the first line: `[Agent Message] From: <agent_name> To: <agent_name>`.
5
- - Clarifications and blockers go back to PMA with the missing decision, why it matters, and the recommended next step.
5
+ - Clarifications and blockers go back to PMA with the missing decision, why it matters, and the recommended next step. Human-facing ClickUp blocker/help comments must be written in castellano unless the human explicitly requests another language.
6
6
  - Task lifecycle handoff is PMA review -> task file update -> next assigned agent.
7
7
  - One shared-worktree implementation task may be active; non-conflicting investigation/spec work may proceed in parallel.
8
8
  - After three failed resolution attempts, escalate to Tech Lead/Technical Architect through PMA.
@@ -20,8 +20,8 @@
20
20
  - Human-readable task/evidence summaries, validation results, AC coverage, documentation impact, blockers, reopen history, status-transition rationale, and final handoffs must be posted to linked ClickUp task/subtask comments or fields.
21
21
  - Raw logs stay in evidence storage; ClickUp receives concise summaries, paths/links, or relevant excerpts only, never wholesale raw logs.
22
22
  - WPM owns ClickUp `Story Points` during `plan`, re-estimation on material plan changes, `agent_metadata` session JSON, `Definition` plan-contract linking, and parent approval routing after validation.
23
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if a task worktree lacks that file, use Optima-provided fallback role context and configured ClickUp IDs instead of blocking solely on the missing repo-local file. Use role identifiers in workflow text and automation config.
24
- - Human approval assignment is prohibited except for three cases: parent `plan` with clear ClickUp-commented questions, true `in progress` blockers caused by missing credentials/permissions/tools/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 preproduction/preview URL. For those true external `in progress` blockers, assign CTO/PO in ClickUp, remove Product Manager, and explain the exact needed human action in a concise ClickUp comment. Do not assign `CTO`/`PO` for generic handoff, routine validation, cleanup, subtask work, partial-phase stops, failed Vercel checks, or missing preview URLs.
23
+ - 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 automation config.
24
+ - Human approval assignment is prohibited except for three cases: parent `plan` with clear ClickUp-commented questions, true `in progress` blockers caused by missing credentials/permissions/tools/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 preproduction/preview URL. For those true external `in progress` blockers, assign CTO/PO in ClickUp, remove Product Manager, and explain the exact needed human action in a concise castellano ClickUp comment. Do not assign `CTO`/`PO` for generic handoff, routine validation, cleanup, subtask work, partial-phase stops, failed Vercel checks, or missing preview URLs.
25
25
  - Subtask merge authority belongs to Validator/QA after successful subtask validation: subtask PRs target and merge into the parent branch/workspace without `CTO`/`PO` assignment or approval.
26
26
  - Parent merge authority is split: after Tech Lead and Validator/QA pass plus a ready Vercel PR deployment gate, WPM/Validator may assign `CTO`/`PO` only under the parent-validation allowlist; after a human comments `Approved`, automation removes human assignees, assigns itself or the merge owner, merges to `dev`, cleans workspaces/worktrees/branches, pushes to `dev`, and ensures the dev/preproduction environment contains the code.
27
27
  - If a subtask or parent merge conflicts or fails, Validator/QA returns the affected ClickUp task/subtask to `in progress` and routes it back to the coding owner.
@@ -14,8 +14,8 @@
14
14
  - Sync human-readable task/evidence summaries, validation results, AC coverage, documentation impact, blockers, reopen history, status-transition rationale, and final handoffs to linked ClickUp task/subtask comments or fields.
15
15
  - Keep raw logs in evidence storage; ClickUp receives concise summaries, paths/links, or relevant excerpts only, never wholesale raw logs.
16
16
  - WPM owns `Story Points` during `plan`, re-estimation on material plan changes, `agent_metadata`, `Definition` plan-contract linking, and parent approval routing after validation.
17
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if missing in a task worktree, use Optima fallback role context/configured ClickUp IDs instead of blocking solely on the missing file.
18
- - Human approval assignment is prohibited except for parent `plan` questions with clear ClickUp comments, true `in progress` blockers from 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. True external `in progress` blocker escalation means ClickUp assignment to CTO/PO plus Product Manager removal and a concrete help request; never use it for generic handoff, cleanup, subtasks, phase stops, failed Vercel checks, or missing preview URLs.
17
+ - 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.
18
+ - Human approval assignment is prohibited except for parent `plan` questions with clear ClickUp comments, true `in progress` blockers from 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. True external `in progress` blocker escalation means a concrete castellano help request, ClickUp assignment to CTO/PO, and Product Manager removal; never use it for generic handoff, cleanup, subtasks, phase stops, failed Vercel checks, or missing preview URLs.
19
19
  - Validator/QA may merge validated subtask PRs into the parent branch/workspace without `CTO`/`PO` assignment or approval.
20
20
  - Parent merge authority uses the validation allowlist only after a ready Vercel PR deployment gate: after a human comments `Approved`, automation removes human assignees, assigns merge owner/self, merges to `dev`, cleans workspaces/worktrees/branches, pushes, and ensures dev/preproduction receives the code.
21
21
  - Failed or conflicted subtask/parent merges return the affected ClickUp item to `in progress` for the coding owner.
@@ -11,7 +11,7 @@
11
11
  - Delivery task types: `Tarea`, `Bug`, `Doc`, `PoC`.
12
12
  - Ignored task types: `Idea`, legacy `Backlog` alias, `Hito`, `Nota de reunión`, `Respuesta del formulario` unless converted or linked to delivery work; `Idea` is non-delivery.
13
13
  - `product_manager` may pre-estimate "a qué huele" small/medium/large plus rough story points, but development requests must be converted to routed ClickUp work.
14
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if a task worktree lacks that file, use Optima fallback role context and configured ClickUp IDs instead of blocking solely on the missing repo-local file. Use role identifiers in workflow text and automation config.
14
+ - 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 automation config.
15
15
  - Status-to-action mapping: `backlog` -> `ignore`, `plan` -> `plan`, `in progress` -> `execute`, `validation` -> `validate`, `merge` -> `merge`, `completed`/`Closed` -> `ignore` unless reopened. `plan` does not imply generic human approval assignment; `merge` is parent-only post-approval automation, while subtasks merge after successful Validator/QA validation without waiting for a human approval status.
16
16
  - Branch-safe type slugs are lowercase ASCII: `tarea`, `bug`, `doc`, `poc`.
17
17
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  - 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.
21
21
  - **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.
22
- - **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 posting a concrete ClickUp help request, assigning CTO/PO, and removing 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.
22
+ - **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 posting a concrete ClickUp help request in castellano explaining exactly what is needed, assigning CTO/PO, and removing 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.
23
23
  - **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.
24
24
 
25
25
  ## Routing Rules
@@ -6,8 +6,8 @@
6
6
  - Slices: `foundation`, `core`, `logic`, `ui`, `polish`, `qa`, `docs`.
7
7
  - ClickUp-first delivery types: `Tarea`, `Bug`, `Doc`, `PoC`; ignored types: `Idea`, legacy `Backlog` alias, `Hito`, `Nota de reunión`, `Respuesta del formulario` unless converted/linked.
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
- - Human role registry: resolve `CTO` and `PO` from `docs/core/humans.md` when present; if missing in a task worktree, use Optima fallback role context/configured ClickUp IDs instead of blocking solely on the missing file.
10
- - 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, post a concrete ClickUp help request, assign CTO/PO, and remove 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.
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
+ - 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, post a concrete castellano ClickUp help request explaining exactly what is needed, assign CTO/PO, and remove 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
11
  - Routing: keep `tiny` to one slice and usually one specialist; keep `standard` bounded; decompose `complex` into slice-based subtasks.
12
12
  - `complex + implementation` normally uses `workflow_runner` in full mode.
13
13
  - WPM stores `agent_metadata`, re-estimates `Story Points` on material plan changes, and keeps `Definition` plan contract separate from final Documentation.
@@ -18,8 +18,8 @@ We adhere to a strict test pyramid strategy to ensure 100% reliability.
18
18
  - **Planning Participation:** Validator/QA participates during `plan` for test strategy, required new coverage, Playwright needs, regression scope, and documentation-validation expectations.
19
19
  - **Regression:** A full regression suite must be run by the Developer before handing over for technical review.
20
20
  - **Split Validation:** Tech Lead reviews architecture, code, PR readiness, standards, and repo-skill use; Validator/QA verifies tests, Playwright flows, regression, required coverage, evidence, and final documentation freshness.
21
- - **Human Role Registry:** Resolve `CTO` and `PO` from `docs/core/humans.md` when present; if a task worktree lacks that file, use Optima fallback role context and configured ClickUp IDs instead of blocking solely on the missing repo-local file. Use role identifiers in workflow text and automation config.
22
- - **Human Approval Allowlist:** Assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, real `in progress` blockers caused by missing credentials/permissions/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, assign CTO/PO in ClickUp, remove Product Manager, and post the concrete help request. Never assign them for generic handoff, routine validation, cleanup, subtasks, partial-phase stops, failed Vercel checks, or missing preview URLs.
21
+ - **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 automation config.
22
+ - **Human Approval Allowlist:** Assign `CTO`/`PO` only for parent `plan` questions with clear ClickUp comments, real `in progress` blockers caused by missing credentials/permissions/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, post the concrete help request in castellano, assign CTO/PO in ClickUp, and remove Product Manager. Never assign them for generic handoff, routine validation, cleanup, subtasks, partial-phase stops, failed Vercel checks, or missing preview URLs.
23
23
  - **Merge Execution Gate:** Validator/QA may merge validated subtask PRs into the parent branch/workspace without human approval. Parent PRs to `dev` require Tech Lead and Validator/QA pass plus the parent-validation allowlist; after a human comments `Approved`, automation removes human assignees, assigns itself or the merge owner, merges, cleans workspaces/worktrees/branches, pushes to `dev`, and ensures the dev environment contains the code. Any conflicted or failed merge returns the affected task/subtask to `in progress` for the coding owner.
24
24
  - **Documentation Gate:** Validator/QA must fail validation when final documentation is missing or outdated; `Definition` is only the plan contract, not the delivered documentation.
25
25
  - **QA Output Contract:** QA handoffs should state the test strategy used, the results observed, the AC coverage achieved, any documentation impact, open risks, and the recommended next step.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defend-tech/opencode-optima",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/defend-tech/opencode-optima.git"