all-for-claudecode 2.0.0 → 2.2.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.
Files changed (67) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +3 -4
  3. package/MIGRATION.md +10 -7
  4. package/README.md +68 -119
  5. package/agents/afc-architect.md +16 -0
  6. package/agents/afc-impl-worker.md +40 -0
  7. package/agents/afc-security.md +11 -0
  8. package/bin/cli.mjs +1 -1
  9. package/commands/analyze.md +6 -7
  10. package/commands/architect.md +5 -7
  11. package/commands/auto.md +355 -102
  12. package/commands/checkpoint.md +3 -4
  13. package/commands/clarify.md +8 -1
  14. package/commands/debug.md +40 -3
  15. package/commands/doctor.md +12 -13
  16. package/commands/ideate.md +191 -0
  17. package/commands/implement.md +211 -66
  18. package/commands/init.md +76 -61
  19. package/commands/launch.md +181 -0
  20. package/commands/plan.md +86 -22
  21. package/commands/principles.md +6 -2
  22. package/commands/resume.md +1 -2
  23. package/commands/review.md +68 -18
  24. package/commands/security.md +10 -13
  25. package/commands/spec.md +60 -3
  26. package/commands/tasks.md +19 -4
  27. package/commands/test.md +24 -6
  28. package/docs/phase-gate-protocol.md +6 -6
  29. package/hooks/hooks.json +29 -3
  30. package/package.json +19 -11
  31. package/schemas/hooks.schema.json +75 -0
  32. package/schemas/marketplace.schema.json +52 -0
  33. package/schemas/plugin.schema.json +53 -0
  34. package/scripts/afc-bash-guard.sh +6 -6
  35. package/scripts/afc-blast-radius.sh +418 -0
  36. package/scripts/afc-config-change.sh +6 -4
  37. package/scripts/afc-consistency-check.sh +261 -0
  38. package/scripts/afc-dag-validate.mjs +94 -0
  39. package/scripts/afc-dag-validate.sh +142 -0
  40. package/scripts/afc-failure-hint.sh +6 -4
  41. package/scripts/afc-parallel-validate.mjs +81 -0
  42. package/scripts/afc-parallel-validate.sh +33 -45
  43. package/scripts/afc-permission-request.sh +56 -11
  44. package/scripts/afc-pipeline-manage.sh +46 -46
  45. package/scripts/afc-preflight-check.sh +6 -3
  46. package/scripts/afc-schema-validate.sh +225 -0
  47. package/scripts/afc-session-end.sh +5 -5
  48. package/scripts/afc-state.sh +256 -0
  49. package/scripts/afc-stop-gate.sh +32 -24
  50. package/scripts/afc-subagent-context.sh +15 -6
  51. package/scripts/afc-subagent-stop.sh +4 -2
  52. package/scripts/afc-task-completed-gate.sh +19 -25
  53. package/scripts/afc-teammate-idle.sh +9 -14
  54. package/scripts/afc-test-pre-gen.sh +141 -0
  55. package/scripts/afc-timeline-log.sh +9 -6
  56. package/scripts/afc-user-prompt-submit.sh +8 -10
  57. package/scripts/afc-worktree-create.sh +56 -0
  58. package/scripts/afc-worktree-remove.sh +47 -0
  59. package/scripts/install-shellspec.sh +38 -0
  60. package/scripts/pre-compact-checkpoint.sh +6 -4
  61. package/scripts/session-start-context.sh +9 -8
  62. package/scripts/track-afc-changes.sh +6 -9
  63. package/templates/afc.config.template.md +12 -76
  64. package/templates/afc.config.express-api.md +0 -99
  65. package/templates/afc.config.monorepo.md +0 -98
  66. package/templates/afc.config.nextjs-fsd.md +0 -107
  67. package/templates/afc.config.react-spa.md +0 -96
@@ -1,90 +1,26 @@
1
- # AFC Configuration
1
+ # Project Configuration
2
2
 
3
- > This file defines project-specific settings for the afc command system.
4
- > All afc commands reference this file to determine project-specific behavior.
5
- > Modify each section to match your project.
3
+ > afc commands reference this file to determine project-specific behavior.
4
+ > CI Commands are parsed by scripts keep the YAML format intact.
5
+ > All other sections are free-form markdown — write whatever best describes your project.
6
6
 
7
7
  ## CI Commands
8
8
 
