Commit graph

142 commits

Author SHA1 Message Date
林 駿甫 (Shunsuke Hayashi)
71ca903234 feat(cli): add full command reference to gate guide
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>
2026-04-10 10:50:48 +09:00
林 駿甫 (Shunsuke Hayashi)
8ea2e898bd [自動] tasks.json sync 2026-04-10 10:48:40 +09:00
林 駿甫 (Shunsuke Hayashi)
6e1108b765
Merge pull request #112 from Miyabi-G-K/feature/issue-111-guide
feat(cli): gate guide for agent onboarding
2026-04-10 10:48:29 +09:00
林 駿甫 (Shunsuke Hayashi)
602ccac22f feat(cli): add gate guide command for agent onboarding
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>
2026-04-10 10:48:01 +09:00
林 駿甫 (Shunsuke Hayashi)
b4385d1074 [自動] tasks.json sync 2026-04-10 10:41:43 +09:00
林 駿甫 (Shunsuke Hayashi)
8e8653c321
Merge pull request #110 from Miyabi-G-K/feature/issue-109-review-fixes
fix(core): F1-F4 review findings + 10 missing tests
2026-04-10 10:37:14 +09:00
林 駿甫 (Shunsuke Hayashi)
9bf1b5e24c fix(core): address review findings F1-F4 + add 10 missing tests
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>
2026-04-10 10:36:44 +09:00
林 駿甫 (Shunsuke Hayashi)
8b49926d6c [自動] tasks.json sync 2026-04-10 10:22:23 +09:00
林 駿甫 (Shunsuke Hayashi)
647a8afd2e [自動] tasks.json sync 2026-04-10 10:22:21 +09:00
林 駿甫 (Shunsuke Hayashi)
e70cef9235 [自動] tasks.json sync 2026-04-10 10:22:05 +09:00
林 駿甫 (Shunsuke Hayashi)
12ce949d11 [自動] tasks.json sync 2026-04-10 10:22:02 +09:00
林 駿甫 (Shunsuke Hayashi)
d80d15e6c6 [自動] tasks.json sync 2026-04-10 10:22:00 +09:00
林 駿甫 (Shunsuke Hayashi)
6e7f5ea6de [自動] tasks.json sync 2026-04-10 10:21:58 +09:00
林 駿甫 (Shunsuke Hayashi)
04030b2692 [自動] tasks.json sync 2026-04-10 10:21:56 +09:00
林 駿甫 (Shunsuke Hayashi)
fb63bc44c5 [自動] tasks.json sync 2026-04-10 10:21:54 +09:00
林 駿甫 (Shunsuke Hayashi)
b87282e211
Merge pull request #103 from Miyabi-G-K/feature/issue-102-wikilink-expand
feat(protocol): Obsidian wikilink expansion in context
2026-04-10 10:21:25 +09:00
林 駿甫 (Shunsuke Hayashi)
263adf87cd feat(protocol): expand Obsidian wikilinks in attach_context
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>
2026-04-10 10:21:01 +09:00
林 駿甫 (Shunsuke Hayashi)
92c551f1b7
Merge pull request #101 from Miyabi-G-K/feature/issue-100-proptest
test(core): proptest property-based tests for lock/store
2026-04-10 10:19:05 +09:00
林 駿甫 (Shunsuke Hayashi)
7976886bc5 test(core): add proptest property-based tests for lock and store
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>
2026-04-10 10:18:41 +09:00
林 駿甫 (Shunsuke Hayashi)
b058632481
Merge pull request #99 from Miyabi-G-K/feature/issue-96-theta-skill-update
feat(dream): θ6 auto-update SKILL.md from rejections
2026-04-10 10:16:25 +09:00
林 駿甫 (Shunsuke Hayashi)
61cdee2db8
Merge pull request #98 from Miyabi-G-K/feature/issue-97-dashboard-stats
feat(dashboard): completion stats with progress bar
2026-04-10 10:16:18 +09:00
林 駿甫 (Shunsuke Hayashi)
3ff1a09c33
Merge pull request #95 from Miyabi-G-K/feature/issue-93-bus-docking
feat(cli): Bus docking — auto-enqueue on register
2026-04-10 10:16:08 +09:00
林 駿甫 (Shunsuke Hayashi)
2733aa9552
Merge pull request #94 from Miyabi-G-K/feature/issue-91-obsidian-utf8-fix
fix(protocol): handle non-UTF-8 in Obsidian vault
2026-04-10 10:16:01 +09:00
林 駿甫 (Shunsuke Hayashi)
5c1852f25e
Merge pull request #90 from Miyabi-G-K/feature/issue-89-depth1-attach
feat(protocol): attach depth-1 impact files
2026-04-10 10:15:54 +09:00
林 駿甫 (Shunsuke Hayashi)
00c25e314b
Merge pull request #88 from Miyabi-G-K/feature/issue-87-test-reinforcement
test(core): Day 1 lock.rs/store.rs テスト補強
2026-04-10 10:15:48 +09:00
林 駿甫 (Shunsuke Hayashi)
9a6e98b8ab feat(dream): auto-update SKILL.md from gate rejection patterns
θ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>
2026-04-10 10:13:40 +09:00
林 駿甫 (Shunsuke Hayashi)
f929c5b6af feat(dashboard): add completion stats panel with progress bar
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>
2026-04-10 10:12:14 +09:00
林 駿甫 (Shunsuke Hayashi)
d52ac2fe12 feat(cli): auto-enqueue to skill-bus on register
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>
2026-04-10 10:10:18 +09:00
林 駿甫 (Shunsuke Hayashi)
6045f67647 fix(protocol): handle non-UTF-8 files in read_file_snippet
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>
2026-04-10 10:07:45 +09:00
林 駿甫 (Shunsuke Hayashi)
5ac86dccad feat(protocol): attach GNI depth-1 impact files to context
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>
2026-04-10 10:00:25 +09:00
林 駿甫 (Shunsuke Hayashi)
a470d60126 test(core): add comprehensive tests for lock.rs and store.rs
Day 1 improvement cycle: reinforce test coverage for deterministic
task protocol primitives.

