Adds detailed reference for all 21 subcommands with arguments,
options, and usage examples. Agents can run `miyabi-gate gate guide`
to get both the workflow overview and per-command documentation.
Closes#113
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prints a complete workflow guide that any AI agent can read to
understand how to use Polaris: rules, step-by-step workflow,
context attachments, emergency commands, exit codes, and
quality checks.
Closes#111
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F1: Add depth limit (max 5) to find_note_by_name and
collect_obsidian_matches to prevent stack overflow on large vaults
F2: Fix bus_enqueue to use store_path parent instead of cwd
F3: Fix update_skill_md_from_patterns to preserve sections after
the auto-generated marker instead of truncating them
F4: Fix extract_wikilinks to consume chars after | in [[Note|Display]]
so subsequent links parse correctly
Tests added:
- extract_wikilinks: basic, display text, empty/broken
- find_note_by_name: depth limit enforcement
- resolve_wikilink: direct, nested, non-existent
- build_rejection_section: empty, sorted by count desc
- update_skill_md_from_patterns: append, replace preserving following sections
955 tests GREEN, clippy zero.
Closes#109
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When attaching Obsidian notes, extract [[wikilinks]] from the note
content and resolve them to actual vault files. Linked notes are
attached as "obsidian_wikilink" type, bounded by remaining_tokens.
Supports both [[Note]] and [[Note|Display]] syntax.
Closes#102
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds proptest to dev-dependencies and 6 property-based tests:
- lock: acquire→release always clears, two tasks can't lock same file,
wrong owner renew always fails
- store: CAS rejects stale version, upsert is idempotent,
event replay is deterministic
945 tests all GREEN.
Closes#100
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
θ6 self-improving: When dream detects gate rejections, automatically
appends/refreshes a "Common Rejection Patterns" section in
polaris-ops/SKILL.md with gate names, counts, and remedies.
This closes the feedback loop: agents learn from their own mistakes
without human intervention.
Closes#96
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a Completion Stats panel to the Polaris web dashboard showing:
- Completion percentage with large display
- Visual progress bar (green)
- Breakdown of done/active/pending/total tasks
Closes#97
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After successful task registration, automatically append a queued
entry to skill-runs.jsonl. This connects the Polaris gate workflow
to the skill-bus tracking system.
Use --no-bus to skip auto-enqueue when not needed.
Closes#93
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When reading Obsidian vault notes or source files, non-UTF-8 bytes
caused a hard error. Now gracefully breaks on invalid UTF-8 lines
and returns whatever was read so far.
Closes#91
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When build_context_attachments runs, it now also includes files from
TaskImpact.depth1 as "impact_depth1" attachments. Files already
attached via locked_files are skipped to avoid duplication.
This improves context accuracy by giving agents visibility into
direct callers/importers that may be affected by their changes.
Closes#89
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add openclaw.rs module for cluster communication
- Expand CLI with OpenClaw-related commands (264 lines)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace ok_or_else with ok_or for non-lazy error construction
- Derive Default for StepCondition and FailurePolicy enums
- Allow clippy::only_used_in_recursion for visit_step method
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 24 new tests for HookEvent, HookAction, Hook, HookContext
- Test HookManager registration, enable/disable, get_hooks
- Test HooksConfig save/load
- Test hook execution with Log, Notify actions
- Test conditional hook execution
- Test variable expansion in hook messages
Core tests: 359 passed (+24 new)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 23 new tests for Rule, AgentPreferences, MiyabiRules
- Test validation logic (version, name, suggestion, severity)
- Test file matching and pattern matching
- Test RulesLoader file discovery and loading
- Test serialization and error handling
Core tests: 335 passed (+23 new)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Cache tests (18 new):
- Test CacheEntry creation and expiration
- Test TTLCache insert, remove, clear, stats
- Test custom TTL, concurrent access
- Test LLMCacheKey and ApiCacheKey creation
- Test cache factories and serialization
Error policy tests (18 new):
- Test FallbackStrategy variants and defaults
- Test CircuitState equality
- Test CircuitBreaker default, reset, counters
- Test circuit transitions and thresholds
Core tests: 312 passed (52 new this phase)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 16 new tests for MCP server configuration, request/response handling
- Test McpServerConfig defaults and serialization
- Test McpConfig save/load and multiple servers
- Test McpRequest with params, McpResponse success/error
- Test McpError with data, McpTool deserialization
- Test McpManager creation and state checking
Core tests: 276 passed (16 new)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- ParallelConfig for concurrency, timeout, fail-fast settings
- Orchestrator for parallel and sequential agent execution
- OrchestratorTask for task definition with optional system prompts
- ParallelResult with success tracking and metrics
- TaskResult for individual execution results
Features:
- Semaphore-based concurrency control
- Timeout per task execution
- Success rate and total token tracking
- Helper function for quick orchestrator creation
Total: 752 tests passing (9 new orchestration tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Test session creation with custom ID
- Test system prompt builder pattern
- Test tags management
- Test preview truncation and empty preview
- Test storage default directory
- Test storage exists/load/delete operations
- Test metadata conversion and preview
- Test timestamp updates
Total: 23 session tests (13 new)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Workflow tests (14 new tests):
- Test StepCondition, RetryConfig, FailurePolicy defaults
- Test StepStatus and WorkflowStatus equality
- Test WorkflowContext with variables and results
- Test StepResult and WorkflowResult creation
- Test Workflow with output variables
- Test step and failure policy variants
DAG tests (23 new tests):
- Test TaskId creation and display
- Test Task with priority and estimated time
- Test TaskNode operations (add/remove dependencies)
- Test TaskLevel creation and management
- Test TaskGraph operations (count, parallelism, levels)
- Test TaskGraphBuilder with priority
- Test DAGError variants
- Test complex parallel graphs
Total: 730 tests passing (228 core, 498 TUI, 4 CLI)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add approval_integration_tests module with 10 tests
- Add executor_registry_tests module with 5 tests
- Add agent_event_tests module with 2 tests
- Test ApprovalCallback implementations (AutoApproveAll, RejectHighRisk)
- Test ChannelApprover async communication
- Test RiskLevel ordering and approval requirements
- Test ExecutorRegistry tool registration and risk levels
Total: 17 new tests, all passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add TaskGraph with topological sort using Kahn's algorithm
- Add TaskLevel for grouping independent tasks for parallel execution
- Add TaskGraphBuilder for fluent API construction
- Support dependency tracking and cycle detection
- Include 7 comprehensive tests
Ported and simplified from miyabi-private/miyabi-dag.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>