@agentic15.com/agentic15-claude-zen 2.0.6 → 3.0.2

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 (65) hide show
  1. package/CHANGELOG.md +298 -5
  2. package/README.md +16 -3
  3. package/bin/create-agentic15-claude-zen.js +1 -1
  4. package/package.json +3 -6
  5. package/src/cli/CommitCommand.js +19 -3
  6. package/src/cli/PlanCommand.js +184 -24
  7. package/src/cli/TaskCommand.js +3 -1
  8. package/src/core/ProjectInitializer.js +19 -23
  9. package/src/core/TaskIssueMapper.js +15 -11
  10. package/src/core/TemplateManager.js +2 -1
  11. package/templates/.github/ISSUE_TEMPLATE/task.md +23 -0
  12. package/templates/.github/PULL_REQUEST_TEMPLATE.md +23 -0
  13. package/templates/README.md +52 -55
  14. package/dist/hooks/auto-format.js +0 -2
  15. package/dist/hooks/check-pending-reviews.js +0 -2
  16. package/dist/hooks/complete-task.js +0 -2
  17. package/dist/hooks/detect-pending-reviews.js +0 -2
  18. package/dist/hooks/enforce-hard-requirements.js +0 -2
  19. package/dist/hooks/enforce-migration-workflow.js +0 -2
  20. package/dist/hooks/enforce-plan-template.js +0 -2
  21. package/dist/hooks/enforce-structured-development.js +0 -2
  22. package/dist/hooks/enforce-test-pyramid.js +0 -2
  23. package/dist/hooks/init-task-tracker.js +0 -2
  24. package/dist/hooks/performance-cache.js +0 -2
  25. package/dist/hooks/prevent-read-bypass.js +0 -2
  26. package/dist/hooks/session-start-context.js +0 -2
  27. package/dist/hooks/start-task.js +0 -2
  28. package/dist/hooks/task-status.js +0 -2
  29. package/dist/hooks/validate-component-contract.js +0 -2
  30. package/dist/hooks/validate-database-changes.js +0 -2
  31. package/dist/hooks/validate-e2e-coverage.js +0 -2
  32. package/dist/hooks/validate-git-workflow.js +0 -2
  33. package/dist/hooks/validate-integration-site.js +0 -2
  34. package/dist/hooks/validate-migration-impact.js +0 -2
  35. package/dist/hooks/validate-task-completion.js +0 -2
  36. package/dist/hooks/validate-test-quality.js +0 -2
  37. package/dist/hooks/validate-test-results.js +0 -2
  38. package/dist/hooks/validate-ui-integration.js +0 -2
  39. package/dist/hooks/validate-ui-runtime.js +0 -2
  40. package/dist/hooks/validate-ui-syntax.js +0 -2
  41. package/dist/hooks/validate-ui-visual-native.js +0 -2
  42. package/dist/hooks/validate-ui-visual.js +0 -2
  43. package/dist/hooks/validate-visual-regression.js +0 -2
  44. package/dist/index.js +0 -24
  45. package/dist/index.js.map +0 -7
  46. package/dist/scripts/add-version-headers.js +0 -2
  47. package/dist/scripts/help.js +0 -2
  48. package/dist/scripts/plan-amend.js +0 -2
  49. package/dist/scripts/plan-create.js +0 -2
  50. package/dist/scripts/plan-generate.js +0 -2
  51. package/dist/scripts/plan-help.js +0 -2
  52. package/dist/scripts/plan-init.js +0 -2
  53. package/dist/scripts/plan-manager.js +0 -2
  54. package/dist/scripts/pre-publish-checklist.js +0 -2
  55. package/dist/scripts/production-test.js +0 -2
  56. package/dist/scripts/profile-hooks.js +0 -2
  57. package/dist/scripts/setup-git-hooks.js +0 -2
  58. package/dist/scripts/task-done.js +0 -2
  59. package/dist/scripts/task-merge.js +0 -2
  60. package/dist/scripts/task-next.js +0 -2
  61. package/dist/scripts/task-start.js +0 -2
  62. package/dist/scripts/task-status.js +0 -2
  63. package/dist/scripts/verify-hooks.js +0 -2
  64. package/templates/.claude/CLAUDE.md +0 -408
  65. package/templates/.claude/ONBOARDING.md +0 -723
