Skip to content

Commit fba3cde

Browse files
ComBbaclaude
andcommitted
docs: Phase K — CHANGELOG 1.3.0, README profiles section, LESSON 0.9
plugins/preview-forge/CHANGELOG.md: full 1.3.0 entry documenting profiles, Rule 9 drift detector, P0-B cost regression, surface detection, preview cache, all 11 agent budget changes, auto-extend SCC, tools-vs-agents split. README.md: new "Profiles (v1.3+)" section with comparison table and "Cost regression + drift detection" subsection. Quick Install snippet now shows --profile=standard|pro|max usage examples. memory/LESSONS.md: LESSON 0.9 — "한 flag 매트릭스 대신 profile 단일화". Documents the design decision to collapse 4 boolean flags × 16 combos into a single --profile flag. References devops-architect panel vote. No version-number edits — release-please will handle the bump on merge via .release-please-manifest.json and extra-files jsonpaths. verify-plugin.sh: 45/45 local checks pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 516712c commit fba3cde

3 files changed

Lines changed: 158 additions & 2 deletions

File tree

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,32 @@ single HTML file, print-friendly.
6464
# 4. Initialize memory (first time only)
6565
/pf:bootstrap
6666

67-
# 5. Run
67+
# 5. Run (profile defaults to `pro`)
6868
/pf:new "한 줄 아이디어"
69+
70+
# …or pick a profile explicitly:
71+
/pf:new "demo-class idea" --profile=standard # ~60k tok · 2×5 eng · 9 previews
72+
/pf:new "real project" --profile=pro # ~250k tok · 3×5 eng · 18 previews (default)
73+
/pf:new "production launch" --profile=max # ~600k tok · 5×5 eng · 26 previews
6974
```
7075

76+
## Profiles (v1.3+)
77+
78+
| Profile | Previews | Eng teams | Panels | SCC iter | P95 ceiling | Use for |
79+
|---|---|---|---|---|---|---|
80+
| **standard** | 9 | 2×5 (BE+FE) | keyword-trigger | 3 | ~60k tok / 25 min | Demo · prototyping |
81+
| **pro** *(default)* | 18 | 3×5 (+DB) | keyword-trigger + escalation | 4 | ~250k tok / 70 min | Real projects |
82+
| **max** | 26 | 5×5 (all) | always-on | 5 | ~600k tok / 160 min | Production · baselines |
83+
84+
- `--previews=N` overrides the count (bounded by `max_user_expand` = 26).
85+
- `--no-cache` bypasses the PreviewDD-level cache (default TTL: 7 days for standard/pro, never cached for max).
86+
- Full spec: [`plugins/preview-forge/profiles/`](plugins/preview-forge/profiles/).
87+
88+
### Cost regression + drift detection (v1.3+)
89+
90+
- **Rule 9 idea-drift detector** (`hooks/idea-drift-detector.py`) catches the failure where Gate H1 picks product A but SpecDD/Engineering drift to product B. Containment coefficient over token sets (no external ML deps). Block threshold 0.3, warn at 0.4.
91+
- **P0-B cost-regression sentinel** (`hooks/cost-regression.py`) compares `cost-snapshot.json` against the active profile's P95/hard ceiling every 30s. Hard breach triggers auto-pause + AskUserQuestion handoff.
92+
7193
## Updating
7294

7395
We release patches and feature updates frequently (see

plugins/preview-forge/CHANGELOG.md

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,132 @@
22

33
All notable changes to this plugin will be documented in this file.
44

5-
## [1.0.0] — 2026-04-22 (in progress)
5+
## [1.3.0] — 2026-04-23 (in progress)
6+
7+
### Added — `--profile` system (standard · pro · max)
8+
9+
Single flag replaces the old `--lean/--previews=N/--single-team/--skip-panels`
10+
matrix (4 booleans × 16 combinations) that the devops-architect panel
11+
vote rejected. `--profile=pro` is the default.
12+
13+
- **`profiles/standard.json`**: 9 previews · 2×5 eng (BE+FE) · keyword-triggered
14+
panels · SCC iter=3 · P95 60k tok / 25 min. Demo / prototyping.
15+
- **`profiles/pro.json`**: 18 previews · 3×5 eng (+DB) · keyword-triggered with
16+
escalation · SCC iter=4 · P95 250k tok / 70 min. **Default**. Real projects.
17+
- **`profiles/max.json`**: 26 previews · 5×5 eng (all disciplines) · all panels
18+
always-on · SCC iter=5 · P95 600k tok / 160 min. Production / baselines.
19+
- **`schemas/pf-profile.schema.json`**: Draft-07 schema, CI-validated.
20+
21+
### Added — Layer-0 Rule 9 (idea-drift detector)
22+
23+
Catches the failure mode "Gate H1 picks P10 API but SpecDD/Engineering
24+
drift to P02 Slack" — usually template caching or agent memory leak.
25+
26+
- **`hooks/idea-drift-detector.py`**: PreToolUse hook. Containment coefficient
27+
`|chosen ∩ incoming| / |chosen|` over stopword-filtered tokens. Default
28+
threshold 0.4. No external deps (stdlib only, LESSON 0.4).
29+
- **Scope**: `runs/*/specs/SPEC.md` · `openapi.yaml(.lock)?` · `apps/*/README.md`.
30+
- **Exit**: 0 allow · 1 warn (0.3–0.4) · 2 block (<0.3).
31+
- **Bypass**: `PF_DRIFT_BYPASS=1` + `PF_DRIFT_REASON=...` for intentional scope expansion.
32+
33+
### Added — P0-B cost-regression sentinel
34+
35+
- **`hooks/cost-regression.py`**: standalone CLI + monitor watcher. Reads
36+
`runs/<id>/cost-snapshot.json`, compares against profile's `cost_ceiling`
37+
(P95 + hard). Writes blackboard row at severity `warn` or `alert`.
38+
- **`monitors/monitors.json`**: cost-regression watcher runs every 30s
39+
per run dir.
40+
- Hard-ceiling breach triggers M1 Run Supervisor to pause + AskUserQuestion.
41+
42+
### Added — Surface-type detection (Proposal #2)
43+
44+
- **`scripts/detect-surface.sh`**: regex-gate over idea.json → classifies
45+
rest-first / ui-first / hybrid. Bilingual keyword banks (EN + KO).
46+
Outputs `{"surface": ..., "stack_hint": ...}` JSON.
47+
- Fixes the "Next.js 16 blindly applied to API-first products" failure
48+
reported by system-architect panel (Minutes.ai case).
49+
- Stack routing: rest-first → nestia · ui-first → Next.js 16 · hybrid → both.
50+
51+
### Added — PreviewDD cache (Proposal #11)
52+
53+
- **`scripts/preview-cache.sh`** {key|get|put|invalidate|prune}.
54+
- Cache key: `sha256(idea + advocate_set + model_version + profile)`.
55+
- TTL from profile: standard/pro 7 days, max never (0 = production safety).
56+
- `/pf:new --no-cache` forces bypass.
57+
- ~60% token saving on demo re-runs with identical idea.
58+
59+
### Changed
60+
61+
- **Agent budgets** are now profile-aware across all tiers:
62+
- Preview Advocates (26): 20K → profile (12K / 14K / 20K)
63+
- Panel Leads (4): 120K → profile (60K / 84K / 120K)
64+
- Panel Members (40): 40K → profile (24K / 28K / 40K)
65+
- QA Leads (4): 80K → profile (48K / 56K / 80K)
66+
- QA Members (14): 40K → profile (24K / 28K / 40K)
67+
- SCC Lead: 80K → profile (56K / 64K / 80K)
68+
- M3 Chief Engineer: 120K → profile (84K / 100K / 120K)
69+
- **`/pf:new`** accepts `--profile=standard|pro|max` · `--previews=N` ·
70+
`--no-cache`. Default = `pro`.
71+
- **`/pf:status`** + **`/pf:budget`** now show active profile + budget-to-ceiling.
72+
- **SCC auto-extend**: if error count is decreasing (`e_i < e_{i-1}`),
73+
allow up to +2 iter beyond `max_iter` for convergence.
74+
- **Panel activation**: standard/pro `keyword-trigger` mode — panels only
75+
activate if idea keywords match trigger list. pro auto-escalates to full
76+
panel on unknown-unknown detection (advocate dispersion > 0.7).
77+
78+
### Methodology
79+
80+
- **`methodology/global.md`** gains Rule 9 (idea-drift fidelity).
81+
- **QA tools-vs-agents separation** formalized in `qa/security/secqa-lead.md`:
82+
tools (semgrep, gitleaks, axe-core, lighthouse, owasp-zap) always run
83+
regardless of agent count. Only agents scale with profile.
84+
85+
### CI
86+
87+
- Validate all 3 profiles against schema on every PR.
88+
- New test matrices: idea-drift (5 cases), cost-regression (6 cases),
89+
detect-surface (3 cases), preview-cache (4 cases).
90+
- verify-plugin.sh now runs 45 checks (was 38).
91+
92+
### Rationale
93+
94+
All decisions ratified by 5-expert panel: system-architect, refactoring-expert,
95+
root-cause-analyst, quality-engineer, devops-architect. See PR body for the
96+
full debate summary.
97+
98+
## [1.2.1] — 2026-04-22
99+
100+
### Fixed
101+
- release-please manifest mode so plugin.json + marketplace.json sync on tag.
102+
103+
## [1.2.0] — 2026-04-22
104+
105+
### Added — Layer-0 Rule 8 (run artifact single-writer)
106+
107+
- `hooks/factory-policy.py` gains run-artifact enforcement: only the M1
108+
Run Supervisor can write to `runs/*/chosen_preview.json(.lock)?` ·
109+
`.panel-recommended.json` · `design-approved.json(.lock)?` ·
110+
`mitigations.json` · `panels/meta-tally.json` · `score/report.json` ·
111+
`.frozen-hash`.
112+
- External out-of-band editors (sibling skills, other assistant sessions,
113+
user manual edits) blocked with exit 2.
114+
- Bypass via `PF_WRITER_ROLE=supervisor` env var (supervisor slash-command flow).
115+
116+
## [1.1.0] — 2026-04-22
117+
118+
### Fixed — UX gap from first real run
119+
120+
- **Gate H1 is now preview-selection + design-tweak (was design-only)**
121+
- `commands/design.md` rewritten: AskUserQuestion 4옵션 (Recommended /
122+
Alt A / Alt B / Gallery of 26).
123+
- `chosen_preview.panel-recommended.json` backup of panel's original pick.
124+
125+
## [1.0.0] — 2026-04-22
6126

7127
### Added
8128
- Plugin manifest (`.claude-plugin/plugin.json`)
9129
- Apache-2.0 license + NOTICE
130+
- 143 Opus 4.7 agents across 6 tiers
131+
- 14 slash commands (`/pf:*`)
132+
- 3 hooks (factory-policy, askuser-enforcement, auto-retro-trigger)
133+
- 3-DD methodology (PreviewDD → SpecDD → TestDD)

plugins/preview-forge/memory/LESSONS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99

1010
## 0. 플러그인 개발 자체에서 배운 것 (bootstrap)
1111

12+
### 0.9 한 flag 매트릭스 대신 profile 단일화 — 구성 표면적 최소화 (category 6 Plugin 배포, UX)
13+
14+
- **문제**: v1.2.x의 e2e run이 2시간+ · 토큰 수백만 소모. "lean mode"로 축소하려는 v1.3.0 초안이 4개 boolean 플래그 (`--lean --previews=N --single-team --skip-panels`) → 16개 조합을 만들어 사용자가 "어떤 조합이 올바른 조합인지" 판단 불가. devops-architect 패널이 "이 매트릭스는 문서화도 테스트도 지원 불가"라고 거부.
15+
16+
- **원인**: 세 가지 직교 축(속도·깊이·안전)을 독립 플래그로 노출하면 matrix explosion. 사용자는 의미 있는 '세트'를 원하지 축별 토글을 원하지 않음.
17+
18+
- **해결**: v1.3.0에서 `--profile=standard|pro|max` 단일 플래그로 치환. 각 profile이 previews 수·eng 팀 수·panel 모드·SCC iter·budget ceiling을 통째로 묶음. `standard=demo/prototype`, `pro=default/real project`, `max=production/baseline`. 플래그 매트릭스 폐기. settings.json의 `defaultProfile`로 tenant/팀별 기본값 설정 가능. 개별 축 override는 `--previews=N` 같은 명시적 escape 플래그로만 제한.
19+
20+
- **참조**: `plugins/preview-forge/profiles/{standard,pro,max}.json`, `schemas/pf-profile.schema.json`, v1.3.0 PR body의 5-전문가 패널 토론 요약, devops-architect 투표 ("config in settings.json not env, profile not flag-matrix").
21+
1222
### 0.8 Live run artifact에 외부 writer 금지 — single-writer 원칙 (category 9 Agent communication, 경쟁 조건)
1323

1424
- **문제**: 2026-04-22 r-20260422-184337 실행 중, 외부 대화 세션(보조 assistant)이 `/pf:design` Gate H1이 열리기 전 `chosen_preview.json`을 P02 → P19로 직접 덮어썼음 (`blackboard.db` 11:19:15 user-override 이벤트). 같은 시점에 사용자의 플러그인 세션이 정식 Gate H1 AskUserQuestion을 실행 중이었고, 사용자는 P10(TP 단독 1위 API-first)을 선택. run-supervisor가 11:42:30에 chosen_preview를 P10으로 재작성, lock도 `1d8f9193…afbb`로 재계산. 결과적으로 P19 편집은 "stale override"로 `selection_metadata.prior_stale_override_noted`에 기록되고 폐기됨. 플러그인 자체는 **정확히 작동** — 사용자의 in-flow 선택이 외부 out-of-band 편집을 이기도록 설계됨. 하지만 혼란과 낭비 발생.

0 commit comments

Comments
 (0)