9
+ <!-- DO NOT change the format below. Scripts parse these keys. -->
9
10
  ```yaml
10
- ci: "npm run ci" # Full CI (lint + typecheck + build)
11
- typecheck: "npm run typecheck" # Typecheck only
12
- lint: "npm run lint" # Lint only
13
- lint_fix: "npm run lint:fix" # Auto-fix lint
14
- gate: "npm run typecheck && npm run lint" # Phase gate (run repeatedly during implement)
15
- test: "npm test" # Tests
11
+ ci: "npm run ci"
12
+ gate: "npm run typecheck && npm run lint"
13
+ test: "npm test"
16
14
  ```
17
15
 
18
16
  ## Architecture
19
17
 
20
- ```yaml
21
- style: "Layered" # e.g.: FSD, Clean Architecture, Modular Monolith, Layered
22
- layers: [] # List from top to bottom layer
23
- import_rule: "" # Import direction rule (e.g.: "upper → lower only")
24
- segments: [] # Sub-segments for each layer
25
- path_alias: "" # e.g.: "@/* → ./src/*"
26
- ```
27
-
28
- ## Framework
29
-
30
- ```yaml
31
- name: "" # e.g.: Next.js 14, Vite, CRA
32
- runtime: "" # e.g.: App Router, Pages Router
33
- client_directive: "" # e.g.: 'use client' (leave empty if not applicable)
34
- client_directive_rule: "" # Rule for applying client directives
35
- server_client_boundary: false # Whether a server/client boundary exists
36
- ```
18
+ (init analyzes your project and writes this section in free-form)
37
19
 
38
20
  ## Code Style
39
21
 
40
- ```yaml
41
- language: "TypeScript"
42
- strict_mode: true
43
- type_keyword: "type" # type vs interface
44
- import_type: true # Whether to use import type
45
- component_style: "PascalCase"
46
- props_position: "above component"
47
- handler_naming: "handle[Event]"
48
- boolean_naming: "is/has/can[State]"
49
- constant_naming: "UPPER_SNAKE_CASE"
50
- any_policy: "minimize"
51
- ```
52
-
53
- ## State Management
54
-
55
- ```yaml
56
- global_state: "" # e.g.: Zustand, Redux, Pinia
57
- server_state: "" # e.g.: React Query, SWR, Apollo
58
- local_state: "" # e.g.: Context API, useState
59
- store_location: "" # Store file location pattern
60
- query_location: "" # Query file location pattern
61
- ```
62
-
63
- ## Styling
64
-
65
- ```yaml
66
- framework: "" # e.g.: Tailwind CSS, styled-components, CSS Modules
67
- ```
68
-
69
- ## Testing
70
-
71
- ```yaml
72
- framework: "" # e.g.: Jest, Vitest, Playwright
73
- ```
74
-
75
- ## Project-Specific Risks
76
-
77
- > Project-specific risk patterns that must be checked in the Plan's RISK Critic
78
- > Modify to match your project.
79
-
80
- 1. (example) Import order violation
81
- 2. (example) Circular reference
82
- 3. (example) Type safety bypass (as any)
83
-
84
- ## Mini-Review Checklist
22
+ (init analyzes your project and writes this section in free-form)
85
23
 
86
- > Items to inspect for each file in the Mini-Review of the Implement Phase gate
24
+ ## Project Context
87
25
 
