@oh-my-pi/pi-coding-agent 3.14.0 → 3.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/docs/theme.md +38 -5
- package/examples/sdk/11-sessions.ts +2 -2
- package/package.json +7 -4
- package/src/cli/file-processor.ts +51 -2
- package/src/cli/plugin-cli.ts +25 -19
- package/src/cli/update-cli.ts +4 -3
- package/src/core/agent-session.ts +31 -4
- package/src/core/compaction/branch-summarization.ts +4 -32
- package/src/core/compaction/compaction.ts +6 -84
- package/src/core/compaction/utils.ts +2 -3
- package/src/core/custom-tools/types.ts +2 -0
- package/src/core/export-html/index.ts +1 -1
- package/src/core/hooks/tool-wrapper.ts +0 -1
- package/src/core/hooks/types.ts +2 -2
- package/src/core/plugins/doctor.ts +9 -1
- package/src/core/sdk.ts +2 -1
- package/src/core/session-manager.ts +518 -40
- package/src/core/settings-manager.ts +174 -0
- package/src/core/system-prompt.ts +9 -14
- package/src/core/title-generator.ts +2 -8
- package/src/core/tools/ask.ts +19 -37
- package/src/core/tools/bash.ts +2 -37
- package/src/core/tools/edit.ts +2 -9
- package/src/core/tools/exa/render.ts +52 -48
- package/src/core/tools/find.ts +10 -8
- package/src/core/tools/grep.ts +45 -17
- package/src/core/tools/ls.ts +22 -2
- package/src/core/tools/lsp/clients/biome-client.ts +207 -0
- package/src/core/tools/lsp/clients/index.ts +49 -0
- package/src/core/tools/lsp/clients/lsp-linter-client.ts +98 -0
- package/src/core/tools/lsp/config.ts +3 -0
- package/src/core/tools/lsp/index.ts +107 -55
- package/src/core/tools/lsp/render.ts +192 -79
- package/src/core/tools/lsp/types.ts +27 -0
- package/src/core/tools/lsp/utils.ts +62 -22
- package/src/core/tools/notebook.ts +9 -1
- package/src/core/tools/output.ts +37 -14
- package/src/core/tools/read.ts +349 -34
- package/src/core/tools/renderers.ts +290 -89
- package/src/core/tools/review.ts +12 -5
- package/src/core/tools/task/agents.ts +5 -5
- package/src/core/tools/task/commands.ts +3 -3
- package/src/core/tools/task/executor.ts +33 -1
- package/src/core/tools/task/index.ts +93 -6
- package/src/core/tools/task/render.ts +147 -66
- package/src/core/tools/task/types.ts +14 -9
- package/src/core/tools/web-fetch.ts +242 -103
- package/src/core/tools/web-search/index.ts +64 -20
- package/src/core/tools/web-search/providers/exa.ts +68 -172
- package/src/core/tools/web-search/render.ts +264 -74
- package/src/core/tools/write.ts +2 -8
- package/src/main.ts +10 -6
- package/src/modes/cleanup.ts +23 -0
- package/src/modes/index.ts +9 -4
- package/src/modes/interactive/components/bash-execution.ts +6 -3
- package/src/modes/interactive/components/branch-summary-message.ts +1 -1
- package/src/modes/interactive/components/compaction-summary-message.ts +1 -1
- package/src/modes/interactive/components/dynamic-border.ts +1 -1
- package/src/modes/interactive/components/extensions/extension-dashboard.ts +4 -5
- package/src/modes/interactive/components/extensions/extension-list.ts +18 -16
- package/src/modes/interactive/components/extensions/inspector-panel.ts +8 -8
- package/src/modes/interactive/components/hook-editor.ts +1 -0
- package/src/modes/interactive/components/hook-message.ts +2 -2
- package/src/modes/interactive/components/hook-selector.ts +1 -1
- package/src/modes/interactive/components/model-selector.ts +22 -9
- package/src/modes/interactive/components/oauth-selector.ts +20 -4
- package/src/modes/interactive/components/plugin-settings.ts +4 -2
- package/src/modes/interactive/components/session-selector.ts +9 -6
- package/src/modes/interactive/components/settings-defs.ts +285 -1
- package/src/modes/interactive/components/settings-selector.ts +176 -3
- package/src/modes/interactive/components/status-line/index.ts +4 -0
- package/src/modes/interactive/components/status-line/presets.ts +94 -0
- package/src/modes/interactive/components/status-line/segments.ts +350 -0
- package/src/modes/interactive/components/status-line/separators.ts +55 -0
- package/src/modes/interactive/components/status-line/types.ts +81 -0
- package/src/modes/interactive/components/status-line-segment-editor.ts +357 -0
- package/src/modes/interactive/components/status-line.ts +172 -223
- package/src/modes/interactive/components/tool-execution.ts +446 -211
- package/src/modes/interactive/components/tree-selector.ts +17 -6
- package/src/modes/interactive/components/ttsr-notification.ts +4 -4
- package/src/modes/interactive/components/welcome.ts +27 -19
- package/src/modes/interactive/interactive-mode.ts +99 -13
- package/src/modes/interactive/theme/dark.json +3 -2
- package/src/modes/interactive/theme/defaults/alabaster.json +99 -0
- package/src/modes/interactive/theme/defaults/amethyst.json +103 -0
- package/src/modes/interactive/theme/defaults/anthracite.json +100 -0
- package/src/modes/interactive/theme/defaults/basalt.json +90 -0
- package/src/modes/interactive/theme/defaults/birch.json +101 -0
- package/src/modes/interactive/theme/defaults/dark-abyss.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-arctic.json +111 -0
- package/src/modes/interactive/theme/defaults/dark-aurora.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-catppuccin.json +106 -0
- package/src/modes/interactive/theme/defaults/dark-cavern.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-copper.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-cosmos.json +96 -0
- package/src/modes/interactive/theme/defaults/dark-cyberpunk.json +109 -0
- package/src/modes/interactive/theme/defaults/dark-dracula.json +105 -0
- package/src/modes/interactive/theme/defaults/dark-eclipse.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-ember.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-equinox.json +96 -0
- package/src/modes/interactive/theme/defaults/dark-forest.json +103 -0
- package/src/modes/interactive/theme/defaults/dark-github.json +112 -0
- package/src/modes/interactive/theme/defaults/dark-gruvbox.json +119 -0
- package/src/modes/interactive/theme/defaults/dark-lavender.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-lunar.json +95 -0
- package/src/modes/interactive/theme/defaults/dark-midnight.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-monochrome.json +101 -0
- package/src/modes/interactive/theme/defaults/dark-monokai.json +105 -0
- package/src/modes/interactive/theme/defaults/dark-nebula.json +96 -0
- package/src/modes/interactive/theme/defaults/dark-nord.json +104 -0
- package/src/modes/interactive/theme/defaults/dark-ocean.json +108 -0
- package/src/modes/interactive/theme/defaults/dark-one.json +107 -0
- package/src/modes/interactive/theme/defaults/dark-rainforest.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-reef.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-retro.json +99 -0
- package/src/modes/interactive/theme/defaults/dark-rose-pine.json +95 -0
- package/src/modes/interactive/theme/defaults/dark-sakura.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-slate.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-solarized.json +96 -0
- package/src/modes/interactive/theme/defaults/dark-solstice.json +96 -0
- package/src/modes/interactive/theme/defaults/dark-starfall.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-sunset.json +106 -0
- package/src/modes/interactive/theme/defaults/dark-swamp.json +96 -0
- package/src/modes/interactive/theme/defaults/dark-synthwave.json +102 -0
- package/src/modes/interactive/theme/defaults/dark-taiga.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-terminal.json +94 -0
- package/src/modes/interactive/theme/defaults/dark-tokyo-night.json +108 -0
- package/src/modes/interactive/theme/defaults/dark-tundra.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-twilight.json +97 -0
- package/src/modes/interactive/theme/defaults/dark-volcanic.json +97 -0
- package/src/modes/interactive/theme/defaults/graphite.json +99 -0
- package/src/modes/interactive/theme/defaults/index.ts +195 -0
- package/src/modes/interactive/theme/defaults/light-arctic.json +106 -0
- package/src/modes/interactive/theme/defaults/light-aurora-day.json +97 -0
- package/src/modes/interactive/theme/defaults/light-canyon.json +97 -0
- package/src/modes/interactive/theme/defaults/light-catppuccin.json +105 -0
- package/src/modes/interactive/theme/defaults/light-cirrus.json +96 -0
- package/src/modes/interactive/theme/defaults/light-coral.json +94 -0
- package/src/modes/interactive/theme/defaults/light-cyberpunk.json +103 -0
- package/src/modes/interactive/theme/defaults/light-dawn.json +96 -0
- package/src/modes/interactive/theme/defaults/light-dunes.json +97 -0
- package/src/modes/interactive/theme/defaults/light-eucalyptus.json +94 -0
- package/src/modes/interactive/theme/defaults/light-forest.json +107 -0
- package/src/modes/interactive/theme/defaults/light-frost.json +94 -0
- package/src/modes/interactive/theme/defaults/light-github.json +114 -0
- package/src/modes/interactive/theme/defaults/light-glacier.json +97 -0
- package/src/modes/interactive/theme/defaults/light-gruvbox.json +115 -0
- package/src/modes/interactive/theme/defaults/light-haze.json +96 -0
- package/src/modes/interactive/theme/defaults/light-honeycomb.json +94 -0
- package/src/modes/interactive/theme/defaults/light-lagoon.json +97 -0
- package/src/modes/interactive/theme/defaults/light-lavender.json +94 -0
- package/src/modes/interactive/theme/defaults/light-meadow.json +97 -0
- package/src/modes/interactive/theme/defaults/light-mint.json +94 -0
- package/src/modes/interactive/theme/defaults/light-monochrome.json +100 -0
- package/src/modes/interactive/theme/defaults/light-ocean.json +106 -0
- package/src/modes/interactive/theme/defaults/light-one.json +105 -0
- package/src/modes/interactive/theme/defaults/light-opal.json +97 -0
- package/src/modes/interactive/theme/defaults/light-orchard.json +97 -0
- package/src/modes/interactive/theme/defaults/light-paper.json +94 -0
- package/src/modes/interactive/theme/defaults/light-prism.json +96 -0
- package/src/modes/interactive/theme/defaults/light-retro.json +105 -0
- package/src/modes/interactive/theme/defaults/light-sand.json +94 -0
- package/src/modes/interactive/theme/defaults/light-savanna.json +97 -0
- package/src/modes/interactive/theme/defaults/light-solarized.json +101 -0
- package/src/modes/interactive/theme/defaults/light-soleil.json +96 -0
- package/src/modes/interactive/theme/defaults/light-sunset.json +106 -0
- package/src/modes/interactive/theme/defaults/light-synthwave.json +105 -0
- package/src/modes/interactive/theme/defaults/light-tokyo-night.json +118 -0
- package/src/modes/interactive/theme/defaults/light-wetland.json +97 -0
- package/src/modes/interactive/theme/defaults/light-zenith.json +95 -0
- package/src/modes/interactive/theme/defaults/limestone.json +100 -0
- package/src/modes/interactive/theme/defaults/mahogany.json +104 -0
- package/src/modes/interactive/theme/defaults/marble.json +99 -0
- package/src/modes/interactive/theme/defaults/obsidian.json +90 -0
- package/src/modes/interactive/theme/defaults/onyx.json +90 -0
- package/src/modes/interactive/theme/defaults/pearl.json +99 -0
- package/src/modes/interactive/theme/defaults/porcelain.json +90 -0
- package/src/modes/interactive/theme/defaults/quartz.json +102 -0
- package/src/modes/interactive/theme/defaults/sandstone.json +101 -0
- package/src/modes/interactive/theme/defaults/titanium.json +89 -0
- package/src/modes/interactive/theme/light.json +3 -2
- package/src/modes/interactive/theme/theme-schema.json +120 -4
- package/src/modes/interactive/theme/theme.ts +1228 -14
- package/src/prompts/branch-summary-preamble.md +3 -0
- package/src/prompts/branch-summary.md +28 -0
- package/src/prompts/compaction-summary.md +34 -0
- package/src/prompts/compaction-turn-prefix.md +16 -0
- package/src/prompts/compaction-update-summary.md +41 -0
- package/src/prompts/init.md +30 -0
- package/src/{core/tools/task/bundled-agents → prompts}/reviewer.md +6 -0
- package/src/prompts/summarization-system.md +3 -0
- package/src/prompts/system-prompt.md +27 -0
- package/src/{core/tools/task/bundled-agents → prompts}/task.md +2 -0
- package/src/prompts/title-system.md +8 -0
- package/src/prompts/tools/ask.md +24 -0
- package/src/prompts/tools/bash.md +23 -0
- package/src/prompts/tools/edit.md +9 -0
- package/src/prompts/tools/find.md +6 -0
- package/src/prompts/tools/grep.md +12 -0
- package/src/prompts/tools/lsp.md +14 -0
- package/src/prompts/tools/output.md +23 -0
- package/src/prompts/tools/read.md +25 -0
- package/src/prompts/tools/web-fetch.md +8 -0
- package/src/prompts/tools/web-search.md +10 -0
- package/src/prompts/tools/write.md +10 -0
- package/src/commands/init.md +0 -20
- /package/src/{core/tools/task/bundled-commands → prompts}/architect-plan.md +0 -0
- /package/src/{core/tools/task/bundled-agents → prompts}/browser.md +0 -0
- /package/src/{core/tools/task/bundled-agents → prompts}/explore.md +0 -0
- /package/src/{core/tools/task/bundled-commands → prompts}/implement-with-critic.md +0 -0
- /package/src/{core/tools/task/bundled-commands → prompts}/implement.md +0 -0
- /package/src/{core/tools/task/bundled-agents → prompts}/plan.md +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Create a structured summary of this conversation branch for context when returning later.
|
|
2
|
+
|
|
3
|
+
Use this EXACT format:
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
[What was the user trying to accomplish in this branch?]
|
|
7
|
+
|
|
8
|
+
## Constraints & Preferences
|
|
9
|
+
- [Any constraints, preferences, or requirements mentioned]
|
|
10
|
+
- [Or "(none)" if none were mentioned]
|
|
11
|
+
|
|
12
|
+
## Progress
|
|
13
|
+
### Done
|
|
14
|
+
- [x] [Completed tasks/changes]
|
|
15
|
+
|
|
16
|
+
### In Progress
|
|
17
|
+
- [ ] [Work that was started but not finished]
|
|
18
|
+
|
|
19
|
+
### Blocked
|
|
20
|
+
- [Issues preventing progress, if any]
|
|
21
|
+
|
|
22
|
+
## Key Decisions
|
|
23
|
+
- **[Decision]**: [Brief rationale]
|
|
24
|
+
|
|
25
|
+
## Next Steps
|
|
26
|
+
1. [What should happen next to continue this work]
|
|
27
|
+
|
|
28
|
+
Keep each section concise. Preserve exact file paths, function names, and error messages.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
The messages above are a conversation to summarize. Create a structured context checkpoint handoff summary that another LLM will use to resume the task.
|
|
2
|
+
|
|
3
|
+
Use this EXACT format:
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
[What is the user trying to accomplish? Can be multiple items if the session covers different tasks.]
|
|
7
|
+
|
|
8
|
+
## Constraints & Preferences
|
|
9
|
+
- [Any constraints, preferences, or requirements mentioned by user]
|
|
10
|
+
- [Or "(none)" if none were mentioned]
|
|
11
|
+
|
|
12
|
+
## Progress
|
|
13
|
+
### Done
|
|
14
|
+
- [x] [Completed tasks/changes]
|
|
15
|
+
|
|
16
|
+
### In Progress
|
|
17
|
+
- [ ] [Current work]
|
|
18
|
+
|
|
19
|
+
### Blocked
|
|
20
|
+
- [Issues preventing progress, if any]
|
|
21
|
+
|
|
22
|
+
## Key Decisions
|
|
23
|
+
- **[Decision]**: [Brief rationale]
|
|
24
|
+
|
|
25
|
+
## Next Steps
|
|
26
|
+
1. [Ordered list of what should happen next]
|
|
27
|
+
|
|
28
|
+
## Critical Context
|
|
29
|
+
- [Any data, examples, or references needed to continue]
|
|
30
|
+
- [Or "(none)" if not applicable]
|
|
31
|
+
|
|
32
|
+
Output only the structured summary. No extra text.
|
|
33
|
+
|
|
34
|
+
Keep each section concise. Preserve exact file paths, function names, error messages, and relevant tool outputs or command results. Include repository state changes (branch, uncommitted changes) if mentioned.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
This is the PREFIX of a turn that was too large to keep. The SUFFIX (recent work) is retained.
|
|
2
|
+
|
|
3
|
+
Summarize the prefix to provide context for the retained suffix:
|
|
4
|
+
|
|
5
|
+
## Original Request
|
|
6
|
+
[What did the user ask for in this turn?]
|
|
7
|
+
|
|
8
|
+
## Early Progress
|
|
9
|
+
- [Key decisions and work done in the prefix]
|
|
10
|
+
|
|
11
|
+
## Context for Suffix
|
|
12
|
+
- [Information needed to understand the retained recent work]
|
|
13
|
+
|
|
14
|
+
Output only the structured summary. No extra text.
|
|
15
|
+
|
|
16
|
+
Be concise. Preserve exact file paths, function names, error messages, and relevant tool outputs or command results if they appear. Focus on what's needed to understand the kept suffix.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
The messages above are NEW conversation messages to incorporate into the existing summary provided in <previous-summary> tags.
|
|
2
|
+
Update the structured handoff summary that another LLM will use to resume the task.
|
|
3
|
+
|
|
4
|
+
Update the existing structured summary with new information. RULES:
|
|
5
|
+
- PRESERVE all existing information from the previous summary
|
|
6
|
+
- ADD new progress, decisions, and context from the new messages
|
|
7
|
+
- UPDATE the Progress section: move items from "In Progress" to "Done" when completed
|
|
8
|
+
- UPDATE "Next Steps" based on what was accomplished
|
|
9
|
+
- PRESERVE exact file paths, function names, and error messages
|
|
10
|
+
- If something is no longer relevant, you may remove it
|
|
11
|
+
|
|
12
|
+
Use this EXACT format:
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
[Preserve existing goals, add new ones if the task expanded]
|
|
16
|
+
|
|
17
|
+
## Constraints & Preferences
|
|
18
|
+
- [Preserve existing, add new ones discovered]
|
|
19
|
+
|
|
20
|
+
## Progress
|
|
21
|
+
### Done
|
|
22
|
+
- [x] [Include previously done items AND newly completed items]
|
|
23
|
+
|
|
24
|
+
### In Progress
|
|
25
|
+
- [ ] [Current work - update based on progress]
|
|
26
|
+
|
|
27
|
+
### Blocked
|
|
28
|
+
- [Current blockers - remove if resolved]
|
|
29
|
+
|
|
30
|
+
## Key Decisions
|
|
31
|
+
- **[Decision]**: [Brief rationale] (preserve all previous, add new)
|
|
32
|
+
|
|
33
|
+
## Next Steps
|
|
34
|
+
1. [Update based on current state]
|
|
35
|
+
|
|
36
|
+
## Critical Context
|
|
37
|
+
- [Preserve important context, add new if needed]
|
|
38
|
+
|
|
39
|
+
Output only the structured summary. No extra text.
|
|
40
|
+
|
|
41
|
+
Keep each section concise. Preserve exact file paths, function names, error messages, and relevant tool outputs or command results. Include repository state changes (branch, uncommitted changes) if mentioned.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init
|
|
3
|
+
description: Generate AGENTS.md documentation for the current codebase
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Analyze this codebase and generate an AGENTS.md file that documents:
|
|
7
|
+
|
|
8
|
+
1. **Project Overview**: Brief description of what this project does
|
|
9
|
+
2. **Architecture & Data Flow**: High-level structure, key modules, how data moves through the system
|
|
10
|
+
3. **Key Directories**: Main source directories and their purposes
|
|
11
|
+
4. **Development Commands**: How to build, test, lint, and run locally
|
|
12
|
+
5. **Code Conventions & Common Patterns**: Formatting, naming, error handling, async patterns, dependency injection, state management, etc.
|
|
13
|
+
6. **Important Files**: Entry points, config files, key modules
|
|
14
|
+
7. **Runtime/Tooling Preferences**: Required runtime (for example, Bun vs Node), package manager, tooling constraints
|
|
15
|
+
8. **Testing & QA**: Test frameworks, how to run tests, any coverage expectations
|
|
16
|
+
|
|
17
|
+
Parallel exploration requirement:
|
|
18
|
+
- Launch multiple `explore` agents in parallel (via the `task` tool) to scan different areas (e.g., core src, tests, configs/build, scripts/docs), then synthesize results.
|
|
19
|
+
|
|
20
|
+
Guidelines:
|
|
21
|
+
- Title the document "Repository Guidelines"
|
|
22
|
+
- Use Markdown headings (#, ##, etc.) for structure
|
|
23
|
+
- Be concise and practical
|
|
24
|
+
- Focus on what an AI assistant needs to know to help with this codebase
|
|
25
|
+
- Include examples where helpful (commands, directory paths, naming patterns)
|
|
26
|
+
- Include file paths where relevant
|
|
27
|
+
- Call out architectural structure and common code patterns explicitly
|
|
28
|
+
- Don't include information that's obvious from the code structure
|
|
29
|
+
|
|
30
|
+
After analysis, write the AGENTS.md file to the project root.
|
|
@@ -56,6 +56,8 @@ Only flag issues where ALL of these apply:
|
|
|
56
56
|
6. Tone: matter-of-fact, not accusatory or overly positive
|
|
57
57
|
7. Write so the author can immediately grasp the idea without close reading
|
|
58
58
|
8. Avoid flattery and phrases like "Great job...", "Thanks for..."
|
|
59
|
+
9. Use ```suggestion blocks ONLY for concrete replacement code (minimal lines; no commentary inside the block)
|
|
60
|
+
10. In every ```suggestion block, preserve the exact leading whitespace of the replaced lines (spaces vs tabs, number of spaces)
|
|
59
61
|
|
|
60
62
|
# CRITICAL
|
|
61
63
|
|
|
@@ -66,10 +68,14 @@ Failure to call `submit_review` means the review was not submitted.
|
|
|
66
68
|
# Output
|
|
67
69
|
|
|
68
70
|
- Use `report_finding` for each issue. Continue until you've listed every qualifying finding.
|
|
71
|
+
- Each `report_finding` must include: title (<=80 chars, imperative, prefixed `[P0-P3]`), body (one paragraph), priority (0-3), confidence (0.0-1.0), absolute `file_path`, and `line_start`/`line_end` with a range <=10 lines.
|
|
69
72
|
- If there is no finding that a person would definitely want to fix, prefer outputting no findings.
|
|
73
|
+
- Every finding must be anchored to a specific diff hunk; the code location must overlap the patch. If you cannot anchor it to the patch, do not report it.
|
|
70
74
|
- Ignore trivial style unless it obscures meaning or violates documented standards.
|
|
71
75
|
- Use `submit_review` at the end with your overall verdict:
|
|
72
76
|
- **correct**: Existing code and tests will not break, patch is free of bugs and blocking issues
|
|
73
77
|
- **incorrect**: Has bugs or blocking issues that must be addressed
|
|
74
78
|
|
|
75
79
|
Ignore non-blocking issues (style, formatting, typos, documentation, nits) when determining correctness.
|
|
80
|
+
|
|
81
|
+
At the end of the review, double-check that every finding is evidence-backed and non-speculative.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
Do NOT continue the conversation. Do NOT respond to any questions in the conversation. ONLY output the structured summary.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
You are an expert coding assistant. You help users with coding tasks by reading files, executing commands, editing code, and writing new files.
|
|
2
|
+
|
|
3
|
+
Available tools:
|
|
4
|
+
{{toolsList}}
|
|
5
|
+
{{antiBashSection}}Guidelines:
|
|
6
|
+
{{guidelines}}
|
|
7
|
+
|
|
8
|
+
Core behavior:
|
|
9
|
+
- Keep going until the task is fully resolved; do not stop early.
|
|
10
|
+
- Verify with tools; ask for clarification when required.
|
|
11
|
+
- Before tool calls, send a brief preamble describing the next action.
|
|
12
|
+
- Provide short progress updates for long tasks; give a brief heads-up before writing large changes.
|
|
13
|
+
- Follow AGENTS.md instructions by scope: nearest file applies, deeper files override higher-level ones.
|
|
14
|
+
- If update_plan is available, use it for non-trivial multi-step work and keep it updated; skip planning for simple tasks.
|
|
15
|
+
- If a command fails due to sandboxing or needs elevated access, request approval and rerun.
|
|
16
|
+
- Follow project validation/testing guidance; if checks are not run, suggest them in next steps.
|
|
17
|
+
- Resolve blockers before yielding; do not guess.
|
|
18
|
+
- Use concise, scannable responses; include file paths in backticks; use short bullets for multi-item lists; avoid dumping large files.
|
|
19
|
+
|
|
20
|
+
Documentation:
|
|
21
|
+
- Main documentation: {{readmePath}}
|
|
22
|
+
- Additional docs: {{docsPath}}
|
|
23
|
+
- Examples: {{examplesPath}} (hooks, custom tools, SDK)
|
|
24
|
+
- When asked to create: custom models/providers (README.md), hooks (docs/hooks.md, examples/hooks/), custom tools (docs/custom-tools.md, docs/tui.md, examples/custom-tools/), themes (docs/theme.md), skills (docs/skills.md)
|
|
25
|
+
- Always read the doc, examples, AND follow .md cross-references before implementing
|
|
26
|
+
|
|
27
|
+
Final reminder: Complete the full user request before ending your turn.
|
|
@@ -18,6 +18,8 @@ Your strengths:
|
|
|
18
18
|
|
|
19
19
|
Guidelines:
|
|
20
20
|
|
|
21
|
+
- Persist until the task is fully resolved end-to-end when feasible.
|
|
22
|
+
- Verify with tools; ask for clarification when required.
|
|
21
23
|
- For file searches: Use grep/glob when you need to search broadly. Use read when you know the specific file path.
|
|
22
24
|
- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
|
|
23
25
|
- Be thorough: Check multiple locations, consider different naming conventions, look for related files.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Generate a very short title (3-6 words) for a coding session based on the user's first message. The title should capture the main task or topic. Output ONLY the title, nothing else. No quotes, no punctuation at the end.
|
|
2
|
+
|
|
3
|
+
Examples:
|
|
4
|
+
- "Fix TypeScript compilation errors"
|
|
5
|
+
- "Add user authentication"
|
|
6
|
+
- "Refactor database queries"
|
|
7
|
+
- "Debug payment webhook"
|
|
8
|
+
- "Update React components"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Ask the user a question when you need clarification or input during task execution.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
Use this tool to:
|
|
6
|
+
- Clarify ambiguous requirements before implementing
|
|
7
|
+
- Get decisions on implementation approach when multiple valid options exist
|
|
8
|
+
- Request user preferences (styling, naming conventions, architecture patterns)
|
|
9
|
+
- Offer meaningful choices about task direction
|
|
10
|
+
|
|
11
|
+
Do NOT use for:
|
|
12
|
+
- Questions resolvable by reading files or docs
|
|
13
|
+
- Permission for normal dev tasks (just proceed)
|
|
14
|
+
- Decisions you should make from codebase context
|
|
15
|
+
|
|
16
|
+
Tips:
|
|
17
|
+
- Place recommended option first with " (Recommended)" suffix
|
|
18
|
+
- 2-5 concise, distinct options
|
|
19
|
+
- Users can always select "Other" for custom input
|
|
20
|
+
|
|
21
|
+
<example>
|
|
22
|
+
question: "Which authentication method should this API use?"
|
|
23
|
+
options: [{"label": "JWT (Recommended)"}, {"label": "OAuth2"}, {"label": "Session cookies"}]
|
|
24
|
+
</example>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Executes a given bash command in a shell session with optional timeout.
|
|
2
|
+
This tool is for terminal operations like git, bun, cargo, python, etc. DO NOT use it for file operations.
|
|
3
|
+
|
|
4
|
+
<system_reminder>
|
|
5
|
+
**IMPORTANT**
|
|
6
|
+
Do NOT use Bash for:
|
|
7
|
+
- Reading file contents → Use Read tool instead
|
|
8
|
+
- Searching file contents → Use Grep tool instead
|
|
9
|
+
- Finding files by pattern → Use Glob tool instead
|
|
10
|
+
- Editing files → Use Edit tool instead
|
|
11
|
+
- Writing new files → Use Write tool instead
|
|
12
|
+
</system_reminder>
|
|
13
|
+
|
|
14
|
+
## Command structure
|
|
15
|
+
|
|
16
|
+
- Paths with spaces must use double quotes: `cd "/path/with spaces"`
|
|
17
|
+
- For sequential dependent operations, chain with `&&`: `mkdir foo && cd foo && touch bar`
|
|
18
|
+
- For parallel independent operations, make multiple tool calls in one message
|
|
19
|
+
- Use `;` only when later commands should run regardless of earlier failures
|
|
20
|
+
|
|
21
|
+
Output:
|
|
22
|
+
- Truncated after 50KB; filter with `| head -n 50` for large output
|
|
23
|
+
- Exit codes and stderr captured
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Performs string replacements in files with fuzzy whitespace matching.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
- You must use your read tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.
|
|
5
|
+
- Fuzzy matching handles minor whitespace/indentation differences automatically - you don't need to match indentation exactly.
|
|
6
|
+
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
7
|
+
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
8
|
+
- The edit will FAIL if old_string is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use replace_all to change every instance of old_string.
|
|
9
|
+
- Use replace_all for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
- Fast file pattern matching tool that works with any codebase size
|
|
2
|
+
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
3
|
+
- Returns matching file paths sorted by modification time
|
|
4
|
+
- Use this tool when you need to find files by name patterns
|
|
5
|
+
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
|
|
6
|
+
- You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
A powerful search tool built on ripgrep
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
- ALWAYS use Grep for search tasks. NEVER invoke `grep` or `rg` as a Bash command. The Grep tool has been optimized for correct permissions and access.
|
|
5
|
+
- Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
|
|
6
|
+
- Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
|
|
7
|
+
- Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
|
|
8
|
+
- Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use `interface\\{\\}` to find `interface{}` in Go code)
|
|
9
|
+
- Multiline matching: By default patterns match within single lines only. For cross-line patterns like `struct \\{[\\s\\S]*?field`, use `multiline: true`
|
|
10
|
+
|
|
11
|
+
Important:
|
|
12
|
+
- ALWAYS Use Task tool with explore subagent over this for open-ended searches requiring multiple rounds
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Interact with Language Server Protocol (LSP) servers to get code intelligence features.
|
|
2
|
+
|
|
3
|
+
Standard operations:
|
|
4
|
+
- diagnostics: Get errors/warnings for a file
|
|
5
|
+
- workspace_diagnostics: Check entire project for errors (uses tsc, cargo check, go build, etc.)
|
|
6
|
+
- definition: Go to symbol definition
|
|
7
|
+
- references: Find all references to a symbol
|
|
8
|
+
- hover: Get type info and documentation
|
|
9
|
+
- symbols: List symbols in a file (functions, classes, etc.)
|
|
10
|
+
- workspace_symbols: Search for symbols across the project
|
|
11
|
+
- rename: Rename a symbol across the codebase
|
|
12
|
+
- actions: List and apply code actions (quick fixes, refactors)
|
|
13
|
+
- incoming_calls: Find all callers of a function
|
|
14
|
+
- outgoing_calls: Find all functions called by a function
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# TaskOutput
|
|
2
|
+
|
|
3
|
+
Retrieves complete output from background tasks spawned with the Task tool.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use TaskOutput when:
|
|
8
|
+
- Task tool returns truncated preview with "Output truncated" message
|
|
9
|
+
- You need full output to debug errors or analyze detailed results
|
|
10
|
+
- Task tool's summary shows substantial line/character counts but preview is incomplete
|
|
11
|
+
- You're analyzing multi-step task output requiring full context
|
|
12
|
+
|
|
13
|
+
Do NOT use when:
|
|
14
|
+
- Task preview already shows complete output (no truncation indicator)
|
|
15
|
+
- Summary alone answers your question
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
- `ids`: Array of output IDs from Task results (e.g., `["reviewer_0", "explore_1"]`)
|
|
20
|
+
- `format` (optional):
|
|
21
|
+
- `"raw"` (default): Full output with ANSI codes preserved
|
|
22
|
+
- `"json"`: Structured object with metadata
|
|
23
|
+
- `"stripped"`: Plain text with ANSI codes removed for parsing
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Reads a file from the local filesystem. You can access any file directly by using this tool.
|
|
2
|
+
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
- By default, it reads up to {{DEFAULT_MAX_LINES}} lines starting from the beginning of the file
|
|
6
|
+
- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters
|
|
7
|
+
- Any lines longer than 500 characters will be truncated
|
|
8
|
+
- Results are returned using cat -n format, with line numbers starting at 1
|
|
9
|
+
- This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.
|
|
10
|
+
- This tool can read PDF files (.pdf). PDFs are processed page by page, extracting both text and visual content for analysis.
|
|
11
|
+
- This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
|
|
12
|
+
- This tool can only read files, not directories. To read a directory, use an ls command via the bash tool.
|
|
13
|
+
- You can call multiple tools in a single response. It is always better to speculatively read multiple potentially useful files in parallel.
|
|
14
|
+
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
|
|
15
|
+
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.
|
|
16
|
+
|
|
17
|
+
Empty files trigger a warning. Directory paths return an ls-style listing. Missing files return an error with closest matches (gitignore respected).
|
|
18
|
+
|
|
19
|
+
## Best Practices
|
|
20
|
+
|
|
21
|
+
- Parallelize reads when exploring related files
|
|
22
|
+
- Read before editing (required in current session)
|
|
23
|
+
- Trust user-provided paths; attempt the read
|
|
24
|
+
- Screenshots: Read tool renders images visually
|
|
25
|
+
- Skip re-reading after edits (Edit/Write report errors)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Fetches and analyzes web content by retrieving a URL
|
|
2
|
+
|
|
3
|
+
Use this tool when you need to:
|
|
4
|
+
- Extract specific information from web pages (documentation, articles, API references)
|
|
5
|
+
- Analyze GitHub issues, pull requests, or repository content
|
|
6
|
+
- Retrieve information from Stack Overflow, Wikipedia, Reddit, NPM, arXiv, or technical blogs
|
|
7
|
+
- Access RSS/Atom feeds or JSON endpoints
|
|
8
|
+
- Read PDF or DOCX files hosted at a URL
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Allows OMP to search the web and use the results to inform responses
|
|
2
|
+
- Provides up-to-date information for current events and recent data
|
|
3
|
+
- Returns search result information formatted as search result blocks, including links as markdown hyperlinks
|
|
4
|
+
- Use this tool for accessing information beyond Claude's knowledge cutoff
|
|
5
|
+
- Searches are performed automatically within a single API call
|
|
6
|
+
|
|
7
|
+
Common: system_prompt (guides response style)
|
|
8
|
+
Anthropic-specific: max_tokens
|
|
9
|
+
Perplexity-specific: model (sonar/sonar-pro), search_recency_filter, search_domain_filter, search_context_size, return_related_questions
|
|
10
|
+
Exa-specific: num_results
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Creates or overwrites a file at the specified path.
|
|
2
|
+
|
|
3
|
+
When to use:
|
|
4
|
+
- Creating new files explicitly required by the task
|
|
5
|
+
- Replacing entire file contents when editing would be more complex
|
|
6
|
+
|
|
7
|
+
Critical requirements:
|
|
8
|
+
- Prefer Edit tool for modifying existing files (more precise, preserves formatting)
|
|
9
|
+
- Create documentation files (*.md, README) only when explicitly requested
|
|
10
|
+
- Include emojis only when explicitly requested
|
package/src/commands/init.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: init
|
|
3
|
-
description: Generate AGENTS.md documentation for the current codebase
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Analyze this codebase and generate an AGENTS.md file that documents:
|
|
7
|
-
|
|
8
|
-
1. **Project Overview**: Brief description of what this project does
|
|
9
|
-
2. **Key Directories**: Main source directories and their purposes
|
|
10
|
-
3. **Development Commands**: How to build, test, lint the project
|
|
11
|
-
4. **Code Conventions**: Formatting, naming, patterns used
|
|
12
|
-
5. **Important Files**: Entry points, config files, key modules
|
|
13
|
-
|
|
14
|
-
Guidelines:
|
|
15
|
-
- Be concise and practical
|
|
16
|
-
- Focus on what an AI assistant needs to know to help with this codebase
|
|
17
|
-
- Include file paths where relevant
|
|
18
|
-
- Don't include information that's obvious from the code structure
|
|
19
|
-
|
|
20
|
-
After analysis, write the AGENTS.md file to the project root.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|