@@ -1,723 +0,0 @@
1
- # 🎯 CRITICAL: READ THIS FIRST
2
- **Version:** 1.4.2
3
- **Last Updated:** 2025-12-24
4
- **Package:** agentic15-claude-zen
5
-
6
- ## Your Environment Structure
7
-
8
- ```
9
- project-root/
10
- ├── .claude/
11
- │ ├── settings.json ← PERMISSIONS & HOOKS (enforced)
12
- │ ├── CLAUDE.md ← YOUR INSTRUCTIONS (read carefully)
13
- │ ├── ONBOARDING.md ← THIS FILE
14
- │ ├── plans/ ← Project plans (immutable once locked)
15
- │ └── hooks/ ← NOT PRESENT (hooks are in node_modules)
16
-
17
- ├── node_modules/
18
- │ └── .agentic15-claude-zen/
19
- │ ├── scripts/ ← 17 WORKFLOW SCRIPTS (bundled, protected)
20
- │ └── hooks/ ← 28 ENFORCEMENT HOOKS (bundled, protected)
21
-
22
- ├── .git/hooks/ ← GIT HOOKS (installed by setup:git-hooks)
23
-
24
- ├── Agent/ ← YOUR WORKSPACE (you can modify)
25
- │ ├── src/ ← Source code
26
- │ ├── tests/ ← Test files
27
- │ └── db/ ← Database scripts (write only, human executes)
28
-
29
- ├── scripts/ ← CUSTOM SCRIPTS (you can modify)
30
-
31
- └── package.json ← NPM scripts configured
32
- ```
33
-
34
- ## 🚨 HARD RULES - NEVER VIOLATED
35
-
36
- ### Rule 1: NO WORK WITHOUT ACTIVE PLAN + TASK
37
- **BLOCKED BY:** `enforce-structured-development.js` hook (PreToolUse)
38
-
39
- ```bash
40
- # ALWAYS start with a plan:
41
- npm run plan:generate "Your project description"
42
-
43
- # Set active plan:
44
- echo "plan-001-generated" > .claude/ACTIVE-PLAN
45
-
46
- # Lock the plan:
47
- npm run plan:init
48
-
49
- # Start a task:
50
- npm run task:start TASK-001
51
- ```
52
-
53
- **What gets blocked if no active task:**
54
- - ❌ Edit()
55
- - ❌ Write()
56
- - ❌ TodoWrite()
57
- - ❌ Read() on project files
58
- - ❌ Grep() on project files
59
- - ❌ Glob() on project files
60
-
61
- **Only allowed without task:**
62
- - ✅ npm run commands
63
- - ✅ git status/log/diff
64
- - ✅ Reading documentation
65
-
66
- ### Rule 2: WORK ONLY ON MAIN BRANCH
67
- **BLOCKED BY:** Permission system in `settings.json`
68
-
69
- ```bash
70
- # ✅ ALLOWED:
71
- git checkout main
72
- git add .
73
- git commit -m "[TASK-001] Description"
74
- git push origin main
75
-
76
- # ❌ BLOCKED:
77
- git checkout -b feature/anything # DENIED
78
- git checkout -b task/anything # DENIED
79
- git merge # DENIED
80
- ```
81
-
82
- **All work happens directly on main branch. No branching.**
83
-
84
- ### Rule 3: RESTRICTED DIRECTORY ACCESS
85
- **BLOCKED BY:** Permission system in `settings.json`
86
-
87
- ```bash
88
- # ✅ YOU CAN MODIFY:
89
- ./Agent/** # Your source code
90
- ./scripts/** # Your custom scripts
91
-
92
- # ❌ YOU CANNOT MODIFY:
93
- ./docs/** # Documentation (DENIED)
94
- ./.claude/** # Framework files (DENIED)
95
- ./node_modules/** # Dependencies (DENIED)
96
- **/*.md # Markdown files (DENIED)
97
- ./.env* # Environment files (DENIED)
98
- ```
99
-
100
- ### Rule 4: NO DANGEROUS OPERATIONS
101
- **BLOCKED BY:** Permission system in `settings.json`
102
-
103
- ```bash
104
- # ❌ BLOCKED COMMANDS:
105
- git push --force
106
- rm -rf
107
- sudo
108
- npm install # Ask user first
109
- npm publish
110
- curl / wget
111
- psql / mysql / mongosh
112
- node ./scripts/** # Write scripts, human executes
113
- node ./Agent/db/** # Write scripts, human executes
114
- ```
115
-
116
- ## 📋 Available Commands
117
-
118
- ### Planning Commands (ALWAYS START HERE)
119
- ```bash
120
- npm run plan:generate "description" # Generate plan from description
121
- npm run plan:init # Lock plan, create task tracker
122
- npm run plan:manager # Switch between plans
123
- npm run plan:amend # Amend locked plan (audit trail)
124
- npm run plan:help # Planning help
125
- ```
126
-
127
- ### Task Commands (USE AFTER PLAN IS LOCKED)
128
- ```bash
129
- npm run task:start TASK-001 # Start specific task
130
- npm run task:next # Auto-start next available task
131
- npm run task:done TASK-001 # Complete current task
132
- npm run task:status # View project progress
133
- ```
134
-
135
- ### Utility Commands
136
- ```bash
137
- npm run help # Show all commands
138
- npm run setup:git-hooks # Install git hooks
139
- ```
140
-
141
- ## 🔒 How Hooks Protect the Workflow
142
-
143
- ### PreToolUse Hooks (RUN BEFORE EVERY ACTION)
144
- 1. **enforce-hard-requirements.js** - Validates critical constraints
145
- 2. **prevent-read-bypass.js** - Prevents unauthorized file access
146
- 3. **enforce-structured-development.js** - Requires active task
147
- 4. **validate-git-workflow.js** - Validates git operations
148
- 5. **validate-task-completion.js** - Ensures task is active
149
-
150
- ### PostToolUse Hooks (RUN AFTER EVERY ACTION)
151
- 1. **auto-format.js** - Auto-formats code
152
- 2. **validate-test-quality.js** - Blocks fake tests
153
- 3. **validate-ui-integration.js** - Requires UI tests
154
- 4. **validate-database-changes.js** - Validates migrations
155
- 5. **enforce-test-pyramid.js** - Warns on missing tests
156
- 6. And 23 more hooks...
157
-
158
- **ALL HOOKS USE `process.exit(1)` OR `process.exit(2)` TO HARD BLOCK VIOLATIONS**
159
-
160
- ## ✅ MANDATORY: Task Completion Steps
161
-
162
- **EVERY SINGLE TASK MUST FOLLOW THESE STEPS - NO EXCEPTIONS**
163
-
164
- ### Step-by-Step Task Completion Checklist
165
-
166
- ```
167
- □ 1. Read task file: .claude/plans/<plan-id>/tasks/TASK-XXX.json
168
- - Read description, completionCriteria, testCases
169
- - Understand what needs to be done
170
-
171
- □ 2. Read related files mentioned in task
172
- - Check artifacts.code for files to modify
173
- - Read existing code before changing
174
-
175
- □ 3. Make changes in ./Agent/ or ./scripts/ only
176
- - Edit/Write only in allowed directories
177
- - Follow task requirements exactly
178
-
179
- □ 4. Write/update tests
180
- - Create test file if doesn't exist
181
- - Add test cases from task.testCases
182
- - Ensure tests have real assertions
183
-
184
- □ 5. Run tests and verify they pass
185
- - npm test (or project-specific test command)
186
- - Fix any failures before continuing
187
-
188
- □ 6. Commit changes with task ID
189
- - git add .
190
- - git commit -m "[TASK-XXX] Description"
191
- - Include task ID in EVERY commit
192
-
193
- □ 7. Push to remote
194
- - git push origin main
195
- - Backup work regularly
196
-
197
- □ 8. Verify all completion criteria met
198
- - Check task.completionCriteria array
199
- - Ensure EVERY criterion is satisfied
200
-
201
- □ 9. Mark task complete
202
- - npm run task:done TASK-XXX
203
- - System validates all changes committed
204
- ```
205
-
206
- **If ANY step fails, DO NOT proceed. Fix the issue first.**
207
-
208
- ## 🧪 TEST-DRIVEN DEVELOPMENT - HARD RULES
209
-
210
- **ALL TESTING RULES ARE ENFORCED BY HOOKS - VIOLATIONS WILL BLOCK COMMITS**
211
-
212
- ### Rule 1: Tests MUST Have Real Assertions
213
- **ENFORCED BY:** `validate-test-quality.js` (PostToolUse)
214
-
215
- ```javascript
216
- // ❌ BLOCKED - Fake test
217
- test('should work', () => {
218
- // empty test
219
- });
220
-
221
- // ❌ BLOCKED - No assertions
222
- test('should calculate', () => {
223
- const result = add(2, 3);
224
- // no assertion
225
- });
226
-
227
- // ✅ ALLOWED - Real assertion
228
- test('should add numbers', () => {
229
- const result = add(2, 3);
230
- expect(result).toBe(5);
231
- });
232
- ```
233
-
234
- **Hook blocks:**
235
- - Empty test functions
236
- - Tests without expect/assert/should
237
- - Comment-only tests
238
- - Console.log-only tests
239
-
240
- ### Rule 2: UI Components MUST Have Tests
241
- **ENFORCED BY:** `validate-ui-integration.js` (PostToolUse)
242
-
243
- When you modify UI components (`.tsx`, `.jsx`, `.vue`, `.svelte`):
244
-
245
- ```bash
246
- # ❌ BLOCKED - No test file
247
- src/components/Button.tsx # modified
248
- # Missing: src/components/Button.test.tsx
249
-
250
- # ✅ ALLOWED - Test file exists
251
- src/components/Button.tsx # modified
252
- src/components/Button.test.tsx # exists with real tests
253
- ```
254
-
255
- **Required in UI tests:**
256
- - Import and render the component
257
- - Provide required props
258
- - Simulate user events (clicks, inputs)
259
- - Mock API calls if used
260
- - Validate state changes
261
- - Test form submission if applicable
262
- - Test conditional rendering paths
263
-
264
- ### Rule 3: UI Components MUST Be in Integration Site
265
- **ENFORCED BY:** `validate-integration-site.js` (PostToolUse)
266
-
267
- ```bash
268
- # ❌ BLOCKED - Not in test-site
269
- src/components/NewWidget.tsx # created
270
- # Missing: test-site/src/components/NewWidget.tsx
271
-
272
- # ✅ ALLOWED - Added to integration site
273
- src/components/NewWidget.tsx # created
274
- test-site/src/components/NewWidget.tsx # added for stakeholder preview
275
- ```
276
-
277
- **Purpose:** Integration site allows stakeholders to preview components with hot-reload.
278
-
279
- ### Rule 4: Tests MUST Pass Before Commit
280
- **ENFORCED BY:** `validate-test-results.js` (PostToolUse)
281
-
282
- ```bash
283
- # ❌ BLOCKED - Tests failing
284
- npm test
285
- # 5 passing, 2 failing
286
- git commit -m "Add feature"
287
- # BLOCKED: Tests must pass
288
-
289
- # ✅ ALLOWED - All tests pass
290
- npm test
291
- # 7 passing
292
- git commit -m "Add feature"
293
- # Commit succeeds
294
- ```
295
-
296
- **Hook checks npm test exit code. Non-zero = blocked.**
297
-
298
- ### Rule 5: Database Changes MUST Use Migrations
299
- **ENFORCED BY:** `validate-database-changes.js` (PostToolUse)
300
-
301
- ```bash
302
- # ❌ BLOCKED - Direct schema edit
303
- Edit(./Agent/db/schema.sql) # DENIED by permissions
304
-
305
- # ✅ ALLOWED - Migration workflow
306
- Write(./Agent/migrations/001_add_users_table.sql)
307
- # Migration file created, human executes
308
- ```
309
-
310
- **Rules:**
311
- - NEVER edit existing migrations (immutable)
312
- - ALWAYS create new migration files
313
- - NEVER run database CLI directly (psql, mysql)
314
- - Human executes migrations, Claude writes them
315
-
316
- ### Rule 6: Test Pyramid Must Be Balanced
317
- **ENFORCED BY:** `enforce-test-pyramid.js` (PostToolUse)
318
-
319
- ```bash
320
- # ⚠️ WARNING - Imbalanced tests
321
- Unit tests: 50
322
- Integration tests: 5
323
- E2E tests: 0
324
- # Warning: Need more integration and E2E tests
325
-
326
- # ✅ GOOD - Balanced pyramid
327
- Unit tests: 100
328
- Integration tests: 30
329
- E2E tests: 10
330
- ```
331
-
332
- **Recommended ratio:** 70% unit, 20% integration, 10% e2e
333
-
334
- ## 📝 TASK DEVELOPMENT WORKFLOW (STEP-BY-STEP)
335
-
336
- **Follow this EXACT workflow for EVERY task - hooks enforce it**
337
-
338
- ### Phase 1: Planning (Before Code)
339
- ```bash
340
- □ 1. Read task file
341
- cat .claude/plans/<plan-id>/tasks/TASK-XXX.json
342
-
343
- □ 2. Understand requirements
344
- - Read description
345
- - Check completionCriteria (what defines "done")
346
- - Check testCases (what tests are required)
347
- - Check artifacts.code (which files to modify)
348
-
349
- □ 3. Read existing code
350
- Read(./Agent/src/target-file.ts)
351
- # NEVER modify code you haven't read first
352
- ```
353
-
354
- ### Phase 2: Write Tests First (TDD)
355
- ```bash
356
- □ 4. Create test file
357
- Write(./Agent/tests/feature.test.ts)
358
-
359
- □ 5. Write test cases from task
360
- - Use task.testCases as test names
361
- - Write failing tests with real assertions
362
- - Test expected behavior, edge cases, errors
363
-
364
- □ 6. Run tests (should fail)
365
- npm test
366
- # Tests should fail - no implementation yet
367
- ```
368
-
369
- ### Phase 3: Implement Code
370
- ```bash
371
- □ 7. Write minimum code to pass tests
372
- Edit(./Agent/src/feature.ts)
373
- # Only in ./Agent/** or ./scripts/**
374
-
375
- □ 8. Run tests (should pass)
376
- npm test
377
- # Fix until all tests pass
378
-
379
- □ 9. Refactor if needed
380
- # Improve code while tests stay green
381
- ```
382
-
383
- ### Phase 4: UI Components (If Applicable)
384
- ```bash
385
- □ 10. Create UI test
386
- Write(./Agent/src/components/Widget.test.tsx)
387
- - Import and render component
388
- - Test props, events, state, API mocks
389
-
390
- □ 11. Implement UI component
391
- Edit(./Agent/src/components/Widget.tsx)
392
-
393
- □ 12. Add to integration site
394
- Write(./test-site/src/components/Widget.tsx)
395
- # For stakeholder preview
396
-
397
- □ 13. Run UI tests
398
- npm test
399
- # Hooks validate test quality
400
- ```
401
-
402
- ### Phase 5: Commit & Push
403
- ```bash
404
- □ 14. Verify completion criteria
405
- # Check task.completionCriteria - ALL must be met
406
-
407
- □ 15. Run full test suite
408
- npm test
409
- # MUST pass - hooks will block otherwise
410
-
411
- □ 16. Commit with task ID
412
- git add .
413
- git commit -m "[TASK-XXX] Implement feature with tests"
414
- # Hooks validate:
415
- # - Active task exists
416
- # - Tests pass
417
- # - Tests have assertions
418
- # - UI components have tests
419
- # - No fake/empty tests
420
-
421
- □ 17. Push to remote
422
- git push origin main
423
- # Backup work regularly
424
- ```
425
-
426
- ### Phase 6: Complete Task
427
- ```bash
428
- □ 18. Mark complete
429
- npm run task:done TASK-XXX
430
- # System validates:
431
- # - All changes committed
432
- # - No uncommitted files
433
- # - Task not already completed
434
- ```
435
-
436
- ## ⚠️ Common Test Violations (WILL BE BLOCKED)
437
-
438
- ### Violation 1: Empty Tests
439
- ```javascript
440
- // ❌ BLOCKED by validate-test-quality.js
441
- test('should work', () => {});
442
- test('should do something', () => {
443
- // TODO: implement
444
- });
445
- ```
446
-
447
- ### Violation 2: No Assertions
448
- ```javascript
449
- // ❌ BLOCKED by validate-test-quality.js
450
- test('calculates total', () => {
451
- const result = calculateTotal(items);
452
- console.log(result); // No assertion!
453
- });
454
- ```
455
-
456
- ### Violation 3: UI Without Tests
457
- ```javascript
458
- // ❌ BLOCKED by validate-ui-integration.js
459
- // Created: src/components/Button.tsx
460
- // Missing: src/components/Button.test.tsx
461
- ```
462
-
463
- ### Violation 4: Failing Tests
464
- ```bash
465
- # ❌ BLOCKED by validate-test-results.js
466
- $ npm test
467
- FAIL src/feature.test.ts
468
- ✓ works in basic case
469
- ✗ handles edge case
470
-
471
- $ git commit -m "Add feature"
472
- # BLOCKED: Tests must pass
473
- ```
474
-
475
- ### Violation 5: Modifying Code Without Task
476
- ```bash
477
- # ❌ BLOCKED by enforce-structured-development.js
478
- $ Edit(./Agent/src/app.ts)
479
- # ERROR: No active task
480
- # Start task first: npm run task:start TASK-XXX
481
- ```
482
-
483
- ## ✅ Correct Test-Driven Workflow Example
484
-
485
- ```bash
486
- # 1. Start task
487
- npm run task:start TASK-005
488
-
489
- # 2. Read task requirements
490
- cat .claude/plans/plan-001/tasks/TASK-005.json
491
-
492
- # 3. Read existing code
493
- Read(./Agent/src/calculator.ts)
494
-
495
- # 4. Write failing test
496
- Write(./Agent/tests/calculator.test.ts)
497
- """
498
- test('should multiply numbers', () => {
499
- const result = multiply(3, 4);
500
- expect(result).toBe(12);
501
- });
502
- """
503
-
504
- # 5. Run test (should fail)
505
- npm test
506
- # FAIL: multiply is not defined
507
-
508
- # 6. Implement feature
509
- Edit(./Agent/src/calculator.ts)
510
- """
511
- export function multiply(a, b) {
512
- return a * b;
513
- }
514
- """
515
-
516
- # 7. Run test (should pass)
517
- npm test
518
- # PASS: 1 test passed
519
-
520
- # 8. Commit
521
- git add .
522
- git commit -m "[TASK-005] Add multiply function with tests"
523
- # Hooks validate:
524
- # ✓ Active task exists
525
- # ✓ Tests pass
526
- # ✓ Tests have real assertions
527
- # ✓ Code only in allowed directories
528
-
529
- # 9. Push
530
- git push origin main
531
-
532
- # 10. Complete task
533
- npm run task:done TASK-005
534
- ```
535
-
536
- **If ANY step fails, DO NOT proceed. Fix the issue first.**
537
-
538
- ## 🎯 Correct Workflow (ALWAYS FOLLOW THIS)
539
-
540
- ### Step 1: Generate Plan
541
- ```bash
542
- npm run plan:generate "Build a REST API with:
543
- - User authentication
544
- - CRUD operations for tasks
545
- - PostgreSQL database
546
- - Express + TypeScript"
547
- ```
548
-
549
- This creates `.claude/plans/plan-001-generated/PROJECT-REQUIREMENTS.txt`
550
-
551
- ### Step 2: Ask Claude to Create Plan
552
- In Claude Code chat:
553
- ```
554
- "Please read .claude/plans/plan-001-generated/PROJECT-REQUIREMENTS.txt
555
- and create a detailed PROJECT-PLAN.json with tasks, dependencies, and phases"
556
- ```
557
-
558
- Claude will create structured plan with TASK-001, TASK-002, etc.
559
-
560
- ### Step 3: Set Active Plan
561
- ```bash
562
- echo "plan-001-generated" > .claude/ACTIVE-PLAN
563
- ```
564
-
565
- **CRITICAL:** This MUST be done BEFORE running plan:init in Step 4.
566
-
567
- ### Step 4: Lock the Plan
568
- ```bash
569
- npm run plan:init
570
- ```
571
-
572
- This creates:
573
- - `TASK-TRACKER.json` (tracks progress)
574
- - `tasks/TASK-001.json`, `tasks/TASK-002.json`, etc.
575
- - `.plan-locked` (makes plan immutable)
576
-
577
- ### Step 5: Start Working
578
- ```bash
579
- npm run task:start TASK-001
580
- ```
581
-
582
- Now you can:
583
- - Edit files in `./Agent/`
584
- - Write tests
585
- - Commit changes: `git commit -m "[TASK-001] Implemented feature"`
586
- - Push: `git push origin main`
587
-
588
- ### Step 6: Complete Task
589
- ```bash
590
- npm run task:done TASK-001
591
- ```
592
-
593
- ### Step 7: Continue
594
- ```bash
595
- npm run task:next # Automatically starts TASK-002
596
- ```
597
-
598
- ## ⚠️ Common Mistakes (DON'T DO THIS)
599
-
600
- ### ❌ WRONG: Working without a plan
601
- ```bash
602
- # This will FAIL - no active task:
603
- Edit(./Agent/src/app.ts)
604
- # ❌ BLOCKED: No active task
605
- ```
606
-
607
- ### ✅ CORRECT: Start with plan
608
- ```bash
609
- npm run plan:generate "My project requirements..."
610
- # Claude creates plan
611
- echo "plan-001-generated" > .claude/ACTIVE-PLAN
612
- npm run plan:init
613
- npm run task:start TASK-001
614
- # Now Edit() works
615
- ```
616
-
617
- ### ❌ WRONG: Creating branches
618
- ```bash
619
- git checkout -b feature/my-feature
620
- # ❌ BLOCKED: Permission denied
621
- ```
622
-
623
- ### ✅ CORRECT: Work on main
624
- ```bash
625
- git checkout main
626
- # Work here, commit, push
627
- ```
628
-
629
- ### ❌ WRONG: Editing framework files
630
- ```bash
631
- Edit(./.claude/settings.json)
632
- # ❌ BLOCKED: Permission denied
633
- ```
634
-
635
- ### ✅ CORRECT: Only edit your code
636
- ```bash
637
- Edit(./Agent/src/myfile.ts) # ✅ Allowed
638
- Edit(./scripts/myutil.js) # ✅ Allowed
639
- ```
640
-
641
- ### ❌ WRONG: Running scripts directly
642
- ```bash
643
- Bash(node ./scripts/setup.js)
644
- # ❌ BLOCKED: Permission denied
645
- ```
646
-
647
- ### ✅ CORRECT: Write scripts, human executes
648
- ```bash
649
- Write(./scripts/setup.js) # ✅ Allowed
650
- # Tell user: "Run: node ./scripts/setup.js"
651
- ```
652
-
653
- ## 🔍 Debugging Blocked Actions
654
-
655
- If you get blocked, check:
656
-
657
- 1. **Is there an active plan?**
658
- ```bash
659
- cat .claude/ACTIVE-PLAN
660
- ```
661
-
662
- 2. **Is the plan locked?**
663
- ```bash
664
- ls .claude/plans/plan-*/. plan-locked
665
- ```
666
-
667
- 3. **Is there an active task?**
668
- ```bash
669
- npm run task:status
670
- ```
671
-
672
- 4. **Are hooks installed?**
673
- ```bash
674
- ls .git/hooks/pre-commit
675
- ```
676
-
677
- 5. **What are my permissions?**
678
- ```bash
679
- cat .claude/settings.json
680
- ```
681
-
682
- ## 📖 Where to Find More Info
683
-
684
- - **Workflow rules:** `.claude/CLAUDE.md`
685
- - **Permissions:** `.claude/settings.json`
686
- - **Active plan:** `.claude/ACTIVE-PLAN`
687
- - **Task progress:** `.claude/plans/<plan-id>/TASK-TRACKER.json`
688
- - **Help commands:** `npm run help`
689
-
690
- ## 🚀 Quick Start for Claude
691
-
692
- ```bash
693
- # 1. Check if plan exists
694
- npm run task:status
695
-
696
- # 2a. If no plan, create one:
697
- npm run plan:generate
698
-
699
- # 2b. If plan exists but not locked:
700
- npm run plan:init
701
-
702
- # 3. Start working:
703
- npm run task:next
704
-
705
- # 4. Work on files in ./Agent/ directory
706
- # 5. Commit frequently with task ID
707
- # 6. Complete task when done:
708
- npm run task:done TASK-XXX
709
- ```
710
-
711
- ## 🎓 Remember
712
-
713
- 1. **NEVER** work without an active task
714
- 2. **NEVER** create branches (work on main)
715
- 3. **NEVER** modify framework files (`.claude/`, `node_modules/`)
716
- 4. **NEVER** run dangerous commands (force push, rm -rf, sudo)
717
- 5. **ALWAYS** use npm run commands for workflow
718
- 6. **ALWAYS** commit with task ID: `[TASK-XXX] Description`
719
- 7. **ALWAYS** check `npm run task:status` if blocked
720
-
721
- ---
722
-
723
- **This framework enforces professional development practices. The hooks and permissions exist to prevent mistakes, not to annoy you. Follow the workflow and you'll be productive.**