Commit Graph
55 Commits
Author SHA1 Message Date
can1357 2e20d87151 feat(coding-agent): simplified skill management by removing per-task pinning
- Removed per-task skill pinning feature; subagents now inherit session skill set instead of per-task selection.
- Removed `preloadedSkills` option from `CreateAgentSessionOptions` interface and related system prompt plumbing.
- Removed `skills` field from Task schema; task execution now passes available session skills directly to subagents.
- Simplified task execution pipeline by removing skill resolution logic and preloaded skills handling from system prompt templates.
2026-02-26 20:47:54 +01:00
can1357 1c8b3f8cb3 Merge PR #155 and fix isolation merge regressions 2026-02-26 08:53:25 +01:00
can1357 8a3699bff4 refactor(prompts): harmonized prompt templates and bolded keywords
- Standardized prompt structures, replacing custom XML-like tags with Markdown.
- Implemented automatic bolding for RFC 2119 keywords (e.g., MUST, SHOULD) in prompt content.
- Simplified environment information provided to agents, removing desktop environment details.
- Updated image generation tool parameters for improved clarity and capacity.
2026-02-23 21:19:26 +01:00
DeprecatedLuke 86cd66b3d5 feat(task): add fuse-overlay isolation backend 2026-02-23 19:17:40 +00:00
can1357 5696e9799a chore: renamed job polling tool to await
- Renamed `poll_jobs` tool to `await` for clarity.
- Updated all related files, prompts, and type definitions.
2026-02-23 01:44:03 +01:00
can1357 c5dafa28f5 docs(prompts): clarified task tool and system prompt documentation structure
- Restructured task tool documentation for clarity, moving parameter definitions into a dedicated section and consolidating guidance on context, assignments, and parallelization.
- Reformatted system prompt template to use markdown headings instead of XML tags for skills, preloaded skills, and rules sections.
2026-02-23 01:40:44 +01:00
can1357andCan Bölük ac76b6623e perf: accepting #142 with changes 2026-02-23 01:18:24 +01:00
can1357 0e1a4ef15a feat: strict mode + simplified hashline edit operations
- Consolidated `replace` operations and removed `insert`.
- Improved line hash collision resistance for symbol-only text.
2026-02-22 23:45:01 +01:00
can1357 399202b8d2 refactor(patch): antigravity friendly schema 2026-02-22 19:56:58 +01:00
can1357 cd5c9655aa refactor: renamed notes protocol to local
- Renamed the `notes://` protocol to `local://` for better clarity.
- Updated all internal references, prompts, and tool documentation.
- Migrated plan storage paths to use the new `local://` scheme.
2026-02-22 18:05:22 +01:00
can1357 563d6a0ab9 feat(coding-agent): introduced notes:// protocol for session-scoped artifact storage
- Replaced plan:// protocol with notes:// for session-scoped artifact storage and plan finalization.
- Added title parameter to exit_plan_mode tool to enable plan file renaming during approval workflow.
- Implemented NotesProtocolHandler for notes:// URL scheme with path traversal protection and session fallback.
- Added renameApprovedPlanFile function to handle plan artifact finalization with validation and error handling.
- Updated system prompt documentation to reference notes:// protocol and internal URL schemes for artifact access.
2026-02-22 17:41:01 +01:00
can1357 8276390877 refactor(coding-agent): standardized XML tags and RFC 2119 keywords across prompts
- Standardized XML tag naming from snake_case to kebab-case across 50+ prompt files for consistency.
- Replaced imperative language with RFC 2119 keywords (MUST/SHOULD/MAY/MUST NOT) throughout system and tool prompts for clarity.
- Removed artifactsDir parameter from Python executor and simplified environment variable handling to use PI_SESSION_FILE only.
- Renamed read_path.md to read-path.md and updated memory guidance with hierarchy rules and conflict resolution workflow.
- Added noEscape option to bash URL expansion and extracted cwd parameter from leading cd commands for improved path handling.
- Exported NO_PAGER_ENV constant from bash-interactive module for centralized environment variable management.
2026-02-22 17:12:27 +01:00
can1357 61ed0fd5aa feat(coding-agent): added poll_jobs tool and task concurrency control for parallel execution
- Added poll_jobs tool for blocking until background jobs complete without manual polling loops.
- Added task.maxConcurrency setting to limit concurrent subagent task execution with semaphore-based control.
- Enhanced task progress tracking to report per-task status with individual timing and token metrics.
- Improved parallel task execution to schedule multiple background jobs independently for true concurrent execution.
- Updated bash and task tool documentation to recommend poll_jobs instead of polling read jobs:// in loops.
2026-02-22 15:23:07 +01:00
can1357 476b858b3a feat(coding-agent): added async background job execution with configurable concurrency limits
- Added async background job execution for bash and task tools with configurable concurrency limits and automatic result delivery.
- Added cancel_job tool and /jobs slash command to manage and inspect running background jobs with status display.
- Added jobs:// internal protocol handler for querying job status and retrieving job execution details.
- Added async.enabled and async.maxJobs settings to control background job execution behavior.
- Enhanced status line to display count of running background jobs with visual indicator.
- Implemented AsyncJobManager with exponential backoff retry delivery, job lifecycle tracking, and automatic eviction.

