feat(tools): added GitHub Actions workflow renderer and enhanced gh-* tool outputs
- Added gh-renderer.ts module with GitHub Actions workflow visualization for terminal output. - Enhanced gh_pr_view tool to fetch and display inline review comments alongside pull request reviews. - Improved gh_run_watch tool output with structured job state tracking and failed log formatting. - Fixed gh_run_watch to resolve explicit branch watches against GitHub API branch head instead of local HEAD. - Fixed gh_* tool outputs to spill full large results to artifacts instead of pre-truncating. - Standardized trailing newlines across 100+ prompt template files for POSIX compliance.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Added dedicated `gh-renderer.ts` module for rich terminal rendering of GitHub Actions workflow runs with live status snapshots and job details
|
||||
- Added `gh_pr_checkout` tool to check out GitHub pull requests into dedicated git worktrees with contributor push metadata
|
||||
- Added `gh_pr_push` tool to push checked-out pull request branches back to their source branches
|
||||
- Added `gh_repo_view` tool to read GitHub repository metadata using the local GitHub CLI
|
||||
@@ -30,11 +32,20 @@
|
||||
- Added opt-in `gh_run_watch` to fast-fail GitHub Actions runs, stream job status snapshots, and return tailed logs for failed jobs
|
||||
- Added bundled `/green` command to generate the iterative “fix CI until green” prompt, with final tag instructions included only when `HEAD` already has a tag
|
||||
|
||||
### Changed
|
||||
|
||||
- Enhanced `gh_pr_view` tool to include inline review comments alongside pull request reviews for improved discussion context
|
||||
- Improved `gh_run_watch` tool output rendering with dedicated visual component for streaming run snapshots and job status updates
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed prompt file formatting to include trailing newlines at EOF for consistency across all prompt markdown files
|
||||
- Fixed `gh_pr_diff` to preserve raw patch content instead of normalizing tabs and whitespace
|
||||
- Fixed `gh_pr_view` to include pull request reviews alongside issue-style comments for discussion context
|
||||
- Fixed `gh_run_watch` and bundled `/green` to watch the workflow runs for the current `HEAD` commit instead of whichever branch run was newest
|
||||
- Fixed `gh_pr_view` to include inline review comments alongside pull request reviews and issue-style comments for discussion context
|
||||
- Fixed `gh_run_watch` to resolve explicit branch watches against the selected branch head instead of local `HEAD`
|
||||
- Fixed `gh_run_watch` to hide repo and polling internals from the tool schema and save full failed-job logs as session artifacts alongside the inline tailed output
|
||||
- Fixed `gh_*` tool outputs to spill full large results to artifacts instead of pre-truncating the head with unusable `offset=` guidance
|
||||
- Fixed bundled `/green` to watch the workflow runs for the current `HEAD` commit instead of whichever branch run was newest
|
||||
- Fixed OpenAI Responses session rehydration to strip stale assistant replay payloads before resumed requests ([#594](https://github.com/can1357/oh-my-pi/pull/594) by [@daandden](https://github.com/daandden))
|
||||
- Fixed inline image rendering to cap image height and preserve multiplexer scrollback during terminal resizes ([#587](https://github.com/can1357/oh-my-pi/pull/587) by [@smileynet](https://github.com/smileynet))
|
||||
|
||||
@@ -6497,4 +6508,4 @@ Initial public release.
|
||||
- Git branch display in footer
|
||||
- Message queueing during streaming responses
|
||||
- OAuth integration for Gmail and Google Calendar access
|
||||
- HTML export with syntax highlighting and collapsible sections
|
||||
- HTML export with syntax highlighting and collapsible sections
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* 5. Compact markdown tables (remove padding)
|
||||
* 6. Collapse 2+ blank lines to single blank line
|
||||
* 7. Trim trailing whitespace (preserve indentation)
|
||||
* 8. No trailing newline at EOF
|
||||
* 8. Trailing newline at EOF (disk only; runtime omits it)
|
||||
* 9. Bold RFC 2119 keywords (MUST, SHOULD, MAY, etc.) in prompt content
|
||||
*/
|
||||
import { Glob } from "bun";
|
||||
@@ -44,11 +44,11 @@ async function main() {
|
||||
const original = await Bun.file(fullPath).text();
|
||||
const formatted = formatPromptContent(original, PROMPT_FORMAT_OPTIONS);
|
||||
|
||||
if (original !== formatted) {
|
||||
if (original !== `${formatted}\n`) {
|
||||
if (check) {
|
||||
console.log(`Would format: ${fullPath}`);
|
||||
} else {
|
||||
await Bun.write(fullPath, formatted);
|
||||
await Bun.write(fullPath, `${formatted}\n`);
|
||||
console.log(`Formatted: ${fullPath}`);
|
||||
}
|
||||
changed++;
|
||||
|
||||
@@ -19,4 +19,4 @@ Return concise JSON object with:
|
||||
Consider how file's changes relate to above files.
|
||||
{{/if}}
|
||||
|
||||
Call submit_result tool with JSON payload.
|
||||
Call submit_result tool with JSON payload.
|
||||
|
||||
@@ -22,4 +22,4 @@ May include entries from list in propose_changelog `deletions` field for removal
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
Use git_* tools to inspect changes. Call analyze_files for deeper per-file summaries. Finish with propose_commit or split_commit.
|
||||
Use git_* tools to inspect changes. Call analyze_files for deeper per-file summaries. Finish with propose_commit or split_commit.
|
||||
|
||||
@@ -1 +1 @@
|
||||
Split commit plan has {{count}} commits. Proceed? (y/N):
|
||||
Split commit plan has {{count}} commits. Proceed? (y/N):
|
||||
|
||||
@@ -35,4 +35,4 @@ Tool guidance:
|
||||
## Changelog Requirements
|
||||
|
||||
If changelog targets provided, you **MUST** call `propose_changelog` before finishing.
|
||||
If you propose split commit plan, include changelog target files in relevant commit changes.
|
||||
If you propose split commit plan, include changelog target files in relevant commit changes.
|
||||
|
||||
@@ -145,4 +145,4 @@ Call create_conventional_analysis with:
|
||||
"details": [],
|
||||
"issue_refs": []
|
||||
}
|
||||
</example>
|
||||
</example>
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
{{/if}}
|
||||
<diff>
|
||||
{{ diff }}
|
||||
</diff>
|
||||
</diff>
|
||||
|
||||
@@ -47,4 +47,4 @@ Return ONLY valid JSON; no markdown fences or explanation.
|
||||
|
||||
With entries: {"entries": {"Added": ["entry 1"], "Fixed": ["entry 2"]}}
|
||||
No changelog-worthy changes: {"entries": {}}
|
||||
</output-format>
|
||||
</output-format>
|
||||
|
||||
@@ -15,4 +15,4 @@ Already documented—skip these:
|
||||
|
||||
<diff>
|
||||
{{ diff }}
|
||||
</diff>
|
||||
</diff>
|
||||
|
||||
@@ -21,4 +21,4 @@ Plain list, no preamble, no summary, no markdown formatting.
|
||||
- changed 'Connection::new()' to accept '&Config' instead of individual params
|
||||
</output-format>
|
||||
|
||||
Observations only. Classification in reduce phase.
|
||||
Observations only. Classification in reduce phase.
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
<related-files>
|
||||
{{ context_header }}
|
||||
</related-files>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -47,4 +47,4 @@ Output:
|
||||
],
|
||||
"issue_refs": []
|
||||
}
|
||||
</example>
|
||||
</example>
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
<scope-candidates>
|
||||
{{ scope_candidates }}
|
||||
</scope-candidates>
|
||||
</scope-candidates>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{#if base_context}}
|
||||
{{ base_context }}
|
||||
{{/if}}Previous summary failed validation: {{ errors }}
|
||||
{{/if}}Previous summary failed validation: {{ errors }}
|
||||
|
||||
@@ -35,4 +35,4 @@ build | Updated serde to fix CVE-2024-1234
|
||||
</examples>
|
||||
<banned-words>
|
||||
comprehensive, various, several, improved, enhanced, quickly, simply, basically, this change, this commit, now
|
||||
</banned-words>
|
||||
</banned-words>
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
<diff-stat>
|
||||
{{ stat }}
|
||||
</diff-stat>
|
||||
</diff-stat>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Types: feat, fix, refactor, perf, docs, test, build, ci, chore, style, revert.
|
||||
Format: <type>(<scope>): <summary> with past-tense summary.
|
||||
Format: <type>(<scope>): <summary> with past-tense summary.
|
||||
|
||||
@@ -65,4 +65,4 @@ You **MAY** make file edits, create components, and run commands—and **SHOULD*
|
||||
Every interface should prompt "how was this made?" not "which AI made this?"
|
||||
You **MUST** commit to clear aesthetic direction and execute with precision.
|
||||
You **MUST** keep going until implementation is complete.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -57,4 +57,4 @@ You **SHOULD** generally follow this procedure, but are allowed to adjust it as
|
||||
<critical>
|
||||
You **MUST** operate as read-only. You **MUST NOT** write, edit, or modify files, nor execute any state-changing commands, via git, build system, package manager, etc.
|
||||
You **MUST** keep going until complete.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -7,4 +7,4 @@ description: {{jsonStringify description}}
|
||||
{{/if}}{{#if thinkingLevel}}thinking-level: {{jsonStringify thinkingLevel}}
|
||||
{{/if}}{{#if blocking}}blocking: true
|
||||
{{/if}}---
|
||||
{{body}}
|
||||
{{body}}
|
||||
|
||||
@@ -33,4 +33,4 @@ You will likely need to document these sections, but only take it as a starting
|
||||
|
||||
<output>
|
||||
After analysis, you **MUST** write AGENTS.md to the project root.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -118,4 +118,4 @@ Before acting, determine what kind of question this is:
|
||||
<critical>
|
||||
Source code is truth. Documentation is aspiration. Training data is history.
|
||||
You **MUST** keep going until you have a definitive, source-verified answer.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -74,4 +74,4 @@ You **MUST NOT** pad with meta-commentary. Dense and useful beats long and thoro
|
||||
You **MUST** keep going until you have a clear answer or have exhausted available evidence.
|
||||
Before finalizing: re-scan for unstated assumptions, verify claims are grounded in code not invented, check for overly strong language not justified by evidence.
|
||||
This matters. The caller is stuck. Get it right.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -46,4 +46,4 @@ You will likely need to document these sections, but only take it as a starting
|
||||
<critical>
|
||||
You **MUST** operate as read-only. You **MUST NOT** write, edit, or modify files, nor execute any state-changing commands, via git, build system, package manager, etc.
|
||||
You **MUST** keep going until complete.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -124,4 +124,4 @@ Correctness ignores non-blocking issues (style, docs, nits).
|
||||
|
||||
<critical>
|
||||
Every finding **MUST** be patch-anchored and evidence-backed.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -13,4 +13,4 @@ You **MUST** maintain hyperfocus on the task at hand, do not deviate from what w
|
||||
- You **SHOULD** prefer edits to existing files over creating new ones.
|
||||
- You **MUST NOT** create documentation files (*.md) unless explicitly requested.
|
||||
- You **MUST** follow the assignment and the instructions given to you. You gave them for a reason.
|
||||
</directives>
|
||||
</directives>
|
||||
|
||||
@@ -33,4 +33,4 @@ Once CI is green, ensure the final commit is tagged `{{headTag}}` and push that
|
||||
<critical>
|
||||
The task is complete only when the workflow runs for the latest HEAD commit succeed.
|
||||
{{#if headTag}}The final green commit must be tagged `{{headTag}}` and that tag must be pushed.{{/if}}
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -2,4 +2,4 @@ The following is a summary of a branch that this conversation came back from:
|
||||
|
||||
<summary>
|
||||
{{summary}}
|
||||
</summary>
|
||||
</summary>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
The user explored a different conversation branch before returning here.
|
||||
Summary of that exploration:
|
||||
Summary of that exploration:
|
||||
|
||||
@@ -27,4 +27,4 @@ You **MUST** use EXACT format:
|
||||
## Next Steps
|
||||
1. [What should happen next to continue]
|
||||
|
||||
Sections **MUST** be kept concise. You **MUST** preserve exact file paths, function names, error messages.
|
||||
Sections **MUST** be kept concise. You **MUST** preserve exact file paths, function names, error messages.
|
||||
|
||||
@@ -6,4 +6,4 @@ Rules:
|
||||
- **MUST NOT** mention running tests, builds, or other validation steps
|
||||
- **MUST NOT** explain what the user asked for
|
||||
- **MUST** write in first person (I added…, I fixed…)
|
||||
- **MUST NOT** ask questions
|
||||
- **MUST NOT** ask questions
|
||||
|
||||
@@ -2,4 +2,4 @@ Another language model started to solve this problem and produced a summary of i
|
||||
|
||||
<summary>
|
||||
{{summary}}
|
||||
</summary>
|
||||
</summary>
|
||||
|
||||
@@ -35,4 +35,4 @@ You **MUST** use this format (sections can be omitted if not applicable):
|
||||
|
||||
You **MUST** output only the structured summary; you **MUST NOT** include extra text.
|
||||
|
||||
Sections **MUST** be kept concise. You **MUST** preserve exact file paths, function names, error messages, and relevant tool outputs or command results. You **MUST** include repository state changes (branch, uncommitted changes) if mentioned.
|
||||
Sections **MUST** be kept concise. You **MUST** preserve exact file paths, function names, error messages, and relevant tool outputs or command results. You **MUST** include repository state changes (branch, uncommitted changes) if mentioned.
|
||||
|
||||
@@ -14,4 +14,4 @@ You **MUST** summarize the prefix to provide context for the retained suffix:
|
||||
|
||||
You **MUST** output only the structured summary. You **MUST NOT** include extra text.
|
||||
|
||||
You **MUST** be concise. You **MUST** preserve exact file paths, function names, error messages, and relevant tool outputs or command results if they appear. You **MUST** focus on what's needed to understand the kept suffix.
|
||||
You **MUST** be concise. You **MUST** preserve exact file paths, function names, error messages, and relevant tool outputs or command results if they appear. You **MUST** focus on what's needed to understand the kept suffix.
|
||||
|
||||
@@ -42,4 +42,4 @@ You **MUST** use this format (omit sections if not applicable):
|
||||
|
||||
You **MUST** output only the structured summary; you **MUST NOT** include extra text.
|
||||
|
||||
Sections **MUST** be kept concise. You **MUST** preserve relevant tool outputs/command results. You **MUST** include repository state changes (branch, uncommitted changes) if mentioned.
|
||||
Sections **MUST** be kept concise. You **MUST** preserve relevant tool outputs/command results. You **MUST** include repository state changes (branch, uncommitted changes) if mentioned.
|
||||
|
||||
@@ -27,4 +27,4 @@ Requirements:
|
||||
- scripts/templates/examples are optional. When present, each entry **MUST** write to skills/<name>/<bucket>/<path>.
|
||||
- You **MUST** only include files worth keeping long-term; you **MUST** omit stale assets so they are pruned.
|
||||
- You **MUST** preserve useful prior themes; you **MUST** remove stale or contradictory guidance.
|
||||
- You **MUST** treat memory as advisory: current repository state wins.
|
||||
- You **MUST** treat memory as advisory: current repository state wins.
|
||||
|
||||
@@ -8,4 +8,4 @@ Operational rules:
|
||||
5) Conflict workflow: if memory disagrees with repo state or user instruction, you **MUST** prefer repo/user, treat memory as stale, proceed with corrected behavior, then update/regenerate memory artifacts through normal execution.
|
||||
6) You **MUST** escalate confidence only after repository verification; memory alone **MUST NOT** be treated as sufficient proof.
|
||||
Memory summary:
|
||||
{{memory_summary}}
|
||||
{{memory_summary}}
|
||||
|
||||
@@ -3,4 +3,4 @@ thread_id: {{thread_id}}
|
||||
Persistable response items (JSON):
|
||||
{{response_items_json}}
|
||||
|
||||
You **MUST** extract durable memory now.
|
||||
You **MUST** extract durable memory now.
|
||||
|
||||
@@ -18,4 +18,4 @@ Rules:
|
||||
- rollout_summary: compact synopsis of what future runs should remember.
|
||||
- rollout_slug: short lowercase slug (letters/numbers/_), or null.
|
||||
- raw_memory: detailed durable memory blocks with enough context to reuse.
|
||||
- If no durable signal exists, you **MUST** return empty strings for rollout_summary/raw_memory and null rollout_slug.
|
||||
- If no durable signal exists, you **MUST** return empty strings for rollout_summary/raw_memory and null rollout_slug.
|
||||
|
||||
@@ -61,4 +61,4 @@ _Full diff too large ({{len files}} files). Showing first ~{{linesPerFile}} line
|
||||
<diff>
|
||||
{{rawDiff}}
|
||||
</diff>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -62,4 +62,4 @@ Key principles for your system prompts:
|
||||
- **MUST** make the agent proactive in seeking clarification when needed
|
||||
- **MUST** build in quality assurance and self-correction mechanisms
|
||||
|
||||
The agents you create **MUST** be autonomous experts capable of handling their designated tasks with minimal additional guidance. Your system prompts are their complete operational manual.
|
||||
The agents you create **MUST** be autonomous experts capable of handling their designated tasks with minimal additional guidance. Your system prompts are their complete operational manual.
|
||||
|
||||
@@ -3,4 +3,4 @@ Design a custom agent for this request:
|
||||
{{request}}
|
||||
|
||||
You **MUST** return only the JSON object required by your system instructions.
|
||||
You **MUST NOT** include markdown fences.
|
||||
You **MUST NOT** include markdown fences.
|
||||
|
||||
@@ -1 +1 @@
|
||||
Threshold-triggered maintenance: preserve critical implementation state and immediate next actions.
|
||||
Threshold-triggered maintenance: preserve critical implementation state and immediate next actions.
|
||||
|
||||
@@ -5,4 +5,4 @@ Do not use tools.
|
||||
Do not ask follow-up questions.
|
||||
Question:
|
||||
{{question}}
|
||||
</btw>
|
||||
</btw>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Generate a concise git commit message from the provided diff. Use conventional commit format: `type(scope): description` where type is feat/fix/refactor/chore/test/docs and scope is optional. The description **MUST** be lowercase, imperative mood, no trailing period. Keep it under 72 characters.
|
||||
You **MUST** output ONLY the commit message, nothing else.
|
||||
You **MUST** output ONLY the commit message, nothing else.
|
||||
|
||||
@@ -60,4 +60,4 @@ You **MUST** read `rule://<name>` when working in that domain.
|
||||
</rules>
|
||||
{{/if}}
|
||||
Current date: {{date}}
|
||||
Current working directory: {{cwd}}
|
||||
Current working directory: {{cwd}}
|
||||
|
||||
@@ -10,4 +10,4 @@ You **MUST** keep exactly one task `in_progress` and all later tasks `pending`.
|
||||
|
||||
After the initial `todo_write` call succeeds, continue with the user's request in the same turn.
|
||||
Do not emit another `todo_write` call unless task state materially changed.
|
||||
</system-reminder>
|
||||
</system-reminder>
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
{{#xml "modified-files"}}
|
||||
{{join modifiedFiles "\n"}}
|
||||
{{/xml}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -43,4 +43,4 @@ Use exactly this structure:
|
||||
<instruction>
|
||||
Additional focus: {{additionalFocus}}
|
||||
</instruction>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -104,4 +104,4 @@ Your turn ends ONLY by:
|
||||
|
||||
You **MUST NOT** ask plan approval via text or `{{askToolName}}`; you **MUST** use `{{exitToolName}}`.
|
||||
You **MUST** keep going until complete.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -20,4 +20,4 @@ If a `todo_write` call fails, you **MUST** fix the todo payload and retry before
|
||||
|
||||
<critical>
|
||||
You **MUST** keep going until complete. This matters.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -11,4 +11,4 @@ Plan file from previous session: `{{planFilePath}}`
|
||||
<instruction>
|
||||
If this plan is relevant to current work and not complete, you **MUST** continue executing it.
|
||||
If the plan is stale or unrelated, you **MUST** ignore it.
|
||||
</instruction>
|
||||
</instruction>
|
||||
|
||||
@@ -31,4 +31,4 @@ List 3-5 files most critical for implementing this plan:
|
||||
<critical>
|
||||
You **MUST** operate as read-only. You **MUST NOT** write, edit, or modify files, nor execute any state-changing commands, via git, build system, package manager, etc.
|
||||
You **MUST** keep going until complete.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -6,4 +6,4 @@ You **MUST** choose exactly one next action now:
|
||||
2. Call `{{exitToolName}}` to finish planning and request approval
|
||||
|
||||
You **MUST NOT** output plain text in this turn.
|
||||
</system-reminder>
|
||||
</system-reminder>
|
||||
|
||||
@@ -8,4 +8,4 @@ You **MUST** call submit_result as your only action now. Choose one:
|
||||
You **MUST NOT** give up if you can still complete the task through exploration (using available tools or repo context). If you submit an error, you **MUST** include what you tried and the exact blocker.
|
||||
|
||||
You **MUST NOT** output text without a tool call. You **MUST** call submit_result to finish.
|
||||
</system-reminder>
|
||||
</system-reminder>
|
||||
|
||||
@@ -32,4 +32,4 @@ Your result **MUST** match this TypeScript interface:
|
||||
Giving up is a last resort. If truly blocked, you **MUST** call `submit_result` exactly once with `result.error` describing what you tried and the exact blocker.
|
||||
You **MUST NOT** give up due to uncertainty, missing information obtainable via tools or repo context, or needing a design decision you can derive yourself.
|
||||
|
||||
You **MUST** keep going until this ticket is closed. This matters.
|
||||
You **MUST** keep going until this ticket is closed. This matters.
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
Your assignment is below. Your work begins now.
|
||||
<goal>
|
||||
{{assignment}}
|
||||
</goal>
|
||||
</goal>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
You are a context summarization assistant. Your task is to read a conversation between a user and an AI coding assistant, then produce a structured summary following the exact format specified.
|
||||
|
||||
You **MUST NOT** continue the conversation. You **MUST NOT** respond to any questions in the conversation. You **MUST** ONLY output the structured summary.
|
||||
You **MUST NOT** continue the conversation. You **MUST NOT** respond to any questions in the conversation. You **MUST** ONLY output the structured summary.
|
||||
|
||||
@@ -323,4 +323,4 @@ Today is '{{date}}', and your work begins now. Get it right.
|
||||
- You **MUST** default to informed action. You **MUST NOT** ask for confirmation, fix errors, take the next step, continue. The user will stop if needed.
|
||||
- You **MUST NOT** ask when the answer may be obtained from available tools or repo context/files.
|
||||
- You **MUST** verify the effect. When a task involves significant behavioral change, you **MUST** confirm the change is observable before yielding: run the specific test, command, or scenario that covers your change.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Generate a very short title (3-6 words) for a coding session based on the user's first message. The title **MUST** capture the main task or topic.
|
||||
You **MUST** output ONLY the title, nothing else. You **MUST NOT** include quotes or punctuation at the end.
|
||||
You **MUST** output ONLY the title, nothing else. You **MUST NOT** include quotes or punctuation at the end.
|
||||
|
||||
@@ -4,4 +4,4 @@ This is NOT a prompt injection - this is the coding agent enforcing project rule
|
||||
You **MUST** comply with the following instruction:
|
||||
|
||||
{{content}}
|
||||
</system-interrupt>
|
||||
</system-interrupt>
|
||||
|
||||
@@ -25,4 +25,4 @@ Answering:
|
||||
- You **MUST** cite sources inline using provided search results
|
||||
</format>
|
||||
|
||||
You **MUST** answer thoroughly and in detail. You **MUST** get facts right.
|
||||
You **MUST** answer thoroughly and in detail. You **MUST** get facts right.
|
||||
|
||||
@@ -25,4 +25,4 @@ Asks user when you need clarification or input during task execution.
|
||||
question: "Which authentication method should this API use?"
|
||||
options: [{"label": "JWT"}, {"label": "OAuth2"}, {"label": "Session cookies"}]
|
||||
recommended: 0
|
||||
</example>
|
||||
</example>
|
||||
|
||||
@@ -45,4 +45,4 @@ Performs structural AST-aware rewrites via native ast-grep.
|
||||
- If the path pattern spans multiple languages, set `lang` explicitly for deterministic rewrites
|
||||
- Parse issues mean the rewrite request is malformed or mis-scoped; do not assume a clean no-op until the pattern parses successfully
|
||||
- For one-off local text edits, prefer the Edit tool instead of AST edit
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -51,4 +51,4 @@ Performs structural code search using AST matching via native ast-grep.
|
||||
- Avoid repo-root AST scans when the target is language-specific; narrow `path` first
|
||||
- Treat parse issues as query failure, not evidence of absence: repair the pattern or tighten `path`/`glob`/`lang` before concluding "no matches"
|
||||
- If exploration is broad/open-ended across subsystems, use Task tool with explore subagent first
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
Background job {{jobId}} has completed. Resume your work using the result below.
|
||||
|
||||
{{result}}
|
||||
</system-notice>
|
||||
</system-notice>
|
||||
|
||||
@@ -2,4 +2,4 @@ Blocks until one or more background jobs complete, fail, or are cancelled.
|
||||
|
||||
You **MUST** use this instead of polling `read jobs://` in a loop when you need to wait for background task or bash results before continuing.
|
||||
|
||||
Returns the status and results of all watched jobs once at least one finishes.
|
||||
Returns the status and results of all watched jobs once at least one finishes.
|
||||
|
||||
@@ -44,4 +44,4 @@ You **MUST** use specialized tools instead of bash for ALL file operations:
|
||||
- You **MUST NOT** use Bash for these operations like read, grep, find, edit, write, where specialized tools exist.
|
||||
- You **MUST NOT** use `2>&1` | `2>/dev/null` pattern, stdout and stderr are already merged.
|
||||
- You **MUST NOT** use `| head -n 50` or `| tail -n 100` pattern, use `head` and `tail` parameters instead.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -21,4 +21,4 @@ Navigates, clicks, types, scrolls, drags, queries DOM content, and captures scre
|
||||
|
||||
<output>
|
||||
Text for navigation/DOM queries, images for screenshots.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -7,4 +7,4 @@ Performs basic calculations.
|
||||
|
||||
<output>
|
||||
Returns each calculation result with its prefix and suffix applied.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -2,4 +2,4 @@ Cancels a running background job started via async tool execution.
|
||||
|
||||
You **SHOULD** use this when a background `bash` or `task` job is no longer needed or is stuck.
|
||||
|
||||
You **MAY** inspect jobs first with `read jobs://` or `read jobs://<job-id>`.
|
||||
You **MAY** inspect jobs first with `read jobs://` or `read jobs://<job-id>`.
|
||||
|
||||
@@ -13,4 +13,4 @@ Typical flow:
|
||||
2. Perform exploratory work
|
||||
3. `rewind(report: …)` with concise findings
|
||||
|
||||
After rewind, intermediate checkpoint messages are removed from active context and replaced by the report.
|
||||
After rewind, intermediate checkpoint messages are removed from active context and replaced by the report.
|
||||
|
||||
@@ -38,4 +38,4 @@ Unsure about auth method (OAuth vs JWT).
|
||||
|
||||
<critical>
|
||||
You **MUST** only use when planning implementation steps. Research tasks (searching, reading, understanding) do not need this tool.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -8,4 +8,4 @@ Retrieves content from a URL and returns it in a clean, readable format.
|
||||
|
||||
<output>
|
||||
Returns processed, readable content. HTML transformed to remove boilerplate. PDF/DOCX converted to text. JSON returned formatted. With `raw: true`, returns untransformed HTML.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -23,4 +23,4 @@ Matching file paths sorted by modification time (most recent first). Truncated a
|
||||
|
||||
<avoid>
|
||||
For open-ended searches requiring multiple rounds of globbing and grepping, you **MUST** use Task tool instead.
|
||||
</avoid>
|
||||
</avoid>
|
||||
|
||||
@@ -4,4 +4,4 @@ Generates or edits images using Gemini image models.
|
||||
- You **MUST** provide a single detailed `subject` prompt for image generation or editing.
|
||||
- When using multiple `input`, you **SHOULD** describe each image's role directly in `subject`, e.g. `Image 1` for composition reference, `Image 2` for lighting reference, `Image 3` for background.
|
||||
- For text: you **SHOULD** add "sharp, legible, correctly spelled" for important text; keep text short
|
||||
</instructions>
|
||||
</instructions>
|
||||
|
||||
@@ -8,4 +8,4 @@ Reads a GitHub issue through the local GitHub CLI.
|
||||
|
||||
<output>
|
||||
Returns issue metadata, body text, and optionally visible comments in a readable format.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -9,4 +9,4 @@ Reads a GitHub pull request diff through the local GitHub CLI.
|
||||
|
||||
<output>
|
||||
Returns a unified diff or changed-file list for the selected pull request.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -3,9 +3,9 @@ Reads a GitHub pull request through the local GitHub CLI.
|
||||
<instruction>
|
||||
- Accepts a pull request number, URL, or branch name
|
||||
- Omitting `pr` targets the pull request associated with the current branch
|
||||
- Use this for PR metadata, body, changed-file summaries, review discussion, and issue-comment context
|
||||
- Use this for PR metadata, body, changed-file summaries, review discussion, inline review comments, and issue-comment context
|
||||
</instruction>
|
||||
|
||||
<output>
|
||||
Returns pull request metadata, body text, changed files, and optionally visible reviews and issue comments in a readable format.
|
||||
</output>
|
||||
Returns pull request metadata, body text, changed files, and optionally visible reviews, inline review comments, and issue comments in a readable format.
|
||||
</output>
|
||||
|
||||
@@ -8,4 +8,4 @@ Reads GitHub repository metadata using the local GitHub CLI.
|
||||
|
||||
<output>
|
||||
Returns a concise repository summary including description, branch, visibility, stars, forks, and related metadata.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -2,11 +2,11 @@ Watches a GitHub Actions workflow run through the local GitHub CLI.
|
||||
|
||||
<instruction>
|
||||
- Accepts a run ID or full Actions run URL
|
||||
- Omitting `run` watches the workflow runs for the current HEAD commit on the selected branch
|
||||
- Omitting `run` watches the workflow runs for the current HEAD commit in the current GitHub repository context
|
||||
- Omitting `branch` falls back to the current checked-out git branch
|
||||
- Fast-fails after the first detected job failure, waits briefly to collect concurrent failures, and then fetches tailed logs for the failed jobs
|
||||
</instruction>
|
||||
|
||||
<output>
|
||||
Streams live run snapshots while polling, then returns the final run status, job list, and tailed logs for failed jobs when available. When `run` is omitted, the snapshots cover all workflow runs created for the current HEAD commit.
|
||||
</output>
|
||||
Streams live run snapshots while polling, then returns the final run status, job list, and tailed logs for failed jobs when available. When failed-job logs are fetched, the full failed-job logs are also saved as a session artifact for on-demand reads. When `run` is omitted, the snapshots cover all workflow runs created for the current HEAD commit.
|
||||
</output>
|
||||
|
||||
@@ -8,4 +8,4 @@ Searches GitHub issues through the local GitHub CLI.
|
||||
|
||||
<output>
|
||||
Returns a concise list of matching issues with repository, state, labels, timestamps, and URLs.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -8,4 +8,4 @@ Searches GitHub pull requests through the local GitHub CLI.
|
||||
|
||||
<output>
|
||||
Returns a concise list of matching pull requests with repository, state, labels, timestamps, and URLs.
|
||||
</output>
|
||||
</output>
|
||||
|
||||
@@ -23,4 +23,4 @@ Searches files using powerful regex matching.
|
||||
- You **MUST** use Grep when searching for content.
|
||||
- You **MUST NOT** invoke `grep` or `rg` via Bash.
|
||||
- If the search is open-ended, requiring multiple rounds, you **MUST** use Task tool with explore subagent instead.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -128,4 +128,4 @@ When adding a sibling declaration, prefer `prepend` on the next declaration.
|
||||
- For a range, either replace only the body or replace the whole range. Do not split range boundaries.
|
||||
- `content` must be literal file content with matching indentation. If the file uses tabs, use real tabs.
|
||||
- You **MUST NOT** use this tool to reformat or clean up unrelated code. **ALWAYS** use project-specific tooling like linters or code formatters which are much more efficient and reliable.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -17,4 +17,4 @@ For OCR-style requests:
|
||||
|
||||
For UI/screenshot debugging requests:
|
||||
- Focus on visible states, labels, toggles, error messages, disabled controls, and relevant affordances.
|
||||
- Separate observed UI state from probable root cause.
|
||||
- Separate observed UI state from probable root cause.
|
||||
|
||||
@@ -29,4 +29,4 @@ Inspects an image file with a vision-capable model and returns compact text anal
|
||||
- Parameters are strict: only `path` and `question` are allowed
|
||||
- If image submission is blocked by settings, the tool will fail with an actionable error
|
||||
- If configured model does not support image input, configure a vision-capable model role before retrying
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -30,4 +30,4 @@ Interacts with Language Server Protocol servers for code intelligence.
|
||||
- Some operations require file to be saved to disk
|
||||
- Diagnostics glob mode samples up to 20 files per request to avoid long-running stalls on broad patterns
|
||||
- When `symbol` is provided for position-based actions, missing symbols or out-of-bounds `occurrence` values return an explicit error instead of silently falling back
|
||||
</caution>
|
||||
</caution>
|
||||
|
||||
@@ -69,4 +69,4 @@ edit {"path":"obsolete.txt","op":"delete"}
|
||||
- Generic anchors: `import`, `export`, `describe`, `function`, `const`
|
||||
- Repeating same addition in multiple hunks (duplicate blocks)
|
||||
- Full-file overwrites for minor changes (acceptable for major restructures or short files)
|
||||
</avoid>
|
||||
</avoid>
|
||||
|
||||
@@ -57,4 +57,4 @@ cells: [
|
||||
{"title": "use helper", "code": "configs = [parse_config(p) for p in Path('.').glob('*.json')]"}
|
||||
]
|
||||
```
|
||||
</example>
|
||||
</example>
|
||||
|
||||
@@ -25,4 +25,4 @@ Reads files from local filesystem or internal URLs.
|
||||
- You **MUST** use `read(path="dir/")` instead of `ls dir/` for directory listings.
|
||||
- You **MUST** always include the `path` parameter — NEVER call `read` with empty arguments `{}`.
|
||||
- When reading specific line ranges, use `offset` and `limit`: `read(path="file", offset=50, limit=100)` not `cat -n file | sed`.
|
||||
</critical>
|
||||
</critical>
|
||||
|
||||
@@ -6,4 +6,4 @@ Parameters:
|
||||
Behavior:
|
||||
- Returns ASCII diagram text.
|
||||
- Saves full ASCII output to an artifact URL (`artifact://<id>`) when artifact storage is available.
|
||||
- Returns an error when the Mermaid input is invalid or rendering fails.
|
||||
- Returns an error when the Mermaid input is invalid or rendering fails.
|
||||
|
||||
@@ -33,4 +33,4 @@ For position-addressed or pattern-addressed changes, bash more efficient:
|
||||
|
||||
Use Replace when _content itself_ identifies location.
|
||||
Use bash when _position_ or _pattern_ identifies what to change.
|
||||
</bash-alternatives>
|
||||
</bash-alternatives>
|
||||
|
||||
@@ -5,4 +5,4 @@ Resolves a pending preview action by either applying or discarding it.
|
||||
- `reason` is required and must explain why you chose to apply or discard.
|
||||
|
||||
This tool is only valid when a pending action exists (typically after a preview step).
|
||||
If no pending action exists, the call fails with an error.
|
||||
If no pending action exists, the call fails with an error.
|
||||
|
||||
@@ -10,4 +10,4 @@ Requirements:
|
||||
|
||||
Behavior:
|
||||
- If no checkpoint is active, this tool errors.
|
||||
- On success, the session rewinds and keeps your report as retained context.
|
||||
- On success, the session rewinds and keeps your report as retained context.
|
||||
|
||||
@@ -31,4 +31,4 @@ Returns JSON with:
|
||||
- `query`
|
||||
- `activated_tools` — MCP tools activated by this search call
|
||||
- `match_count` — number of ranked matches returned by the search
|
||||
- `total_tools`
|
||||
- `total_tools`
|
||||
|
||||
@@ -41,4 +41,4 @@ Command: `tasklist /v`
|
||||
Task: Get system info on "macbook"
|
||||
Host: macbook (10.0.0.20) | macos/zsh
|
||||
Command: `uname -a && sw_vers`
|
||||
</example>
|
||||
</example>
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
{{mergeSummary}}
|
||||
</merge-summary>
|
||||
{{/if}}
|
||||
</task-summary>
|
||||
</task-summary>
|
||||
|
||||
@@ -128,4 +128,4 @@ Caller runs `bun check:ts` after both tasks complete. Tasks must NOT run it.
|
||||
### Agent: {{name}}
|
||||
**Tools:** {{default (join tools ", ") "All"}}
|
||||
{{description}}
|
||||
{{/list}}
|
||||
{{/list}}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user