lock.rs: +6 tests (acquire unknown task, wrong owner renew, release
noop, no-conflict check, multi-file lock/release, empty sweep)
store.rs: +6 tests (replay since_id, empty replay, upsert replace,
remove task, legacy file loading, lock release event rebuild,
lease_expiry calculation)

Closes #87

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:58:28 +09:00
林 駿甫 (Shunsuke Hayashi)
32f034e2b2 [文書] セッション引き継ぎ: 改善サイクル Day 1 から継続
ビジョン達成度 80%。目標 95%。
IMPROVEMENT-CYCLE.md の Day 1-7 を次セッションで連続実行。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:53:46 +09:00
林 駿甫 (Shunsuke Hayashi)
32af68b284 [文書] 改善サイクル: シータ分析に基づく7日間プラン (#86)
θ分析結果:
  dream: 39イベント(実運用データ不足)
  codex-cli-usage-rules: 0.95→0.70(大幅ドリフト)
  Bus: 49件滞留

7日間サイクル:
  Day 1-2: テスト補強 + hooks 検証
  Day 3-4: attach 精度向上
  Day 5: Bus 滞留解消 + Codex ルール改善
  Day 6: 実運用(全タスク Polaris 経由)
  Day 7: レビュー + 次サイクル計画

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:52:50 +09:00
林 駿甫 (Shunsuke Hayashi)
17ad33a96a [追加] Sprint 5: Issue自動作成 + git同期 + Telegram + Heartbeat + Obsidian検索 (#77-81) 2026-04-10 09:48:49 +09:00
林 駿甫 (Shunsuke Hayashi)
f5fe5f36cf [調査] L-Step/Funnel/Analytics 利用状況レポート (#85)
Polaris (miyabi gate) で管理した調査タスク。
タグ251個、4段ファネル構造、自動化3件を確認。
改善点5件を特定(ログ不在、KPI統合、Polaris連携等)。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:44:24 +09:00
林 駿甫 (Shunsuke Hayashi)
98239fc3f3 [追加] miyabi gate init: Git/GitHub チェック + .gitignore 自動更新 (#75) 2026-04-10 09:28:47 +09:00
林 駿甫 (Shunsuke Hayashi)
9edc191907 [整備] MiyabiGate スキル: miyabi-gate と miyabi の区別を明記
- miyabi-gate gate ... が Polaris GATE CLI
- miyabi は別の hub CLI(使わない)
- Claude Code での正式運用フロー追記

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:23:57 +09:00
林 駿甫 (Shunsuke Hayashi)
0747fee394 [整備] Codex + Claude Code スキルを強化: バイナリパス明記 + 全コマンド例 + init
.codex/instructions.md: 全フロー + 全コマンド + exit code + 禁止事項
skills/miyabi-gate-cli/SKILL.md: バイナリパス + クイックスタート追加

バイナリ名: miyabi-gate (~/bin/miyabi-gate)
コマンド: miyabi-gate gate <subcommand>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:07:49 +09:00
林 駿甫 (Shunsuke Hayashi)
0c5dec9950 [追加] miyabi gate init: リポ初期化コマンド (#74) 2026-04-10 09:04:42 +09:00
林 駿甫 (Shunsuke Hayashi)
3e3149f7d1 [追加] Claude Code hooks: ファイル編集前にロック自動チェック (#73 関連)
.claude/settings.json:
  PreToolUse hook: Edit/Write 前に miyabi gate locks を確認
  PostToolUse hook: git commit 後にロック状態をリマインド

scripts/hook-check-lock.sh:
  他人がロック中のファイルへの書き込みを exit 2 でブロック
  ロックなしファイルの編集は警告のみ(ブロックしない)

scripts/hook-post-bash.sh:
  git commit 後にロック残数を表示

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:58:58 +09:00
林 駿甫 (Shunsuke Hayashi)
3744382d3d [追加] assign 後に実行プランを自動表示 (#73) 2026-04-10 08:53:40 +09:00
林 駿甫 (Shunsuke Hayashi)
3560b6e702 [整備] OpenSSL 依存を排除: rustls-tls + vendored-openssl で全ノード対応
- reqwest: rustls-tls に切り替え(OpenSSL 不要)
- git2: vendored-openssl で静的リンク
- 全 Mac ノード (mainmini, macmini2, mini3) にバイナリ配布済み
- mini3 の dylib not found エラーを解消

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:24:42 +09:00
林 駿甫 (Shunsuke Hayashi)
b56728ba22 [整備] Polaris 運用設定: CLAUDE.md + Codex + グローバルルール + dream cron
- CLAUDE.md に Polaris ルール追加(全エージェント必読)
- .codex/instructions.md 更新(Codex 用ルール)
- ~/.claude/rules/polaris-gate.md(グローバルルール)
- launchd: com.miyabi.polaris.dream(毎日 03:00 に学び抽出)
- logs/ ディレクトリ作成

エージェントが自然に miyabi gate を使えるように設定完了。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:15:24 +09:00
林 駿甫 (Shunsuke Hayashi)
a965bd3b62 [追加] verify_merge + escape hatch (force_unlock, manual_complete) 2026-04-10 08:11:29 +09:00
林 駿甫 (Shunsuke Hayashi)
e6ec2cab8d [整備] IP保護強化: .gitattributes + Copilot学習除外 + シークレットスキャン
- DTP 核心コードに linguist-generated 属性(GitHub コード検索除外)
- project_memory/ も検索除外
- .env は gitignore 済み
- シークレットファイルのコミットなし確認済み

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:59:38 +09:00
林 駿甫 (Shunsuke Hayashi)
54c4d01701 [文書] 知的財産保護方針: クローズド + BSL 1.1 + 公開禁止
- npm / crates.io 公開禁止
- GitHub は Private のまま維持
- Sprint 5 の公開タスクを廃止
- エージェントへの外部送信禁止指示

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:57:56 +09:00
林 駿甫 (Shunsuke Hayashi)
59be218b20 [整備] ライセンスを MIT → BSL 1.1 に変更
Licensor: 合同会社みやび (Miyabi G.K.)
非商用・教育目的のみ無料。商用利用は別途ライセンス。
4年後に Apache 2.0 に自動移行。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:50:40 +09:00
林 駿甫 (Shunsuke Hayashi)
fc6be84853 [文書] エッジケース設計決定書 (#64, #68, #69, #70)
- #64: ブランチ戦略(ブランチは切る、ワークツリーは不要)
- #68: マルチマシン分断(単一マシン前提、CAS で衝突検出)
- #69: ロック外ファイル(attach_context で事前通知)
- #70: merge 変更検知(post-commit hook + 通知)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:44:58 +09:00
林 駿甫 (Shunsuke Hayashi)
0588d41799 [追加] Web ダッシュボード: miyabi gate serve (#63) 2026-04-10 07:42:21 +09:00
林 駿甫 (Shunsuke Hayashi)
70cd906776 [追加] ドリーミング: event log → 学び抽出 (#59) 2026-04-10 07:29:03 +09:00