diff --git a/AGENTS.md b/AGENTS.md index 5eaf868..e11c909 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,8 @@ packages/opencode/.opencode/ # Generated OpenCode output for review - Author command definitions in `packages/core/commands/`; treat `packages/opencode/.opencode/commands/` as generated output only - Treat `packages/core/commands/index.ts`, `packages/core/lib/config.ts`, `kompass.schema.json`, the bundled `kompass.jsonc` files, and the relevant docs as a linked surface area; if one changes, verify the others still describe the same command set and config shape - Use `packages/core/commands/pr/create.md` as the canonical example for command structure and tone -- Keep this section order in command docs unless a command has a strong reason not to: `## Goal`, `## Workflow`, `## Additional Context`, `## Output` +- Keep this section order in command docs unless a command has a strong reason not to: `## Goal`, `## Additional Context`, `## Workflow` +- Keep `### Output` as the final subsection inside `## Workflow`; do not use a separate top-level `## Output` section - Start `## Workflow` with a dedicated `### Arguments` subsection that stores the raw `$ARGUMENTS` value inside literal `` tags before any normalization - Follow `### Arguments` with `### Interpret Arguments`, and normalize `` into any additional named placeholders before execution steps - Use angle-bracket placeholders consistently for derived values and stored context, such as ``, ``, ``, ``, and define each placeholder before it is referenced later in the command @@ -66,9 +67,9 @@ packages/opencode/.opencode/ # Generated OpenCode output for review - Use literal `` tags when the workflow must forward exact text as the next user message to a subagent session; `agent` is required, the block body is the exact rendered message to send, and slash commands belong on the first line of the body when needed - Do not use `` blocks in command docs; author navigator delegation with `` blocks only - When a command can pause for approval or loop over repeated work, describe the resume condition and the exact cases that must STOP without mutating state -- Use `## Additional Context` for instructions about how optional guidance, related tickets, focus areas, or other stored context should influence analysis and output -- Use `## Output` to define the exact user-facing response shape, including placeholders for generated values -- Make success, blocked, and no-op outcomes explicit in `## Output` or the surrounding workflow so navigator-led flows report deterministic end states +- Use `## Additional Context` for instructions about how optional guidance, related tickets, focus areas, or other stored context should influence analysis and response formatting +- Use `### Output` as the final workflow step to define the exact user-facing response shape, including placeholders for generated values +- Make success, blocked, and no-op outcomes explicit in `### Output` or the surrounding workflow so navigator-led flows report deterministic end states - For terminal command outcomes, prefer an explicit final line inside the output block: `No additional steps are required.` - For one-off commands that do not orchestrate follow-up work, make every success, blocked, or no-op output explicitly terminal with that final line - Command-specific extra sections are fine, but they should support this core structure rather than replace it @@ -80,6 +81,10 @@ Example command structure: Describe the command's purpose in one short paragraph. +## Additional Context + +- Explain how optional guidance should influence planning or execution + ## Workflow ### Arguments @@ -122,11 +127,7 @@ Constraints: - STOP if implementation is blocked or incomplete -## Additional Context - -- Explain how optional guidance should influence planning or execution - -## Output +### Output - Define the exact success, blocked, and no-op response shapes - For terminal outcomes, end the output block with `No additional steps are required.` diff --git a/packages/core/commands/ask.md b/packages/core/commands/ask.md index f2a1ba8..275f315 100644 --- a/packages/core/commands/ask.md +++ b/packages/core/commands/ask.md @@ -2,6 +2,11 @@ Answer a question about the current project or codebase using the repository and available context. +## Additional Context + +- Use `` to prioritize the most relevant files, subsystems, or concerns +- Ask only when the question cannot be determined from `` and the conversation + ## Workflow ### Arguments @@ -29,12 +34,7 @@ $ARGUMENTS - Include file references when they materially help the answer - Keep the response concise unless the question requires more detail -## Additional Context - -- Use `` to prioritize the most relevant files, subsystems, or concerns -- Ask only when the question cannot be determined from `` and the conversation - -## Output +### Output If the question cannot be determined, display: ``` diff --git a/packages/core/commands/branch.md b/packages/core/commands/branch.md index cf63aef..c3f0e51 100644 --- a/packages/core/commands/branch.md +++ b/packages/core/commands/branch.md @@ -2,6 +2,10 @@ Create and switch to a categorized branch whose name summarizes the current uncommitted work. +## Additional Context + +Use `` to steer the branch category and slug while keeping the final name short, descriptive, and aligned with the change type. + ## Workflow ### Arguments @@ -36,11 +40,7 @@ $ARGUMENTS - If that name already exists, retry once with a short numeric suffix - Store the checked-out branch as `` -## Additional Context - -Use `` to steer the branch category and slug while keeping the final name short, descriptive, and aligned with the change type. - -## Output +### Output If there is nothing to branch from, display: ``` diff --git a/packages/core/commands/commit-and-push.md b/packages/core/commands/commit-and-push.md index bfcf8fc..901e2b3 100644 --- a/packages/core/commands/commit-and-push.md +++ b/packages/core/commands/commit-and-push.md @@ -2,6 +2,10 @@ Create a commit and immediately push it to the remote repository. +## Additional Context + +Consider `` when analyzing changes and writing the commit message. + ## Workflow ### Arguments @@ -36,11 +40,7 @@ $ARGUMENTS - Store the successful destination as `` - If push fails, STOP and report the push error -## Additional Context - -Consider `` when analyzing changes and writing the commit message. - -## Output +### Output If there is nothing to commit, display: ``` diff --git a/packages/core/commands/commit.md b/packages/core/commands/commit.md index 20c668c..0a51818 100644 --- a/packages/core/commands/commit.md +++ b/packages/core/commands/commit.md @@ -2,6 +2,10 @@ Create a commit with an appropriate message summarizing the uncommitted changes. +## Additional Context + +Consider `` when analyzing changes and writing the commit message. + ## Workflow ### Arguments @@ -29,11 +33,7 @@ $ARGUMENTS <%~ include("@commit") %> - Store the created commit hash as `` -## Additional Context - -Consider `` when analyzing changes and writing the commit message. - -## Output +### Output If there is nothing to commit, display: ``` diff --git a/packages/core/commands/dev.md b/packages/core/commands/dev.md index 209c855..dcd6d4b 100644 --- a/packages/core/commands/dev.md +++ b/packages/core/commands/dev.md @@ -2,6 +2,10 @@ Implement a feature or fix based on a ticket or request, then prepare for PR creation. +## Additional Context + +Use `` to refine priorities, scope, and tradeoffs while implementing ``. + ## Workflow ### Arguments @@ -46,11 +50,7 @@ $ARGUMENTS - Store the current branch name as `` - Do not create the pull request in this command; stop when the branch is ready for `pr/create` -## Additional Context - -Use `` to refine priorities, scope, and tradeoffs while implementing ``. - -## Output +### Output When the implementation is ready for PR creation, display: ``` diff --git a/packages/core/commands/learn.md b/packages/core/commands/learn.md index b3f764e..9138958 100644 --- a/packages/core/commands/learn.md +++ b/packages/core/commands/learn.md @@ -2,6 +2,13 @@ Extract non-obvious learnings from this session and document them appropriately. +## Additional Context + +- Document non-obvious discoveries only +- Skip obvious facts, standard behavior, and already-documented items +- Avoid verbose explanations and session-specific details +- Use `` and `` to decide where to look more closely + ## Workflow ### Arguments @@ -57,14 +64,7 @@ $ARGUMENTS - Report which files were created or updated and how many learnings were added to each - Store those summary lines as `` in the format `- : learnings` -## Additional Context - -- Document non-obvious discoveries only -- Skip obvious facts, standard behavior, and already-documented items -- Avoid verbose explanations and session-specific details -- Use `` and `` to decide where to look more closely - -## Output +### Output When the documentation update is complete, display: ``` diff --git a/packages/core/commands/pr/create.md b/packages/core/commands/pr/create.md index a097805..da644bb 100644 --- a/packages/core/commands/pr/create.md +++ b/packages/core/commands/pr/create.md @@ -2,6 +2,15 @@ Create a pull request for the current branch, handling the entire workflow from change detection to PR submission. +## Additional Context + +Consider `` when analyzing changes and writing the PR description. +- Always include the `Ticket`, `Description`, and `Checklist` sections in that order. +- Use the literal `SKIPPED` when ticket mention was skipped. +- Keep the description focused on intent, not implementation details. +- Mark checklist validation items as completed if validation was performed. +- Uncommitted changes and being on the base branch block PR creation entirely. + ## Workflow ### Arguments @@ -117,16 +126,7 @@ Use `pr_sync` to create the pull request: - If `pr_sync` reports that a PR already exists for the branch, treat the result as an existing PR - Track whether the branch was pushed during this run and report that status in the final response -## Additional Context - -Consider `` when analyzing changes and writing the PR description. -- Always include the `Ticket`, `Description`, and `Checklist` sections in that order. -- Use the literal `SKIPPED` when ticket mention was skipped. -- Keep the description focused on intent, not implementation details. -- Mark checklist validation items as completed if validation was performed. -- Uncommitted changes and being on the base branch block PR creation entirely. - -## Output +### Output If PR creation stops because there is nothing to include, display: ``` diff --git a/packages/core/commands/pr/fix.md b/packages/core/commands/pr/fix.md index be67f46..18c3509 100644 --- a/packages/core/commands/pr/fix.md +++ b/packages/core/commands/pr/fix.md @@ -2,6 +2,12 @@ Address feedback on a pull request by making fixes and responding to review threads. +## Additional Context + +Use `` when prioritizing which review feedback to address first and when deciding how much scope to take on in this pass. +- Default `/pr/fix` behavior is review-first: show the proposed fix, gather feedback, and loop until the user approves before committing, pushing, or replying on the PR. +- Treat `/pr/fix auto` as the explicit opt-in to skip the approval loop and proceed directly from passing validation to commit, push, and PR replies. + ## Workflow ### Arguments @@ -113,13 +119,7 @@ pr_sync refUrl="" commitId="" review={"comments": Confirm which feedback was addressed and which was intentionally not followed. - Store the number of resolved threads as `` -## Additional Context - -Use `` when prioritizing which review feedback to address first and when deciding how much scope to take on in this pass. -- Default `/pr/fix` behavior is review-first: show the proposed fix, gather feedback, and loop until the user approves before committing, pushing, or replying on the PR. -- Treat `/pr/fix auto` as the explicit opt-in to skip the approval loop and proceed directly from passing validation to commit, push, and PR replies. - -## Output +### Output When waiting for approval or revision feedback, display: ``` diff --git a/packages/core/commands/pr/review.md b/packages/core/commands/pr/review.md index 2418c94..89e9beb 100644 --- a/packages/core/commands/pr/review.md +++ b/packages/core/commands/pr/review.md @@ -2,6 +2,10 @@ Review a GitHub pull request and publish findings as a formal review with inline comments. +## Additional Context + +Use `` and `` to judge whether the PR meets its stated intent without over-indexing on stylistic preferences. + ## Workflow ### Arguments @@ -95,11 +99,8 @@ For multi-line: add `startLine`. For deleted lines: use `side: "LEFT"`. If `pr_sync` returns a review URL, store it as ``. -## Additional Context - -Use `` and `` to judge whether the PR meets its stated intent without over-indexing on stylistic preferences. +### Output -## Output <% if (it.config.shared.prApprove === true) { -%> When approved: ``` diff --git a/packages/core/commands/review.md b/packages/core/commands/review.md index 43628ac..9723c19 100644 --- a/packages/core/commands/review.md +++ b/packages/core/commands/review.md @@ -2,6 +2,10 @@ Review code changes and provide actionable feedback with a grade and risk assessment. +## Additional Context + +Use `` to prioritize specific risks, feature areas, or related concerns while reviewing ``. + ## Workflow ### Arguments @@ -49,11 +53,7 @@ While reading files: - For deleted files, inspect prior contents from git because `changes_load` does not provide full deleted-file contents - Use a helper agent only if the changed-file set is too large to review comfortably in one session after the changed paths are already known -## Additional Context - -Use `` to prioritize specific risks, feature areas, or related concerns while reviewing ``. - -## Output +### Output When the review is complete, display: ``` diff --git a/packages/core/commands/rmslop.md b/packages/core/commands/rmslop.md index 056a2cd..8a148d5 100644 --- a/packages/core/commands/rmslop.md +++ b/packages/core/commands/rmslop.md @@ -2,6 +2,10 @@ Remove AI-generated code slop and inconsistencies from the branch changes. +## Additional Context + +Use `` to decide which kinds of slop to prioritize and which areas should remain untouched. + ## Workflow ### Arguments @@ -61,11 +65,7 @@ $ARGUMENTS - Create a focused commit describing the cleanup - Store the created commit hash as `` -## Additional Context - -Use `` to decide which kinds of slop to prioritize and which areas should remain untouched. - -## Output +### Output If there is no branch work to clean up, display: ``` diff --git a/packages/core/commands/ship.md b/packages/core/commands/ship.md index 3e9f661..2e53e19 100644 --- a/packages/core/commands/ship.md +++ b/packages/core/commands/ship.md @@ -2,6 +2,10 @@ Ship the current work by delegating branch creation, commit creation, and PR creation. +## Additional Context + +Use `` to steer delegated branch naming. Use `` to refine the delegated commit and PR summaries. Pass `` through to PR creation when it was provided. + ## Workflow ### Arguments @@ -56,11 +60,7 @@ Additional context: - If `` says there is nothing to include in a PR, STOP and report that there is nothing to ship - Otherwise, continue with the created or existing PR -## Additional Context - -Use `` to steer delegated branch naming. Use `` to refine the delegated commit and PR summaries. Pass `` through to PR creation when it was provided. - -## Output +### Output If there is nothing to ship, display: ``` diff --git a/packages/core/commands/ticket/ask.md b/packages/core/commands/ticket/ask.md index 881f086..5d59dd1 100644 --- a/packages/core/commands/ticket/ask.md +++ b/packages/core/commands/ticket/ask.md @@ -2,6 +2,12 @@ Load a ticket and its discussion, answer the user's question, and post that answer back to the ticket. +## Additional Context + +- Use `` to shape tone, depth, and focus for `` +- Keep the posted answer grounded in the actual ticket discussion; do not invent missing facts +- Ask only when the ticket source or question cannot be determined reliably + ## Workflow ### Arguments @@ -35,13 +41,7 @@ $ARGUMENTS - `comments: []` - Store the returned ticket URL as `` -## Additional Context - -- Use `` to shape tone, depth, and focus for `` -- Keep the posted answer grounded in the actual ticket discussion; do not invent missing facts -- Ask only when the ticket source or question cannot be determined reliably - -## Output +### Output If the ticket context or question cannot be determined, display: ``` diff --git a/packages/core/commands/ticket/create.md b/packages/core/commands/ticket/create.md index c987f4f..5eecb4c 100644 --- a/packages/core/commands/ticket/create.md +++ b/packages/core/commands/ticket/create.md @@ -2,6 +2,10 @@ Create a ticket that summarizes the work returned by the current change comparison. +## Additional Context + +Consider `` when analyzing the work and writing the ticket title and body. + ## Workflow ### Arguments @@ -36,11 +40,7 @@ Use `ticket_sync` with `refUrl` unset to create the ticket: - Store the generated title as `` - Store the created issue URL as `` -## Additional Context - -Consider `` when analyzing the work and writing the ticket title and body. - -## Output +### Output If there is no work to summarize, display: ``` diff --git a/packages/core/commands/ticket/dev.md b/packages/core/commands/ticket/dev.md index 4f71c88..d793dde 100644 --- a/packages/core/commands/ticket/dev.md +++ b/packages/core/commands/ticket/dev.md @@ -2,6 +2,10 @@ Implement a ticket by orchestrating development, branching, commit-and-push, and PR creation. +## Additional Context + +Use `` to refine scope, sequencing, and tradeoffs across the delegated `/dev`, `/branch`, `/commit-and-push`, and `/pr/create` steps. + ## Workflow ### Arguments @@ -83,11 +87,7 @@ Additional context: - If `` is blocked or incomplete, STOP and report the PR blocker - Otherwise, continue and store the resulting PR URL as `` -## Additional Context - -Use `` to refine scope, sequencing, and tradeoffs across the delegated `/dev`, `/branch`, `/commit-and-push`, and `/pr/create` steps. - -## Output +### Output When the ticket work is complete, display: ``` diff --git a/packages/core/commands/ticket/plan-and-sync.md b/packages/core/commands/ticket/plan-and-sync.md index e28dc8e..0543543 100644 --- a/packages/core/commands/ticket/plan-and-sync.md +++ b/packages/core/commands/ticket/plan-and-sync.md @@ -2,6 +2,18 @@ Create a scoped implementation plan from a request or ticket, then capture that plan in the relevant ticket flow without losing important technical context. +## Additional Context + +- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. +- Use the current request to determine ``. +- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. +- Use `` to emphasize the most important constraints, dependencies, or focus areas. +- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. +- If technical details provided in the conversation are good, keep them. +- If those details are incomplete, validate and improve them. +- For existing tickets, update the same ticket instead of creating a replacement. +- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. + ## Workflow ### Arguments @@ -70,19 +82,7 @@ $ARGUMENTS - Return the generated title, a brief plan summary, and the ticket reference or URL - Call out assumptions, risks, or blockers only when they materially matter -## Additional Context - -- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. -- Use the current request to determine ``. -- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. -- Use `` to emphasize the most important constraints, dependencies, or focus areas. -- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. -- If technical details provided in the conversation are good, keep them. -- If those details are incomplete, validate and improve them. -- For existing tickets, update the same ticket instead of creating a replacement. -- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. - -## Output +### Output If planning context cannot be determined, display: ``` diff --git a/packages/core/commands/ticket/plan.md b/packages/core/commands/ticket/plan.md index ebdfdcd..d16272e 100644 --- a/packages/core/commands/ticket/plan.md +++ b/packages/core/commands/ticket/plan.md @@ -2,6 +2,18 @@ Create a scoped implementation plan from a request or ticket and present it directly without modifying any ticket state. +## Additional Context + +- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. +- Use the current request to determine ``. +- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. +- Use `` to emphasize the most important constraints, dependencies, or focus areas. +- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. +- If technical details provided in the conversation are good, keep them. +- If those details are incomplete, validate and improve them. +- If a ticket source was provided, use it as planning context only; do not sync updates back automatically. +- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. + ## Workflow ### Arguments @@ -58,19 +70,7 @@ $ARGUMENTS - Return the generated title and plan details without creating or updating a ticket - Call out assumptions, risks, or blockers only when they materially matter -## Additional Context - -- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. -- Use the current request to determine ``. -- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. -- Use `` to emphasize the most important constraints, dependencies, or focus areas. -- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. -- If technical details provided in the conversation are good, keep them. -- If those details are incomplete, validate and improve them. -- If a ticket source was provided, use it as planning context only; do not sync updates back automatically. -- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. - -## Output +### Output If planning context cannot be determined, display: ``` diff --git a/packages/core/commands/todo.md b/packages/core/commands/todo.md index c3b72aa..de04e65 100644 --- a/packages/core/commands/todo.md +++ b/packages/core/commands/todo.md @@ -2,6 +2,13 @@ Work through a todo file one pending item at a time by planning, getting approval, implementing, committing, and marking completed tasks. +## Additional Context + +- Keep the loop focused on one checklist item at a time +- Do not merge separate todo items unless the file explicitly frames them as one task +- If implementation reveals scope that materially changes the approved plan, pause and re-plan before marking the task complete +- Use `` to prioritize tradeoffs, constraints, or validation expectations during planning and implementation + ## Workflow ### Arguments @@ -100,14 +107,7 @@ Additional context: - Save the updated todo file - Return to `### Load Todo Context` and repeat the workflow for the next pending task -## Additional Context - -- Keep the loop focused on one checklist item at a time -- Do not merge separate todo items unless the file explicitly frames them as one task -- If implementation reveals scope that materially changes the approved plan, pause and re-plan before marking the task complete -- Use `` to prioritize tradeoffs, constraints, or validation expectations during planning and implementation - -## Output +### Output When presenting a task plan for approval, display: ``` diff --git a/packages/opencode/.opencode/commands/ask.md b/packages/opencode/.opencode/commands/ask.md index bf4fc11..61c087a 100644 --- a/packages/opencode/.opencode/commands/ask.md +++ b/packages/opencode/.opencode/commands/ask.md @@ -7,6 +7,11 @@ agent: build Answer a question about the current project or codebase using the repository and available context. +## Additional Context + +- Use `` to prioritize the most relevant files, subsystems, or concerns +- Ask only when the question cannot be determined from `` and the conversation + ## Workflow ### Arguments @@ -34,12 +39,7 @@ $ARGUMENTS - Include file references when they materially help the answer - Keep the response concise unless the question requires more detail -## Additional Context - -- Use `` to prioritize the most relevant files, subsystems, or concerns -- Ask only when the question cannot be determined from `` and the conversation - -## Output +### Output If the question cannot be determined, display: ``` diff --git a/packages/opencode/.opencode/commands/branch.md b/packages/opencode/.opencode/commands/branch.md index a8a2256..2d9f0ed 100644 --- a/packages/opencode/.opencode/commands/branch.md +++ b/packages/opencode/.opencode/commands/branch.md @@ -7,6 +7,10 @@ agent: build Create and switch to a categorized branch whose name summarizes the current uncommitted work. +## Additional Context + +Use `` to steer the branch category and slug while keeping the final name short, descriptive, and aligned with the change type. + ## Workflow ### Arguments @@ -54,11 +58,7 @@ $ARGUMENTS - If that name already exists, retry once with a short numeric suffix - Store the checked-out branch as `` -## Additional Context - -Use `` to steer the branch category and slug while keeping the final name short, descriptive, and aligned with the change type. - -## Output +### Output If there is nothing to branch from, display: ``` diff --git a/packages/opencode/.opencode/commands/commit-and-push.md b/packages/opencode/.opencode/commands/commit-and-push.md index 6f3a8b1..42e9737 100644 --- a/packages/opencode/.opencode/commands/commit-and-push.md +++ b/packages/opencode/.opencode/commands/commit-and-push.md @@ -7,6 +7,10 @@ agent: build Create a commit and immediately push it to the remote repository. +## Additional Context + +Consider `` when analyzing changes and writing the commit message. + ## Workflow ### Arguments @@ -77,11 +81,7 @@ type: summary - Store the successful destination as `` - If push fails, STOP and report the push error -## Additional Context - -Consider `` when analyzing changes and writing the commit message. - -## Output +### Output If there is nothing to commit, display: ``` diff --git a/packages/opencode/.opencode/commands/commit.md b/packages/opencode/.opencode/commands/commit.md index a60d26e..2b6da67 100644 --- a/packages/opencode/.opencode/commands/commit.md +++ b/packages/opencode/.opencode/commands/commit.md @@ -7,6 +7,10 @@ agent: build Create a commit with an appropriate message summarizing the uncommitted changes. +## Additional Context + +Consider `` when analyzing changes and writing the commit message. + ## Workflow ### Arguments @@ -70,11 +74,7 @@ type: summary 7. Only run `git status` if the commit fails and needs diagnosis - Store the created commit hash as `` -## Additional Context - -Consider `` when analyzing changes and writing the commit message. - -## Output +### Output If there is nothing to commit, display: ``` diff --git a/packages/opencode/.opencode/commands/dev.md b/packages/opencode/.opencode/commands/dev.md index 563a940..d705cb4 100644 --- a/packages/opencode/.opencode/commands/dev.md +++ b/packages/opencode/.opencode/commands/dev.md @@ -7,6 +7,10 @@ agent: navigator Implement a feature or fix based on a ticket or request, then prepare for PR creation. +## Additional Context + +Use `` to refine priorities, scope, and tradeoffs while implementing ``. + ## Workflow ### Arguments @@ -60,11 +64,7 @@ $ARGUMENTS - Store the current branch name as `` - Do not create the pull request in this command; stop when the branch is ready for `pr/create` -## Additional Context - -Use `` to refine priorities, scope, and tradeoffs while implementing ``. - -## Output +### Output When the implementation is ready for PR creation, display: ``` diff --git a/packages/opencode/.opencode/commands/learn.md b/packages/opencode/.opencode/commands/learn.md index b34a384..455151e 100644 --- a/packages/opencode/.opencode/commands/learn.md +++ b/packages/opencode/.opencode/commands/learn.md @@ -7,6 +7,13 @@ agent: build Extract non-obvious learnings from this session and document them appropriately. +## Additional Context + +- Document non-obvious discoveries only +- Skip obvious facts, standard behavior, and already-documented items +- Avoid verbose explanations and session-specific details +- Use `` and `` to decide where to look more closely + ## Workflow ### Arguments @@ -62,14 +69,7 @@ $ARGUMENTS - Report which files were created or updated and how many learnings were added to each - Store those summary lines as `` in the format `- : learnings` -## Additional Context - -- Document non-obvious discoveries only -- Skip obvious facts, standard behavior, and already-documented items -- Avoid verbose explanations and session-specific details -- Use `` and `` to decide where to look more closely - -## Output +### Output When the documentation update is complete, display: ``` diff --git a/packages/opencode/.opencode/commands/pr/create.md b/packages/opencode/.opencode/commands/pr/create.md index f532cc3..02b4d8b 100644 --- a/packages/opencode/.opencode/commands/pr/create.md +++ b/packages/opencode/.opencode/commands/pr/create.md @@ -7,6 +7,15 @@ agent: build Create a pull request for the current branch, handling the entire workflow from change detection to PR submission. +## Additional Context + +Consider `` when analyzing changes and writing the PR description. +- Always include the `Ticket`, `Description`, and `Checklist` sections in that order. +- Use the literal `SKIPPED` when ticket mention was skipped. +- Keep the description focused on intent, not implementation details. +- Mark checklist validation items as completed if validation was performed. +- Uncommitted changes and being on the base branch block PR creation entirely. + ## Workflow ### Arguments @@ -153,16 +162,7 @@ Use `kompass_pr_sync` to create the pull request: - If `kompass_pr_sync` reports that a PR already exists for the branch, treat the result as an existing PR - Track whether the branch was pushed during this run and report that status in the final response -## Additional Context - -Consider `` when analyzing changes and writing the PR description. -- Always include the `Ticket`, `Description`, and `Checklist` sections in that order. -- Use the literal `SKIPPED` when ticket mention was skipped. -- Keep the description focused on intent, not implementation details. -- Mark checklist validation items as completed if validation was performed. -- Uncommitted changes and being on the base branch block PR creation entirely. - -## Output +### Output If PR creation stops because there is nothing to include, display: ``` diff --git a/packages/opencode/.opencode/commands/pr/fix.md b/packages/opencode/.opencode/commands/pr/fix.md index e5efda7..e10797c 100644 --- a/packages/opencode/.opencode/commands/pr/fix.md +++ b/packages/opencode/.opencode/commands/pr/fix.md @@ -7,6 +7,12 @@ agent: build Address feedback on a pull request by making fixes and responding to review threads. +## Additional Context + +Use `` when prioritizing which review feedback to address first and when deciding how much scope to take on in this pass. +- Default `/pr/fix` behavior is review-first: show the proposed fix, gather feedback, and loop until the user approves before committing, pushing, or replying on the PR. +- Treat `/pr/fix auto` as the explicit opt-in to skip the approval loop and proceed directly from passing validation to commit, push, and PR replies. + ## Workflow ### Arguments @@ -124,13 +130,7 @@ kompass_pr_sync refUrl="" commitId="" review={"co Confirm which feedback was addressed and which was intentionally not followed. - Store the number of resolved threads as `` -## Additional Context - -Use `` when prioritizing which review feedback to address first and when deciding how much scope to take on in this pass. -- Default `/pr/fix` behavior is review-first: show the proposed fix, gather feedback, and loop until the user approves before committing, pushing, or replying on the PR. -- Treat `/pr/fix auto` as the explicit opt-in to skip the approval loop and proceed directly from passing validation to commit, push, and PR replies. - -## Output +### Output When waiting for approval or revision feedback, display: ``` diff --git a/packages/opencode/.opencode/commands/pr/review.md b/packages/opencode/.opencode/commands/pr/review.md index 11c4d5a..ab9a4f6 100644 --- a/packages/opencode/.opencode/commands/pr/review.md +++ b/packages/opencode/.opencode/commands/pr/review.md @@ -7,6 +7,10 @@ agent: reviewer Review a GitHub pull request and publish findings as a formal review with inline comments. +## Additional Context + +Use `` and `` to judge whether the PR meets its stated intent without over-indexing on stylistic preferences. + ## Workflow ### Arguments @@ -100,11 +104,8 @@ For multi-line: add `startLine`. For deleted lines: use `side: "LEFT"`. If `kompass_pr_sync` returns a review URL, store it as ``. -## Additional Context - -Use `` and `` to judge whether the PR meets its stated intent without over-indexing on stylistic preferences. +### Output -## Output When approved: ``` PR approved for # diff --git a/packages/opencode/.opencode/commands/review.md b/packages/opencode/.opencode/commands/review.md index c528983..9407077 100644 --- a/packages/opencode/.opencode/commands/review.md +++ b/packages/opencode/.opencode/commands/review.md @@ -7,6 +7,10 @@ agent: reviewer Review code changes and provide actionable feedback with a grade and risk assessment. +## Additional Context + +Use `` to prioritize specific risks, feature areas, or related concerns while reviewing ``. + ## Workflow ### Arguments @@ -54,11 +58,7 @@ While reading files: - For deleted files, inspect prior contents from git because `kompass_changes_load` does not provide full deleted-file contents - Use a helper agent only if the changed-file set is too large to review comfortably in one session after the changed paths are already known -## Additional Context - -Use `` to prioritize specific risks, feature areas, or related concerns while reviewing ``. - -## Output +### Output When the review is complete, display: ``` diff --git a/packages/opencode/.opencode/commands/rmslop.md b/packages/opencode/.opencode/commands/rmslop.md index 5126b3f..c22f091 100644 --- a/packages/opencode/.opencode/commands/rmslop.md +++ b/packages/opencode/.opencode/commands/rmslop.md @@ -7,6 +7,10 @@ agent: build Remove AI-generated code slop and inconsistencies from the branch changes. +## Additional Context + +Use `` to decide which kinds of slop to prioritize and which areas should remain untouched. + ## Workflow ### Arguments @@ -65,11 +69,7 @@ $ARGUMENTS - Create a focused commit describing the cleanup - Store the created commit hash as `` -## Additional Context - -Use `` to decide which kinds of slop to prioritize and which areas should remain untouched. - -## Output +### Output If there is no branch work to clean up, display: ``` diff --git a/packages/opencode/.opencode/commands/ship.md b/packages/opencode/.opencode/commands/ship.md index dbf39bd..1604c2d 100644 --- a/packages/opencode/.opencode/commands/ship.md +++ b/packages/opencode/.opencode/commands/ship.md @@ -7,6 +7,10 @@ agent: navigator Ship the current work by delegating branch creation, commit creation, and PR creation. +## Additional Context + +Use `` to steer delegated branch naming. Use `` to refine the delegated commit and PR summaries. Pass `` through to PR creation when it was provided. + ## Workflow ### Arguments @@ -61,11 +65,7 @@ Additional context: - If `` says there is nothing to include in a PR, STOP and report that there is nothing to ship - Otherwise, continue with the created or existing PR -## Additional Context - -Use `` to steer delegated branch naming. Use `` to refine the delegated commit and PR summaries. Pass `` through to PR creation when it was provided. - -## Output +### Output If there is nothing to ship, display: ``` diff --git a/packages/opencode/.opencode/commands/ticket/ask.md b/packages/opencode/.opencode/commands/ticket/ask.md index ef8639a..885f103 100644 --- a/packages/opencode/.opencode/commands/ticket/ask.md +++ b/packages/opencode/.opencode/commands/ticket/ask.md @@ -7,6 +7,12 @@ agent: build Load a ticket and its discussion, answer the user's question, and post that answer back to the ticket. +## Additional Context + +- Use `` to shape tone, depth, and focus for `` +- Keep the posted answer grounded in the actual ticket discussion; do not invent missing facts +- Ask only when the ticket source or question cannot be determined reliably + ## Workflow ### Arguments @@ -44,13 +50,7 @@ $ARGUMENTS - `comments: []` - Store the returned ticket URL as `` -## Additional Context - -- Use `` to shape tone, depth, and focus for `` -- Keep the posted answer grounded in the actual ticket discussion; do not invent missing facts -- Ask only when the ticket source or question cannot be determined reliably - -## Output +### Output If the ticket context or question cannot be determined, display: ``` diff --git a/packages/opencode/.opencode/commands/ticket/create.md b/packages/opencode/.opencode/commands/ticket/create.md index fd5be70..9cd586e 100644 --- a/packages/opencode/.opencode/commands/ticket/create.md +++ b/packages/opencode/.opencode/commands/ticket/create.md @@ -7,6 +7,10 @@ agent: build Create a ticket that summarizes the work returned by the current change comparison. +## Additional Context + +Consider `` when analyzing the work and writing the ticket title and body. + ## Workflow ### Arguments @@ -71,11 +75,7 @@ Use `kompass_ticket_sync` with `refUrl` unset to create the ticket: - Store the generated title as `` - Store the created issue URL as `` -## Additional Context - -Consider `` when analyzing the work and writing the ticket title and body. - -## Output +### Output If there is no work to summarize, display: ``` diff --git a/packages/opencode/.opencode/commands/ticket/dev.md b/packages/opencode/.opencode/commands/ticket/dev.md index fb43ab6..e527657 100644 --- a/packages/opencode/.opencode/commands/ticket/dev.md +++ b/packages/opencode/.opencode/commands/ticket/dev.md @@ -7,6 +7,10 @@ agent: build Implement a ticket by orchestrating development, branching, commit-and-push, and PR creation. +## Additional Context + +Use `` to refine scope, sequencing, and tradeoffs across the delegated `/dev`, `/branch`, `/commit-and-push`, and `/pr/create` steps. + ## Workflow ### Arguments @@ -98,11 +102,7 @@ Additional context: - If `` is blocked or incomplete, STOP and report the PR blocker - Otherwise, continue and store the resulting PR URL as `` -## Additional Context - -Use `` to refine scope, sequencing, and tradeoffs across the delegated `/dev`, `/branch`, `/commit-and-push`, and `/pr/create` steps. - -## Output +### Output When the ticket work is complete, display: ``` diff --git a/packages/opencode/.opencode/commands/ticket/plan-and-sync.md b/packages/opencode/.opencode/commands/ticket/plan-and-sync.md index b72dc77..fc49931 100644 --- a/packages/opencode/.opencode/commands/ticket/plan-and-sync.md +++ b/packages/opencode/.opencode/commands/ticket/plan-and-sync.md @@ -7,6 +7,18 @@ agent: planner Create a scoped implementation plan from a request or ticket, then capture that plan in the relevant ticket flow without losing important technical context. +## Additional Context + +- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. +- Use the current request to determine ``. +- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. +- Use `` to emphasize the most important constraints, dependencies, or focus areas. +- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. +- If technical details provided in the conversation are good, keep them. +- If those details are incomplete, validate and improve them. +- For existing tickets, update the same ticket instead of creating a replacement. +- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. + ## Workflow ### Arguments @@ -79,19 +91,7 @@ $ARGUMENTS - Return the generated title, a brief plan summary, and the ticket reference or URL - Call out assumptions, risks, or blockers only when they materially matter -## Additional Context - -- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. -- Use the current request to determine ``. -- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. -- Use `` to emphasize the most important constraints, dependencies, or focus areas. -- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. -- If technical details provided in the conversation are good, keep them. -- If those details are incomplete, validate and improve them. -- For existing tickets, update the same ticket instead of creating a replacement. -- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. - -## Output +### Output If planning context cannot be determined, display: ``` diff --git a/packages/opencode/.opencode/commands/ticket/plan.md b/packages/opencode/.opencode/commands/ticket/plan.md index 5752809..b2460bd 100644 --- a/packages/opencode/.opencode/commands/ticket/plan.md +++ b/packages/opencode/.opencode/commands/ticket/plan.md @@ -7,6 +7,18 @@ agent: planner Create a scoped implementation plan from a request or ticket and present it directly without modifying any ticket state. +## Additional Context + +- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. +- Use the current request to determine ``. +- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. +- Use `` to emphasize the most important constraints, dependencies, or focus areas. +- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. +- If technical details provided in the conversation are good, keep them. +- If those details are incomplete, validate and improve them. +- If a ticket source was provided, use it as planning context only; do not sync updates back automatically. +- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. + ## Workflow ### Arguments @@ -67,19 +79,7 @@ $ARGUMENTS - Return the generated title and plan details without creating or updating a ticket - Call out assumptions, risks, or blockers only when they materially matter -## Additional Context - -- Treat ticket systems generically. Do not assume GitHub or any specific provider unless the provided context makes it relevant. -- Use the current request to determine ``. -- Earlier comments remain in force when they add operative constraints, business rules, technical decisions, migration rules, exact labels or renames, ordering rules, or scoping rules. -- Use `` to emphasize the most important constraints, dependencies, or focus areas. -- For technical tickets, repo inspection is expected unless the request is clearly non-technical or repository context is unavailable. -- If technical details provided in the conversation are good, keep them. -- If those details are incomplete, validate and improve them. -- If a ticket source was provided, use it as planning context only; do not sync updates back automatically. -- Ask only when blocked by a missing or invalid ticket source, or by ambiguity that prevents a reliable plan. - -## Output +### Output If planning context cannot be determined, display: ``` diff --git a/packages/opencode/.opencode/commands/todo.md b/packages/opencode/.opencode/commands/todo.md index 8be45e5..6855fae 100644 --- a/packages/opencode/.opencode/commands/todo.md +++ b/packages/opencode/.opencode/commands/todo.md @@ -7,6 +7,13 @@ agent: navigator Work through a todo file one pending item at a time by planning, getting approval, implementing, committing, and marking completed tasks. +## Additional Context + +- Keep the loop focused on one checklist item at a time +- Do not merge separate todo items unless the file explicitly frames them as one task +- If implementation reveals scope that materially changes the approved plan, pause and re-plan before marking the task complete +- Use `` to prioritize tradeoffs, constraints, or validation expectations during planning and implementation + ## Workflow ### Arguments @@ -105,14 +112,7 @@ Additional context: - Save the updated todo file - Return to `### Load Todo Context` and repeat the workflow for the next pending task -## Additional Context - -- Keep the loop focused on one checklist item at a time -- Do not merge separate todo items unless the file explicitly frames them as one task -- If implementation reveals scope that materially changes the approved plan, pause and re-plan before marking the task complete -- Use `` to prioritize tradeoffs, constraints, or validation expectations during planning and implementation - -## Output +### Output When presenting a task plan for approval, display: ```