@jaguilar87/gaia-ops 1.0.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 (91) hide show
  1. package/CHANGELOG.md +315 -0
  2. package/CLAUDE.md +154 -0
  3. package/LICENSE +21 -0
  4. package/README.md +221 -0
  5. package/agents/aws-troubleshooter.md +50 -0
  6. package/agents/claude-architect.md +821 -0
  7. package/agents/devops-developer.md +92 -0
  8. package/agents/gcp-troubleshooter.md +50 -0
  9. package/agents/gitops-operator.md +360 -0
  10. package/agents/terraform-architect.md +289 -0
  11. package/bin/gaia-init.js +620 -0
  12. package/commands/architect.md +97 -0
  13. package/commands/restore-session.md +87 -0
  14. package/commands/save-session.md +88 -0
  15. package/commands/session-status.md +61 -0
  16. package/commands/speckit.add-task.md +144 -0
  17. package/commands/speckit.analyze-task.md +65 -0
  18. package/commands/speckit.implement.md +96 -0
  19. package/commands/speckit.init.md +237 -0
  20. package/commands/speckit.plan.md +88 -0
  21. package/commands/speckit.specify.md +161 -0
  22. package/commands/speckit.tasks.md +188 -0
  23. package/config/AGENTS.md +162 -0
  24. package/config/agent-catalog.md +604 -0
  25. package/config/context-contracts.md +682 -0
  26. package/config/git-standards.md +674 -0
  27. package/config/git_standards.json +69 -0
  28. package/config/orchestration-workflow.md +735 -0
  29. package/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
  30. package/hooks/__pycache__/pre_kubectl_security.cpython-312.pyc +0 -0
  31. package/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
  32. package/hooks/__pycache__/session_start.cpython-312.pyc +0 -0
  33. package/hooks/__pycache__/subagent_stop.cpython-312.pyc +0 -0
  34. package/hooks/post_tool_use.py +463 -0
  35. package/hooks/pre_kubectl_security.py +205 -0
  36. package/hooks/pre_tool_use.py +530 -0
  37. package/hooks/session_start.py +315 -0
  38. package/hooks/subagent_stop.py +549 -0
  39. package/index.js +92 -0
  40. package/package.json +59 -0
  41. package/speckit/README.en.md +648 -0
  42. package/speckit/README.md +353 -0
  43. package/speckit/governance.md +169 -0
  44. package/speckit/scripts/check-prerequisites.sh +194 -0
  45. package/speckit/scripts/common.sh +126 -0
  46. package/speckit/scripts/create-new-feature.sh +131 -0
  47. package/speckit/scripts/init.sh +42 -0
  48. package/speckit/scripts/setup-plan.sh +95 -0
  49. package/speckit/scripts/update-agent-context.sh +718 -0
  50. package/speckit/templates/adr-template.md +118 -0
  51. package/speckit/templates/agent-file-template.md +23 -0
  52. package/speckit/templates/plan-template.md +233 -0
  53. package/speckit/templates/spec-template.md +116 -0
  54. package/speckit/templates/tasks-template-bkp.md +136 -0
  55. package/speckit/templates/tasks-template.md +345 -0
  56. package/templates/CLAUDE.template.md +170 -0
  57. package/templates/code-examples/approval_gate_workflow.py +141 -0
  58. package/templates/code-examples/clarification_workflow.py +94 -0
  59. package/templates/code-examples/commit_validation.py +86 -0
  60. package/templates/project-context.template.json +126 -0
  61. package/templates/settings.template.json +307 -0
  62. package/tools/__pycache__/agent_router.cpython-312.pyc +0 -0
  63. package/tools/__pycache__/approval_gate.cpython-312.pyc +0 -0
  64. package/tools/__pycache__/clarify_engine.cpython-312.pyc +0 -0
  65. package/tools/__pycache__/clarify_patterns.cpython-312.pyc +0 -0
  66. package/tools/__pycache__/commit_validator.cpython-312.pyc +0 -0
  67. package/tools/__pycache__/context_section_reader.cpython-312.pyc +0 -0
  68. package/tools/__pycache__/routing_dashboard.cpython-312.pyc +0 -0
  69. package/tools/__pycache__/routing_feedback.cpython-312.pyc +0 -0
  70. package/tools/__pycache__/semantic_matcher.cpython-312.pyc +0 -0
  71. package/tools/__pycache__/task_manager.cpython-312.pyc +0 -0
  72. package/tools/agent_capabilities.json +231 -0
  73. package/tools/agent_invoker_helper.py +239 -0
  74. package/tools/agent_router.py +730 -0
  75. package/tools/approval_gate.py +318 -0
  76. package/tools/clarify_engine.py +511 -0
  77. package/tools/clarify_patterns.py +356 -0
  78. package/tools/commit_validator.py +338 -0
  79. package/tools/context_provider.py +181 -0
  80. package/tools/context_section_reader.py +301 -0
  81. package/tools/demo_clarify.py +104 -0
  82. package/tools/generate_embeddings.py +168 -0
  83. package/tools/quicktriage_aws_troubleshooter.sh +45 -0
  84. package/tools/quicktriage_devops_developer.sh +38 -0
  85. package/tools/quicktriage_gcp_troubleshooter.sh +51 -0
  86. package/tools/quicktriage_gitops_operator.sh +47 -0
  87. package/tools/quicktriage_terraform_architect.sh +40 -0
  88. package/tools/semantic_matcher.py +222 -0
  89. package/tools/task_manager.py +547 -0
  90. package/tools/task_manager_README.md +395 -0
  91. package/tools/task_manager_example.py +215 -0
