create-claude-context 1.0.0 → 1.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 (112) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +146 -146
  3. package/bin/create-claude-context.js +61 -61
  4. package/lib/detector.js +373 -373
  5. package/lib/index.js +170 -170
  6. package/lib/installer.js +371 -362
  7. package/lib/placeholder.js +208 -208
  8. package/lib/prompts.js +287 -287
  9. package/lib/spinner.js +60 -60
  10. package/lib/validate.js +147 -147
  11. package/package.json +59 -59
  12. package/templates/CLAUDE.md.template +235 -235
  13. package/templates/base/README.md +257 -257
  14. package/templates/base/RPI_WORKFLOW_PLAN.md +320 -320
  15. package/templates/base/agents/api-developer.md +76 -76
  16. package/templates/base/agents/context-engineer.md +525 -525
  17. package/templates/base/agents/core-architect.md +76 -76
  18. package/templates/base/agents/database-ops.md +76 -76
  19. package/templates/base/agents/deployment-ops.md +76 -76
  20. package/templates/base/agents/integration-hub.md +76 -76
  21. package/templates/base/analytics/README.md +114 -114
  22. package/templates/base/automation/config.json +58 -0
  23. package/templates/base/automation/generators/code-mapper.js +308 -0
  24. package/templates/base/automation/generators/index-builder.js +321 -0
  25. package/templates/base/automation/hooks/post-commit.sh +83 -0
  26. package/templates/base/automation/hooks/pre-commit.sh +103 -0
  27. package/templates/base/ci-templates/README.md +108 -108
  28. package/templates/base/ci-templates/github-actions/context-check.yml +144 -144
  29. package/templates/base/ci-templates/github-actions/validate-docs.yml +105 -105
  30. package/templates/base/commands/analytics.md +238 -238
  31. package/templates/base/commands/auto-sync.md +172 -0
  32. package/templates/base/commands/collab.md +194 -194
  33. package/templates/base/commands/help.md +450 -450
  34. package/templates/base/commands/rpi-implement.md +115 -115
  35. package/templates/base/commands/rpi-plan.md +93 -93
  36. package/templates/base/commands/rpi-research.md +88 -88
  37. package/templates/base/commands/session-resume.md +144 -0
  38. package/templates/base/commands/session-save.md +112 -0
  39. package/templates/base/commands/validate-all.md +77 -77
  40. package/templates/base/commands/verify-docs-current.md +86 -86
  41. package/templates/base/config/base.json +57 -57
  42. package/templates/base/config/environments/development.json +13 -13
  43. package/templates/base/config/environments/production.json +17 -17
  44. package/templates/base/config/environments/staging.json +13 -13
  45. package/templates/base/config/local.json.example +21 -21
  46. package/templates/base/context/.meta/generated-at.json +18 -0
  47. package/templates/base/context/ARCHITECTURE_SNAPSHOT.md +156 -156
  48. package/templates/base/context/CODE_TO_WORKFLOW_MAP.md +94 -94
  49. package/templates/base/context/FILE_OWNERSHIP.md +57 -0
  50. package/templates/base/context/INTEGRATION_POINTS.md +92 -0
  51. package/templates/base/context/KNOWN_GOTCHAS.md +195 -195
  52. package/templates/base/context/TESTING_MAP.md +95 -0
  53. package/templates/base/context/WORKFLOW_INDEX.md +129 -129
  54. package/templates/base/context/workflows/WORKFLOW_TEMPLATE.md +294 -294
  55. package/templates/base/indexes/agents/CAPABILITY_MATRIX.md +255 -255
  56. package/templates/base/indexes/agents/CATEGORY_INDEX.md +44 -44
  57. package/templates/base/indexes/code/CATEGORY_INDEX.md +38 -38
  58. package/templates/base/indexes/routing/CATEGORY_INDEX.md +39 -39
  59. package/templates/base/indexes/search/CATEGORY_INDEX.md +39 -39
  60. package/templates/base/indexes/workflows/CATEGORY_INDEX.md +38 -38
  61. package/templates/base/knowledge/README.md +98 -98
  62. package/templates/base/knowledge/sessions/README.md +88 -88
  63. package/templates/base/knowledge/sessions/TEMPLATE.md +150 -150
  64. package/templates/base/knowledge/shared/decisions/0001-adopt-context-engineering.md +144 -144
  65. package/templates/base/knowledge/shared/decisions/README.md +49 -49
  66. package/templates/base/knowledge/shared/decisions/TEMPLATE.md +123 -123
  67. package/templates/base/knowledge/shared/patterns/README.md +62 -62
  68. package/templates/base/knowledge/shared/patterns/TEMPLATE.md +120 -120
  69. package/templates/base/plans/PLAN_TEMPLATE.md +250 -250
  70. package/templates/base/research/RESEARCH_TEMPLATE.md +153 -153
  71. package/templates/base/schemas/agent.schema.json +141 -141
  72. package/templates/base/schemas/anchors.schema.json +54 -0
  73. package/templates/base/schemas/automation.schema.json +93 -0
  74. package/templates/base/schemas/command.schema.json +134 -134
  75. package/templates/base/schemas/hashes.schema.json +40 -0
  76. package/templates/base/schemas/manifest.schema.json +117 -117
  77. package/templates/base/schemas/plan.schema.json +136 -136
  78. package/templates/base/schemas/research.schema.json +115 -115
  79. package/templates/base/schemas/roles.schema.json +34 -0
  80. package/templates/base/schemas/session.schema.json +77 -0
  81. package/templates/base/schemas/settings.schema.json +244 -244
  82. package/templates/base/schemas/staleness.schema.json +53 -0
  83. package/templates/base/schemas/team-config.schema.json +42 -0
  84. package/templates/base/schemas/workflow.schema.json +126 -126
  85. package/templates/base/session/checkpoints/.gitkeep +2 -0
  86. package/templates/base/session/current/state.json +20 -0
  87. package/templates/base/session/history/.gitkeep +2 -0
  88. package/templates/base/settings.json +79 -57
  89. package/templates/base/standards/COMPATIBILITY.md +219 -219
  90. package/templates/base/standards/EXTENSION_GUIDELINES.md +280 -280
  91. package/templates/base/standards/QUALITY_CHECKLIST.md +211 -211
  92. package/templates/base/standards/README.md +66 -66
  93. package/templates/base/sync/anchors.json +6 -0
  94. package/templates/base/sync/hashes.json +6 -0
  95. package/templates/base/sync/staleness.json +10 -0
  96. package/templates/base/team/README.md +168 -168
  97. package/templates/base/team/config.json +79 -79
  98. package/templates/base/team/roles.json +145 -145
  99. package/templates/base/tools/bin/claude-context.js +151 -151
  100. package/templates/base/tools/lib/anchor-resolver.js +276 -0
  101. package/templates/base/tools/lib/config-loader.js +363 -363
  102. package/templates/base/tools/lib/detector.js +350 -350
  103. package/templates/base/tools/lib/diagnose.js +206 -206
  104. package/templates/base/tools/lib/drift-detector.js +373 -0
  105. package/templates/base/tools/lib/errors.js +199 -199
  106. package/templates/base/tools/lib/index.js +36 -24
  107. package/templates/base/tools/lib/init.js +192 -192
  108. package/templates/base/tools/lib/logger.js +230 -230
  109. package/templates/base/tools/lib/placeholder.js +201 -201
  110. package/templates/base/tools/lib/session-manager.js +354 -0
  111. package/templates/base/tools/lib/validate.js +521 -521
  112. package/templates/base/tools/package.json +49 -49
