all-for-claudecode 2.12.0 → 2.14.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/.claude-plugin/marketplace.json +24 -5
- package/.claude-plugin/plugin.json +15 -4
- package/README.md +14 -0
- package/agents/afc-appsec-expert.md +19 -26
- package/agents/afc-architect.md +9 -2
- package/agents/afc-backend-expert.md +16 -4
- package/agents/afc-design-expert.md +17 -7
- package/agents/afc-impl-worker.md +7 -1
- package/agents/afc-infra-expert.md +16 -6
- package/agents/afc-legal-expert.md +16 -18
- package/agents/afc-marketing-expert.md +15 -5
- package/agents/afc-pm-expert.md +16 -5
- package/agents/afc-pr-analyst.md +1 -1
- package/agents/afc-security.md +7 -2
- package/agents/afc-tech-advisor.md +18 -30
- package/docs/agent-authoring-guide.md +144 -0
- package/docs/context-management-harness.md +293 -0
- package/docs/orchestration-modes.md +228 -0
- package/docs/skill-authoring-guide.md +153 -0
- package/hooks/hooks.json +27 -2
- package/package.json +4 -3
- package/schemas/hooks.schema.json +1 -1
- package/schemas/marketplace.schema.json +6 -1
- package/schemas/plugin.schema.json +0 -4
- package/scripts/afc-pipeline-manage.sh +1 -0
- package/scripts/afc-post-compact.sh +54 -0
- package/scripts/afc-spec-guard.sh +7 -7
- package/scripts/afc-stop-failure.sh +46 -0
- package/scripts/afc-sync-cache.sh +8 -2
- package/scripts/afc-tdd-guard.sh +7 -5
- package/scripts/afc-user-prompt-submit.sh +43 -1
- package/scripts/pre-compact-checkpoint.sh +10 -0
- package/scripts/session-start-context.sh +10 -0
- package/skills/architect/SKILL.md +1 -9
- package/skills/auto/SKILL.md +228 -910
- package/skills/auto/skill-advisor.md +306 -0
- package/skills/checkpoint/SKILL.md +7 -1
- package/skills/clarify/SKILL.md +3 -2
- package/skills/consult/SKILL.md +30 -123
- package/skills/consult/peer-mode.md +61 -0
- package/skills/debug/SKILL.md +3 -21
- package/skills/ideate/SKILL.md +1 -77
- package/skills/ideate/brief-template.md +73 -0
- package/skills/implement/SKILL.md +68 -260
- package/skills/init/SKILL.md +79 -129
- package/skills/init/reference.md +55 -0
- package/skills/issue/SKILL.md +191 -0
- package/skills/launch/SKILL.md +5 -0
- package/skills/learner/SKILL.md +1 -25
- package/skills/learner/suggestion-format.md +49 -0
- package/skills/plan/SKILL.md +1 -5
- package/skills/pr-comment/SKILL.md +38 -51
- package/skills/principles/SKILL.md +3 -7
- package/skills/qa/SKILL.md +3 -14
- package/skills/release-notes/SKILL.md +6 -5
- package/skills/resolve/SKILL.md +162 -0
- package/skills/resolve/graphql.md +48 -0
- package/skills/resume/SKILL.md +10 -5
- package/skills/review/SKILL.md +56 -202
- package/skills/review/perspectives.md +118 -0
- package/skills/security/SKILL.md +4 -22
- package/skills/security/cross-boundary-verification.md +22 -0
- package/skills/setup/SKILL.md +40 -87
- package/skills/setup/conflict-detection.md +33 -0
- package/skills/spec/SKILL.md +6 -9
- package/skills/tasks/SKILL.md +47 -70
- package/skills/test/SKILL.md +4 -16
- package/skills/triage/SKILL.md +38 -85
- package/skills/triage/coupling-detection.md +13 -0
- package/skills/triage/pr-analysis-prompt.md +46 -0
- package/skills/validate/SKILL.md +24 -62
- package/skills/validate/validation-categories.md +39 -0
package/scripts/afc-tdd-guard.sh
CHANGED
|
@@ -15,22 +15,24 @@ trap cleanup EXIT
|
|
|
15
15
|
|
|
16
16
|
ALLOW='{"hookSpecificOutput":{"permissionDecision":"allow"}}'
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
INPUT=$(cat)
|
|
20
|
-
|
|
21
|
-
# If pipeline is inactive -> allow
|
|
18
|
+
# Early exit: TDD guard only applies during active pipeline
|
|
22
19
|
if ! afc_state_is_active; then
|
|
20
|
+
cat > /dev/null # consume stdin to prevent SIGPIPE
|
|
23
21
|
printf '%s\n' "$ALLOW"
|
|
24
22
|
exit 0
|
|
25
23
|
fi
|
|
26
24
|
|
|
27
|
-
#
|
|
25
|
+
# Early exit: only guard during implement phase
|
|
28
26
|
PHASE="$(afc_state_read phase || echo '')"
|
|
29
27
|
if [ "$PHASE" != "implement" ]; then
|
|
28
|
+
cat > /dev/null # consume stdin to prevent SIGPIPE
|
|
30
29
|
printf '%s\n' "$ALLOW"
|
|
31
30
|
exit 0
|
|
32
31
|
fi
|
|
33
32
|
|
|
33
|
+
# Consume stdin now that we know we need to inspect it
|
|
34
|
+
INPUT=$(cat)
|
|
35
|
+
|
|
34
36
|
# Read tdd setting from afc.config.md (YAML in markdown — grep/sed parse)
|
|
35
37
|
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
36
38
|
CONFIG_FILE="$PROJECT_DIR/.claude/afc.config.md"
|
|
@@ -42,7 +42,7 @@ if ! afc_state_is_active; then
|
|
|
42
42
|
LOWER=$(printf '%s' "$USER_TEXT" | tr '[:upper:]' '[:lower:]' | cut -c1-500)
|
|
43
43
|
|
|
44
44
|
# Compact skill catalog: injected when regex misses, so the model classifies semantically
|
|
45
|
-
FALLBACK_HINT="[afc] Route via Skill tool if applicable — debug(bug/에러/수정/fix) | review(코드검토/리뷰/PR) | test(테스트/coverage) | spec(요구사항/스펙) | plan(설계/계획) | implement(구현/리팩터) | auto(새기능/feature) | consult(조언/상의/discuss) | analyze(분석/trace) | research(조사/리서치) | security(보안/취약점) | architect(아키텍처/설계) | qa(품질감사) | launch(릴리스/배포) | triage(PR정리/이슈분류) | clean(정리/cleanup) | ideate(아이디어/brainstorm) | doctor(진단/health) | release-notes(변경이력)"
|
|
45
|
+
FALLBACK_HINT="[afc] Route via Skill tool if applicable — debug(bug/에러/수정/fix) | review(코드검토/리뷰/PR) | test(테스트/coverage) | spec(요구사항/스펙) | plan(설계/계획) | implement(구현/리팩터) | auto(새기능/feature) | consult(조언/상의/discuss) | analyze(분석/trace) | research(조사/리서치) | security(보안/취약점) | architect(아키텍처/설계) | qa(품질감사) | launch(릴리스/배포) | triage(PR정리/이슈분류) | issue(이슈분석) | resolve(LLM리뷰대응) | clean(정리/cleanup) | ideate(아이디어/brainstorm) | doctor(진단/health) | release-notes(변경이력)"
|
|
46
46
|
|
|
47
47
|
# Early exit for empty prompts (context-only messages, malformed JSON)
|
|
48
48
|
if [ -z "$LOWER" ]; then
|
|
@@ -83,6 +83,10 @@ if ! afc_state_is_active; then
|
|
|
83
83
|
SKILL="afc:launch"
|
|
84
84
|
elif printf '%s' "$LOWER" | grep -qE '(triage|pr.?정리|이슈.?정리|백로그.?정리|pr.?분류|이슈.?분류)' 2>/dev/null; then
|
|
85
85
|
SKILL="afc:triage"
|
|
86
|
+
elif printf '%s' "$LOWER" | grep -qE '(issue.*분석|이슈.*분석|analyze.*issue|issue.*#[0-9]|이슈.*#[0-9])' 2>/dev/null; then
|
|
87
|
+
SKILL="afc:issue"
|
|
88
|
+
elif printf '%s' "$LOWER" | grep -qE '(review.*comment|resolve.*comment|coderabbit|copilot.*review|리뷰.*코멘트|봇.*리뷰|bot.*review.*fix)' 2>/dev/null; then
|
|
89
|
+
SKILL="afc:resolve"
|
|
86
90
|
# Medium confidence: still distinctive but broader
|
|
87
91
|
elif printf '%s' "$LOWER" | grep -qE '(specification|requirements|acceptance criteria|요구.?사항|기능.?정의|인수.?조건)' 2>/dev/null; then
|
|
88
92
|
SKILL="afc:spec"
|
|
@@ -139,10 +143,38 @@ PHASE="$(printf '%s' "$PHASE" | tr -d '"\n\r' | cut -c1-100)"
|
|
|
139
143
|
# Increment per-phase prompt counter + pipeline-wide total
|
|
140
144
|
CALL_COUNT=$(afc_state_increment promptCount 2>/dev/null || echo 0)
|
|
141
145
|
afc_state_increment totalPromptCount >/dev/null 2>&1 || echo "[afc:prompt-submit] totalPromptCount increment failed" >&2
|
|
146
|
+
TOTAL_COUNT=$(afc_state_read totalPromptCount 2>/dev/null || echo 0)
|
|
142
147
|
|
|
143
148
|
# Build context message
|
|
144
149
|
CONTEXT="[Pipeline: ${FEATURE}] [Phase: ${PHASE}] [TASK HYGIENE: Mark completed tasks via TaskUpdate(status: completed) -- do not leave stale tasks]"
|
|
145
150
|
|
|
151
|
+
# P1.1: Phase-Boundary Compact 권고
|
|
152
|
+
# Inject compact recommendation on first prompt after a phase transition
|
|
153
|
+
PHASE_TRANSITION=$(afc_state_read phaseTransition 2>/dev/null || echo "")
|
|
154
|
+
if [ "$PHASE_TRANSITION" = "true" ]; then
|
|
155
|
+
afc_state_write "phaseTransition" "false"
|
|
156
|
+
case "$PHASE" in
|
|
157
|
+
plan)
|
|
158
|
+
COMPACT_MSG="이전 phase(spec) 컨텍스트 정리 권장: /compact Preserve spec.md acceptance criteria, edge cases, and NFRs"
|
|
159
|
+
;;
|
|
160
|
+
implement)
|
|
161
|
+
COMPACT_MSG="이전 phase(plan) 컨텍스트 정리 권장: /compact Preserve File Change Map, Implementation Context, and ADR decisions"
|
|
162
|
+
;;
|
|
163
|
+
review)
|
|
164
|
+
COMPACT_MSG="이전 phase(implement) 컨텍스트 정리 권장: /compact Preserve changed files list, CI results, and unresolved issues"
|
|
165
|
+
;;
|
|
166
|
+
clean)
|
|
167
|
+
COMPACT_MSG="이전 phase(review) 컨텍스트 정리 권장: /compact Preserve review findings and fix status"
|
|
168
|
+
;;
|
|
169
|
+
*)
|
|
170
|
+
COMPACT_MSG=""
|
|
171
|
+
;;
|
|
172
|
+
esac
|
|
173
|
+
if [ -n "$COMPACT_MSG" ]; then
|
|
174
|
+
CONTEXT="${CONTEXT} [afc:context] ${COMPACT_MSG}"
|
|
175
|
+
fi
|
|
176
|
+
fi
|
|
177
|
+
|
|
146
178
|
# Drift checkpoint: inject plan constraints at every N prompts during implement/review
|
|
147
179
|
# AFC_DRIFT_THRESHOLD sourced from afc-state.sh (SSOT)
|
|
148
180
|
if [ "$CALL_COUNT" -gt 0 ] && [ $((CALL_COUNT % AFC_DRIFT_THRESHOLD)) -eq 0 ]; then
|
|
@@ -154,6 +186,16 @@ if [ "$CALL_COUNT" -gt 0 ] && [ $((CALL_COUNT % AFC_DRIFT_THRESHOLD)) -eq 0 ]; t
|
|
|
154
186
|
esac
|
|
155
187
|
fi
|
|
156
188
|
|
|
189
|
+
# P1.3: Context Budget Monitor
|
|
190
|
+
# Inject budget hints based on totalPromptCount across all phases
|
|
191
|
+
if [ "$TOTAL_COUNT" -ge 200 ]; then
|
|
192
|
+
CONTEXT="${CONTEXT} [afc:context] ~90%+ context estimated (${TOTAL_COUNT} total prompts). Auto-compact imminent. /compact now with phase-specific preservation."
|
|
193
|
+
elif [ "$TOTAL_COUNT" -ge 150 ]; then
|
|
194
|
+
CONTEXT="${CONTEXT} [afc:context] Context ~70%+ estimated (${TOTAL_COUNT} total prompts). /compact recommended: preserve current phase artifacts."
|
|
195
|
+
elif [ "$TOTAL_COUNT" -ge 100 ]; then
|
|
196
|
+
CONTEXT="${CONTEXT} [afc:context] Context ~50%+ estimated (${TOTAL_COUNT} total prompts). Delegate verbose operations to subagents."
|
|
197
|
+
fi
|
|
198
|
+
|
|
157
199
|
# Output additionalContext to stdout (injected into Claude context)
|
|
158
200
|
# Use jq for safe JSON encoding; printf fallback strips remaining quotes
|
|
159
201
|
if command -v jq >/dev/null 2>&1; then
|
|
@@ -76,6 +76,13 @@ if [ -n "$PIPELINE_FEATURE" ] && [ -d "$PROJECT_DIR/.claude/afc/specs/$PIPELINE_
|
|
|
76
76
|
fi
|
|
77
77
|
fi
|
|
78
78
|
|
|
79
|
+
# Include context.md if pipeline is active and file exists
|
|
80
|
+
CONTEXT_MD=""
|
|
81
|
+
if [ -n "$PIPELINE_FEATURE" ] && [ -f "$PROJECT_DIR/.claude/afc/specs/$PIPELINE_FEATURE/context.md" ]; then
|
|
82
|
+
# Include first 50 lines of context.md (keep checkpoint concise)
|
|
83
|
+
CONTEXT_MD=$(head -50 "$PROJECT_DIR/.claude/afc/specs/$PIPELINE_FEATURE/context.md" 2>/dev/null || true)
|
|
84
|
+
fi
|
|
85
|
+
|
|
79
86
|
# Guard against empty lists
|
|
80
87
|
if [ -n "$MODIFIED" ]; then
|
|
81
88
|
# shellcheck disable=SC2001
|
|
@@ -110,6 +117,9 @@ $STAGED_LIST
|
|
|
110
117
|
- Active: $([ -n "$PIPELINE_FEATURE" ] && echo "Yes ($PIPELINE_FEATURE)" || echo "No")
|
|
111
118
|
- Task progress: $TASKS_DONE/$TASKS_TOTAL
|
|
112
119
|
|
|
120
|
+
## Feature Context
|
|
121
|
+
${CONTEXT_MD:-"(no context.md found)"}
|
|
122
|
+
|
|
113
123
|
## Restore Command
|
|
114
124
|
\`\`\`
|
|
115
125
|
/afc:resume
|
|
@@ -38,6 +38,16 @@ if afc_state_is_active; then
|
|
|
38
38
|
FEATURE=$(afc_state_read feature || true)
|
|
39
39
|
OUTPUT="[AFC PIPELINE ACTIVE] Feature: $FEATURE"
|
|
40
40
|
|
|
41
|
+
# Cache pipeline state in CLAUDE_ENV_FILE for hook performance
|
|
42
|
+
if [ -n "${CLAUDE_ENV_FILE:-}" ]; then
|
|
43
|
+
CACHED_PHASE=$(afc_state_read phase 2>/dev/null || echo "")
|
|
44
|
+
CACHED_FEATURE=$(afc_state_read feature 2>/dev/null || echo "")
|
|
45
|
+
{
|
|
46
|
+
printf 'export AFC_CACHED_PHASE="%s"\n' "$CACHED_PHASE"
|
|
47
|
+
printf 'export AFC_CACHED_FEATURE="%s"\n' "$CACHED_FEATURE"
|
|
48
|
+
} >> "$CLAUDE_ENV_FILE"
|
|
49
|
+
fi
|
|
50
|
+
|
|
41
51
|
# tasks.md progress
|
|
42
52
|
TASKS_FILE="$PROJECT_DIR/.claude/afc/specs/$FEATURE/tasks.md"
|
|
43
53
|
if [ -f "$TASKS_FILE" ]; then
|
|
@@ -99,9 +99,7 @@ Structure analysis results and **print to console**:
|
|
|
99
99
|
|
|
100
100
|
### 4. Critic Loop
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
102
|
+
Read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` and follow it. Safety cap: 5 passes.
|
|
105
103
|
|
|
106
104
|
| Criterion | Validation |
|
|
107
105
|
|-----------|------------|
|
|
@@ -110,12 +108,6 @@ Run the critic loop until convergence. Safety cap: 5 passes.
|
|
|
110
108
|
| **COMPATIBILITY** | Is it compatible with existing code? Are there breaking changes? |
|
|
111
109
|
| **ARCHITECTURE** | Does it comply with {config.architecture} rules? |
|
|
112
110
|
|
|
113
|
-
**On FAIL**: auto-fix and continue to next pass.
|
|
114
|
-
**On ESCALATE**: pause, present options to user, apply choice, resume.
|
|
115
|
-
**On DEFER**: record reason, mark criterion clean, continue.
|
|
116
|
-
**On CONVERGE**: `✓ Critic converged ({N} passes, {M} fixes, {E} escalations)`
|
|
117
|
-
**On SAFETY CAP**: `⚠ Critic safety cap ({N} passes). Review recommended.`
|
|
118
|
-
|
|
119
111
|
### 5. Save ADR (for design decisions)
|
|
120
112
|
|
|
121
113
|
If ADR type, save to `.claude/afc/memory/decisions/{YYYY-MM-DD}-{topic}.md`:
|