Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"name": "cwf",
"source": "./plugins/cwf",
"version": "0.8.12",
"version": "1.0.0",
"description": "Corca Workflow Framework — consolidated hooks and skill orchestration for structured development sessions",
"keywords": [
"workflow",
Expand Down
157 changes: 157 additions & 0 deletions .cwf/codebase-contract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
version: 1
generated_at_utc: "2026-02-24T00:30:16Z"
mode: advisory
source:
git_tracked_only: true
scope:
include_globs:
- "**/*"
exclude_globs:
- ".git/**"
- ".cwf/**"
- "node_modules/**"
- "dist/**"
- "build/**"
- "coverage/**"
- ".venv/**"
- "venv/**"
- "**/*.md"
- "**/*.mdx"
- "**/*.png"
- "**/*.jpg"
- "**/*.jpeg"
- "**/*.gif"
- "**/*.svg"
- "**/*.pdf"
- "**/*.lock"
- "**/package-lock.json"
- "**/pnpm-lock.yaml"
- "**/yarn.lock"
- "**/bun.lock"
- "**/bun.lockb"
- "**/*.snap"
- "**/*.min.js"
- "**/*.min.css"
include_extensions:
- ".sh"
- ".bash"
- ".zsh"
- ".py"
- ".js"
- ".jsx"
- ".ts"
- ".tsx"
- ".mjs"
- ".cjs"
- ".java"
- ".go"
- ".rs"
- ".rb"
- ".php"
- ".cs"
- ".kt"
- ".swift"
- ".scala"
- ".lua"
- ".sql"
- ".yaml"
- ".yml"
- ".json"
- ".toml"
- ".ini"
- ".cfg"
- ".conf"
- ".xml"
checks:
large_file_lines:
enabled: true
warn_at: 600
error_at: 800
long_line_length:
enabled: true
warn_at: 140
todo_markers:
enabled: true
patterns:
- TODO
- FIXME
- HACK
- XXX
shell_strict_mode:
enabled: true
exclude_globs: []
require_contract_and_pragma: true
pragma_prefix: "cwf: shell-strict-mode relax"
pragma_required_fields:
- reason
- ticket
- expires
file_overrides:
plugins/cwf/hooks/scripts/cwf-hook-gate.sh:
action: relax
reason: "Sourced gate library; strict mode must remain at caller entrypoint"
ticket: CWF-STRICT-RELAX-001
expires: "2026-12-31"
plugins/cwf/hooks/scripts/env-loader.sh:
action: relax
reason: "Sourced env loader shared by multiple scripts"
ticket: CWF-STRICT-RELAX-002
expires: "2026-12-31"
plugins/cwf/hooks/scripts/slack-send.sh:
action: relax
reason: "Primarily sourced helper; strict mode controlled by caller"
ticket: CWF-STRICT-RELAX-003
expires: "2026-12-31"
plugins/cwf/hooks/scripts/text-format.sh:
action: relax
reason: "Sourced formatting helper used from strict and non-strict callers"
ticket: CWF-STRICT-RELAX-004
expires: "2026-12-31"
deep_review:
enabled: true
fixed_experts:
- name: Martin Fowler
domain: "refactoring patterns, knowledge duplication (Rule of Three), shared abstractions, evolutionary design"
source: "Refactoring (2nd ed., 2018), BeckDesignRules (martinfowler.com/bliki)"
- name: Kent Beck
domain: "Tidy First, small safe refactorings, test-driven development, simple design"
source: "Tidy First? (2023), Test-Driven Development: By Example (2002), Extreme Programming Explained (2004)"
context_experts:
- name: Nancy Leveson
domain: "systems safety engineering, STAMP/STPA, control-structure analysis"
source: "Engineering a Safer World (MIT Press, 2011)"
- name: Donella Meadows
domain: "systems thinking, feedback loops, leverage points"
source: "Thinking in Systems (2008)"
- name: David Parnas
domain: "information hiding, modular decomposition criteria"
source: "On the Criteria To Be Used in Decomposing Systems into Modules (CACM, 1972)"
- name: John Ousterhout
domain: "deep modules, interface simplicity, strategic design"
source: "A Philosophy of Software Design (2018/2021)"
context_expert_count: 2
selection_keywords:
large_file_lines:
- modular
- decomposition
- architecture
- design
long_line_length:
- readability
- clarity
- maintainability
todo_markers:
- technical debt
- process
- improvement
shell_strict_mode:
- safety
- risk
- reliability
- resilience
reporting:
top_findings_limit: 30
include_clean_summary: true
notes:
- "Auto-generated by refactor codebase contract bootstrap."
- "Tune scope and thresholds for your repository before enforcing as policy."
35 changes: 21 additions & 14 deletions .cwf/cwf-state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,13 @@ sessions:
artifacts: [plan.md, lessons.md, retro.md, retro-cdm-analysis.md, retro-learning-resources.md, retro-expert-alpha.md, retro-expert-beta.md]
stage_checkpoints: [retro]


- id: "S260224-01"
title: "concept-governance-yaml-unification"
dir: ".cwf/projects/260224-01-concept-governance-yaml-unification"
branch: "main"
artifacts: [plan.md, lessons.md]

tools:
codex: unavailable
gemini: unavailable
Expand Down Expand Up @@ -545,11 +552,11 @@ git_hooks:
# read by SessionStart(compact) hook for context recovery after auto-compact.
# check-session.sh --live validates required fields are populated.
live:
session_id: ""
dir: ".cwf/projects/260221-01-retro-cwf-081-plus-postmortem"
branch: ""
phase: "retro"
task: ""
session_id: "S260224-01"
dir: ".cwf/projects/260224-01-concept-governance-yaml-unification"
branch: "feat/260224-concept-governance-plan"
phase: "done"
task: "concept governance + yaml unification migration run"
key_files: []
decisions: []
decision_journal: []
Expand All @@ -560,18 +567,18 @@ live:
updated_at: ""
state_file: ".cwf/projects/260221-01-retro-cwf-081-plus-postmortem/session-state.yaml"
remaining_gates: []
state_version: "6"
worktree_root: ""
worktree_branch: ""
state_version: "8"
worktree_root: "/home/hwidong/codes/claude-plugins"
worktree_branch: "feat/260224-concept-governance-plan"
Comment on lines +571 to +572
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

머신별 절대 경로가 저장소에 커밋됩니다

worktree_root: "/home/hwidong/codes/claude-plugins" 은 특정 개발자 환경의 절대 경로입니다. phase: "done" 상태이므로 다음 세션의 cwf:run 실행 시 덮어쓰이겠지만, 현재 커밋에는 개발 환경 정보가 노출되어 있습니다.

CWF 도구가 세션 종료 후 이 필드를 자동으로 비우거나 상대 경로로 기록하는 정책을 추가하는 것을 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cwf/cwf-state.yaml around lines 571 - 572, The committed
.cwf/cwf-state.yaml contains a machine-specific absolute path in the
worktree_root field; update the code that persists CWF state so it never writes
developer absolute paths: when saving state (the routine that writes
worktree_root/worktree_branch/phase), convert worktree_root to a relative path
or an empty string for phase == "done", or clear worktree_root at session end;
ensure the writer uses a relative resolution (or omits worktree_root) before
committing and add a safe-guard to cwf:run persistence to prevent storing
user-specific absolute paths.

active_pipeline: ""
user_directive: ""
pipeline_override_reason: ""
ambiguity_mode: ""
blocking_decisions_pending: ""
ambiguity_decisions_file: ".cwf/projects/260218-03-pre-release-refactor-audit/run-ambiguity-decisions.md"
clarify_result_file: "project/initial-req.md"
clarify_completed_at: "2026-02-19T00:40:57Z"
stage_provenance_file: ".cwf/projects/260218-03-pre-release-refactor-audit/run-stage-provenance.md"
ambiguity_mode: "defer-blocking"
blocking_decisions_pending: "false"
ambiguity_decisions_file: ".cwf/projects/260224-01-concept-governance-yaml-unification/run-ambiguity-decisions.md"
clarify_result_file: ".cwf/projects/260224-01-concept-governance-yaml-unification/clarify-result.md"
clarify_completed_at: "2026-02-24T00:22:09Z"
stage_provenance_file: ".cwf/projects/260224-01-concept-governance-yaml-unification/run-stage-provenance.md"
# Expert roster for domain expert sub-agents (used by clarify, review, retro)
# Semi-automatic evolution: usage_count auto-incremented, new experts user-approved
# verified: true = skip web identity verification, cite source field directly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Synced from .cwf/cwf-state.yaml live section.

live:
session_id: ""
dir: ".cwf/projects/260221-01-retro-cwf-081-plus-postmortem"
branch: ""
phase: "retro"
task: ""
session_id: "S260224-01"
dir: ".cwf/projects/260224-01-concept-governance-yaml-unification"
branch: "feat/260224-concept-governance-plan"
phase: "done"
task: "concept governance + yaml unification migration run"
key_files: []
decisions: []
decision_journal: []
Expand All @@ -16,15 +16,15 @@ live:
rules_file: ""
updated_at: ""
remaining_gates: []
state_version: "6"
worktree_root: ""
worktree_branch: ""
state_version: "8"
worktree_root: "/home/hwidong/codes/claude-plugins"
worktree_branch: "feat/260224-concept-governance-plan"
Comment on lines +20 to +21
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

개발자 로컬 절대 경로 및 사용자명이 레포에 커밋됩니다.

worktree_root/home/hwidong/codes/claude-plugins가 하드코딩되어 있습니다. 이는 두 가지 문제를 야기합니다:

  1. 개인정보(PII) 노출: 개발자 사용자명 hwidong이 Git 히스토리에 영구적으로 기록됩니다.
  2. 이식성 손상: 다른 기여자 환경에서 CWF 툴링이 이 경로를 읽어 사용하는 경우 실패합니다.

향후 세션 상태 파일에서는 worktree_root를 빈 문자열("")이나 레포 루트 기준 상대 경로(.)로 초기화하고, 툴이 런타임에 실제 경로를 결정하도록 하는 방안을 고려하세요.

🔧 제안 수정
-  worktree_root: "/home/hwidong/codes/claude-plugins"
-  worktree_branch: "feat/260224-concept-governance-plan"
+  worktree_root: ""
+  worktree_branch: ""
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
worktree_root: "/home/hwidong/codes/claude-plugins"
worktree_branch: "feat/260224-concept-governance-plan"
worktree_root: ""
worktree_branch: ""
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cwf/projects/260221-01-retro-cwf-081-plus-postmortem/session-state.yaml
around lines 20 - 21, The session-state.yaml contains a hardcoded local absolute
path in the worktree_root key which leaks a username and breaks portability;
update the worktree_root value in session-state.yaml (key: worktree_root) to an
empty string "" or a repository-relative value "." and ensure any code that
reads worktree_root (CWF tooling that references worktree_root) falls back to
computing the actual worktree at runtime (e.g., resolve to process/OS cwd or
repo root) when the value is empty or "." so no developer-specific absolute
paths are committed.

active_pipeline: ""
user_directive: ""
pipeline_override_reason: ""
ambiguity_mode: ""
blocking_decisions_pending: ""
ambiguity_decisions_file: ".cwf/projects/260218-03-pre-release-refactor-audit/run-ambiguity-decisions.md"
clarify_result_file: "project/initial-req.md"
clarify_completed_at: "2026-02-19T00:40:57Z"
stage_provenance_file: ".cwf/projects/260218-03-pre-release-refactor-audit/run-stage-provenance.md"
ambiguity_mode: "defer-blocking"
blocking_decisions_pending: "false"
ambiguity_decisions_file: ".cwf/projects/260224-01-concept-governance-yaml-unification/run-ambiguity-decisions.md"
clarify_result_file: ".cwf/projects/260224-01-concept-governance-yaml-unification/clarify-result.md"
clarify_completed_at: "2026-02-24T00:22:09Z"
stage_provenance_file: ".cwf/projects/260224-01-concept-governance-yaml-unification/run-stage-provenance.md"
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Requirement Clarification Summary

### Before (Original)
"Run `cwf:run` for `.cwf/projects/260224-01-concept-governance-yaml-unification/plan.md`, treat it as a draft, start from gather, continue through the pipeline, and actively request user decisions when needed."

### After (Clarified)
**Goal**: Execute a full CWF run for the concept-governance + YAML-unification migration, using the previous-session draft as seed input and producing an implementation-ready execution contract plus code changes in this branch.

**Reason**: Turn concept-driven architecture from implicit documentation into deterministic, gate-enforced runtime behavior with YAML-only contract governance.

**Scope**:
- Included:
- Use existing draft as `initial-plan.md`
- Run gather -> clarify -> plan -> review(plan) -> impl -> review(code) -> refactor -> retro -> ship workflow intent
- Implement concept-governance scaffolding and YAML contract migration in repo code/docs
- Update run/review/refactor-related deterministic gates as required by migrated contracts
- Update `README.md` and `README.ko.md` before release
- Excluded:
- Backward-compatibility shims for external consumers
- Maintaining legacy JSON contract artifacts after migration completion

**Constraints**:
- Breaking change is acceptable (`1.0.0` target remains valid).
- `refactor --codebase --deep` fixed experts must remain mandatory.
- Deterministic gates are authoritative (no prose-only bypass).
- User-created files must not be deleted without explicit confirmation.

**Success Criteria**:
- Every active skill/hook is bound to >=1 concept or explicitly excluded with owner/reason.
- Contract governance is YAML-only at end-state; no active `*contract*.json` remains.
- Expert policy/roster/state split is explicit and operationally enforced.
- Release docs reflect the migrated architecture without stale legacy guidance.

### Decisions Made

| Question | Decision |
|---|---|
| How to treat the previous `plan.md`? | Preserve as `initial-plan.md`; regenerate `plan.md` during run planning stage. |
| Concept source of truth model | Add machine-readable registry under `plugins/cwf/concepts/registry.yaml`; keep `references/concept-map.md` as explanatory reference, not gate SSOT. |
| Migration execution style | Execute in phased cutover within one branch/run (skeleton -> concept artifacts -> contract/expert migration -> binding/wiring -> release updates). |
| Gate rollout order | Build concept gate early, switch to fail-closed enforcement after bindings and references are in place. |
| Expert policy split direction | Introduce `.cwf/expert-contract.yaml` + `.cwf/expert-roster.yaml`; keep runtime-only fields in `.cwf/cwf-state.yaml`. |
| Scope for this run | Continue full pipeline intent, raising user decisions only when a blocking architecture fork appears. |

Loading