Skip to content

Commit 358de64

Browse files
sgwannabeclaude
andauthored
fix(profile): default profile actually 'standard' (align stale 'pro' default refs) (#110)
* fix(profile): align stale 'pro' default refs with actual standard default settings.json has shipped pf.defaultProfile: "standard" since v1.4.0 (LESSON 0.10 — demo-first UX flip), but several markdown / Python files still claimed 'pro' as the default. Because LLM agents reading commands/new.md and ideation-lead.md trust the markdown over the JSON config, /pf:new was silently spinning up the pro profile (18 previews · 3×5 eng · ~70min) when users expected the standard demo path (9 previews · 2×5 eng · ~25min). Fix: - commands/new.md: examples row now shows standard as the default invocation; flag table corrected; "(기본)" tag moved from pro row to standard row in the comparison table; flow text §7 expanded to show the full resolution chain (--profile flag → env PF_PROFILE → settings.json → final fallback "standard"). Adds explicit "use --profile=pro|max for deeper verification" + PF_PROFILE env-var example. - agents/ideation/ideation-lead.md L110: profile-resolve doc updated to "standard" + LESSON 0.10 cross-reference. - hooks/cost-regression.py L46-60: docstring + 3 fallback branches ("pro" → "standard"). Now matches settings.json shipped value. - schemas/pf-profile.schema.json description: "pro (default)" wording replaced with "standard (default since v1.4)". Side effects: - bash scripts/verify-plugin.sh → 58 Pass / 0 Fail (unchanged) - No advocate boilerplate impact (lint scope is advocates/P*.md, not any of the touched files) - Historical references in LESSONS.md / CHANGELOG.md preserved intentionally (they document the v1.3.0 → v1.4.0 flip itself) - New users / fresh /pf:new invocations now hit the documented intended UX: ~25min standard run by default How to opt into pro/max from start (now documented in commands/new.md): /pf:new "..." --profile=pro /pf:new "..." --profile=max PF_PROFILE=pro /pf:new "..." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: untrack .claude/scheduled_tasks.lock + gitignore Accidentally added in the previous commit (Claude Code session lock, per-process state, not source). Removed from index and gitignored so future sessions don't re-stage it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f87ab33 commit 358de64

5 files changed

Lines changed: 24 additions & 14 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,6 @@ coverage/
7676
# matters: in .gitignore the *last* matching pattern wins.
7777
!runs/r-clean-*/
7878
!runs/r-clean-*/**
79+
80+
# Claude Code session locks (per-process state, not source)
81+
.claude/scheduled_tasks.lock

plugins/preview-forge/agents/ideation/ideation-lead.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ IDEA_SPEC: <not provided — fallback v1.5.4 path>
107107
먼저 **active profile을 resolve**:
108108
1. `runs/<id>/.profile` 파일 (M1이 /pf:new --profile 파싱 후 기록)
109109
2. env `PF_PROFILE`
110-
3. plugin `settings.json``pf.defaultProfile` (기본 `pro`)
110+
3. plugin `settings.json``pf.defaultProfile` (현재 `"standard"`; v1.3.0에서는 `"pro"`였으나 v1.4.0에서 데모-퍼스트 정책으로 flip — LESSON 0.10 참조). 최종 fallback도 `"standard"`.
111111

112112
그리고 profile의 `previews.count`만큼 Advocate 선정:
113113
- **standard** (9): P01, P02, P05, P07, P10, P14, P17, P20, P24 — 가장 다양한 페르소나 스펙트럼

plugins/preview-forge/commands/new.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ description: Start a new Preview Forge run (PreviewDD cycle begins)
1313
```
1414

1515
예시:
16-
- `/pf:new "공방 운영자가 수업·재고·정산을 한 곳에서"` (pro profile 기본값)
17-
- `/pf:new "todo app with auth" --profile=standard` (빠른 프로토타입)
18-
- `/pf:new "production SaaS 런칭용 앱" --profile=max` (풀 143-agent 검증)
19-
- `/pf:new "idea" --profile=pro --previews=26 --no-cache` (pro 기본에 previews 확장 + 캐시 스킵)
16+
- `/pf:new "공방 운영자가 수업·재고·정산을 한 곳에서"` (**standard** profile 기본값 — v1.4+, 9 previews · 2×5 eng · ~25분)
17+
- `/pf:new "production SaaS launch" --profile=pro` (실제 프로젝트, 18 previews · 3×5 eng · ~70분)
18+
- `/pf:new "regulated enterprise rollout" --profile=max` (풀 143-agent · 26 previews · ~160분)
19+
- `/pf:new "idea" --profile=pro --previews=26 --no-cache` (pro에 previews 확장 + 캐시 스킵)
20+
- `PF_PROFILE=max /pf:new "..."` (환경변수로 default 오버라이드 — 1회용)
2021

2122
## 인자
2223

@@ -27,16 +28,16 @@ description: Start a new Preview Forge run (PreviewDD cycle begins)
2728

2829
| 플래그 | 기본값 | 설명 |
2930
|---|---|---|
30-
| `--profile` | `pro` (`settings.json` defaultProfile) | 프로파일 이름: `standard` · `pro` · `max` |
31+
| `--profile` | **`standard`** (v1.4+, was `pro` in v1.3.0; lives in `settings.json` `pf.defaultProfile`) | 프로파일 이름: `standard` · `pro` · `max`. 처음부터 더 깊은 검증을 원하면 `--profile=pro` 또는 `--profile=max` 명시. 환경변수 `PF_PROFILE=pro` 도 동일 효과 (해당 셸 세션에 영향). |
3132
| `--previews=N` | profile에 종속 (9/18/26) | Advocate 수 오버라이드. profile의 `max_user_expand` (26) 이내 |
3233
| `--no-cache` | false | PreviewDD-level 캐시 스킵. 동일 아이디어 재실행 시 강제 재생성 |
3334

3435
### 프로파일 빠른 비교
3536

3637
| Profile | Previews | Eng teams | Panels | SCC iter | P95 ceiling | 권장 용도 |
3738
|---|---|---|---|---|---|---|
38-
| **standard** | 9 | 2×5 (BE+FE) | keyword-trigger | 3 | ~60k tok / 25min | 데모 · 프로토타입 |
39-
| **pro** *(기본)* | 18 | 3×5 (+DB) | keyword-trigger + escalation | 4 | ~250k tok / 70min | 실제 프로젝트 |
39+
| **standard** *(기본 — v1.4+)* | 9 | 2×5 (BE+FE) | keyword-trigger | 3 | ~60k tok / 25min | 데모 · 프로토타입 · 첫 시도 |
40+
| **pro** | 18 | 3×5 (+DB) | keyword-trigger + escalation | 4 | ~250k tok / 70min | 실제 프로젝트 |
4041
| **max** | 26 | 5×5 (all) | always-on | 5 | ~600k tok / 160min | 프로덕션 런칭 · 베이스라인 |
4142

4243
상세: `plugins/preview-forge/profiles/{standard,pro,max}.json`
@@ -51,7 +52,7 @@ M1 Run Supervisor는 **모든 작업 전** 다음을 순서대로 검증합니
5152
4. **claude CLI + plugin install** — plugin 자체 로드 상태 확인.
5253
5. **api.anthropic.com 연결** — 기본 reachability 확인.
5354
6. **LESSONS pre-load**`~/.claude/preview-forge/memory/LESSONS.md`에서 관련 카테고리(1. PreviewDD, 4. Memory, 6. Plugin 배포)를 읽어 department lead들의 system prompt에 주입.
54-
7. **profile resolve** (v1.3+) — `--profile` 플래그 · env `PF_PROFILE` · `settings.json` defaultProfile 순으로 해결 → `runs/<id>/.profile` 파일에 기록. 이후 모든 hook·monitor가 이 값을 참조.
55+
7. **profile resolve** (v1.3+, v1.4+ default flipped to `standard`) — `--profile` 플래그 env `PF_PROFILE` `settings.json` `pf.defaultProfile` (현재 `"standard"`) → 최종 fallback `"standard"` 순으로 해결 → `runs/<id>/.profile` 파일에 기록. 이후 모든 hook·monitor가 이 값을 참조. 사용자가 처음부터 깊은 검증을 원하면 `/pf:new "..." --profile=pro|max` 또는 `PF_PROFILE=pro` 환경변수 사용.
5556
8. **idea-input size cap** (umbrella #95 follow-up — defense in depth, layer 1) — orchestrator MUST invoke [`scripts/pre-flight.sh --idea "<seed>"`](../../../scripts/pre-flight.sh) (or the equivalent direct call to [`scripts/validate-idea-input.sh`](../../../scripts/validate-idea-input.sh)) on the raw seed idea **BEFORE** writing it to `runs/<id>/idea.json`, computing any cache key (`scripts/preview-cache.sh key …`), or expanding the I1 Socratic interview prompt. The validator exits 0 if `len(idea) ≤ 5000` Unicode code points (matching the `idea_summary` schema cap), exits non-zero otherwise. On non-zero, abort the run with the validator's stderr message — do NOT silently truncate. Rationale: the schema's `idea_summary.maxLength: 5000` only fires at S-3 validation, well after the seed idea has already inflated the Socratic system prompt and been hashed into the cache key. This pre-flight gate stops a 10MB seed idea at the door. Bypass policy: NONE — `--no-cache` does not bypass this check. Truncate mode (`scripts/validate-idea-input.sh --truncate -`) exists for non-interactive automation pipelines that explicitly opt in; `/pf:new` itself MUST default to reject so the user keeps full intent over what gets trimmed. The size cap also runs at S-3 schema validation as the canonical authority — this layer-1 gate is belt-and-suspenders.
5657

5758
CLI 환경에서는 `scripts/pre-flight.sh` 또는 `pf check`로 동일 검증 수동 실행 가능. 아이디어 텍스트까지 포함해 한 번에 검증하려면 `scripts/pre-flight.sh --idea "<seed>"` (or `--idea-file <path>` for inputs that may exceed ARG_MAX).

plugins/preview-forge/hooks/cost-regression.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ def load_profile(name: str) -> dict | None:
4343

4444

4545
def load_active_profile(run_dir: Path) -> dict | None:
46-
"""Priority: run_dir/.profile → env PF_PROFILE → settings.defaultProfile → 'pro'."""
46+
"""Priority: run_dir/.profile → env PF_PROFILE → settings.defaultProfile → 'standard'.
47+
48+
v1.4+ default is 'standard' (was 'pro' in v1.3.0; flipped for demo-first
49+
UX — see LESSON 0.10). settings.json ships with defaultProfile: standard;
50+
the hard-coded fallbacks below match that so a missing/malformed
51+
settings.json behaves consistently.
52+
"""
4753
marker = run_dir / ".profile"
4854
if marker.exists():
4955
name = marker.read_text(encoding="utf-8").strip()
@@ -52,11 +58,11 @@ def load_active_profile(run_dir: Path) -> dict | None:
5258
if not name and SETTINGS_PATH.exists():
5359
try:
5460
s = json.load(SETTINGS_PATH.open(encoding="utf-8"))
55-
name = s.get("pf", {}).get("defaultProfile", "pro")
61+
name = s.get("pf", {}).get("defaultProfile", "standard")
5662
except (OSError, json.JSONDecodeError):
57-
name = "pro"
63+
name = "standard"
5864
if not name:
59-
name = "pro"
65+
name = "standard"
6066
return load_profile(name)
6167

6268

plugins/preview-forge/schemas/pf-profile.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://two-weeks-team.github.io/PreviewForgeForClaudeCode/schemas/pf-profile.schema.json",
44
"title": "PF Profile",
5-
"description": "Preview Forge run profile — controls cost, speed, and thoroughness of a 3-DD cycle. Three values ship: standard (cheapest), pro (default, balanced), max (all-in 143 agents).",
5+
"description": "Preview Forge run profile — controls cost, speed, and thoroughness of a 3-DD cycle. Three values ship: standard (default since v1.4 — demo/prototype, fastest), pro (real project, balanced), max (production launch, all-in 143 agents).",
66
"type": "object",
77
"required": [
88
"name",

0 commit comments

Comments
 (0)