diff --git a/README.ja.md b/README.ja.md index 0b55729..18df42a 100644 --- a/README.ja.md +++ b/README.ja.md @@ -1,6 +1,6 @@ # bestwork-agent -Claude Codeのための最高のハーネスエンジニアリング。サークルではなく企業のように働く。 +Claude Codeのためのハーネスエンジニアリング。プロンプト一行で十分 — 残りはハーネスがキャッチします。
English · 한국어 · 日本語
@@ -8,125 +8,136 @@ Claude Codeのための最高のハーネスエンジニアリング。サーク
---
-AIエージェントは一人で作業します。ハルシネーション、ループ、要件の見落とし — 終わってから気づきます。
+## 問題
-**bestwork-agent**はエージェントをチームに変えます。すべてのタスクに**Tech**(エンジニア)+ **PM**(プロダクトマネージャー)+ **Critic**(品質レビュアー)が割り当てられます。49の専門エージェント。自動選択。並列実行。フィードバックループ。リアルタイム通知。
+AIコーディングエージェントはハルシネーション、ループ、要件漏れ、セキュリティ欠陥を生み出します。AI生成コードの45%に脆弱性が含まれています(Veracode)。バイブコーディングアプリはアイデア検証なしで作られ、失敗します。
-## インストール
+**bestwork-agent**はプロのエンジニアリングチームが使う品質ゲートを追加します — 作業方法は変えずに。
-### 方法1: Claude Codeプラグイン(推奨)
+## ベンチマーク:ハーネスON vs OFF
```
-/plugin marketplace add https://github.com/rlaope/bestwork-agent
-/plugin install bestwork-agent
+═══════════════════════════════════
+ HARNESS EFFECTIVENESS BENCHMARK
+═══════════════════════════════════
+
+ シナリオ: 13
+ 精度: 100.0%
+
+ ハーネスON:
+ キャッチ率: 100% (10/10)
+ 誤検出: 0
+
+ ハーネスOFF (バニラ):
+ キャッチ率: 0% (0/10)
+
+ カテゴリ:
+ ハルシネーション 3/4 キャッチ
+ プラットフォーム 4/4 キャッチ
+ 非推奨 1/1 キャッチ
+ セキュリティ 1/1 キャッチ
+═══════════════════════════════════
```
-### 方法2: npm
+自分で実行: `npm run benchmark`
-```bash
-npm install -g bestwork-agent
-bestwork install
-```
+## ハーネスの機能
-Claude Codeを再起動後、`./help`を入力。
+| ゲート | タイミング | キャッチ対象 |
+|--------|-----------|-------------|
+| **グラウンディング** | PreToolUse (Edit/Write) | 未読ファイルの編集 |
+| **スコープロック** | PreToolUse | ロックディレクトリ外の編集 |
+| **ストリクト** | PreToolUse | `rm -rf`、`git push --force` |
+| **タイプチェック** | PostToolUse (Edit/Write) | 変更後のTypeScriptエラー |
+| **レビュー** | オンデマンド / PostToolUse | 偽import、ハルシネーションメソッド、プラットフォーム不一致 |
+| **要件チェック** | PostToolUse (Edit/Write) | clarify/validateセッションの未達要件 |
+| **検証** | ビルド前 | エビデンスベースのgo/no-go — この機能は作る価値があるか? |
----
+すべてのゲートは自動実行されます。プロンプトを入力するだけです。
-## ハーネス
+## インストール
-### トリオ実行 — AI企業
+### 方法1: Claude Codeプラグイン(推奨)
+```bash
+/plugin marketplace add https://github.com/rlaope/bestwork-agent
+/plugin install bestwork-agent
```
-./trio implement auth API | add rate limiting | write integration tests
-```
-
-各タスクにドメイン専門家トリオを自動マッチング:
-
-- **Tech** — ドメイン専門知識で実装
-- **PM** — 要件充足を検証
-- **Critic** — 品質レビュー + ハルシネーション検出
-- 却下?フィードバックループ → Tech修正 → 再レビュー(最大3回)
-### 49の専門エージェント
+### 方法2: npm
```bash
-bestwork agents # フルカタログ
+npm install -g bestwork-agent
+bestwork install
```
-**25 Tech**: backend, frontend, fullstack, infra, database, API, mobile, testing, security, performance, devops, data, ML, CLI, realtime, auth, migration, config, agent-engineer, plugin, accessibility, i18n, graphql, monorepo, writer
+## 仕組み
-**10 PM**: product, API, platform, data, infra, migration, security, growth, compliance, DX
+ゲートウェイがプロンプトを分析し、適切なスケールを選択します:
-**14 Critic**: performance, scalability, security, consistency, reliability, testing, hallucination, DX, type safety, cost, accessibility, devsecops, i18n, agent
+- **Solo** — 簡単な修正(エージェント1名)
+- **Pair** — 関連する2タスク(エージェント2名 + クリティック)
+- **Trio** — 品質ゲート付き複数タスク(タスクごとにtech + PM + critic)
+- **Hierarchy** — 大規模、アーキテクチャ決定(CTO → Lead → Senior → Junior)
+- **Squad** — ローカル機能、高速コンセンサス(フラット、並列)
-### 開発コントロール
+## 49ドメインスペシャリスト
-| コマンド | 説明 |
-|----------|------|
-| `./scope src/auth/` | ディレクトリへの編集をロック |
-| `./unlock` | スコープロック解除 |
-| `./strict` | 全ガードレール有効化 |
-| `./relax` | ストリクトモード無効化 |
-| `./tdd add auth` | TDD(テスト駆動開発)フロー |
-| `./context [files]` | ファイルコンテキストプリロード |
-| `./recover` | 行き詰まり?アプローチリセット |
-| `./review` | プラットフォーム/ランタイムのハルシネーションチェック |
+**25 Tech** · **10 PM** · **14 Critic**
-### スマートゲートウェイ
+エージェントプロンプトは`prompts/`にあり、ビルドなしで編集可能。
-コマンドの暗記不要。自然言語で入力:
+## 22スキル
-```
-"review my code" → ./review
-"run in parallel" → ./trio
-"why did it fail" → ./autopsy
-"improve my prompts" → ./learn
-```
+自然言語またはスラッシュコマンド — ゲートウェイが自動ルーティング。
-### 通知
+| スキル | 機能 |
+|--------|------|
+| `validate` | ビルド前のエビデンスベース機能検証 |
+| `clarify` | 実行前の要件質問 |
+| `review` | ハルシネーション + プラットフォーム不一致スキャン |
+| `trio` | 品質ゲート付き並列実行 |
+| `plan` | スコープ分析 + チーム推薦 |
+| `delegate` | 確認なしの自律実行 |
+| `deliver` | 完了まで繰り返し実行 |
+| `blitz` | 最大並列バースト |
+| `doctor` | デプロイ設定 vs コード整合性チェック |
+| `pipeline-run` | GitHub Issue一括自動処理 |
+| `superthinking` | 1000回反復思考シミュレーション |
+| `waterfall` | ゲート付き順次ステージ処理 |
-```
-./discord
English · 한국어 · 日本語
@@ -8,142 +8,141 @@ Claude Code 하네스 엔지니어링 오픈소스. AI 에이전트를 혼자
---
-에이전트한테 일 시키면 혼자 끙끙대다가 할루시네이션 내고, 루프 돌고, 요구사항 빠뜨립니다. 끝나고 나서야 아는 거죠.
+## 문제
-**bestwork-agent**는 에이전트한테 팀을 붙여줍니다. 태스크마다 **Tech**(개발) + **PM**(검증) + **Critic**(리뷰) 3명이 붙어서 일합니다. 49개 전문 에이전트 자동 매칭. 병렬 실행. 피드백 루프. 디스코드/슬랙 알림.
+AI 코딩 에이전트는 할루시네이션, 루프, 요구사항 누락, 보안 결함을 만듭니다. AI 생성 코드의 45%가 취약점을 포함합니다(Veracode). 바이브 코딩 앱은 아이디어 검증 없이 만들어져서 실패합니다.
-## 설치
+**bestwork-agent**는 프로 엔지니어링 팀이 사용하는 품질 게이트를 추가합니다 — 작업 방식은 바꾸지 않으면서.
-### 방법 1: Claude Code 플러그인 (추천)
+## 벤치마크: 하네스 ON vs OFF
```
-/plugin marketplace add https://github.com/rlaope/bestwork-agent
-/plugin install bestwork-agent
-```
-
-### 방법 2: npm
+═══════════════════════════════════
+ HARNESS EFFECTIVENESS BENCHMARK
+═══════════════════════════════════
-```bash
-npm install -g bestwork-agent
-bestwork install
-```
+ 시나리오: 13개
+ 정확도: 100.0%
-### 알림 설정
+ 하네스 ON:
+ 캐치율: 100% (10/10)
+ 오탐: 0
-설치 후 알림 연결:
+ 하네스 OFF (바닐라):
+ 캐치율: 0% (0/10)
+ 카테고리:
+ 할루시네이션 3/4 캐치
+ 플랫폼 4/4 캐치
+ 디프리케이트 1/1 캐치
+ 보안 1/1 캐치
+═══════════════════════════════════
```
-./discord
@@ -14,103 +14,52 @@ Best harness engineering for Claude Code. Work like a corporation team, not just
---
-## What is bestwork-agent?
+## The problem
-Your AI agent works alone — it hallucinates, loops, misses requirements, and you find out too late.
+AI coding agents hallucinate, loop, miss requirements, and ship security flaws. 45% of AI-generated code contains vulnerabilities (Veracode). Vibe-coded apps fail because nobody validated the idea before building.
-**bestwork-agent** organizes your AI agent the way top unicorn companies organize their engineering teams. It analyzes your request, decides whether it needs a **hierarchical team** (waterfall, top-down authority) or a **squad** (agile, flat, fast) — and dispatches the right specialists automatically.
+**bestwork-agent** adds the quality gates that professional engineering teams use — without changing how you work.
-```
-You: "Refactor the auth module to support OAuth2"
-
-bestwork analyzes → large scope, architecture decision, security-sensitive
-bestwork selects → Hierarchy: Security Team
-
-┌─────────────────────────────────────────────────────┐
-│ CISO │
-│ "Attack surface acceptable. Approve with │
-│ condition: rotate existing JWT secrets on deploy." │
-│ ▲ final decision │
-│ Tech Lead │
-│ "OAuth2 PKCE flow is correct. Consolidate the │
-│ two token refresh paths into one." │
-│ ▲ architecture review │
-│ Sr. Security Engineer │
-│ "Implementation secure. Added CSRF protection. │
-│ Input validation on redirect_uri." │
-│ ▲ implementation + hardening │
-│ Jr. QA Engineer │
-│ "Found: /callback doesn't handle expired state │
-│ param. Added test for token replay attack." │
-│ ▲ fresh eyes + edge cases │
-└─────────────────────────────────────────────────────┘
-```
+## Benchmark: harness ON vs OFF
```
-You: "Add a dark mode toggle to the settings page"
-
-bestwork analyzes → single feature, localized scope, fast feedback needed
-bestwork selects → Squad: Feature Squad
-
-┌──────────────────────────────────────────────────────┐
-│ Feature Squad (parallel) │
-│ │
-│ Sr. Backend Sr. Frontend Product Lead │
-│ "API endpoint "Toggle component "Matches │
-│ for user prefs with CSS vars, user story. │
-│ ready. Tests accessible." Ship it." │
-│ passing." │
-│ QA Lead │
-│ "Tested light/dark │
-│ + system pref. │
-│ All green." │
-│ │
-│ Verdict: all APPROVE → merged │
-└──────────────────────────────────────────────────────┘
-```
-
-```
-You: "Why did my last session struggle?"
+═══════════════════════════════════
+ HARNESS EFFECTIVENESS BENCHMARK
+═══════════════════════════════════
-bestwork analyzes → observability request, not coding
-bestwork selects → data analysis
+ Scenarios: 13
+ Accuracy: 100.0%
- Session Outcome — b322dc3e ✗ struggling
+ Harness ON:
+ Catch rate: 100% (10/10)
+ False pos: 0
- Duration: 45m
- Calls/Prompt: 38 (high — avg is 12)
- Loop detected: Edit → Bash(test fail) → Edit × 6 on auth.ts
+ Harness OFF (vanilla):
+ Catch rate: 0% (0/10)
- Root cause: missing import caused test failure loop.
- Recommendation: use ./strict to force read-before-edit.
+ Categories:
+ hallucination 3/4 caught
+ platform 4/4 caught
+ deprecated 1/1 caught
+ security 1/1 caught
+═══════════════════════════════════
```
-## How it works
-
-bestwork-agent mirrors how the best engineering organizations operate:
-
-**Hierarchy mode** — for decisions that need authority levels
-```
-CTO → Tech Lead → Sr. Engineer → Jr. Engineer
-```
-Junior implements first (fresh perspective catches obvious issues), seniors refine, leads review architecture, C-level makes final strategic calls. Each level can send work back down.
+Run it yourself: `npm run benchmark`
-**Squad mode** — for tasks that need speed and collaboration
-```
-Backend + Frontend + Product + QA (all equal)
-```
-Everyone works in parallel. No single authority. Consensus-driven. Fast.
+## What the harness does
-**The gateway picks automatically** based on task signals:
-- Simple fix / rename / format → solo (one agent, no overhead)
-- Two related sub-tasks → pair (one agent per task + critic)
-- Multiple sub-tasks → trio (tech + PM + critic per task, parallel)
-- Large scope / cross-directory / architecture → hierarchy (CTO → Lead → Senior → Junior)
-- Single feature / bugfix / localized → squad (flat, consensus-driven)
-- Security-sensitive files → security team
-- Infra / CI/CD files → infra squad
+| Gate | When | What it catches |
+|------|------|-----------------|
+| **Grounding** | PreToolUse (Edit/Write) | Editing files the agent hasn't read |
+| **Scope lock** | PreToolUse | Edits outside the locked directory |
+| **Strict mode** | PreToolUse | `rm -rf`, `git push --force` |
+| **Type check** | PostToolUse (Edit/Write) | TypeScript errors after every change |
+| **Review** | On demand / PostToolUse | Fake imports, hallucinated methods, platform mismatch, deprecated APIs, type safety bypass |
+| **Requirement check** | PostToolUse (Edit/Write) | Unmet requirements from clarify/validate sessions |
+| **Validate** | Before building | Evidence-based go/no-go — is this feature worth building? |
-For non-solo work, the gateway shows you the plan (tasks + agents) and asks you to confirm, adjust, or drop to solo.
+All gates run automatically. You just type your prompt.
## Install
@@ -128,77 +77,37 @@ npm install -g bestwork-agent
bestwork install
```
-### Notifications
-
-After install, connect notifications:
-
-```
-./discord