@uzysjung/agent-harness 26.83.0
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/LICENSE +21 -0
- package/README.ko.md +279 -0
- package/README.md +306 -0
- package/dist/chunk-SDVAM5JZ.js +775 -0
- package/dist/chunk-SDVAM5JZ.js.map +1 -0
- package/dist/index.js +5412 -0
- package/dist/index.js.map +1 -0
- package/dist/trust-tier-drift.js +67 -0
- package/dist/trust-tier-drift.js.map +1 -0
- package/package.json +53 -0
- package/scripts/prune-ecc.sh +310 -0
- package/templates/CLAUDE.md +86 -0
- package/templates/agents/build-error-resolver.md +114 -0
- package/templates/agents/code-reviewer.md +237 -0
- package/templates/agents/data-analyst.md +69 -0
- package/templates/agents/plan-checker.md +118 -0
- package/templates/agents/reviewer.md +128 -0
- package/templates/agents/security-reviewer.md +108 -0
- package/templates/agents/silent-failure-hunter.md +50 -0
- package/templates/agents/strategist.md +86 -0
- package/templates/antigravity/AGENTS.md.template +58 -0
- package/templates/codex/AGENTS.md.template +94 -0
- package/templates/codex/README.md +69 -0
- package/templates/codex/config.toml.template +108 -0
- package/templates/codex/hooks/README.md +40 -0
- package/templates/codex/hooks/gate-check.sh +7 -0
- package/templates/codex/hooks/hito-counter.sh +7 -0
- package/templates/codex/hooks/session-start.sh +7 -0
- package/templates/codex/hooks/uncommitted-check.sh +7 -0
- package/templates/codex/skills/uzys-build/SKILL.md +24 -0
- package/templates/codex/skills/uzys-plan/SKILL.md +24 -0
- package/templates/codex/skills/uzys-review/SKILL.md +24 -0
- package/templates/codex/skills/uzys-ship/SKILL.md +24 -0
- package/templates/codex/skills/uzys-spec/SKILL.md +28 -0
- package/templates/codex/skills/uzys-test/SKILL.md +24 -0
- package/templates/commands/ecc/checkpoint.md +32 -0
- package/templates/commands/ecc/e2e.md +105 -0
- package/templates/commands/ecc/eval.md +88 -0
- package/templates/commands/ecc/evolve.md +7 -0
- package/templates/commands/ecc/harness-audit.md +73 -0
- package/templates/commands/ecc/instinct-status.md +8 -0
- package/templates/commands/ecc/promote.md +10 -0
- package/templates/commands/ecc/security-scan.md +10 -0
- package/templates/commands/uzys/auto.md +190 -0
- package/templates/commands/uzys/build.md +42 -0
- package/templates/commands/uzys/plan.md +55 -0
- package/templates/commands/uzys/review.md +44 -0
- package/templates/commands/uzys/ship.md +49 -0
- package/templates/commands/uzys/spec.md +93 -0
- package/templates/commands/uzys/test.md +58 -0
- package/templates/docs/PLAN.template.md +102 -0
- package/templates/hooks/agentshield-gate.sh +101 -0
- package/templates/hooks/checkpoint-snapshot.sh +115 -0
- package/templates/hooks/gate-check.sh +138 -0
- package/templates/hooks/hito-counter.sh +26 -0
- package/templates/hooks/karpathy-gate.sh +59 -0
- package/templates/hooks/mcp-pre-exec.sh +104 -0
- package/templates/hooks/protect-files.sh +41 -0
- package/templates/hooks/session-start.sh +40 -0
- package/templates/hooks/spec-drift-check.sh +86 -0
- package/templates/mcp-allowlist.example +24 -0
- package/templates/mcp.json +20 -0
- package/templates/opencode/.opencode/commands/uzys-build.md +22 -0
- package/templates/opencode/.opencode/commands/uzys-plan.md +22 -0
- package/templates/opencode/.opencode/commands/uzys-review.md +22 -0
- package/templates/opencode/.opencode/commands/uzys-ship.md +22 -0
- package/templates/opencode/.opencode/commands/uzys-spec.md +28 -0
- package/templates/opencode/.opencode/commands/uzys-test.md +22 -0
- package/templates/opencode/.opencode/plugins/uzys-harness.ts +146 -0
- package/templates/opencode/AGENTS.md.template +98 -0
- package/templates/opencode/README.md +34 -0
- package/templates/opencode/opencode.json.template +42 -0
- package/templates/project-claude/_base.md +23 -0
- package/templates/project-claude/fragments/csr-fastapi/active-rules.md +13 -0
- package/templates/project-claude/fragments/csr-fastapi/agents.md +5 -0
- package/templates/project-claude/fragments/csr-fastapi/boundaries.md +18 -0
- package/templates/project-claude/fragments/csr-fastapi/commands.md +6 -0
- package/templates/project-claude/fragments/csr-fastapi/plugins.md +2 -0
- package/templates/project-claude/fragments/csr-fastapi/skills.md +5 -0
- package/templates/project-claude/fragments/csr-fastapi/stack.md +6 -0
- package/templates/project-claude/fragments/csr-fastapi/tagline.md +1 -0
- package/templates/project-claude/fragments/csr-fastapi/workflow.md +8 -0
- package/templates/project-claude/fragments/csr-fastify/active-rules.md +13 -0
- package/templates/project-claude/fragments/csr-fastify/agents.md +5 -0
- package/templates/project-claude/fragments/csr-fastify/boundaries.md +18 -0
- package/templates/project-claude/fragments/csr-fastify/commands.md +6 -0
- package/templates/project-claude/fragments/csr-fastify/plugins.md +2 -0
- package/templates/project-claude/fragments/csr-fastify/skills.md +5 -0
- package/templates/project-claude/fragments/csr-fastify/stack.md +6 -0
- package/templates/project-claude/fragments/csr-fastify/tagline.md +1 -0
- package/templates/project-claude/fragments/csr-fastify/workflow.md +8 -0
- package/templates/project-claude/fragments/csr-supabase/active-rules.md +12 -0
- package/templates/project-claude/fragments/csr-supabase/agents.md +5 -0
- package/templates/project-claude/fragments/csr-supabase/boundaries.md +19 -0
- package/templates/project-claude/fragments/csr-supabase/commands.md +6 -0
- package/templates/project-claude/fragments/csr-supabase/plugins.md +4 -0
- package/templates/project-claude/fragments/csr-supabase/skills.md +7 -0
- package/templates/project-claude/fragments/csr-supabase/stack.md +6 -0
- package/templates/project-claude/fragments/csr-supabase/supabase-auth.md +21 -0
- package/templates/project-claude/fragments/csr-supabase/tagline.md +1 -0
- package/templates/project-claude/fragments/csr-supabase/workflow.md +8 -0
- package/templates/project-claude/fragments/data/active-rules.md +10 -0
- package/templates/project-claude/fragments/data/agents.md +6 -0
- package/templates/project-claude/fragments/data/boundaries.md +20 -0
- package/templates/project-claude/fragments/data/commands.md +6 -0
- package/templates/project-claude/fragments/data/plugins.md +2 -0
- package/templates/project-claude/fragments/data/skills.md +3 -0
- package/templates/project-claude/fragments/data/stack.md +7 -0
- package/templates/project-claude/fragments/data/tagline.md +1 -0
- package/templates/project-claude/fragments/data/workflow.md +9 -0
- package/templates/project-claude/fragments/executive/active-rules.md +6 -0
- package/templates/project-claude/fragments/executive/agents.md +6 -0
- package/templates/project-claude/fragments/executive/boundaries.md +17 -0
- package/templates/project-claude/fragments/executive/commands.md +11 -0
- package/templates/project-claude/fragments/executive/plugins.md +1 -0
- package/templates/project-claude/fragments/executive/skills.md +7 -0
- package/templates/project-claude/fragments/executive/stack.md +4 -0
- package/templates/project-claude/fragments/executive/tagline.md +1 -0
- package/templates/project-claude/fragments/executive/workflow.md +10 -0
- package/templates/project-claude/fragments/growth-marketing/active-rules.md +7 -0
- package/templates/project-claude/fragments/growth-marketing/agents.md +6 -0
- package/templates/project-claude/fragments/growth-marketing/boundaries.md +17 -0
- package/templates/project-claude/fragments/growth-marketing/commands.md +11 -0
- package/templates/project-claude/fragments/growth-marketing/plugins.md +9 -0
- package/templates/project-claude/fragments/growth-marketing/skills.md +8 -0
- package/templates/project-claude/fragments/growth-marketing/stack.md +7 -0
- package/templates/project-claude/fragments/growth-marketing/tagline.md +1 -0
- package/templates/project-claude/fragments/growth-marketing/workflow.md +11 -0
- package/templates/project-claude/fragments/project-management/active-rules.md +7 -0
- package/templates/project-claude/fragments/project-management/agents.md +6 -0
- package/templates/project-claude/fragments/project-management/boundaries.md +16 -0
- package/templates/project-claude/fragments/project-management/commands.md +10 -0
- package/templates/project-claude/fragments/project-management/plugins.md +6 -0
- package/templates/project-claude/fragments/project-management/skills.md +5 -0
- package/templates/project-claude/fragments/project-management/stack.md +4 -0
- package/templates/project-claude/fragments/project-management/tagline.md +1 -0
- package/templates/project-claude/fragments/project-management/workflow.md +12 -0
- package/templates/project-claude/fragments/ssr-htmx/active-rules.md +11 -0
- package/templates/project-claude/fragments/ssr-htmx/agents.md +5 -0
- package/templates/project-claude/fragments/ssr-htmx/boundaries.md +20 -0
- package/templates/project-claude/fragments/ssr-htmx/commands.md +6 -0
- package/templates/project-claude/fragments/ssr-htmx/plugins.md +2 -0
- package/templates/project-claude/fragments/ssr-htmx/skills.md +3 -0
- package/templates/project-claude/fragments/ssr-htmx/stack.md +6 -0
- package/templates/project-claude/fragments/ssr-htmx/tagline.md +1 -0
- package/templates/project-claude/fragments/ssr-htmx/workflow.md +8 -0
- package/templates/project-claude/fragments/ssr-nextjs/active-rules.md +12 -0
- package/templates/project-claude/fragments/ssr-nextjs/agents.md +5 -0
- package/templates/project-claude/fragments/ssr-nextjs/boundaries.md +20 -0
- package/templates/project-claude/fragments/ssr-nextjs/commands.md +6 -0
- package/templates/project-claude/fragments/ssr-nextjs/plugins.md +2 -0
- package/templates/project-claude/fragments/ssr-nextjs/skills.md +5 -0
- package/templates/project-claude/fragments/ssr-nextjs/stack.md +5 -0
- package/templates/project-claude/fragments/ssr-nextjs/tagline.md +1 -0
- package/templates/project-claude/fragments/ssr-nextjs/workflow.md +8 -0
- package/templates/project-claude/fragments/tooling/active-rules.md +11 -0
- package/templates/project-claude/fragments/tooling/agents.md +5 -0
- package/templates/project-claude/fragments/tooling/boundaries.md +17 -0
- package/templates/project-claude/fragments/tooling/commands.md +4 -0
- package/templates/project-claude/fragments/tooling/skills.md +4 -0
- package/templates/project-claude/fragments/tooling/stack.md +5 -0
- package/templates/project-claude/fragments/tooling/tagline.md +1 -0
- package/templates/project-claude/fragments/tooling/workflow.md +5 -0
- package/templates/rules/api-contract.md +33 -0
- package/templates/rules/change-management.md +80 -0
- package/templates/rules/cli-development.md +39 -0
- package/templates/rules/code-style.md +23 -0
- package/templates/rules/data-analysis.md +61 -0
- package/templates/rules/database.md +29 -0
- package/templates/rules/design-workflow.md +17 -0
- package/templates/rules/error-handling.md +23 -0
- package/templates/rules/gates-taxonomy.md +21 -0
- package/templates/rules/git-policy.md +102 -0
- package/templates/rules/htmx.md +42 -0
- package/templates/rules/nextjs.md +35 -0
- package/templates/rules/playwright-launch.md +66 -0
- package/templates/rules/pyside6.md +59 -0
- package/templates/rules/shadcn.md +33 -0
- package/templates/rules/ship-checklist.md +24 -0
- package/templates/rules/tauri.md +40 -0
- package/templates/rules/test-policy.md +62 -0
- package/templates/settings.json +71 -0
- package/templates/skills/agent-introspection-debugging/SKILL.md +153 -0
- package/templates/skills/continuous-learning-v2/SKILL.md +365 -0
- package/templates/skills/continuous-learning-v2/config.json +8 -0
- package/templates/skills/continuous-learning-v2/hooks/observe.sh +428 -0
- package/templates/skills/continuous-learning-v2/scripts/detect-project.sh +228 -0
- package/templates/skills/continuous-learning-v2/scripts/instinct-cli.py +1426 -0
- package/templates/skills/deep-research/SKILL.md +155 -0
- package/templates/skills/deep-research/agents/openai.yaml +7 -0
- package/templates/skills/e2e-testing/SKILL.md +326 -0
- package/templates/skills/e2e-testing/agents/openai.yaml +7 -0
- package/templates/skills/eval-harness/SKILL.md +279 -0
- package/templates/skills/eval-harness/agents/openai.yaml +7 -0
- package/templates/skills/gh-issue-workflow/ISSUE.template.md +58 -0
- package/templates/skills/gh-issue-workflow/SKILL.md +184 -0
- package/templates/skills/investor-materials/SKILL.md +96 -0
- package/templates/skills/investor-outreach/SKILL.md +91 -0
- package/templates/skills/market-research/SKILL.md +75 -0
- package/templates/skills/market-research/agents/openai.yaml +7 -0
- package/templates/skills/nextjs-turbopack/SKILL.md +44 -0
- package/templates/skills/north-star/NORTH_STAR.template.md +114 -0
- package/templates/skills/north-star/SKILL.md +103 -0
- package/templates/skills/python-patterns/SKILL.md +750 -0
- package/templates/skills/python-testing/SKILL.md +816 -0
- package/templates/skills/spec-scaling/SKILL.md +89 -0
- package/templates/skills/strategic-compact/SKILL.md +131 -0
- package/templates/skills/strategic-compact/suggest-compact.sh +54 -0
- package/templates/skills/ui-visual-review/SKILL.md +154 -0
- package/templates/skills/verification-loop/SKILL.md +126 -0
- package/templates/skills/verification-loop/agents/openai.yaml +7 -0
- package/templates/track-mcp-map.tsv +15 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-scaling
|
|
3
|
+
description: "Detects when SPEC.md or PRD.md exceeds 300 lines and proposes feature-based splitting with a master route document. Use when SPEC.md grows too large to be effectively used as a single document."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec Scaling
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
SPEC.md 또는 PRD.md가 300줄을 초과했을 때 자동 트리거.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
1. 현재 SPEC.md/PRD.md의 줄 수를 확인한다.
|
|
15
|
+
2. 300줄 초과 시 기능별 분리를 제안한다 (SPEC와 PRD 둘 다 동일 패턴):
|
|
16
|
+
|
|
17
|
+
### SPEC 분리 (기능별)
|
|
18
|
+
```
|
|
19
|
+
docs/
|
|
20
|
+
├── SPEC.md # 마스터 — 공통 규칙 + 각 기능 파일 라우트
|
|
21
|
+
├── specs/
|
|
22
|
+
│ ├── auth.md # 인증/인가 기능 스펙
|
|
23
|
+
│ ├── dashboard.md # 대시보드 기능 스펙
|
|
24
|
+
│ └── payment.md # 결제 기능 스펙
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### PRD 분리 (제품 영역별)
|
|
28
|
+
```
|
|
29
|
+
docs/
|
|
30
|
+
├── PRD.md # 마스터 — 비전, 사용자, 큰 그림 + 영역 파일 라우트
|
|
31
|
+
└── PRD/ # 영역별 세부 사양
|
|
32
|
+
├── platform-common.md # 플랫폼 공통 (인증, 권한, 인프라)
|
|
33
|
+
├── feature-screener.md # 스크리너 영역
|
|
34
|
+
├── feature-portfolio.md # 포트폴리오 영역
|
|
35
|
+
└── feature-simulator.md # 시뮬레이터 영역
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
> Vantage 프로젝트의 `.claude/PRD/` 구조를 일반화한 것 (도메인 비종속). 본 패턴에서는 `docs/PRD/` 하위에 위치.
|
|
39
|
+
> 두 패턴 모두 **마스터 = 인덱스 + 공통**, **하위 = 독립 참조 가능 단위** 원칙.
|
|
40
|
+
|
|
41
|
+
3. 마스터 SPEC.md 구조:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# SPEC: [프로젝트명]
|
|
45
|
+
|
|
46
|
+
## 공통 규칙
|
|
47
|
+
[전체 적용 Boundaries, Tech Stack, DO NOT CHANGE]
|
|
48
|
+
|
|
49
|
+
## 기능별 스펙
|
|
50
|
+
- [인증/인가](specs/auth.md)
|
|
51
|
+
- [대시보드](specs/dashboard.md)
|
|
52
|
+
- [결제](specs/payment.md)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
4. 마스터 PRD.md 구조:
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
# PRD: [프로젝트명]
|
|
59
|
+
|
|
60
|
+
## 1. 비전 / Personas / NSM
|
|
61
|
+
[North Star 요약 (없으면 생략)]
|
|
62
|
+
|
|
63
|
+
## 2. 영역별 사양
|
|
64
|
+
- [Platform Common](PRD/platform-common.md) — 인증/권한/인프라
|
|
65
|
+
- [Feature: Screener](PRD/feature-screener.md)
|
|
66
|
+
- [Feature: Portfolio](PRD/feature-portfolio.md)
|
|
67
|
+
|
|
68
|
+
## 3. 영역 간 의존성
|
|
69
|
+
- Screener → Portfolio (선택 결과 전달)
|
|
70
|
+
- All → Platform Common (인증 의존)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
5. **인간 승인 후에만 분리 실행**. 자동 분리 금지.
|
|
74
|
+
|
|
75
|
+
## Rules
|
|
76
|
+
|
|
77
|
+
- 공통 규칙(Boundaries, Tech Stack, DO NOT CHANGE)은 마스터에 유지.
|
|
78
|
+
- 각 하위 파일은 독립적으로 참조 가능해야 한다 — 다른 파일을 읽지 않아도 의미 통해야 함.
|
|
79
|
+
- 영역/기능 간 의존성은 마스터에 명시.
|
|
80
|
+
- 분리 후 기존 SPEC.md/PRD.md는 마스터로 변환 (삭제 아님).
|
|
81
|
+
- 하위 파일도 다시 300줄 초과하면 sub-area로 추가 분리 (재귀 적용).
|
|
82
|
+
|
|
83
|
+
## When to Split SPEC vs PRD
|
|
84
|
+
|
|
85
|
+
| 경우 | 분리 대상 |
|
|
86
|
+
|------|---------|
|
|
87
|
+
| 비즈니스 맥락 / 사용자 시나리오가 큰 비중 | PRD 우선 분리 |
|
|
88
|
+
| 기술 스펙이 핵심 (API, 데이터 모델, AC) | SPEC 우선 분리 |
|
|
89
|
+
| 둘 다 큰 경우 | PRD를 영역별로, SPEC를 기능별로 (서로 cross-link) |
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strategic-compact
|
|
3
|
+
description: Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Strategic Compact Skill
|
|
8
|
+
|
|
9
|
+
Suggests manual `/compact` at strategic points in your workflow rather than relying on arbitrary auto-compaction.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
- Running long sessions that approach context limits (200K+ tokens)
|
|
14
|
+
- Working on multi-phase tasks (research → plan → implement → test)
|
|
15
|
+
- Switching between unrelated tasks within the same session
|
|
16
|
+
- After completing a major milestone and starting new work
|
|
17
|
+
- When responses slow down or become less coherent (context pressure)
|
|
18
|
+
|
|
19
|
+
## Why Strategic Compaction?
|
|
20
|
+
|
|
21
|
+
Auto-compaction triggers at arbitrary points:
|
|
22
|
+
- Often mid-task, losing important context
|
|
23
|
+
- No awareness of logical task boundaries
|
|
24
|
+
- Can interrupt complex multi-step operations
|
|
25
|
+
|
|
26
|
+
Strategic compaction at logical boundaries:
|
|
27
|
+
- **After exploration, before execution** — Compact research context, keep implementation plan
|
|
28
|
+
- **After completing a milestone** — Fresh start for next phase
|
|
29
|
+
- **Before major context shifts** — Clear exploration context before different task
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
The `suggest-compact.js` script runs on PreToolUse (Edit/Write) and:
|
|
34
|
+
|
|
35
|
+
1. **Tracks tool calls** — Counts tool invocations in session
|
|
36
|
+
2. **Threshold detection** — Suggests at configurable threshold (default: 50 calls)
|
|
37
|
+
3. **Periodic reminders** — Reminds every 25 calls after threshold
|
|
38
|
+
|
|
39
|
+
## Hook Setup
|
|
40
|
+
|
|
41
|
+
Add to your `~/.claude/settings.json`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"hooks": {
|
|
46
|
+
"PreToolUse": [
|
|
47
|
+
{
|
|
48
|
+
"matcher": "Edit",
|
|
49
|
+
"hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"matcher": "Write",
|
|
53
|
+
"hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
Environment variables:
|
|
63
|
+
- `COMPACT_THRESHOLD` — Tool calls before first suggestion (default: 50)
|
|
64
|
+
|
|
65
|
+
## Compaction Decision Guide
|
|
66
|
+
|
|
67
|
+
Use this table to decide when to compact:
|
|
68
|
+
|
|
69
|
+
| Phase Transition | Compact? | Why |
|
|
70
|
+
|-----------------|----------|-----|
|
|
71
|
+
| Research → Planning | Yes | Research context is bulky; plan is the distilled output |
|
|
72
|
+
| Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |
|
|
73
|
+
| Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |
|
|
74
|
+
| Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |
|
|
75
|
+
| Mid-implementation | No | Losing variable names, file paths, and partial state is costly |
|
|
76
|
+
| After a failed approach | Yes | Clear the dead-end reasoning before trying a new approach |
|
|
77
|
+
|
|
78
|
+
## What Survives Compaction
|
|
79
|
+
|
|
80
|
+
Understanding what persists helps you compact with confidence:
|
|
81
|
+
|
|
82
|
+
| Persists | Lost |
|
|
83
|
+
|----------|------|
|
|
84
|
+
| CLAUDE.md instructions | Intermediate reasoning and analysis |
|
|
85
|
+
| TodoWrite task list | File contents you previously read |
|
|
86
|
+
| Memory files (`~/.claude/memory/`) | Multi-step conversation context |
|
|
87
|
+
| Git state (commits, branches) | Tool call history and counts |
|
|
88
|
+
| Files on disk | Nuanced user preferences stated verbally |
|
|
89
|
+
|
|
90
|
+
## Best Practices
|
|
91
|
+
|
|
92
|
+
1. **Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh
|
|
93
|
+
2. **Compact after debugging** — Clear error-resolution context before continuing
|
|
94
|
+
3. **Don't compact mid-implementation** — Preserve context for related changes
|
|
95
|
+
4. **Read the suggestion** — The hook tells you *when*, you decide *if*
|
|
96
|
+
5. **Write before compacting** — Save important context to files or memory before compacting
|
|
97
|
+
6. **Use `/compact` with a summary** — Add a custom message: `/compact Focus on implementing auth middleware next`
|
|
98
|
+
|
|
99
|
+
## Token Optimization Patterns
|
|
100
|
+
|
|
101
|
+
### Trigger-Table Lazy Loading
|
|
102
|
+
Instead of loading full skill content at session start, use a trigger table that maps keywords to skill paths. Skills load only when triggered, reducing baseline context by 50%+:
|
|
103
|
+
|
|
104
|
+
| Trigger | Skill | Load When |
|
|
105
|
+
|---------|-------|-----------|
|
|
106
|
+
| "test", "tdd", "coverage" | tdd-workflow | User mentions testing |
|
|
107
|
+
| "security", "auth", "xss" | security-review | Security-related work |
|
|
108
|
+
| "deploy", "ci/cd" | deployment-patterns | Deployment context |
|
|
109
|
+
|
|
110
|
+
### Context Composition Awareness
|
|
111
|
+
Monitor what's consuming your context window:
|
|
112
|
+
- **CLAUDE.md files** — Always loaded, keep lean
|
|
113
|
+
- **Loaded skills** — Each skill adds 1-5K tokens
|
|
114
|
+
- **Conversation history** — Grows with each exchange
|
|
115
|
+
- **Tool results** — File reads, search results add bulk
|
|
116
|
+
|
|
117
|
+
### Duplicate Instruction Detection
|
|
118
|
+
Common sources of duplicate context:
|
|
119
|
+
- Same rules in both `~/.claude/rules/` and project `.claude/rules/`
|
|
120
|
+
- Skills that repeat CLAUDE.md instructions
|
|
121
|
+
- Multiple skills covering overlapping domains
|
|
122
|
+
|
|
123
|
+
### Context Optimization Tools
|
|
124
|
+
- `token-optimizer` MCP — Automated 95%+ token reduction via content deduplication
|
|
125
|
+
- `context-mode` — Context virtualization (315KB to 5.4KB demonstrated)
|
|
126
|
+
|
|
127
|
+
## Related
|
|
128
|
+
|
|
129
|
+
- [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) — Token optimization section
|
|
130
|
+
- Memory persistence hooks — For state that survives compaction
|
|
131
|
+
- `continuous-learning` skill — Extracts patterns before session ends
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Strategic Compact Suggester
|
|
3
|
+
# Runs on PreToolUse or periodically to suggest manual compaction at logical intervals
|
|
4
|
+
#
|
|
5
|
+
# Why manual over auto-compact:
|
|
6
|
+
# - Auto-compact happens at arbitrary points, often mid-task
|
|
7
|
+
# - Strategic compacting preserves context through logical phases
|
|
8
|
+
# - Compact after exploration, before execution
|
|
9
|
+
# - Compact after completing a milestone, before starting next
|
|
10
|
+
#
|
|
11
|
+
# Hook config (in ~/.claude/settings.json):
|
|
12
|
+
# {
|
|
13
|
+
# "hooks": {
|
|
14
|
+
# "PreToolUse": [{
|
|
15
|
+
# "matcher": "Edit|Write",
|
|
16
|
+
# "hooks": [{
|
|
17
|
+
# "type": "command",
|
|
18
|
+
# "command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
|
|
19
|
+
# }]
|
|
20
|
+
# }]
|
|
21
|
+
# }
|
|
22
|
+
# }
|
|
23
|
+
#
|
|
24
|
+
# Criteria for suggesting compact:
|
|
25
|
+
# - Session has been running for extended period
|
|
26
|
+
# - Large number of tool calls made
|
|
27
|
+
# - Transitioning from research/exploration to implementation
|
|
28
|
+
# - Plan has been finalized
|
|
29
|
+
|
|
30
|
+
# Track tool call count (increment in a temp file)
|
|
31
|
+
# Use CLAUDE_SESSION_ID for session-specific counter (not $$ which changes per invocation)
|
|
32
|
+
SESSION_ID="${CLAUDE_SESSION_ID:-${PPID:-default}}"
|
|
33
|
+
COUNTER_FILE="/tmp/claude-tool-count-${SESSION_ID}"
|
|
34
|
+
THRESHOLD=${COMPACT_THRESHOLD:-50}
|
|
35
|
+
|
|
36
|
+
# Initialize or increment counter
|
|
37
|
+
if [ -f "$COUNTER_FILE" ]; then
|
|
38
|
+
count=$(cat "$COUNTER_FILE")
|
|
39
|
+
count=$((count + 1))
|
|
40
|
+
echo "$count" > "$COUNTER_FILE"
|
|
41
|
+
else
|
|
42
|
+
echo "1" > "$COUNTER_FILE"
|
|
43
|
+
count=1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Suggest compact after threshold tool calls
|
|
47
|
+
if [ "$count" -eq "$THRESHOLD" ]; then
|
|
48
|
+
echo "[StrategicCompact] $THRESHOLD tool calls reached - consider /compact if transitioning phases" >&2
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# Suggest at regular intervals after threshold
|
|
52
|
+
if [ "$count" -gt "$THRESHOLD" ] && [ $((count % 25)) -eq 0 ]; then
|
|
53
|
+
echo "[StrategicCompact] $count tool calls - good checkpoint for /compact if context is stale" >&2
|
|
54
|
+
fi
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-visual-review
|
|
3
|
+
description: "Captures screenshots of key UI flows after E2E tests pass, runs an agent-side first-pass diff (regressions, console errors, layout shifts), then surfaces a checklist for the user's final approval. Use after /uzys:test passes on a UI track (csr-*, ssr-*, full). Adapts the GoalTrack screenshot-review pattern into a repeatable workflow."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI Visual Review
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
E2E 테스트가 PASS 했어도 시각적 회귀(layout shift, 색상/간격 변화, 빈 화면, 잘림)는 functional test가 못 잡는다. 본 skill은:
|
|
11
|
+
|
|
12
|
+
1. 핵심 사용자 화면을 자동 캡처
|
|
13
|
+
2. 이전 baseline과 diff
|
|
14
|
+
3. 에이전트가 명백한 regression 1차 판정
|
|
15
|
+
4. 사용자가 최종 승인 → 새 baseline 채택 또는 수정 요청
|
|
16
|
+
|
|
17
|
+
GoalTrack의 `docs/screenshots/` 수동 패턴(mvp-home / v3-search / v4-wiki 등)을 자동화한 형태.
|
|
18
|
+
|
|
19
|
+
## When to Invoke
|
|
20
|
+
|
|
21
|
+
| 트리거 | 행동 |
|
|
22
|
+
|--------|------|
|
|
23
|
+
| `/uzys:test` PASS + UI Track(csr-*/ssr-*/full) | 본 skill 호출 권유 |
|
|
24
|
+
| `/uzys:review` UI 변경 PR | visual diff 결과 review 입력으로 |
|
|
25
|
+
| 의도적 디자인 변경 후 baseline 갱신 | "approve all" 옵션 |
|
|
26
|
+
| Track이 data/tooling/executive | **skip** — UI 없음 |
|
|
27
|
+
|
|
28
|
+
## Pre-conditions
|
|
29
|
+
|
|
30
|
+
- Playwright 또는 chrome-devtools MCP 사용 가능 (UI Track 설치 시 기본 포함)
|
|
31
|
+
- 앱이 로컬에서 기동 가능 (예: `pnpm dev`, `docker-compose up`)
|
|
32
|
+
- 핵심 화면 URL 리스트가 정의됨 (없으면 본 skill 첫 실행 시 사용자 질의)
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### 1. 화면 리스트업 (한 번만)
|
|
37
|
+
|
|
38
|
+
`docs/visual-pages.json` 부재 시 사용자에게 핵심 화면을 묻는다 (5-10개 권장):
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"base_url": "http://localhost:3000",
|
|
43
|
+
"pages": [
|
|
44
|
+
{ "id": "login", "path": "/login", "wait_for": "form" },
|
|
45
|
+
{ "id": "home", "path": "/", "wait_for": "main", "auth": "user1" },
|
|
46
|
+
{ "id": "detail", "path": "/items/sample", "auth": "user1" },
|
|
47
|
+
{ "id": "settings", "path": "/settings", "auth": "user1" }
|
|
48
|
+
],
|
|
49
|
+
"viewports": [
|
|
50
|
+
{ "name": "desktop", "width": 1440, "height": 900 },
|
|
51
|
+
{ "name": "mobile", "width": 375, "height": 812 }
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`auth` 키는 `docs/visual-auth.example.json`(별도 시크릿)에서 매핑.
|
|
57
|
+
|
|
58
|
+
### 2. 캡처
|
|
59
|
+
|
|
60
|
+
각 page × viewport 조합으로 스크린샷 캡처. chrome-devtools MCP 사용 예:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
for page in pages:
|
|
64
|
+
navigate_page({url: base_url + page.path})
|
|
65
|
+
wait_for({text: page.wait_for})
|
|
66
|
+
take_screenshot({fullPage: true})
|
|
67
|
+
→ 저장: docs/screenshots/<branch-or-date>/<page.id>__<viewport.name>.png
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
저장 경로 규칙: `docs/screenshots/<phase>/<page_id>__<viewport>.png`. `phase`는 git branch 이름 또는 `YYYY-MM-DD-HHmm`.
|
|
71
|
+
|
|
72
|
+
### 3. Diff (baseline 대비)
|
|
73
|
+
|
|
74
|
+
baseline 위치: `docs/screenshots/baseline/`. 첫 실행이면 현재 캡처가 baseline.
|
|
75
|
+
|
|
76
|
+
비교 방식 (간단 → 정밀 순):
|
|
77
|
+
- **L1 (해시)**: `sha256` 비교. 같으면 PASS, 다르면 L2.
|
|
78
|
+
- **L2 (pixelmatch)**: `pixelmatch` 또는 ImageMagick `compare -metric AE`. threshold(예: 0.5%) 이내 PASS.
|
|
79
|
+
- **L3 (시각 검토)**: L2 fail 시 에이전트가 두 이미지를 LLM 입력으로 보고 차이 서술.
|
|
80
|
+
|
|
81
|
+
L1만 구현해도 50% 가치. L2는 의존성 추가.
|
|
82
|
+
|
|
83
|
+
### 4. 에이전트 1차 리뷰 (자동)
|
|
84
|
+
|
|
85
|
+
L2/L3 fail이거나 차이가 임계 이상이면 에이전트가 다음 휴리스틱으로 명백한 regression 판정:
|
|
86
|
+
|
|
87
|
+
| 시그널 | 분류 |
|
|
88
|
+
|--------|------|
|
|
89
|
+
| 빈 화면 / 흰 페이지 | **REGRESSION** |
|
|
90
|
+
| 콘솔 에러 (chrome-devtools `list_console_messages`) | **REGRESSION** |
|
|
91
|
+
| 핵심 컴포넌트(navbar, main content) 누락 | **REGRESSION** |
|
|
92
|
+
| 색상/간격 미세 변화 | **CHANGED** (사용자 판단) |
|
|
93
|
+
| 의도된 카피/레이아웃 변경 | **EXPECTED** (커밋 메시지 매칭) |
|
|
94
|
+
|
|
95
|
+
### 5. 결과 보고
|
|
96
|
+
|
|
97
|
+
`docs/visual-review-<phase>.md` 생성:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
# Visual Review — 2026-04-20
|
|
101
|
+
|
|
102
|
+
## Summary
|
|
103
|
+
- 8 pages × 2 viewports = 16 captures
|
|
104
|
+
- PASS (no diff): 12
|
|
105
|
+
- CHANGED (review needed): 3
|
|
106
|
+
- REGRESSION: 1
|
|
107
|
+
|
|
108
|
+
## REGRESSION
|
|
109
|
+
- `home__desktop`: 콘솔 에러 "Cannot read properties of undefined" + main 영역 빈 화면
|
|
110
|
+
|
|
111
|
+
## CHANGED
|
|
112
|
+
- `login__mobile`: 버튼 색상 변경 (의도 추정 — git diff에 button.primary 수정 발견)
|
|
113
|
+
- `settings__desktop`: spacing 변화
|
|
114
|
+
|
|
115
|
+
## PASS
|
|
116
|
+
- (생략)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 6. 사용자 승인 게이트
|
|
120
|
+
|
|
121
|
+
사용자가 `docs/visual-review-<phase>.md` 보고 다음 중 결정:
|
|
122
|
+
|
|
123
|
+
- **REGRESSION 있음** → 수정 후 재실행 (Revision Gate)
|
|
124
|
+
- **CHANGED만 있음** → 항목별 approve 또는 reject. approve 시 baseline 업데이트
|
|
125
|
+
- **PASS만 있음** → 자동 baseline 업데이트 가능
|
|
126
|
+
|
|
127
|
+
## Output
|
|
128
|
+
|
|
129
|
+
- `docs/screenshots/<phase>/*.png` — 캡처본
|
|
130
|
+
- `docs/screenshots/baseline/*.png` — 승인된 baseline
|
|
131
|
+
- `docs/visual-review-<phase>.md` — diff 리포트
|
|
132
|
+
|
|
133
|
+
## Integration with Workflow
|
|
134
|
+
|
|
135
|
+
- **`/uzys:test`**: UI Track + `docs/visual-pages.json` 존재 시 PASS 후 본 skill 자동 호출 권유
|
|
136
|
+
- **`/uzys:review`**: visual-review-<phase>.md 가 있으면 review 입력으로 흡수. REGRESSION 1건이라도 있으면 Review Gate 차단
|
|
137
|
+
- **`/uzys:auto`**: revision loop에 포함 (REGRESSION → 수정 → 재캡처 → 재diff)
|
|
138
|
+
|
|
139
|
+
## Anti-Patterns
|
|
140
|
+
|
|
141
|
+
- **사용자 승인 없이 baseline 자동 갱신** — 의도하지 않은 regression이 영구화. 항상 명시적 approve 필요
|
|
142
|
+
- **모든 페이지 다 캡처 (50+)** — 노이즈 폭증. 핵심 5-10개로 시작
|
|
143
|
+
- **viewport 1개만** — mobile 깨짐 놓침. desktop + mobile 최소 2개
|
|
144
|
+
- **L3(LLM 시각 비교) 매번 호출** — 비용. L1/L2에서 못 거른 것만 L3
|
|
145
|
+
- **screenshots/ 디렉토리 git에 커밋 X** — 회귀 비교 불가. `docs/screenshots/baseline/`은 커밋, `<phase>/`는 gitignore
|
|
146
|
+
|
|
147
|
+
## Examples
|
|
148
|
+
|
|
149
|
+
GoalTrack 프로젝트의 수동 패턴 (참고):
|
|
150
|
+
- `docs/screenshots/mvp-home-empty.png`, `mvp-home-list.png` — 같은 화면 다른 상태
|
|
151
|
+
- `crypto-365d-after-fix.png`, `crypto-365d-round2.png` — 수정 round별 보존
|
|
152
|
+
- `shared_portfolio.png`, `shared_simulation.png` — 기능별 핵심 화면
|
|
153
|
+
|
|
154
|
+
본 skill은 그 패턴을 자동화 + diff + 에이전트 사전 판정 추가.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-loop
|
|
3
|
+
description: "A comprehensive verification system for Claude Code sessions."
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Verification Loop Skill
|
|
8
|
+
|
|
9
|
+
A comprehensive verification system for Claude Code sessions.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Invoke this skill:
|
|
14
|
+
- After completing a feature or significant code change
|
|
15
|
+
- Before creating a PR
|
|
16
|
+
- When you want to ensure quality gates pass
|
|
17
|
+
- After refactoring
|
|
18
|
+
|
|
19
|
+
## Verification Phases
|
|
20
|
+
|
|
21
|
+
### Phase 1: Build Verification
|
|
22
|
+
```bash
|
|
23
|
+
# Check if project builds
|
|
24
|
+
npm run build 2>&1 | tail -20
|
|
25
|
+
# OR
|
|
26
|
+
pnpm build 2>&1 | tail -20
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If build fails, STOP and fix before continuing.
|
|
30
|
+
|
|
31
|
+
### Phase 2: Type Check
|
|
32
|
+
```bash
|
|
33
|
+
# TypeScript projects
|
|
34
|
+
npx tsc --noEmit 2>&1 | head -30
|
|
35
|
+
|
|
36
|
+
# Python projects
|
|
37
|
+
pyright . 2>&1 | head -30
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Report all type errors. Fix critical ones before continuing.
|
|
41
|
+
|
|
42
|
+
### Phase 3: Lint Check
|
|
43
|
+
```bash
|
|
44
|
+
# JavaScript/TypeScript
|
|
45
|
+
npm run lint 2>&1 | head -30
|
|
46
|
+
|
|
47
|
+
# Python
|
|
48
|
+
ruff check . 2>&1 | head -30
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Phase 4: Test Suite
|
|
52
|
+
```bash
|
|
53
|
+
# Run tests with coverage
|
|
54
|
+
npm run test -- --coverage 2>&1 | tail -50
|
|
55
|
+
|
|
56
|
+
# Check coverage threshold
|
|
57
|
+
# Target: 80% minimum
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Report:
|
|
61
|
+
- Total tests: X
|
|
62
|
+
- Passed: X
|
|
63
|
+
- Failed: X
|
|
64
|
+
- Coverage: X%
|
|
65
|
+
|
|
66
|
+
### Phase 5: Security Scan
|
|
67
|
+
```bash
|
|
68
|
+
# Check for secrets
|
|
69
|
+
grep -rn "sk-" --include="*.ts" --include="*.js" . 2>/dev/null | head -10
|
|
70
|
+
grep -rn "api_key" --include="*.ts" --include="*.js" . 2>/dev/null | head -10
|
|
71
|
+
|
|
72
|
+
# Check for console.log
|
|
73
|
+
grep -rn "console.log" --include="*.ts" --include="*.tsx" src/ 2>/dev/null | head -10
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Phase 6: Diff Review
|
|
77
|
+
```bash
|
|
78
|
+
# Show what changed
|
|
79
|
+
git diff --stat
|
|
80
|
+
git diff HEAD~1 --name-only
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Review each changed file for:
|
|
84
|
+
- Unintended changes
|
|
85
|
+
- Missing error handling
|
|
86
|
+
- Potential edge cases
|
|
87
|
+
|
|
88
|
+
## Output Format
|
|
89
|
+
|
|
90
|
+
After running all phases, produce a verification report:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
VERIFICATION REPORT
|
|
94
|
+
==================
|
|
95
|
+
|
|
96
|
+
Build: [PASS/FAIL]
|
|
97
|
+
Types: [PASS/FAIL] (X errors)
|
|
98
|
+
Lint: [PASS/FAIL] (X warnings)
|
|
99
|
+
Tests: [PASS/FAIL] (X/Y passed, Z% coverage)
|
|
100
|
+
Security: [PASS/FAIL] (X issues)
|
|
101
|
+
Diff: [X files changed]
|
|
102
|
+
|
|
103
|
+
Overall: [READY/NOT READY] for PR
|
|
104
|
+
|
|
105
|
+
Issues to Fix:
|
|
106
|
+
1. ...
|
|
107
|
+
2. ...
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Continuous Mode
|
|
111
|
+
|
|
112
|
+
For long sessions, run verification every 15 minutes or after major changes:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
Set a mental checkpoint:
|
|
116
|
+
- After completing each function
|
|
117
|
+
- After finishing a component
|
|
118
|
+
- Before moving to next task
|
|
119
|
+
|
|
120
|
+
Run: /verify
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Integration with Hooks
|
|
124
|
+
|
|
125
|
+
This skill complements PostToolUse hooks but provides deeper verification.
|
|
126
|
+
Hooks catch issues immediately; this skill provides comprehensive review.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# track-mcp-map.tsv — Track별 MCP 서버 매핑 데이터
|
|
2
|
+
# v26.12.0 — setup-harness.sh의 .mcp.json 조립 case문 외재화 (deep-research 권장)
|
|
3
|
+
#
|
|
4
|
+
# 형식 (탭 구분):
|
|
5
|
+
# <mcp_name> <track_pattern> <command> <args_json>
|
|
6
|
+
#
|
|
7
|
+
# - mcp_name: .mcp.json의 mcpServers[키]
|
|
8
|
+
# - track_pattern: any_track 패턴 (csr-*|full 같은 bash glob)
|
|
9
|
+
# - command: 실행 명령 (npx 등)
|
|
10
|
+
# - args_json: jq 인자 배열 (JSON 형식)
|
|
11
|
+
#
|
|
12
|
+
# 신규 MCP 추가 시: 이 파일에 1줄 추가만 하면 setup-harness.sh 수정 불필요.
|
|
13
|
+
# 주석 (#) 라인은 무시.
|
|
14
|
+
railway-mcp-server csr-supabase|csr-fastify|csr-fastapi|ssr-htmx|ssr-nextjs|full npx ["-y", "@railway/mcp-server"]
|
|
15
|
+
supabase csr-supabase|full npx ["-y", "@supabase/mcp-server"]
|