@@ -0,0 +1,648 @@
1
+ # Spec-Kit - Structured Feature Development System
2
+
3
+ **[🇪🇸 Versión en Español](README.md)**
4
+
5
+ Structured workflow framework for specification-driven feature development. Spec-Kit is an open-source framework that we've integrated and modified as agentic functionality for Claude Code, providing templates, scripts, and commands that guide features from initial specification through complete implementation with automatic routing to specialized agents.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview](#overview)
10
+ - [Architecture](#architecture)
11
+ - [Installation](#installation)
12
+ - [Commands Reference](#commands-reference)
13
+ - [Scripts Reference](#scripts-reference)
14
+ - [Templates](#templates)
15
+ - [Auto-Enrichment](#auto-enrichment)
16
+ - [Agent Routing](#agent-routing)
17
+ - [Troubleshooting](#troubleshooting)
18
+ - [Best Practices](#best-practices)
19
+ - [References](#references)
20
+ - [Support](#support)
21
+
22
+ ## Overview
23
+
24
+ ### What is Spec-Kit?
25
+
26
+ Spec-Kit provides structured workflow for feature development:
27
+ 1. **Specify** - Define feature specifications
28
+ 2. **Clarify** - Resolve ambiguities before planning
29
+ 3. **Plan** - Create technical implementation plans
30
+ 4. **Tasks** - Generate actionable task lists with metadata
31
+ 5. **Analyze** - Validate consistency across artifacts
32
+ 6. **Implement** - Execute tasks with automatic risk analysis
33
+ 7. **Constitution** - Maintain project governance principles
34
+
35
+ ### Key Features
36
+
37
+ - ✅ **Explicit arguments** - Zero setup, everything via parameters
38
+ - ✅ **Multi-project** - Work with multiple spec-kits simultaneously
39
+ - ✅ **Portable** - Works with any project structure
40
+ - ✅ **Auto-enrichment** - Tasks automatically tagged with agent routing metadata
41
+ - ✅ **Risk analysis** - High-risk tasks (T2/T3) analyzed before execution
42
+ - ✅ **Agent routing** - Tasks routed to specialized agents automatically
43
+ - ✅ **Git-agnostic** - User controls Git workflow independently
44
+ - ✅ **Template-based** - Consistent structure across features
45
+
46
+ ## Architecture
47
+
48
+ ### Directory Structure
49
+
50
+ ```
51
+ .claude/speckit/
52
+ ├── README.md # Spanish documentation
53
+ ├── README.en.md # This file - English documentation
54
+ ├── scripts/ # 5 bash scripts for automation
55
+ │ ├── common.sh # Shared functions (get_feature_paths)
56
+ │ ├── create-new-feature.sh # Create feature directory
57
+ │ ├── check-prerequisites.sh # Validate prerequisites
58
+ │ ├── setup-plan.sh # Setup plan template
59
+ │ └── update-agent-context.sh # Update agent context
60
+ ├── templates/ # 5 markdown templates
61
+ │ ├── spec-template.md # Feature specification template
62
+ │ ├── plan-template.md # Implementation plan template
63
+ │ ├── tasks-template.md # Tasks list template
64
+ │ ├── data-model-template.md # Data model template
65
+ │ └── contracts-template.md # API contracts template
66
+ └── memory/ # Legacy directory (deprecated)
67
+ └── constitution.md # MOVED to project root
68
+
69
+ .claude/commands/ # 9 /speckit.* commands
70
+ ├── speckit.specify.md # Create specification
71
+ ├── speckit.clarify.md # Clarify ambiguities
72
+ ├── speckit.plan.md # Create implementation plan
73
+ ├── speckit.tasks.md # Generate task list
74
+ ├── speckit.analyze-plan.md # Validate consistency (cross-artifact)
75
+ ├── speckit.analyze-task.md # Analyze specific task (deep-dive)
76
+ ├── speckit.implement.md # Execute implementation
77
+ ├── speckit.add-task.md # Add ad-hoc task (with auto-validation)
78
+ └── speckit.constitution.md # Update constitution
79
+
80
+ .claude/tools/ # Python utilities
81
+ ├── agent_router.py # Route tasks to agents
82
+ └── tasks-richer.py # Auto-enrich tasks with metadata
83
+
84
+ <project-root>/ # User-specified root (e.g., spec-kit-tcm-plan/)
85
+ ├── constitution.md # Project governance principles
86
+ └── specs/ # Feature specifications
87
+ ├── 001-feature-name/
88
+ │ ├── spec.md # Feature specification
89
+ │ ├── plan.md # Implementation plan
90
+ │ ├── tasks.md # Task list (auto-enriched)
91
+ │ ├── research.md # Research notes (optional)
92
+ │ ├── data-model.md # Data model (optional)
93
+ │ └── contracts/ # API contracts (optional)
94
+ └── 002-feature-name/
95
+ ```
96
+
97
+ ### Component Responsibilities
98
+
99
+ | Component | Responsibility | Used By |
100
+ |-----------|---------------|---------|
101
+ | **Scripts** | Automation and validation | Commands via Bash |
102
+ | **Templates** | Consistent feature structure | Scripts during creation |
103
+ | **Commands** | User-facing workflow steps | Claude orchestrator |
104
+ | **Tools** | Auto-enrichment, routing | Commands automatically |
105
+ | **Constitution** | Project governance | All planning commands |
106
+
107
+ ## Installation
108
+
109
+ ### Initial Setup
110
+
111
+ **Step 1: Create project directory**
112
+ ```bash
113
+ mkdir -p spec-kit-tcm-plan/specs
114
+ ```
115
+
116
+ **Step 2: Create constitution (optional)**
117
+ ```bash
118
+ /speckit.constitution spec-kit-tcm-plan
119
+ ```
120
+
121
+ **Ready!** Commands are available immediately. Example:
122
+
123
+ ```bash
124
+ /speckit.specify spec-kit-tcm-plan "Add dark mode"
125
+ /speckit.plan spec-kit-tcm-plan 001-add-dark
126
+ /speckit.tasks spec-kit-tcm-plan 001-add-dark
127
+ /speckit.implement spec-kit-tcm-plan 001-add-dark
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Commands Reference
133
+
134
+ | Command | Syntax | Purpose | When to Use |
135
+ |---------|--------|---------|-------------|
136
+ | **specify** | `/speckit.specify <root> "description"` | Create new feature specification | Start of workflow |
137
+ | **clarify** | `/speckit.clarify <root> <feature>` | Resolve ambiguities in spec.md | After specify, before plan (optional) |
138
+ | **plan** | `/speckit.plan <root> <feature>` | Create technical implementation plan | After specify/clarify |
139
+ | **tasks** | `/speckit.tasks <root> <feature>` | Generate task list with metadata | After plan |
140
+ | **analyze-plan** | `/speckit.analyze-plan <root> <feature>` | Validate spec/plan/tasks consistency | After tasks, before implement (optional) |
141
+ | **implement** | `/speckit.implement <root> <feature>` | Execute tasks with automatic routing | After tasks |
142
+ | **add-task** | `/speckit.add-task <root> <feature> "desc"` | Add ad-hoc task with validation | During implement |
143
+ | **analyze-task** | `/speckit.analyze-task <root> <feature> T###` | Deep analysis of specific task | Before executing risky tasks |
144
+ | **constitution** | `/speckit.constitution <root>` | Create/update governance principles | Initial setup or updates |
145
+
146
+ ### Usage Examples
147
+
148
+ ```bash
149
+ # Basic complete workflow
150
+ /speckit.specify spec-kit-tcm-plan "Project Guidance Deployment"
151
+ /speckit.plan spec-kit-tcm-plan 004-project-guidance-deployment
152
+ /speckit.tasks spec-kit-tcm-plan 004-project-guidance-deployment
153
+ /speckit.implement spec-kit-tcm-plan 004-project-guidance-deployment
154
+
155
+ # With optional validation
156
+ /speckit.clarify spec-kit-tcm-plan 004-project-guidance-deployment
157
+ /speckit.analyze-plan spec-kit-tcm-plan 004-project-guidance-deployment
158
+
159
+ # During implementation
160
+ /speckit.add-task spec-kit-tcm-plan 004-project-guidance-deployment "Fix config error"
161
+ /speckit.analyze-task spec-kit-tcm-plan 004-project-guidance-deployment T042
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Scripts Reference
167
+
168
+ Location: `.claude/speckit/scripts/`
169
+
170
+ - `common.sh`: Shared functions (`get_feature_paths`, path resolution from arguments)
171
+ - `create-new-feature.sh`: Creates feature structure and `spec.md`
172
+ - `check-prerequisites.sh`: Validates required and optional artifacts
173
+ - `setup-plan.sh`: Creates `plan.md` from template
174
+ - `update-agent-context.sh`: Syncs agent context
175
+
176
+ ---
177
+ **Purpose:** Task list template
178
+
179
+ **Location:** `.claude/speckit/templates/tasks-template.md`
180
+
181
+ **Format:**
182
+ ```markdown
183
+ - [ ] T001 Task description
184
+ <!-- Metadata injected by tasks-richer.py -->
185
+ ```
186
+
187
+ **Used by:** `/speckit.tasks`
188
+
189
+ ---
190
+
191
+ ### data-model-template.md
192
+
193
+ **Purpose:** Data model documentation template
194
+
195
+ **Location:** `.claude/speckit/templates/data-model-template.md`
196
+
197
+ **Sections:**
198
+ - Entity Definitions
199
+ - Relationships
200
+ - Schema Design
201
+ - Migrations
202
+
203
+ **Optional:** Created manually when needed
204
+
205
+ ---
206
+
207
+ ### contracts-template.md
208
+
209
+ **Purpose:** API contracts template
210
+
211
+ **Location:** `.claude/speckit/templates/contracts-template.md`
212
+
213
+ **Sections:**
214
+ - API Endpoints
215
+ - Request/Response Schemas
216
+ - Error Codes
217
+ - Authentication
218
+
219
+ **Optional:** Created manually when needed
220
+
221
+ ## Auto-Enrichment
222
+
223
+ ### What is Auto-Enrichment?
224
+
225
+ Automatic injection of metadata into tasks for agent routing and risk assessment.
226
+
227
+ ### When Does It Happen?
228
+
229
+ **Automatic enrichment:**
230
+ - ✨ `/speckit.tasks` - All tasks enriched when generated
231
+ - ✨ `/speckit.add-task` - New task enriched when added
232
+
233
+ **No manual `/enrich` step needed**
234
+
235
+ ### Enrichment Process
236
+
237
+ **Step 1: Task parsing**
238
+ ```bash
239
+ python3 .claude/tools/tasks-richer.py tasks.md
240
+ ```
241
+
242
+ **Step 2: Agent routing**
243
+ ```bash
244
+ python3 .claude/tools/agent_router.py --json "Task description"
245
+ ```
246
+
247
+ **Step 3: Metadata injection**
248
+ ```markdown
249
+ - [ ] T001 Create GKE cluster
250
+ <!-- 🤖 Agent: terraform-architect | ✅ T1 | ❓ 0.85 -->
251
+ <!-- 🏷️ Tags: #terraform #gcp #gke -->
252
+ <!-- 🎯 skill: terraform_operations (8.0) -->
253
+ <!-- 🔄 Fallback: devops-developer -->
254
+ ```
255
+
256
+ ### Metadata Components
257
+
258
+ **Agent assignment:**
259
+ ```
260
+ 🤖 Agent: terraform-architect
261
+ ```
262
+ Primary agent for task execution
263
+
264
+ **Risk tier:**
265
+ ```
266
+ ✅ T0 (read-only)
267
+ ✅ T1 (validation)
268
+ 🔒 T2 (simulation) - Requires analysis
269
+ 🚫 T3 (blocked) - Not executed
270
+ ```
271
+
272
+ **Confidence score:**
273
+ ```
274
+ ❓ 0.85 (0.0-1.0 scale)
275
+ ```
276
+ Router confidence in agent assignment
277
+
278
+ **Tags:**
279
+ ```
280
+ 🏷️ Tags: #terraform #gcp #gke
281
+ ```
282
+ Technology and domain tags
283
+
284
+ **Skill scores:**
285
+ ```
286
+ 🎯 skill: terraform_operations (8.0)
287
+ ```
288
+ Agent capability match
289
+
290
+ **Fallback agent:**
291
+ ```
292
+ 🔄 Fallback: devops-developer
293
+ ```
294
+ Alternative if primary fails
295
+
296
+ **High-risk warning:**
297
+ ```
298
+ ⚠️ HIGH RISK: Analyze before execution
299
+ 💡 Suggested: /speckit.analyze-task T001
300
+ ```
301
+ For T2/T3 tasks only
302
+
303
+ ### Enrichment Benefits
304
+
305
+ - [x] Automatic agent routing
306
+ - [x] Risk visibility
307
+ - [x] Execution safety
308
+ - [x] Audit trail
309
+ - [x] Team coordination
310
+
311
+ ## Agent Routing
312
+
313
+ ### How Routing Works
314
+
315
+ **Step 1: Parse task metadata**
316
+ ```markdown
317
+ <!-- 🤖 Agent: gitops-operator | ✅ T0 | ❓ 0.92 -->
318
+ ```
319
+
320
+ **Step 2: Load agent context**
321
+ ```python
322
+ from .claude.tools.context_section_reader import ContextSectionReader
323
+ context = reader.get_for_agent('gitops-operator')
324
+ ```
325
+
326
+ **Step 3: Invoke specialized agent**
327
+ ```python
328
+ Task(
329
+ subagent_type='gitops-operator',
330
+ prompt=f"{context}\n\n{task_instructions}"
331
+ )
332
+ ```
333
+
334
+ ### Available Agents
335
+
336
+ | Agent | Specialization | Risk Tiers |
337
+ |-------|---------------|-----------|
338
+ | **terraform-architect** | Terraform/Terragrunt validation | T0-T1 |
339
+ | **gitops-operator** | Kubernetes/Flux operations | T0-T1 |
340
+ | **gcp-troubleshooter** | GCP diagnostics | T0 only |
341
+ | **devops-developer** | Application development | T0-T2 |
342
+ | **aws-troubleshooter** | AWS diagnostics (standby) | T0 only |
343
+
344
+ ### Routing Decision Factors
345
+
346
+ **Keyword matching:**
347
+ - "terraform" → terraform-architect
348
+ - "kubectl", "flux" → gitops-operator
349
+ - "gcp", "gke" → gcp-troubleshooter
350
+ - "build", "test" → devops-developer
351
+
352
+ **Skill scoring:**
353
+ ```
354
+ Agent: gitops-operator
355
+ - skill: kubernetes_operations (9.0)
356
+ - skill: flux_operations (8.5)
357
+ - skill: helm_management (7.0)
358
+ ```
359
+
360
+ **Context requirements:**
361
+ - Cluster name → gitops-operator, gcp-troubleshooter
362
+ - Terraform path → terraform-architect
363
+ - Repository → devops-developer
364
+
365
+ ### Routing CLI
366
+
367
+ **Manual routing (for debugging):**
368
+ ```bash
369
+ python3 .claude/tools/agent_router.py --json "Check pods in namespace"
370
+ python3 .claude/tools/agent_router.py --explain "Validate terraform config"
371
+ python3 .claude/tools/agent_router.py --test
372
+ ```
373
+
374
+ ### Fallback Behavior
375
+
376
+ **If primary agent fails:**
377
+ 1. Check fallback agent in metadata
378
+ 2. Retry with fallback
379
+ 3. If fallback fails, escalate to user
380
+
381
+ **If no agent specified:**
382
+ - Default to `devops-developer` (general-purpose)
383
+
384
+ ## Troubleshooting
385
+
386
+ ### Config Not Found
387
+
388
+ **Error:**
389
+ ```
390
+ ERROR: Spec-Kit not initialized. Run: /speckit.init --root <directory>
391
+ ```
392
+
393
+ **Solution:**
394
+ ```bash
395
+ # Initialize Spec-Kit first
396
+ /speckit.init --root spec-kit-tcm-plan
397
+
398
+ # Verify config created
399
+ cat .claude/speckit/config.json
400
+ ```
401
+
402
+ ---
403
+
404
+ ### Constitution Not Found
405
+
406
+ **Error:**
407
+ ```
408
+ WARNING: constitution.md not found at spec-kit-tcm-plan/constitution.md
409
+ ```
410
+
411
+ **Solution:**
412
+ ```bash
413
+ # Create constitution
414
+ /speckit.constitution
415
+
416
+ # Or move existing
417
+ mv .claude/speckit/memory/constitution.md spec-kit-tcm-plan/
418
+ ```
419
+
420
+ ---
421
+
422
+ ### Feature Directory Missing
423
+
424
+ **Error:**
425
+ ```
426
+ ERROR: Feature directory not found
427
+ Run /specify first to create the feature structure.
428
+ ```
429
+
430
+ **Solution:**
431
+ ```bash
432
+ # Create new feature
433
+ /speckit.specify "Feature description"
434
+ ```
435
+
436
+ ---
437
+
438
+ ### Plan Missing
439
+
440
+ **Error:**
441
+ ```
442
+ ERROR: plan.md not found in spec-kit-tcm-plan/specs/003-feature-name
443
+ Run /plan first to create the implementation plan.
444
+ ```
445
+
446
+ **Solution:**
447
+ ```bash
448
+ # Create plan
449
+ /speckit.plan "Architecture decisions"
450
+ ```
451
+
452
+ ---
453
+
454
+ ### Tasks Not Enriched
455
+
456
+ **Symptoms:**
457
+ - Tasks missing metadata comments
458
+ - No agent assignments
459
+ - No risk tiers
460
+
461
+ **Solution:**
462
+ Tasks are automatically enriched by `/speckit.tasks` and `/speckit.add-task`. No manual action needed.
463
+
464
+ **Verify enrichment:**
465
+ ```bash
466
+ # Check tasks.md for metadata
467
+ grep "🤖 Agent:" spec-kit-tcm-plan/specs/003-feature-name/tasks.md
468
+ ```
469
+
470
+ ---
471
+
472
+ ### Wrong Agent Assigned
473
+
474
+ **Symptoms:**
475
+ - Task routed to incorrect agent
476
+ - Low confidence score (<0.5)
477
+
478
+ **Solution:**
479
+ ```bash
480
+ # Manually test routing
481
+ python3 .claude/tools/agent_router.py --explain "Task description"
482
+
483
+ # Check suggested agent and confidence
484
+ # Edit tasks.md metadata if needed
485
+ ```
486
+
487
+ **Manual override:**
488
+ ```markdown
489
+ - [ ] T001 Task description
490
+ <!-- 🤖 Agent: correct-agent | ✅ T1 | ❓ 0.85 -->
491
+ ```
492
+
493
+ ---
494
+
495
+ ### High-Risk Task Blocked
496
+
497
+ **Symptoms:**
498
+ - Task marked with ⚠️ HIGH RISK
499
+ - `/speckit.implement` requests confirmation
500
+
501
+ **This is expected behavior for T2/T3 tasks**
502
+
503
+ **Solution:**
504
+ 1. Review task carefully
505
+ 2. Run `/speckit.analyze-task T001`
506
+ 3. Confirm if safe to proceed
507
+ 4. If not safe, modify approach
508
+
509
+ ---
510
+
511
+ ### Paths Hardcoded in Old Code
512
+
513
+ **Symptoms:**
514
+ - Scripts fail to find files
515
+ - Errors about missing `specs/` directory
516
+
517
+ **Solution:**
518
+ Verify all scripts load config:
519
+
520
+ ```bash
521
+ # Check scripts source common.sh and call load_config
522
+ grep -n "load_config" .claude/speckit/scripts/*.sh
523
+
524
+ # Should see in:
525
+ # - create-new-feature.sh
526
+ # - check-prerequisites.sh
527
+ # - setup-plan.sh
528
+ # - update-agent-context.sh
529
+ ```
530
+
531
+ ---
532
+
533
+ ### JQ Not Installed
534
+
535
+ **Error:**
536
+ ```
537
+ ERROR: jq is required but not installed
538
+ ```
539
+
540
+ **Solution:**
541
+ ```bash
542
+ # macOS
543
+ brew install jq
544
+
545
+ # Ubuntu/Debian
546
+ sudo apt-get install jq
547
+
548
+ # Verify installation
549
+ jq --version
550
+ ```
551
+
552
+ ## Best Practices
553
+
554
+ ### Configuration Management
555
+
556
+ - ✅ Run `/speckit.init` once per project
557
+ - ✅ Commit config.json to git
558
+ - ✅ Keep constitution in project root (not .claude/)
559
+ - ✅ Don't hardcode paths in custom scripts
560
+
561
+ ### Feature Development
562
+
563
+ - ✅ Follow workflow order (specify → plan → tasks → implement)
564
+ - ✅ Use `/speckit.clarify` to resolve ambiguities early
565
+ - ✅ Run `/speckit.analyze` before implementation (optional but recommended)
566
+ - ✅ Let auto-enrichment handle metadata (don't edit manually)
567
+
568
+ ### Risk Management
569
+
570
+ - ✅ Always analyze T2/T3 tasks before execution
571
+ - ✅ Review agent assignments for high-risk tasks
572
+ - ✅ Keep confidence scores >0.7 for critical operations
573
+ - ✅ Use fallback agents when primary confidence is low
574
+
575
+ ### Git Workflow
576
+
577
+ - ✅ User controls Git workflow (no auto-branching)
578
+ - ✅ Branch when ready (not enforced by scripts)
579
+ - ✅ Commit regularly during implementation
580
+ - ✅ Use descriptive commit messages
581
+
582
+ ### Documentation
583
+
584
+ - ✅ Keep constitution up-to-date with learnings
585
+ - ✅ Document architecture decisions in plan.md
586
+ - ✅ Create research.md for investigation notes
587
+ - ✅ Use contracts/ for API specifications
588
+
589
+ ## References
590
+
591
+ ### Internal Documentation
592
+
593
+ - `.claude/README.md` - Complete agent system documentation
594
+ - `.claude/project-context.json` - Project-specific context
595
+ - `CLAUDE.md` - Repository guidance for Claude Code
596
+ - `spec-kit-tcm-plan/constitution.md` - Project principles
597
+
598
+ ### Command Files
599
+
600
+ All commands in `.claude/commands/speckit.*.md`:
601
+ - speckit.init.md
602
+ - speckit.specify.md
603
+ - speckit.clarify.md
604
+ - speckit.plan.md
605
+ - speckit.tasks.md
606
+ - speckit.analyze-plan.md
607
+ - speckit.analyze-task.md
608
+ - speckit.implement.md
609
+ - speckit.add-task.md
610
+ - speckit.constitution.md
611
+
612
+ ### Tool Files
613
+
614
+ - `.claude/tools/agent_router.py` - Agent routing logic
615
+ - `.claude/tools/tasks-richer.py` - Task enrichment logic
616
+ - `.claude/tools/context_section_reader.py` - Context filtering
617
+
618
+ **Framework Base**
619
+
620
+ Spec-Kit is an open-source framework adapted as agentic functionality for Claude Code. Main modifications:
621
+
622
+ - ✅ Explicit arguments - No centralized configuration
623
+ - ✅ Zero setup - No initialization required
624
+ - ✅ Auto-enrichment - Tasks with routing metadata
625
+ - ✅ Risk analysis - T0-T3 with automatic validation
626
+ - ✅ Multi-project - Simultaneous spec support
627
+ - ✅ Agentic integration - Automatic routing to specialized agents
628
+
629
+ ---
630
+
631
+ ## Support
632
+
633
+ **For Claude orchestrator:**
634
+ - Read this file when user mentions "speckit" or "spec-kit"
635
+ - Reference specific sections as needed
636
+ - Use commands, not direct file manipulation
637
+
638
+ **For users:**
639
+ - **Zero setup** - No initialization needed
640
+ - Create project directory: `mkdir -p spec-kit-tcm-plan/specs`
641
+ - Use explicit arguments: `<speckit-root> <feature-name>`
642
+ - Follow workflow phases in order
643
+ - Trust auto-enrichment (don't edit metadata manually)
644
+ - Analyze high-risk tasks before execution
645
+
646
+ **For Spanish documentation:** Ver [README.md](README.md)
647
+
648
+ ---