Fixes #56.
2026-02-22 12:44:57 +01:00
can1357 acf8ab5225 style: stylistic changes 2026-02-10 07:39:39 +01:00
can1357 9186ae78c3 docs(coding-agent/prompts): clarified subagent context inheritance to reduce redundant documentation
- Clarified that subagents automatically inherit full system prompt including AGENTS.md, context files, and skills -- do not repeat project rules or conventions in task context.
- Updated task context guidance to focus on session-specific information subagents lack, eliminating redundant documentation of project constraints already available to them.
- Refined constraints template to emphasize task-specific rules and session decisions rather than global project conventions.
- Expanded anti-patterns section to explicitly flag redundant context that wastes tokens by repeating AGENTS.md rules, project constraints, and tool preferences.
2026-02-10 03:21:26 +01:00
can1357 97628bfe0f fix(coding-agent): fixed todo carryover in session initialization and formatting
- Fixed `newSession()` to properly await session manager operations for full initialization.
- Changed session formatting to use XML structure instead of YAML for tools and tool invocations.
- Added formatArgsAsXml() helper function to serialize objects as XML parameter elements.
- Removed trailing whitespace from task.md prompt file.
- Added regression test for AgentSession.newSession() to verify proper session switching and artifact isolation.
2026-02-06 07:10:06 +01:00
can1357 a5db81b90b fix(coding-agent/task): fixed task executor to handle null data in submit_result and added schema mismatch warnings
- Fixed task executor to properly handle agents calling `submit_result` with null data by treating it as missing and attempting to extract output from conversation text rather than silently failing.
- Added documentation caution in task.md about schema vs agent mismatch causing null output, with guidance on using `schema` parameter to override built-in schemas.
- Added warning message when subagent calls submit_result with null data to help diagnose schema mismatch issues.
2026-02-06 02:14:53 +01:00
can1357 71f3acb6dc feat(coding-agent/task): added task isolation setting and dynamic schema configuration for isolated worktrees
- Added task isolation setting to enable running subagents in isolated git worktrees.
- Made task schema dynamically include isolated parameter only when isolation is enabled.
- Added validation to reject isolated parameter when task isolation is disabled.
- Updated task tool to conditionally render isolation documentation based on feature flag.
- Refactored task schema into factory function to support dynamic isolation configuration.
2026-02-05 08:00:08 +01:00
can1357 39634776a7 feat(coding-agent): refactored task API to use 'assignment' field and structured context separation
- Refactored task API to use 'assignment' field instead of 'args' for per-task instructions, enabling clearer separation between shared context and task-specific work.
- Introduced structured context/assignment separation pattern with '<swarm_context>' wrapper for template rendering, replacing placeholder-based substitution.
- Changed agent frontmatter field from 'thinkingLevel' to 'thinking-level' (kebab-case) for consistency with YAML conventions.
- Removed 'context' parameter from ExecutorOptions as context is now prepended at template level rather than executor level.
- Removed 'args' field from AgentProgress and SingleResult interfaces, simplifying task result tracking.
- Updated task rendering to display full task text instead of formatted args, improving clarity in progress output.
2026-02-05 07:43:53 +01:00
can1357 b9938ada49 refactor(brush-core-vendored): fixed PATHEXT handling for Windows executable discovery
- Refactored ExecutablePathSearch to remove generic type parameter N and use pre-computed filename candidates instead of single filename.
- Extracted platform-specific candidate_filenames() functions to generate executable filename variants on Windows and Unix-like systems.
- Replaced manual PATH string splitting with std::env::split_paths() for cross-platform path parsing.
- Simplified find_in_path() method to delegate to pathsearch::search_for_executable() instead of custom path searching logic.
- Implemented executable_extensions() function with lazy initialization to parse PATHEXT environment variable on Windows.
- Enhanced executable() method to validate file extensions against known executable extensions instead of returning hardcoded true.
2026-02-04 10:37:51 +01:00
can1357 23290b704b docs(coding-agent/prompts): updated task tool guidance to enforce small, well-defined scope
- Updated task tool guidance to enforce small, well-defined task scope with maximum 3-5 files per task to prevent timeouts and improve parallel execution.
- Added critical section with task granularity requirements, red flags for overly broad tasks, and examples of bad vs. good task definitions.
2026-02-04 09:51:39 +01:00
can1357 877f4aead7 style(coding-agent/prompts): condensed prompt documentation for improved clarity and conciseness
- Condensed prompt documentation throughout by removing articles, auxiliary verbs, and redundant explanations for improved clarity and conciseness.
- Simplified system prompts by replacing multi-line explanations with terse, semicolon-separated fragments and removing verbose motivational language.
- Reformatted tool documentation to use abbreviated language, removing 'the', 'a', and 'is' throughout for more direct technical writing.
- Removed blank lines and consolidated spacing in prompt files to reduce vertical whitespace and improve document density.
2026-02-02 14:29:21 +01:00
can1357 f494d2a68a docs(coding-agent/prompts): improved prompt formatting and removed redundant instructions
- Removed redundant instruction about preferring delegation in coordinator prompt.
- Improved task context template formatting with consistent markdown code fence markers.
- Removed dependencies section from task template constraints as it was redundant.
- Enhanced readability of task examples with better spacing and formatting.
2026-02-01 04:57:57 +01:00
can1357 b5e96526e3 feat: added native find module and made grep/html/image/text async with camelCase naming
- Added native find module for high-performance filesystem discovery with glob pattern matching and .gitignore support.
- Made grep, html, image, and text native functions asynchronous to prevent blocking the event loop.
- Updated native function names to use camelCase convention for JavaScript interoperability.
- Extended grep and text functions to accept Uint8Array/Buffer input for zero-copy operations.
- Delegated file discovery logic from JavaScript to native Rust implementation for improved performance.
2026-02-01 03:10:24 +01:00
can1357 eabbde0c8a feat(natives): migrated native bindings from WASM to Node.js N-API with ripgrep-backed grep module
- Migrated native bindings from WebAssembly (wasm-bindgen) to Node.js N-API architecture for improved performance and platform support.
- Replaced worker pool-based async architecture with synchronous native addon calls, eliminating thread overhead and simplifying the API.
- Added new grep module with ripgrep-backed filesystem search supporting parallel processing, glob filtering, and context line extraction.
- Updated build system to compile Rust crates to platform-specific .node binaries instead of WASM modules.
- Removed WASI implementation and worker pool infrastructure no longer needed with N-API native bindings.
- Updated CI/CD pipeline to build native addons for multiple platforms (Linux x64/arm64, macOS x64/arm64, Windows x64) and include them in releases.
2026-01-31 18:02:56 +01:00
can1357 e67e02947f docs(coding-agent/prompts): added phased execution guidance for migrations and refactors with WASM to N-API example
- Added phased execution guidance for migrations and refactors to prevent parallel work on dependent layers.
- Added example demonstrating phased execution pattern for porting WASM to N-API with sequential foundation, parallel implementation, integration, and dependent layer phases.
2026-01-31 15:45:00 +01:00
can1357 735f808353 docs(coding-agent/prompts): updated task tool docs to clarify parent context access via searchable file
- Updated task tool documentation to clarify that subagents can access parent conversation context via a searchable file, reducing need to repeat information in context parameter.
- Revised critical instruction section to guide users toward leveraging searchable parent context file instead of requiring self-contained context.
2026-01-31 10:31:53 +01:00
can1357 331a9d5a28 docs(coding-agent/prompts): clarified delegation rules and enhanced context documentation for subagents
- Clarified that user instructions about delegation override tool-use defaults in system prompt.
- Updated coordinator guidance to emphasize Task tool preference for substantial work with improved emphasis on context window limitations.
- Enhanced `context` parameter documentation to require self-contained information for subagents, including file contents and user requirements.
2026-01-31 07:16:43 +01:00
can1357 899f201f2d refactor(coding-agent): renamed output parameter to schema and restructured task metadata format
- Renamed 'output' parameter to 'schema' throughout task configuration and documentation for clarity.
- Updated task schema definition to use 'schema' field with improved description clarifying it defines expected response structure.
- Restructured task summary output format to consolidate metadata into tag attributes and simplify XML structure.
- Added truncation detection for task output exceeding 5000 character threshold with truncated flag.
- Removed charCount from task metadata, retaining only lineCount and charSize properties.
2026-01-28 04:00:32 +01:00
can1357 eb3ca1ddd2 refactor(coding-agent): restructured prompt rendering and tool utilities into dedicated modules
- Extracted tool choice mapping logic into dedicated utility module for provider-specific format conversions.
- Refactored task summary generation to use template-based rendering instead of string concatenation.
- Migrated system prompt generation to use Handlebars templates with structured data instead of hardcoded strings.
- Extracted JTD to TypeScript conversion logic into dedicated utility module for schema documentation.
- Consolidated prompt template rendering across multiple modules using unified renderPromptTemplate function.
- Simplified type assertions in stream module to use generic OptionsForApi type instead of provider-specific types.
2026-01-28 03:47:16 +01:00
can1357 a4bfb5795c refactor(coding-agent): renamed 'complete' tool to 'submit_result' for clarity and consistency
- Renamed 'complete' tool to 'submit_result' throughout codebase for clarity and consistency.
- Updated all tool references, function names, and variable names from 'complete' to 'submit_result' in executor, render, and tools modules.
- Renamed CompleteTool class to SubmitResultTool and CompleteDetails interface to SubmitResultDetails.
- Updated agent prompts and documentation to reference the new 'submit_result' tool name.
- Reorganized task.md prompt to move critical guidance to the top and restructure instructions for better clarity.
2026-01-28 03:28:03 +01:00
can1357 9b90dabaa9 feat(coding-agent): added session compaction enhancements with auto-continue, tool pruning, and remote endpoint support
- Added session compaction auto-continue feature that automatically sends a synthetic continuation prompt after compaction completes when enabled in settings.
- Added tool output pruning system that intelligently removes verbose tool outputs from session history during compaction to reduce token usage while preserving critical information.
- Added short summary generation for compaction results, providing concise PR-style summaries of conversation changes alongside full summaries.
- Added session.compacting extension hook that allows extensions to customize compaction prompts, add context, and preserve metadata during summarization.
- Added synthetic message support to mark system-injected messages (like auto-continue prompts) and prevent them from being persisted to editor history.
2026-01-28 03:15:28 +01:00
can1357 34f03bc7fb feat(coding-agent): added subagent skill preloads
- Inline preloaded skill contents in system prompts and allow task-level skill selection.
- Record session init entries with system prompt, task, tools, and output schema.
- Fix session persistence to keep pre-assistant entries in subagent logs.
2026-01-27 05:18:30 +01:00
can1357 79079e6ecd feat(coding-agent): added plan mode with approval workflow and tool gating
- Plan mode provides structured workflow where agents propose plans for user approval before execution.
- Added plan:// internal URL protocol for accessing plan files and injecting plan-mode context into subagent prompts.
- Added plan mode toggle shortcut and paused status indicator in status line.
- Fixed plan reference injection to properly pass workflow state to plan-mode system prompts.
- Improved autocomplete fuzzy matching to support subsequence matching for skill suggestions.
2026-01-25 19:35:26 +01:00
can1357 ef4077c597 feat(coding-agent/commit): added existing changelog entries display and optional analyze_files
- Added ExistingChangelogEntries interface to pass existing unreleased changelog entries for deletion support.
- Agent prompts now display existing unreleased changelog entries organized by path for potential removal.
- Made analyze_files tool conditional on enableAnalyzeFiles flag when pre-computed observations are available.
- Fixed changelog application to process proposals with only deletions without new entries.
2026-01-23 13:46:06 +01:00
can1357 d676150f9c refactor(coding-agent/core): simplified Python gateway coordination by removing reference counting
- Simplified Python gateway coordination by removing reference counting and idle timeout functionality.
- Updated Python kernel initialization to support environment variable setup and working directory configuration.
- Modified interactive status display to show Python and venv paths instead of client counts.
- Updated system prompt to clarify CHECKPOINT step 0 timing after user request completion.
2026-01-23 09:31:40 +01:00
can1357 564df10b2c fix(coding-agent): corrected async error handling and timeout conversion in tools
- Fixed Python environment warming to use await for proper async error handling.
- Changed interactive mode shutdown to use postmortem.quit instead of process.exit.
- Enhanced bash and python executors to save full output as artifacts when truncated.
- Replaced manual error formatting with ToolError.render() for standardized handling.
- Fixed timeout parameter handling to auto-convert milliseconds to seconds.
2026-01-23 09:05:05 +01:00
can1357 b952e379ae feat(coding-agent): renamed task parameter from vars to args
- Renamed task parameter from vars to args throughout task tool interface.
- Enhanced task template rendering with built-in {{id}} and {{description}} placeholders.
- Simplified task template validation by removing strict placeholder requirements.
- Streamlined CHECKPOINT step requirements in system prompts.
2026-01-23 08:16:16 +01:00
can1357 87fb52bfb1 refactor(coding-agent): removed internal URL handling from fetch tool to use read tool
- Removed internal URL handling from fetch tool to use read tool instead.
- Updated fetch and task tool documentation to reference read tool for agent:// URLs.
- Added timeout clamping to reasonable ranges across all tools.
- Fixed timeout parameter handling to auto-convert milliseconds to seconds.
- Simplified todo-write tool by removing active_form parameter requirement.
2026-01-23 07:43:46 +01:00
can1357 f0fce652b9 feat(coding-agent/core): added internal URL routing system with agent:// and skill:// protocols
- Added internal URL routing system with agent:// and skill:// protocol handlers.
- Enhanced fetch tool to support internal URLs and JSON extraction from agent outputs.
- Extended read tool to handle internal URLs with pagination and query extraction.
- Removed Output tool and replaced functionality with agent:// URL integration.
- Replaced minimatch dependency with Bun.Glob for pattern matching across modules.
2026-01-23 07:38:08 +01:00
can1357 8013a15e49 docs(coding-agent/prompts): standardized tool documentation format with consistent XML sections
- Standardized documentation format across all 18 tools with consistent XML sections.
- Added `<output>` sections to clarify return values and behavior for all tools.
- Reorganized tool instructions with clearer `<instruction>`, `<critical>`, and `<avoid>` sections.
- Renamed Patch tool to Edit and Edit tool to Replace for better naming consistency.
2026-01-23 06:23:18 +01:00
can1357 19a7e33b4e feat(coding-agent): added nonAbortable option and isolated task execution
- Added nonAbortable option to AgentTool interface for ignoring abort signals during tool execution.
- Added isolated option to task tool for running tasks in isolated git worktrees.
- Simplified tool parameter descriptions across all coding-agent tools for better readability.
- Updated find tool to always sort results by modification time and removed sortByMtime parameter.
- Changed web-fetch timeout default from 20s to 45s maximum and updated bash prompt to use cwd parameter.
- Removed model parameter from task and gemini-image tools to use session/provider defaults.
2026-01-23 05:42:40 +01:00
can1357 50af9519ab refactor(agent-prompts): restructured tool descriptions
- Removed centralized tool descriptions from prompt generation logic.
- Eliminated consolidated tool list rendering in system prompts.
- Added explicit tool name headings to individual tool documentation files.
- Simplifies prompt construction by decentralizing tool information.
2026-01-23 05:24:12 +01:00
can1357 da60f86f24 feat(coding-agent/core): added isolated task execution with git worktree support
- Added isolated task execution feature with git worktree support.
- Implemented automatic patch generation and application for isolated tasks.
- Added worktree management with baseline capture and delta patching.
- Enhanced task result display to show isolation status and patch information.
2026-01-21 23:57:33 +01:00
can1357 96822471c2 feat(coding-agent): added cell-by-cell Python execution tracking with duration and exit codes
- Added cell-by-cell Python execution tracking with duration and exit codes.
- Added template system with {{placeholders}} for task tool context rendering.
- Enhanced patch applicator to preserve exact indentation when intended.
- Changed Python tool to use cells array instead of single code parameter.
- Updated task tool schema to require vars instead of task field.
2026-01-21 11:58:29 +01:00
can1357 f9ababd17b refactor(ai): updated User-Agent header to 'pi' and simplified Codex prompts
- Updated User-Agent header from 'opencode' to 'pi' for OpenAI Codex requests.
- Simplified Codex system prompt instructions and removed bridge text override.
- Removed bridge text parameter from buildCodexSystemPrompt function.
- Updated task execution guidelines with parallelization instructions.
2026-01-18 04:54:15 +01:00
can1357 5e9ef021bb feat: enhanced subagent config, reviewer output schema, and consolidated discovery helpers
- Added thinkingLevel field to agent frontmatter allowing subagents to override thinking level with clamping to model capabilities.
- Added structured output schema to reviewer agent ensuring consistent review output format with findings, correctness verdict, and confidence.
- Expanded system prompt with defensive reasoning guidance including assumption checks, edge case awareness, and completion reflex inhibition.
- Consolidated expandPath, parseFrontmatter, and parseAgentFields utilities into discovery/helpers module eliminating code duplication across loaders.
- Replaced silent error handling with logger.warn calls across config parsing, migrations, extension loading, and OAuth refresh failures.
2026-01-11 14:09:18 +01:00
can1357 2844d6ece8 refactor(discovery): extracted skill loading logic into reusable helper to eliminate duplication
- Extracted skill loading logic into reusable `loadSkillsFromDir` helper function to eliminate code duplication across builtin, claude, and codex discovery providers.
- Refactored builtin provider to use new `loadSkillsFromDir` helper instead of inline `loadSkillsRecursive` function.
- Refactored claude provider to use new `loadSkillsFromDir` helper, reducing function from 78 lines to 25 lines.
- Refactored codex provider to use new `loadSkillsFromDir` helper, consolidating duplicate skill transformation and frontmatter parsing logic.
- Updated extension module discovery to skip `node_modules` directories in addition to hidden directories.
- Added guideline to Task tool documentation about isolating file scopes for concurrent agents to prevent conflicts.
2026-01-11 03:07:28 +01:00
can1357 ef97ffc322 docs(coding-agent/prompts): improved Task tool docs to clarify subagent context isolation and tool access
- Updated Task tool documentation to emphasize that subagents have no access to conversation history and require all relevant context to be explicitly passed.
- Revised task agent prompt to clarify that subagents have full tool access and can make file edits, run commands, and create files.
- Replaced example in Task tool docs with a more realistic refactoring scenario demonstrating context passing.
2026-01-11 02:28:29 +01:00