@@ -1,13 +1,13 @@
1
- {
2
- "$comment": "Development environment overrides",
3
- "logging": {
4
- "level": "debug"
5
- },
6
- "validation": {
7
- "on_commit": false,
8
- "line_accuracy_threshold": 50
9
- },
10
- "rpi_workflow": {
11
- "require_human_approval": false
12
- }
13
- }
1
+ {
2
+ "$comment": "Development environment overrides",
3
+ "logging": {
4
+ "level": "debug"
5
+ },
6
+ "validation": {
7
+ "on_commit": false,
8
+ "line_accuracy_threshold": 50
9
+ },
10
+ "rpi_workflow": {
11
+ "require_human_approval": false
12
+ }
13
+ }
@@ -1,17 +1,17 @@
1
- {
2
- "$comment": "Production environment overrides",
3
- "logging": {
4
- "level": "warn"
5
- },
6
- "validation": {
7
- "on_commit": true,
8
- "line_accuracy_threshold": 70,
9
- "link_check_external": true
10
- },
11
- "rpi_workflow": {
12
- "require_human_approval": true
13
- },
14
- "documentation": {
15
- "auto_commit_docs": false
16
- }
17
- }
1
+ {
2
+ "$comment": "Production environment overrides",
3
+ "logging": {
4
+ "level": "warn"
5
+ },
6
+ "validation": {
7
+ "on_commit": true,
8
+ "line_accuracy_threshold": 70,
9
+ "link_check_external": true
10
+ },
11
+ "rpi_workflow": {
12
+ "require_human_approval": true
13
+ },
14
+ "documentation": {
15
+ "auto_commit_docs": false
16
+ }
17
+ }
@@ -1,13 +1,13 @@
1
- {
2
- "$comment": "Staging environment overrides",
3
- "logging": {
4
- "level": "info"
5
- },
6
- "validation": {
7
- "on_commit": true,
8
- "line_accuracy_threshold": 60
9
- },
10
- "rpi_workflow": {
11
- "require_human_approval": true
12
- }
13
- }
1
+ {
2
+ "$comment": "Staging environment overrides",
3
+ "logging": {
4
+ "level": "info"
5
+ },
6
+ "validation": {
7
+ "on_commit": true,
8
+ "line_accuracy_threshold": 60
9
+ },
10
+ "rpi_workflow": {
11
+ "require_human_approval": true
12
+ }
13
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "$comment": "Local overrides - copy to local.json (gitignored)",
3
- "$instructions": "This file is an example. Copy to local.json and customize.",
4
-
5
- "logging": {
6
- "level": "debug",
7
- "file": ".claude/logs/claude-local.log"
8
- },
9
-
10
- "validation": {
11
- "on_commit": false
12
- },
13
-
14
- "rpi_workflow": {
15
- "require_human_approval": false
16
- },
17
-
18
- "telemetry": {
19
- "enabled": false
20
- }
21
- }
1
+ {
2
+ "$comment": "Local overrides - copy to local.json (gitignored)",
3
+ "$instructions": "This file is an example. Copy to local.json and customize.",
4
+
5
+ "logging": {
6
+ "level": "debug",
7
+ "file": ".claude/logs/claude-local.log"
8
+ },
9
+
10
+ "validation": {
11
+ "on_commit": false
12
+ },
13
+
14
+ "rpi_workflow": {
15
+ "require_human_approval": false
16
+ },
17
+
18
+ "telemetry": {
19
+ "enabled": false
20
+ }
21
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "CODE_TO_WORKFLOW_MAP.md": {
3
+ "generatedAt": null,
4
+ "filesScanned": 0,
5
+ "referencesFound": 0,
6
+ "status": "pending"
7
+ },
8
+ "WORKFLOW_CATEGORY_INDEX": {
9
+ "generatedAt": null,
10
+ "itemCount": 0,
11
+ "status": "pending"
12
+ },
13
+ "AGENT_CATEGORY_INDEX": {
14
+ "generatedAt": null,
15
+ "itemCount": 0,
16
+ "status": "pending"
17
+ }
18
+ }
@@ -1,156 +1,156 @@
1
- # Architecture Snapshot - {{PROJECT_NAME}}
2
-
3
- **Purpose:** High-level system map for rapid orientation
4
- **Load:** When starting a new session or onboarding
5
- **Size:** ~10k tokens (5% of 200k budget)
6
- **Last Updated:** {{DATE}}
7
-
8
- ---
9
-
10
- ## System Overview
11
-
12
- {{SYSTEM_OVERVIEW_DIAGRAM}}
13
-
14
- ---
15
-
16
- ## Technology Stack
17
-
18
- | Layer | Technology | Purpose |
19
- |-------|------------|---------|
20
- | **Frontend** | {{FRONTEND_TECH}} | {{FRONTEND_PURPOSE}} |
21
- | **Backend** | {{BACKEND_TECH}} | {{BACKEND_PURPOSE}} |
22
- | **Database** | {{DATABASE_TECH}} | {{DATABASE_PURPOSE}} |
23
- | **Cache** | {{CACHE_TECH}} | {{CACHE_PURPOSE}} |
24
- | **Queue** | {{QUEUE_TECH}} | {{QUEUE_PURPOSE}} |
25
-
26
- ---
27
-
28
- ## Core Components
29
-
30
- ### Component 1: {{COMPONENT_1_NAME}}
31
-
32
- **Purpose:** {{COMPONENT_1_PURPOSE}}
33
- **Key Files:**
34
- - `{{FILE_1}}` - {{FILE_1_PURPOSE}}
35
- - `{{FILE_2}}` - {{FILE_2_PURPOSE}}
36
-
37
- **Related Workflows:**
38
- - [workflow_1.md](./workflows/workflow_1.md)
39
-
40
- ---
41
-
42
- ### Component 2: {{COMPONENT_2_NAME}}
43
-
44
- [Same structure...]
45
-
46
- ---
47
-
48
- ## Data Flow
49
-
50
- ```
51
- {{DATA_FLOW_DIAGRAM}}
52
- ```
53
-
54
- ---
55
-
56
- ## Database Schema Summary
57
-
58
- **Total Tables:** {{TABLE_COUNT}}
59
-
60
- | Table | Purpose | Key Relationships |
61
- |-------|---------|-------------------|
62
- | `{{TABLE_1}}` | {{TABLE_1_PURPOSE}} | FK to {{RELATED_TABLE}} |
63
- | `{{TABLE_2}}` | {{TABLE_2_PURPOSE}} | FK to {{RELATED_TABLE}} |
64
-
65
- **Schema Details:** {{MODELS_FILE}}
66
-
67
- ---
68
-
69
- ## External Integrations
70
-
71
- | Integration | Type | Purpose | Docs |
72
- |-------------|------|---------|------|
73
- | {{INTEGRATION_1}} | API | {{PURPOSE_1}} | {{DOCS_LINK}} |
74
- | {{INTEGRATION_2}} | API | {{PURPOSE_2}} | {{DOCS_LINK}} |
75
-
76
- ---
77
-
78
- ## Key Architectural Decisions
79
-
80
- ### Decision 1: {{DECISION_1_TITLE}}
81
-
82
- **Choice:** {{WHAT_WAS_CHOSEN}}
83
- **Why:** {{RATIONALE}}
84
- **Trade-offs:** {{TRADE_OFFS}}
85
-
86
- ---
87
-
88
- ### Decision 2: {{DECISION_2_TITLE}}
89
-
90
- [Same structure...]
91
-
92
- ---
93
-
94
- ## Directory Structure
95
-
96
- ```
97
- {{PROJECT_ROOT}}/
98
- ├── {{DIR_1}}/ # {{DIR_1_PURPOSE}}
99
- │ ├── {{SUBDIR_1}}/ # {{SUBDIR_1_PURPOSE}}
100
- │ └── {{SUBDIR_2}}/ # {{SUBDIR_2_PURPOSE}}
101
- ├── {{DIR_2}}/ # {{DIR_2_PURPOSE}}
102
- ├── {{DIR_3}}/ # {{DIR_3_PURPOSE}}
103
- └── {{DIR_4}}/ # {{DIR_4_PURPOSE}}
104
- ```
105
-
106
- ---
107
-
108
- ## Security Model
109
-
110
- ### Authentication
111
- {{AUTHENTICATION_DESCRIPTION}}
112
-
113
- ### Authorization
114
- {{AUTHORIZATION_DESCRIPTION}}
115
-
116
- ### Data Protection
117
- {{DATA_PROTECTION_DESCRIPTION}}
118
-
119
- ---
120
-
121
- ## Performance Characteristics
122
-
123
- | Metric | Target | Current |
124
- |--------|--------|---------|
125
- | API Response Time | {{TARGET_1}} | {{CURRENT_1}} |
126
- | Throughput | {{TARGET_2}} | {{CURRENT_2}} |
127
- | Availability | {{TARGET_3}} | {{CURRENT_3}} |
128
-
129
- ---
130
-
131
- ## Deployment Architecture
132
-
133
- ```
134
- {{DEPLOYMENT_DIAGRAM}}
135
- ```
136
-
137
- **Environments:**
138
- | Environment | URL | Purpose |
139
- |-------------|-----|---------|
140
- | Development | {{DEV_URL}} | Local development |
141
- | Staging | {{STAGING_URL}} | Pre-production testing |
142
- | Production | {{PROD_URL}} | Live system |
143
-
144
- ---
145
-
146
- ## See Also
147
-
148
- - **Detailed workflows:** [WORKFLOW_INDEX.md](./WORKFLOW_INDEX.md)
149
- - **File responsibilities:** [FILE_OWNERSHIP.md](./FILE_OWNERSHIP.md)
150
- - **External APIs:** [INTEGRATION_POINTS.md](./INTEGRATION_POINTS.md)
151
- - **Lessons learned:** [KNOWN_GOTCHAS.md](./KNOWN_GOTCHAS.md)
152
-
153
- ---
154
-
155
- **Version:** 1.0
156
- **Verified Against Commit:** {{COMMIT_HASH}}
1
+ # Architecture Snapshot - {{PROJECT_NAME}}
2
+
3
+ **Purpose:** High-level system map for rapid orientation
4
+ **Load:** When starting a new session or onboarding
5
+ **Size:** ~10k tokens (5% of 200k budget)
6
+ **Last Updated:** {{DATE}}
7
+
8
+ ---
9
+
10
+ ## System Overview
11
+
12
+ {{SYSTEM_OVERVIEW_DIAGRAM}}
13
+
14
+ ---
15
+
16
+ ## Technology Stack
17
+
18
+ | Layer | Technology | Purpose |
19
+ |-------|------------|---------|
20
+ | **Frontend** | {{FRONTEND_TECH}} | {{FRONTEND_PURPOSE}} |
21
+ | **Backend** | {{BACKEND_TECH}} | {{BACKEND_PURPOSE}} |
22
+ | **Database** | {{DATABASE_TECH}} | {{DATABASE_PURPOSE}} |
23
+ | **Cache** | {{CACHE_TECH}} | {{CACHE_PURPOSE}} |
24
+ | **Queue** | {{QUEUE_TECH}} | {{QUEUE_PURPOSE}} |
25
+
26
+ ---
27
+
28
+ ## Core Components
29
+
30
+ ### Component 1: {{COMPONENT_1_NAME}}
31
+
32
+ **Purpose:** {{COMPONENT_1_PURPOSE}}
33
+ **Key Files:**
34
+ - `{{FILE_1}}` - {{FILE_1_PURPOSE}}
35
+ - `{{FILE_2}}` - {{FILE_2_PURPOSE}}
36
+
37
+ **Related Workflows:**
38
+ - [workflow_1.md](./workflows/workflow_1.md)
39
+
40
+ ---
41
+
42
+ ### Component 2: {{COMPONENT_2_NAME}}
43
+
44
+ [Same structure...]
45
+
46
+ ---
47
+
48
+ ## Data Flow
49
+
50
+ ```
51
+ {{DATA_FLOW_DIAGRAM}}
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Database Schema Summary
57
+
58
+ **Total Tables:** {{TABLE_COUNT}}
59
+
60
+ | Table | Purpose | Key Relationships |
61
+ |-------|---------|-------------------|
62
+ | `{{TABLE_1}}` | {{TABLE_1_PURPOSE}} | FK to {{RELATED_TABLE}} |
63
+ | `{{TABLE_2}}` | {{TABLE_2_PURPOSE}} | FK to {{RELATED_TABLE}} |
64
+
65
+ **Schema Details:** {{MODELS_FILE}}
66
+
67
+ ---
68
+
69
+ ## External Integrations
70
+
71
+ | Integration | Type | Purpose | Docs |
72
+ |-------------|------|---------|------|
73
+ | {{INTEGRATION_1}} | API | {{PURPOSE_1}} | {{DOCS_LINK}} |
74
+ | {{INTEGRATION_2}} | API | {{PURPOSE_2}} | {{DOCS_LINK}} |
75
+
76
+ ---
77
+
78
+ ## Key Architectural Decisions
79
+
80
+ ### Decision 1: {{DECISION_1_TITLE}}
81
+
82
+ **Choice:** {{WHAT_WAS_CHOSEN}}
83
+ **Why:** {{RATIONALE}}
84
+ **Trade-offs:** {{TRADE_OFFS}}
85
+
86
+ ---
87
+
88
+ ### Decision 2: {{DECISION_2_TITLE}}
89
+
90
+ [Same structure...]
91
+
92
+ ---
93
+
94
+ ## Directory Structure
95
+
96
+ ```
97
+ {{PROJECT_ROOT}}/
98
+ ├── {{DIR_1}}/ # {{DIR_1_PURPOSE}}
99
+ │ ├── {{SUBDIR_1}}/ # {{SUBDIR_1_PURPOSE}}
100
+ │ └── {{SUBDIR_2}}/ # {{SUBDIR_2_PURPOSE}}
101
+ ├── {{DIR_2}}/ # {{DIR_2_PURPOSE}}
102
+ ├── {{DIR_3}}/ # {{DIR_3_PURPOSE}}
103
+ └── {{DIR_4}}/ # {{DIR_4_PURPOSE}}
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Security Model
109
+
110
+ ### Authentication
111
+ {{AUTHENTICATION_DESCRIPTION}}
112
+
113
+ ### Authorization
114
+ {{AUTHORIZATION_DESCRIPTION}}
115
+
116
+ ### Data Protection
117
+ {{DATA_PROTECTION_DESCRIPTION}}
118
+
119
+ ---
120
+
121
+ ## Performance Characteristics
122
+
123
+ | Metric | Target | Current |
124
+ |--------|--------|---------|
125
+ | API Response Time | {{TARGET_1}} | {{CURRENT_1}} |
126
+ | Throughput | {{TARGET_2}} | {{CURRENT_2}} |
127
+ | Availability | {{TARGET_3}} | {{CURRENT_3}} |
128
+
129
+ ---
130
+
131
+ ## Deployment Architecture
132
+
133
+ ```
134
+ {{DEPLOYMENT_DIAGRAM}}
135
+ ```
136
+
137
+ **Environments:**
138
+ | Environment | URL | Purpose |
139
+ |-------------|-----|---------|
140
+ | Development | {{DEV_URL}} | Local development |
141
+ | Staging | {{STAGING_URL}} | Pre-production testing |
142
+ | Production | {{PROD_URL}} | Live system |
143
+
144
+ ---
145
+
146
+ ## See Also
147
+
148
+ - **Detailed workflows:** [WORKFLOW_INDEX.md](./WORKFLOW_INDEX.md)
149
+ - **File responsibilities:** [FILE_OWNERSHIP.md](./FILE_OWNERSHIP.md)
150
+ - **External APIs:** [INTEGRATION_POINTS.md](./INTEGRATION_POINTS.md)
151
+ - **Lessons learned:** [KNOWN_GOTCHAS.md](./KNOWN_GOTCHAS.md)
152
+
153
+ ---
154
+
155
+ **Version:** 1.0
156
+ **Verified Against Commit:** {{COMMIT_HASH}}
@@ -1,94 +1,94 @@
1
- # Code to Workflow Map
2
-
3
- **Purpose:** Reverse index - Given a code file, find which workflows document it
4
- **Use:** After modifying any file, look up what documentation needs updating
5
- **Last Updated:** {{DATE}}
6
-
7
- ---
8
-
9
- ## How to Use This File
10
-
11
- 1. **Modified a file?** Search for it below
12
- 2. **Find "Documented In" section** for affected workflows
13
- 3. **Check "Update After Changing" section** for required updates
14
- 4. **Run `/verify-docs-current [file]`** to validate
15
-
16
- ---
17
-
18
- ## File → Workflow Mapping
19
-
20
- ### {{DIRECTORY_1}}/
21
-
22
- #### `{{FILE_1}}` [XXX lines]
23
-
24
- **Documented In:**
25
- - [workflows/workflow_1.md](./workflows/workflow_1.md) - Section 2
26
- - [workflows/workflow_2.md](./workflows/workflow_2.md) - Section 4
27
-
28
- **Update After Changing:**
29
- - Workflow: workflow_1.md (if [specific thing] changes)
30
- - Agent: agent_name.md (if [capability] changes)
31
- - CLAUDE.md (if [architecture] changes)
32
-
33
- ---
34
-
35
- #### `{{FILE_2}}` [XXX lines]
36
-
37
- **Documented In:**
38
- - [workflows/workflow_3.md](./workflows/workflow_3.md) - Complete file
39
-
40
- **Update After Changing:**
41
- - Workflow: workflow_3.md (always)
42
-
43
- ---
44
-
45
- ### {{DIRECTORY_2}}/
46
-
47
- [Same structure for each directory...]
48
-
49
- ---
50
-
51
- ## Files NOT Currently Documented
52
-
53
- These files exist but are not yet in any workflow:
54
-
55
- | File | Reason | Priority |
56
- |------|--------|----------|
57
- | `path/file.ext` | [Why not documented] | LOW/MED/HIGH |
58
-
59
- ---
60
-
61
- ## Documentation Update Checklist
62
-
63
- After ANY code change:
64
-
65
- 1. [ ] Find modified file in this map
66
- 2. [ ] Check all "Documented In" workflows
67
- 3. [ ] Update line numbers if code moved
68
- 4. [ ] Update function signatures if changed
69
- 5. [ ] Update business logic descriptions if changed
70
- 6. [ ] Run `/verify-docs-current [file]`
71
- 7. [ ] Commit documentation updates with code
72
-
73
- ---
74
-
75
- ## Automation
76
-
77
- ### Quick Lookup Command
78
-
79
- ```bash
80
- # Find what documents a specific file
81
- grep -l "path/to/file" .claude/context/workflows/*.md
82
- ```
83
-
84
- ### Validation Command
85
-
86
- ```bash
87
- /verify-docs-current path/to/modified/file.ext
88
- ```
89
-
90
- ---
91
-
92
- **Version:** 1.0
93
- **Files Tracked:** {{FILES_COUNT}}
94
- **Workflows Linked:** {{WORKFLOWS_COUNT}}
1
+ # Code to Workflow Map
2
+
3
+ **Purpose:** Reverse index - Given a code file, find which workflows document it
4
+ **Use:** After modifying any file, look up what documentation needs updating
5
+ **Last Updated:** {{DATE}}
6
+
7
+ ---
8
+
9
+ ## How to Use This File
10
+
11
+ 1. **Modified a file?** Search for it below
12
+ 2. **Find "Documented In" section** for affected workflows
13
+ 3. **Check "Update After Changing" section** for required updates
14
+ 4. **Run `/verify-docs-current [file]`** to validate
15
+
16
+ ---
17
+
18
+ ## File → Workflow Mapping
19
+
20
+ ### {{DIRECTORY_1}}/
21
+
22
+ #### `{{FILE_1}}` [XXX lines]
23
+
24
+ **Documented In:**
25
+ - [workflows/workflow_1.md](./workflows/workflow_1.md) - Section 2
26
+ - [workflows/workflow_2.md](./workflows/workflow_2.md) - Section 4
27
+
28
+ **Update After Changing:**
29
+ - Workflow: workflow_1.md (if [specific thing] changes)
30
+ - Agent: agent_name.md (if [capability] changes)
31
+ - CLAUDE.md (if [architecture] changes)
32
+
33
+ ---
34
+
35
+ #### `{{FILE_2}}` [XXX lines]
36
+
37
+ **Documented In:**
38
+ - [workflows/workflow_3.md](./workflows/workflow_3.md) - Complete file
39
+
40
+ **Update After Changing:**
41
+ - Workflow: workflow_3.md (always)
42
+
43
+ ---
44
+
45
+ ### {{DIRECTORY_2}}/
46
+
47
+ [Same structure for each directory...]
48
+
49
+ ---
50
+
51
+ ## Files NOT Currently Documented
52
+
53
+ These files exist but are not yet in any workflow:
54
+
55
+ | File | Reason | Priority |
56
+ |------|--------|----------|
57
+ | `path/file.ext` | [Why not documented] | LOW/MED/HIGH |
58
+
59
+ ---
60
+
61
+ ## Documentation Update Checklist
62
+
63
+ After ANY code change:
64
+
65
+ 1. [ ] Find modified file in this map
66
+ 2. [ ] Check all "Documented In" workflows
67
+ 3. [ ] Update line numbers if code moved
68
+ 4. [ ] Update function signatures if changed
69
+ 5. [ ] Update business logic descriptions if changed
70
+ 6. [ ] Run `/verify-docs-current [file]`
71
+ 7. [ ] Commit documentation updates with code
72
+
73
+ ---
74
+
75
+ ## Automation
76
+
77
+ ### Quick Lookup Command
78
+
79
+ ```bash
80
+ # Find what documents a specific file
81
+ grep -l "path/to/file" .claude/context/workflows/*.md
82
+ ```
83
+
84
+ ### Validation Command
85
+
86
+ ```bash
87
+ /verify-docs-current path/to/modified/file.ext
88
+ ```
89
+
90
+ ---
91
+
92
+ **Version:** 1.0
93
+ **Files Tracked:** {{FILES_COUNT}}
94
+ **Workflows Linked:** {{WORKFLOWS_COUNT}}