88
- 1. Architecture rule violations
89
- 2. Code style pattern compliance
90
- 3. Dead code (unused imports, empty exports, dead code)
26
+ (init analyzes your project and writes this section in free-form — framework, state management, styling, testing, risks, etc.)
@@ -1,99 +0,0 @@
1
- # AFC Configuration
2
-
3
- > This file defines project-specific settings for the afc command system.
4
- > All afc commands reference this file to determine project-specific behavior.
5
-
6
- ## CI Commands
7
-
8
- ```yaml
9
- ci: "npm run build && npm run lint && npm run test" # Full CI (build + lint + test)
10
- typecheck: "npx tsc --noEmit" # Typecheck only
11
- lint: "npx eslint src/" # Lint only
12
- lint_fix: "npx eslint src/ --fix" # Auto-fix lint
13
- gate: "npx tsc --noEmit && npx eslint src/" # Phase gate (run repeatedly during implement)
14
- test: "npx jest --runInBand" # Tests
15
- ```
16
-
17
- ## Architecture
18
-
19
- ```yaml
20
- style: "Layered" # Layered architecture
21
- layers: # Top → bottom order
22
- - src/routes
23
- - src/controllers
24
- - src/services
25
- - src/repositories
26
- - src/models
27
- - src/middleware
28
- - src/lib
29
- - src/types
30
- - src/config
31
- import_rule: "Upper layers (routes) depend only in order: controllers → services → repositories"
32
- segments: []
33
- path_alias: "@/* → ./src/*"
34
- ```
35
-
36
- ## Framework
37
-
38
- ```yaml
39
- name: "Express.js"
40
- runtime: "Node.js (CommonJS or ESM)"
41
- client_directive: "" # Server-only — not applicable
42
- server_client_boundary: false # Server-only application
43
- ```
44
-
45
- ## Code Style
46
-
47
- ```yaml
48
- language: "TypeScript"
49
- strict_mode: true
50
- type_keyword: "type" # Use type instead of interface
51
- import_type: true # Use import type { ... }
52
- component_style: "" # No UI components
53
- props_position: "" # No UI components
54
- handler_naming: "camelCase"
55
- boolean_naming: "is/has/can[State]"
56
- constant_naming: "UPPER_SNAKE_CASE"
57
- any_policy: "banned (use unknown with strict mode)"
58
- ```
59
-
60
- ## State Management
61
-
62
- ```yaml
63
- global_state: "" # Server — stateless
64
- server_state: ""
65
- local_state: ""
66
- store_location: ""
67
- query_location: ""
68
- ```
69
-
70
- ## Styling
71
-
72
- ```yaml
73
- framework: "" # Not applicable
74
- ```
75
-
76
- ## Testing
77
-
78
- ```yaml
79
- framework: "Jest + Supertest"
80
- ```
81
-
82
- ## Project-Specific Risks
83
-
84
- > Project-specific risk patterns that must be checked in the Plan's RISK Critic
85
-
86
- 1. Prisma migration and schema mismatch
87
- 2. Express middleware ordering errors (auth → validation → handler)
88
- 3. Missing async/await error handling (try-catch or wrapper)
89
- 4. Runtime errors when environment variables (.env) are not set
90
- 5. SQL injection (caution with raw queries when using Prisma)
91
-
92
- ## Mini-Review Checklist
93
-
94
- > Items to inspect for each file in the Mini-Review of the Implement Phase gate
95
-
96
- 1. TypeScript strict mode violations
97
- 2. Error handling (try-catch or asyncHandler on async routes)
98
- 3. Input validation (type checking of req.body/params/query)
99
- 4. Unused imports / dead code
@@ -1,98 +0,0 @@
1
- # AFC Configuration
2
-
3
- > This file defines project-specific settings for the afc command system.
4
- > All afc commands reference this file to determine project-specific behavior.
5
-
6
- ## CI Commands
7
-
8
- ```yaml
9
- ci: "pnpm turbo build lint test" # Full CI (lint + typecheck + build)
10
- typecheck: "pnpm turbo typecheck" # Typecheck only
11
- lint: "pnpm turbo lint" # Lint only
12
- lint_fix: "pnpm turbo lint -- --fix" # Auto-fix lint
13
- gate: "pnpm turbo typecheck lint" # Phase gate (run repeatedly during implement)
14
- test: "pnpm turbo test" # Tests
15
- ```
16
-
17
- ## Architecture
18
-
19
- ```yaml
20
- style: "Monorepo"
21
- layers: # Root → package order
22
- - apps/
23
- - packages/
24
- import_rule: "apps/ may only import from packages/. packages/ must declare explicit dependencies (package.json)"
25
- segments:
26
- - apps/web # Web app
27
- - apps/api # API server
28
- - packages/ui # Shared UI components
29
- - packages/config # Shared configuration (ESLint, Prettier, etc.)
30
- - packages/tsconfig # Shared TypeScript configuration
31
- - packages/utils # Shared utilities
32
- path_alias: "@repo/* → packages/*"
33
- ```
34
-
35
- ## Framework
36
-
37
- ```yaml
38
- name: "Turborepo + pnpm workspace"
39
- runtime: "Multiple (varies per app)"
40
- client_directive: "Varies per app"
41
- server_client_boundary: "Varies per app" # Determined by each app's framework
42
- ```
43
-
44
- ## Code Style
45
-
46
- ```yaml
47
- language: "TypeScript"
48
- strict_mode: true
49
- type_keyword: "type" # Use type instead of interface
50
- import_type: true # Use import type { ... }
51
- component_style: "PascalCase"
52
- props_position: "above component" # Define Props type above the component
53
- handler_naming: "handle[Event]"
54
- boolean_naming: "is/has/can[State]"
55
- constant_naming: "UPPER_SNAKE_CASE"
56
- any_policy: "minimize (especially strict for shared packages)"
57
- ```
58
-
59
- ## State Management
60
-
61
- ```yaml
62
- global_state: "Varies per app"
63
- server_state: "Varies per app"
64
- local_state: "Varies per app"
65
- store_location: "Within each app"
66
- query_location: "Within each app"
67
- ```
68
-
69
- ## Styling
70
-
71
- ```yaml
72
- framework: "Varies per app (shared UI package uses Tailwind CSS)"
73
- ```
74
-
75
- ## Testing
76
-
77
- ```yaml
78
- framework: "Varies per app (Vitest or Jest)"
79
- ```
80
-
81
- ## Project-Specific Risks
82
-
83
- > Project-specific risk patterns that must be checked in the Plan's RISK Critic
84
-
85
- 1. Circular dependencies between packages (turborepo detects, but runtime errors possible)
86
- 2. Build failures in dependent apps when shared packages change
87
- 3. npm publish errors when pnpm workspace protocol (workspace:*) is missing
88
- 4. tsconfig inheritance chain mismatch (extends path errors)
89
- 5. Stale builds due to incorrect pipeline cache settings in turbo.json
90
-
91
- ## Mini-Review Checklist
92
-
93
- > Items to inspect for each file in the Mini-Review of the Implement Phase gate
94
-
95
- 1. Dependency direction between packages (apps → packages only)
96
- 2. Shared package export paths (package.json exports field)
97
- 3. TypeScript strict mode + path alias consistency
98
- 4. turbo.json pipeline configuration matches actual scripts
@@ -1,107 +0,0 @@
1
- # AFC Configuration
2
-
3
- > This file defines project-specific settings for the afc command system.
4
- > All afc commands reference this file to determine project-specific behavior.
5
-
6
- ## CI Commands
7
-
8
- ```yaml
9
- ci: "yarn ci" # Full CI (lint + typecheck + build)
10
- typecheck: "yarn typecheck" # Typecheck only
11
- lint: "yarn lint" # Lint only
12
- lint_fix: "yarn lint:fix" # Auto-fix lint
13
- gate: "yarn typecheck && yarn lint" # Phase gate (run repeatedly during implement)
14
- test: "yarn test" # Tests
15
- ```
16
-
17
- ## Architecture
18
-
19
- ```yaml
20
- style: "FSD" # Feature-Sliced Design
21
- layers: # Top → bottom order
22
- - app
23
- - views
24
- - widgets
25
- - features
26
- - entities
27
- - shared
28
- - core
29
- import_rule: "Upper layers may only import from lower layers (no reverse direction)"
30
- segments:
31
- - api # API-related logic (React Query hooks)
32
- - model # State management and type definitions
33
- - ui # UI components
34
- - lib # Utility functions
35
- - config # Configuration and constants
36
- - hooks # Custom hooks
37
- path_alias: "@/* → ./src/*"
38
- ```
39
-
40
- ## Framework
41
-
42
- ```yaml
43
- name: "Next.js 14"
44
- runtime: "App Router"
45
- client_directive: "'use client'"
46
- client_directive_rule: >
47
- Files using client hooks such as useState/useEffect/useRef must
48
- declare 'use client'. Pay special attention when indirectly imported
49
- from server components via barrel exports (index.ts).
50
- server_client_boundary: true # Server/client boundary exists
51
- ```
52
-
53
- ## Code Style
54
-
55
- ```yaml
56
- language: "TypeScript"
57
- strict_mode: true
58
- type_keyword: "type" # Use type instead of interface
59
- import_type: true # Use import type { ... }
60
- component_style: "PascalCase"
61
- props_position: "above component" # Define Props type above the component
62
- handler_naming: "handle[Event]"
63
- boolean_naming: "is/has/can[State]"
64
- constant_naming: "UPPER_SNAKE_CASE"
65
- any_policy: "minimize (comply with strict mode)"
66
- ```
67
-
68
- ## State Management
69
-
70
- ```yaml
71
- global_state: "Zustand"
72
- server_state: "React Query v5"
73
- local_state: "Context API (use-context-selector)"
74
- store_location: "model/ segment"
75
- query_location: "api/ segment"
76
- ```
77
-
78
- ## Styling
79
-
80
- ```yaml
81
- framework: "Tailwind CSS v3"
82
- ```
83
-
84
- ## Testing
85
-
86
- ```yaml
87
- framework: "Jest + React Testing Library"
88
- ```
89
-
90
- ## Project-Specific Risks
91
-
92
- > Project-specific risk patterns that must be checked in the Plan's RISK Critic
93
-
94
- 1. Missing `'use client'` in barrel export chain → build failure
95
- 2. Import order violation (ESLint FSD import order)
96
- 3. Circular reference (when using barrel imports inside shared/ui)
97
- 4. FSD layer reverse import
98
- 5. Residual `as any` → typecheck bypass
99
-
100
- ## Mini-Review Checklist
101
-
102
- > Items to inspect for each file in the Mini-Review of the Implement Phase gate
103
-
104
- 1. Whether `'use client'` is required (mandatory when using client hooks)
105
- 2. FSD layer violations (M violations out of N import paths)
106
- 3. Project patterns (`type` vs `interface`, naming, import order)
107
- 4. Dead code (unused imports, empty exports, dead code)
@@ -1,96 +0,0 @@
1
- # AFC Configuration
2
-
3
- > This file defines project-specific settings for the afc command system.
4
- > All afc commands reference this file to determine project-specific behavior.
5
-
6
- ## CI Commands
7
-
8
- ```yaml
9
- ci: "npm run build && npm run lint && npm run test" # Full CI (build + lint + test)
10
- typecheck: "npx tsc --noEmit" # Typecheck only
11
- lint: "npx eslint src/" # Lint only
12
- lint_fix: "npx eslint src/ --fix" # Auto-fix lint
13
- gate: "npx tsc --noEmit && npx eslint src/" # Phase gate (run repeatedly during implement)
14
- test: "npx vitest run" # Tests
15
- ```
16
-
17
- ## Architecture
18
-
19
- ```yaml
20
- style: "Modular"
21
- layers: # Role-based separation structure
22
- - src/components
23
- - src/features
24
- - src/hooks
25
- - src/lib
26
- - src/stores
27
- - src/types
28
- - src/api
29
- import_rule: "No direct imports between features/ (route via shared)"
30
- segments: []
31
- path_alias: "@/* → ./src/*"
32
- ```
33
-
34
- ## Framework
35
-
36
- ```yaml
37
- name: "Vite + React 18"
38
- runtime: "SPA (Client-Side)"
39
- client_directive: "" # Not needed for SPA
40
- server_client_boundary: false # No server/client boundary
41
- ```
42
-
43
- ## Code Style
44
-
45
- ```yaml
46
- language: "TypeScript"
47
- strict_mode: true
48
- type_keyword: "type" # Use type instead of interface
49
- import_type: true # Use import type { ... }
50
- component_style: "PascalCase"
51
- props_position: "above component" # Define Props type above the component
52
- handler_naming: "handle[Event]"
53
- boolean_naming: "is/has/can[State]"
54
- constant_naming: "UPPER_SNAKE_CASE"
55
- any_policy: "minimize (comply with strict mode)"
56
- ```
57
-
58
- ## State Management
59
-
60
- ```yaml
61
- global_state: "Zustand"
62
- server_state: "React Query v5"
63
- local_state: "useState / useReducer"
64
- store_location: "src/stores/"
65
- query_location: "src/api/"
66
- ```
67
-
68
- ## Styling
69
-
70
- ```yaml
71
- framework: "Tailwind CSS v3"
72
- ```
73
-
74
- ## Testing
75
-
76
- ```yaml
77
- framework: "Vitest + React Testing Library"
78
- ```
79
-
80
- ## Project-Specific Risks
81
-
82
- > Project-specific risk patterns that must be checked in the Plan's RISK Critic
83
-
84
- 1. Missing environment variables when building with Vite HMR disabled
85
- 2. Stale data displayed due to missing React Query cache invalidation
86
- 3. Unnecessary re-renders when selectors are not used in Zustand store
87
- 4. Mismatch between path alias and Vite resolve.alias
88
-
89
- ## Mini-Review Checklist
90
-
91
- > Items to inspect for each file in the Mini-Review of the Implement Phase gate
92
-
93
- 1. TypeScript strict mode violations (any, as unknown)
94
- 2. Whether import paths use path alias (@/)
95
- 3. React hooks rules (no conditional hook calls)
96
- 4. Unused imports / dead code