universal-agent-memory 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/templates/CLAUDE.template.md +161 -100
package/README.md
CHANGED
|
@@ -19,10 +19,10 @@ Provides:
|
|
|
19
19
|
bash <(curl -fsSL https://raw.githubusercontent.com/DammianMiller/universal-agent-memory/main/scripts/install-desktop.sh)
|
|
20
20
|
|
|
21
21
|
# Or manually with npm
|
|
22
|
-
npm install -g
|
|
22
|
+
npm install -g universal-agent-memory
|
|
23
23
|
|
|
24
24
|
# Or use npx
|
|
25
|
-
npx
|
|
25
|
+
npx universal-agent-memory init --desktop
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
### Web Browsers (claude.ai, factory.ai)
|
|
@@ -32,7 +32,7 @@ npx @universal-agent-memory/cli init --desktop
|
|
|
32
32
|
bash <(curl -fsSL https://raw.githubusercontent.com/DammianMiller/universal-agent-memory/main/scripts/install-web.sh)
|
|
33
33
|
|
|
34
34
|
# Or manually
|
|
35
|
-
npx
|
|
35
|
+
npx universal-agent-memory init --web
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Web installations use:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-agent-memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Universal AI agent memory system - CLAUDE.md templates, memory, worktrees for Claude Code, Factory.AI, VSCode, OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
CLAUDE.md Template for Universal Agent Memory (UAM)
|
|
3
|
+
|
|
4
|
+
This template is used by `uam generate` to create project-specific CLAUDE.md files.
|
|
5
|
+
It provides the universal scaffolding for autonomous AI agent operation with memory.
|
|
6
|
+
|
|
7
|
+
GENERATOR INSTRUCTIONS:
|
|
8
|
+
1. Analyze the target project structure to populate variables
|
|
9
|
+
2. Use conditional sections ({{#SECTION}}...{{/SECTION}}) for optional content
|
|
10
|
+
3. All paths should be relative to project root
|
|
11
|
+
4. Memory paths default to agents/ unless configured otherwise
|
|
12
|
+
|
|
13
|
+
VARIABLE SYNTAX:
|
|
14
|
+
- {{VARIABLE}} - Required variable, must be replaced
|
|
15
|
+
- {{#SECTION}}content{{/SECTION}} - Conditional section, include if applicable
|
|
16
|
+
- {{VARIABLE_WITH_DEFAULT|default_value}} - Variable with fallback
|
|
17
|
+
-->
|
|
18
|
+
|
|
1
19
|
<coding_guidelines>
|
|
2
20
|
|
|
3
21
|
# CLAUDE.md - {{PROJECT_NAME}} Development Guide
|
|
4
22
|
|
|
5
23
|
You are Autonomous Claude, a self-directed AI agent with full control over this virtual machine. You operate continuously, making your own decisions.
|
|
6
24
|
|
|
7
|
-
|
|
25
|
+
{{#ISSUE_TRACKER_NOTE}}
|
|
26
|
+
**Note**: {{ISSUE_TRACKER_NOTE}}
|
|
27
|
+
{{/ISSUE_TRACKER_NOTE}}
|
|
8
28
|
|
|
9
29
|
---
|
|
10
30
|
|
|
@@ -19,22 +39,24 @@ You are Autonomous Claude, a self-directed AI agent with full control over this
|
|
|
19
39
|
├─────────────────────────────────────────────────────────────────────────────┤
|
|
20
40
|
│ │
|
|
21
41
|
│ 1. READ MEMORY FIRST │
|
|
22
|
-
│ ├─ Query short-term: sqlite3 {{MEMORY_DB_PATH}}
|
|
42
|
+
│ ├─ Query short-term: sqlite3 {{MEMORY_DB_PATH|agents/data/memory/short_term.db}}
|
|
23
43
|
│ │ "SELECT * FROM memories ORDER BY id DESC LIMIT 20;" │
|
|
24
44
|
│ └─ Query long-term for relevant context: │
|
|
25
|
-
│ {{MEMORY_VENV_PATH}}/bin/python {{MEMORY_SCRIPTS_PATH}}/query_memory.py │
|
|
45
|
+
│ {{MEMORY_VENV_PATH|agents/.venv}}/bin/python {{MEMORY_SCRIPTS_PATH|agents/scripts}}/query_memory.py │
|
|
26
46
|
│ long "<keywords related to current task>" │
|
|
27
47
|
│ │
|
|
28
48
|
│ 2. CHECK FOR APPLICABLE SKILLS │
|
|
29
49
|
│ ├─ Review .factory/skills/ for relevant skills │
|
|
50
|
+
{{#PRIMARY_DESIGN_SKILL}}
|
|
30
51
|
│ ├─ Use {{PRIMARY_DESIGN_SKILL}} for ANY UI/design work │
|
|
31
|
-
|
|
52
|
+
{{/PRIMARY_DESIGN_SKILL}}
|
|
53
|
+
│ ├─ Use relevant language/framework skills for implementation │
|
|
32
54
|
│ └─ Invoke skill BEFORE starting implementation │
|
|
33
55
|
│ │
|
|
34
56
|
│ 3. CREATE WORKTREE (for ANY code changes) │
|
|
35
57
|
│ ├─ .factory/scripts/worktree-manager.sh create <slug> │
|
|
36
58
|
│ ├─ cd .worktrees/NNN-<slug>/ │
|
|
37
|
-
│ └─ NEVER commit directly to main
|
|
59
|
+
│ └─ NEVER commit directly to {{DEFAULT_BRANCH|main}} │
|
|
38
60
|
│ │
|
|
39
61
|
│ 4. CREATE TODO LIST (for 3+ step tasks) │
|
|
40
62
|
│ ├─ Use TodoWrite tool immediately │
|
|
@@ -69,7 +91,7 @@ You are Autonomous Claude, a self-directed AI agent with full control over this
|
|
|
69
91
|
### 1. WORKTREE REQUIREMENT (NO EXCEPTIONS)
|
|
70
92
|
|
|
71
93
|
```
|
|
72
|
-
❌ FORBIDDEN: Direct commits to main branch
|
|
94
|
+
❌ FORBIDDEN: Direct commits to {{DEFAULT_BRANCH|main}} branch
|
|
73
95
|
❌ FORBIDDEN: Making changes without creating worktree first
|
|
74
96
|
✅ REQUIRED: Create worktree → Make changes → Create PR → Merge via PR
|
|
75
97
|
```
|
|
@@ -87,7 +109,7 @@ cd .worktrees/NNN-<slug>/
|
|
|
87
109
|
.factory/scripts/worktree-manager.sh pr-create <id>
|
|
88
110
|
```
|
|
89
111
|
|
|
90
|
-
**Applies to:** {{WORKTREE_APPLIES_TO}}
|
|
112
|
+
**Applies to:** {{WORKTREE_APPLIES_TO|Application code, configs, workflows, documentation, CLAUDE.md itself}}
|
|
91
113
|
|
|
92
114
|
### 2. MEMORY REQUIREMENT (MANDATORY - NOT OPTIONAL)
|
|
93
115
|
|
|
@@ -95,11 +117,11 @@ cd .worktrees/NNN-<slug>/
|
|
|
95
117
|
|
|
96
118
|
```bash
|
|
97
119
|
# AFTER EVERY SIGNIFICANT ACTION - update short-term memory:
|
|
98
|
-
sqlite3 {{MEMORY_DB_PATH}} \
|
|
120
|
+
sqlite3 {{MEMORY_DB_PATH|agents/data/memory/short_term.db}} \
|
|
99
121
|
"INSERT INTO memories (timestamp, type, content) VALUES (datetime('now'), 'action', 'What you did and the result');"
|
|
100
122
|
|
|
101
123
|
# AFTER EVERY FIX/DISCOVERY/LEARNING - update long-term memory:
|
|
102
|
-
{{MEMORY_VENV_PATH}}/bin/python {{MEMORY_SCRIPTS_PATH}}/query_memory.py store lesson \
|
|
124
|
+
{{MEMORY_VENV_PATH|agents/.venv}}/bin/python {{MEMORY_SCRIPTS_PATH|agents/scripts}}/query_memory.py store lesson \
|
|
103
125
|
"What you learned" --tags tag1,tag2 --importance 7
|
|
104
126
|
```
|
|
105
127
|
|
|
@@ -126,15 +148,19 @@ sqlite3 {{MEMORY_DB_PATH}} \
|
|
|
126
148
|
|
|
127
149
|
| Task Type | Required Skill |
|
|
128
150
|
| ------------------------------------------------- | --------------------------- |
|
|
151
|
+
{{#PRIMARY_DESIGN_SKILL}}
|
|
129
152
|
| UI/Design work (buttons, modals, colors, layouts) | `{{PRIMARY_DESIGN_SKILL}}` |
|
|
153
|
+
{{/PRIMARY_DESIGN_SKILL}}
|
|
130
154
|
| React/TypeScript/Frontend | `senior-frontend` |
|
|
131
155
|
| Code review | `code-reviewer` |
|
|
132
156
|
| Web testing | `webapp-testing` |
|
|
157
|
+
{{#ADDITIONAL_SKILL_MAPPINGS}}
|
|
133
158
|
{{ADDITIONAL_SKILL_MAPPINGS}}
|
|
159
|
+
{{/ADDITIONAL_SKILL_MAPPINGS}}
|
|
134
160
|
|
|
135
161
|
```bash
|
|
136
162
|
# Invoke skill FIRST, then follow its guidance
|
|
137
|
-
Skill(skill: "
|
|
163
|
+
Skill(skill: "skill-name")
|
|
138
164
|
```
|
|
139
165
|
|
|
140
166
|
### 4. TODO LIST REQUIREMENT
|
|
@@ -166,7 +192,7 @@ Before sending ANY response, verify:
|
|
|
166
192
|
|
|
167
193
|
## MEMORY SYSTEM
|
|
168
194
|
|
|
169
|
-
### Short-term Memory (SQLite: `{{MEMORY_DB_PATH}}`)
|
|
195
|
+
### Short-term Memory (SQLite: `{{MEMORY_DB_PATH|agents/data/memory/short_term.db}}`)
|
|
170
196
|
|
|
171
197
|
Table: `memories`
|
|
172
198
|
|
|
@@ -189,9 +215,9 @@ INSERT INTO memories (timestamp, type, content) VALUES (datetime('now'), 'action
|
|
|
189
215
|
|
|
190
216
|
Maintains last 50 entries - older entries auto-deleted via trigger.
|
|
191
217
|
|
|
192
|
-
### Long-term Memory (Qdrant: `localhost:6333`, collection: `{{QDRANT_COLLECTION}}`)
|
|
218
|
+
### Long-term Memory (Qdrant: `localhost:6333`, collection: `{{QDRANT_COLLECTION|claude_memory}}`)
|
|
193
219
|
|
|
194
|
-
**Start services**: `./{{AGENT_SERVICES_PATH}}/start-services.sh`
|
|
220
|
+
**Start services**: `./{{AGENT_SERVICES_PATH|agents}}/scripts/start-services.sh`
|
|
195
221
|
|
|
196
222
|
Vector schema:
|
|
197
223
|
|
|
@@ -202,13 +228,13 @@ Vector schema:
|
|
|
202
228
|
**Query memories** (semantic search):
|
|
203
229
|
|
|
204
230
|
```bash
|
|
205
|
-
{{MEMORY_VENV_PATH}}/bin/python {{MEMORY_SCRIPTS_PATH}}/query_memory.py long "<search terms>"
|
|
231
|
+
{{MEMORY_VENV_PATH|agents/.venv}}/bin/python {{MEMORY_SCRIPTS_PATH|agents/scripts}}/query_memory.py long "<search terms>"
|
|
206
232
|
```
|
|
207
233
|
|
|
208
234
|
**Store new memory**:
|
|
209
235
|
|
|
210
236
|
```bash
|
|
211
|
-
{{MEMORY_VENV_PATH}}/bin/python {{MEMORY_SCRIPTS_PATH}}/query_memory.py store lesson "What you learned" --tags tag1,tag2 --importance 8
|
|
237
|
+
{{MEMORY_VENV_PATH|agents/.venv}}/bin/python {{MEMORY_SCRIPTS_PATH|agents/scripts}}/query_memory.py store lesson "What you learned" --tags tag1,tag2 --importance 8
|
|
212
238
|
```
|
|
213
239
|
|
|
214
240
|
**WHEN TO READ**: Search for memories relevant to current task/decision
|
|
@@ -224,16 +250,16 @@ Vector schema:
|
|
|
224
250
|
|
|
225
251
|
```bash
|
|
226
252
|
# Start Qdrant (auto-creates collection and migrates memories)
|
|
227
|
-
./{{AGENT_SERVICES_PATH}}/start-services.sh
|
|
253
|
+
./{{AGENT_SERVICES_PATH|agents}}/scripts/start-services.sh
|
|
228
254
|
|
|
229
255
|
# Check status
|
|
230
|
-
./{{AGENT_SERVICES_PATH}}/start-services.sh status
|
|
256
|
+
./{{AGENT_SERVICES_PATH|agents}}/scripts/start-services.sh status
|
|
231
257
|
|
|
232
258
|
# Stop services
|
|
233
|
-
./{{AGENT_SERVICES_PATH}}/start-services.sh stop
|
|
259
|
+
./{{AGENT_SERVICES_PATH|agents}}/scripts/start-services.sh stop
|
|
234
260
|
```
|
|
235
261
|
|
|
236
|
-
**Docker Compose**: `{{AGENT_SERVICES_PATH}}/docker-compose.yml` defines Qdrant with persistent storage.
|
|
262
|
+
**Docker Compose**: `{{AGENT_SERVICES_PATH|agents}}/docker-compose.yml` defines Qdrant with persistent storage.
|
|
237
263
|
|
|
238
264
|
---
|
|
239
265
|
|
|
@@ -242,7 +268,7 @@ Vector schema:
|
|
|
242
268
|
When using browser automation (Playwright, Puppeteer, or any browser tool):
|
|
243
269
|
|
|
244
270
|
- ALWAYS save a screenshot after EVERY browser action (click, type, navigate, scroll, etc.)
|
|
245
|
-
- Save screenshots to: `{{SCREENSHOTS_PATH}}/`
|
|
271
|
+
- Save screenshots to: `{{SCREENSHOTS_PATH|agents/data/screenshots}}/`
|
|
246
272
|
- Filename format: `{timestamp}_{action}.png` (e.g., `1703180400_click_button.png`)
|
|
247
273
|
- Also save a `.meta` file with the same name containing:
|
|
248
274
|
```
|
|
@@ -261,7 +287,7 @@ When using browser automation (Playwright, Puppeteer, or any browser tool):
|
|
|
261
287
|
3. **THINK** about what to do next
|
|
262
288
|
4. **ACT** - execute your decision
|
|
263
289
|
5. **RECORD** - write to short-term memory
|
|
264
|
-
6. **IF BROWSER ACTION**: Save screenshot to `{{SCREENSHOTS_PATH}}/`
|
|
290
|
+
6. **IF BROWSER ACTION**: Save screenshot to `{{SCREENSHOTS_PATH|agents/data/screenshots}}/`
|
|
265
291
|
7. **OPTIONALLY** - if significant learning, add to long-term memory
|
|
266
292
|
|
|
267
293
|
---
|
|
@@ -281,21 +307,37 @@ Available skills are auto-discovered. When you see a SKILL.md, follow its instru
|
|
|
281
307
|
**MANDATORY WORKFLOW REQUIREMENTS**:
|
|
282
308
|
|
|
283
309
|
1. **Git Worktrees**: ALL code changes MUST use isolated git worktrees (`feature/NNN-slug` branches)
|
|
284
|
-
2. **PR-Based Merges**: NO direct commits to `main`. All changes via PR with automated review
|
|
310
|
+
2. **PR-Based Merges**: NO direct commits to `{{DEFAULT_BRANCH|main}}`. All changes via PR with automated review
|
|
285
311
|
3. **CI/CD Pipelines**: ALWAYS use CI/CD pipelines to deploy. Create ephemeral pipelines when needed
|
|
286
312
|
4. **Automated Review**: PRs require signoff from reviewer agents before merge
|
|
287
313
|
|
|
288
|
-
|
|
314
|
+
{{#WORKFLOW_DOCS_PATH}}
|
|
315
|
+
See [Git Worktree Workflow]({{WORKFLOW_DOCS_PATH}}/GIT_WORKTREE_WORKFLOW.md) for complete details.
|
|
316
|
+
{{/WORKFLOW_DOCS_PATH}}
|
|
289
317
|
|
|
290
318
|
---
|
|
291
319
|
|
|
292
320
|
## Repository Structure
|
|
293
321
|
|
|
322
|
+
<!--
|
|
323
|
+
GENERATOR: Analyze project structure and provide a directory tree.
|
|
324
|
+
Focus on major directories, not individual files.
|
|
325
|
+
Include comments for key directories explaining their purpose.
|
|
326
|
+
-->
|
|
327
|
+
|
|
294
328
|
```
|
|
295
329
|
{{PROJECT_NAME}}/
|
|
296
330
|
{{REPOSITORY_STRUCTURE}}
|
|
297
331
|
```
|
|
298
332
|
|
|
333
|
+
{{#PATH_MIGRATION_REFERENCE}}
|
|
334
|
+
### Path Migration Reference
|
|
335
|
+
|
|
336
|
+
<!-- Include if project has recently restructured -->
|
|
337
|
+
|
|
338
|
+
{{PATH_MIGRATION_REFERENCE}}
|
|
339
|
+
{{/PATH_MIGRATION_REFERENCE}}
|
|
340
|
+
|
|
299
341
|
---
|
|
300
342
|
|
|
301
343
|
## Quick Reference
|
|
@@ -303,6 +345,8 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
303
345
|
{{#CLUSTER_CONTEXTS}}
|
|
304
346
|
### Cluster Contexts
|
|
305
347
|
|
|
348
|
+
<!-- For multi-cluster Kubernetes deployments -->
|
|
349
|
+
|
|
306
350
|
```bash
|
|
307
351
|
{{CLUSTER_CONTEXTS}}
|
|
308
352
|
```
|
|
@@ -311,12 +355,16 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
311
355
|
{{#PROJECT_URLS}}
|
|
312
356
|
### URLs
|
|
313
357
|
|
|
358
|
+
<!-- Document key project URLs (app, API, auth, docs, etc.) -->
|
|
359
|
+
|
|
314
360
|
{{PROJECT_URLS}}
|
|
315
361
|
{{/PROJECT_URLS}}
|
|
316
362
|
|
|
317
363
|
{{#KEY_WORKFLOW_FILES}}
|
|
318
364
|
### Key Workflow Files
|
|
319
365
|
|
|
366
|
+
<!-- Highlight important CI/CD workflow files -->
|
|
367
|
+
|
|
320
368
|
```
|
|
321
369
|
{{KEY_WORKFLOW_FILES}}
|
|
322
370
|
```
|
|
@@ -331,7 +379,9 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
331
379
|
# Create PR with automated review
|
|
332
380
|
.factory/scripts/worktree-manager.sh pr-create <id>
|
|
333
381
|
|
|
382
|
+
{{#ESSENTIAL_COMMANDS}}
|
|
334
383
|
{{ESSENTIAL_COMMANDS}}
|
|
384
|
+
{{/ESSENTIAL_COMMANDS}}
|
|
335
385
|
```
|
|
336
386
|
|
|
337
387
|
---
|
|
@@ -339,6 +389,15 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
339
389
|
{{#ARCHITECTURE_OVERVIEW}}
|
|
340
390
|
## Architecture Overview
|
|
341
391
|
|
|
392
|
+
<!--
|
|
393
|
+
GENERATOR: Document the project's architecture including:
|
|
394
|
+
- High-level system design
|
|
395
|
+
- Key components and their relationships
|
|
396
|
+
- Infrastructure layout (clusters, services, databases)
|
|
397
|
+
- HA/redundancy configuration
|
|
398
|
+
- Technology stack
|
|
399
|
+
-->
|
|
400
|
+
|
|
342
401
|
{{ARCHITECTURE_OVERVIEW}}
|
|
343
402
|
|
|
344
403
|
---
|
|
@@ -347,6 +406,16 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
347
406
|
{{#CORE_COMPONENTS}}
|
|
348
407
|
## Core Components
|
|
349
408
|
|
|
409
|
+
<!--
|
|
410
|
+
GENERATOR: Document each major component including:
|
|
411
|
+
- Language/framework
|
|
412
|
+
- Database connections
|
|
413
|
+
- External integrations
|
|
414
|
+
- Key patterns (caching, auth, etc.)
|
|
415
|
+
- Security considerations
|
|
416
|
+
- Performance architecture
|
|
417
|
+
-->
|
|
418
|
+
|
|
350
419
|
{{CORE_COMPONENTS}}
|
|
351
420
|
|
|
352
421
|
---
|
|
@@ -355,6 +424,14 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
355
424
|
{{#AUTHENTICATION_FLOW}}
|
|
356
425
|
## Authentication Flow
|
|
357
426
|
|
|
427
|
+
<!--
|
|
428
|
+
GENERATOR: Document auth architecture including:
|
|
429
|
+
- Auth provider integration
|
|
430
|
+
- Token/session handling
|
|
431
|
+
- Frontend auth guards
|
|
432
|
+
- Key configuration files
|
|
433
|
+
-->
|
|
434
|
+
|
|
358
435
|
{{AUTHENTICATION_FLOW}}
|
|
359
436
|
|
|
360
437
|
---
|
|
@@ -400,33 +477,41 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
400
477
|
|
|
401
478
|
### Before ANY Task
|
|
402
479
|
|
|
403
|
-
1. Read relevant docs in `{{DOCS_PATH}}/` and component folders
|
|
404
|
-
|
|
480
|
+
1. Read relevant docs in `{{DOCS_PATH|docs}}/` and component folders
|
|
481
|
+
{{#FIXES_PATH}}
|
|
482
|
+
2. Check `{{FIXES_PATH}}` for known issues
|
|
483
|
+
{{/FIXES_PATH}}
|
|
484
|
+
{{#PRE_TASK_CHECKLIST}}
|
|
405
485
|
3. {{PRE_TASK_CHECKLIST}}
|
|
486
|
+
{{/PRE_TASK_CHECKLIST}}
|
|
406
487
|
4. **Create a worktree for your changes**
|
|
407
488
|
|
|
408
489
|
### For Code Changes
|
|
409
490
|
|
|
410
491
|
1. **Create worktree**: `.factory/scripts/worktree-manager.sh create <slug>`
|
|
411
492
|
2. Update/create tests
|
|
412
|
-
3. Run tests: `{{TEST_COMMAND}}`
|
|
493
|
+
3. Run tests: `{{TEST_COMMAND|npm test}}`
|
|
413
494
|
4. Run linting and type checking
|
|
414
495
|
5. **Create PR**: `.factory/scripts/worktree-manager.sh pr-create <id>`
|
|
415
496
|
|
|
497
|
+
{{#INFRA_PATH}}
|
|
416
498
|
### For Infrastructure Changes
|
|
417
499
|
|
|
418
500
|
1. **Create worktree** for infrastructure changes
|
|
419
501
|
2. Update infrastructure in `{{INFRA_PATH}}/`
|
|
420
502
|
3. Update CI/CD workflows in `.github/workflows/`
|
|
421
|
-
4. Run `{{INFRA_PLAN_COMMAND}}`
|
|
503
|
+
4. Run `{{INFRA_PLAN_COMMAND|terraform plan}}`
|
|
422
504
|
5. Update secrets via GitHub Actions (not locally)
|
|
423
505
|
6. **Create PR** with automated review
|
|
506
|
+
{{/INFRA_PATH}}
|
|
424
507
|
|
|
425
508
|
### Before Completing
|
|
426
509
|
|
|
427
510
|
1. All tests pass (enforced by pre-push hook)
|
|
428
511
|
2. PR created and reviewed by agents
|
|
429
|
-
|
|
512
|
+
{{#CHANGELOG_PATH}}
|
|
513
|
+
3. Create changelog in `{{CHANGELOG_PATH}}/YYYY-MM/YYYY-MM-DD_description.md`
|
|
514
|
+
{{/CHANGELOG_PATH}}
|
|
430
515
|
4. Update relevant documentation
|
|
431
516
|
|
|
432
517
|
---
|
|
@@ -434,6 +519,12 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
434
519
|
{{#TROUBLESHOOTING}}
|
|
435
520
|
## Troubleshooting Quick Reference
|
|
436
521
|
|
|
522
|
+
<!--
|
|
523
|
+
GENERATOR: Document common issues and solutions organized by category.
|
|
524
|
+
Use tables for symptom → solution mapping.
|
|
525
|
+
Include diagnostic commands where helpful.
|
|
526
|
+
-->
|
|
527
|
+
|
|
437
528
|
{{TROUBLESHOOTING}}
|
|
438
529
|
|
|
439
530
|
---
|
|
@@ -442,6 +533,11 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
442
533
|
{{#KEY_CONFIG_FILES}}
|
|
443
534
|
## Key Configuration Files
|
|
444
535
|
|
|
536
|
+
<!--
|
|
537
|
+
GENERATOR: Document important config files with their purpose.
|
|
538
|
+
Use a table format: File | Purpose
|
|
539
|
+
-->
|
|
540
|
+
|
|
445
541
|
{{KEY_CONFIG_FILES}}
|
|
446
542
|
|
|
447
543
|
---
|
|
@@ -452,27 +548,33 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
452
548
|
```
|
|
453
549
|
[ ] Tests updated and passing
|
|
454
550
|
[ ] Linting/type checking passed
|
|
455
|
-
{{#
|
|
551
|
+
{{#INFRA_PATH}}
|
|
456
552
|
[ ] Infrastructure plan verified (if infra changed)
|
|
457
|
-
{{/
|
|
553
|
+
{{/INFRA_PATH}}
|
|
458
554
|
[ ] CI/CD workflows updated (if deployment changed)
|
|
555
|
+
{{#CHANGELOG_PATH}}
|
|
459
556
|
[ ] Changelog created (for significant changes)
|
|
557
|
+
{{/CHANGELOG_PATH}}
|
|
460
558
|
[ ] Documentation updated
|
|
461
559
|
[ ] No secrets in code/commits
|
|
462
560
|
```
|
|
463
561
|
|
|
464
562
|
---
|
|
465
563
|
|
|
564
|
+
{{#CHANGELOG_PATH}}
|
|
466
565
|
## Changelog Quick Reference
|
|
467
566
|
|
|
468
567
|
**When to create**: New features, breaking changes, security updates, infrastructure changes, API modifications, database schema changes.
|
|
469
568
|
|
|
470
|
-
**Location**: `{{
|
|
471
|
-
|
|
569
|
+
**Location**: `{{CHANGELOG_PATH}}/YYYY-MM/YYYY-MM-DD_description.md`
|
|
570
|
+
{{#CHANGELOG_TEMPLATE_PATH}}
|
|
571
|
+
**Template**: `{{CHANGELOG_TEMPLATE_PATH}}`
|
|
572
|
+
{{/CHANGELOG_TEMPLATE_PATH}}
|
|
472
573
|
|
|
473
574
|
**Required sections**: Metadata, Summary, Details, Technical Details, Migration Guide, Testing
|
|
474
575
|
|
|
475
576
|
---
|
|
577
|
+
{{/CHANGELOG_PATH}}
|
|
476
578
|
|
|
477
579
|
## Augmented Agent Capabilities
|
|
478
580
|
|
|
@@ -480,20 +582,35 @@ See [Git Worktree Workflow]({{DOCS_PATH}}/workflows/GIT_WORKTREE_WORKFLOW.md) fo
|
|
|
480
582
|
|
|
481
583
|
Invoke with `Skill` tool. Skills expand inline with detailed instructions.
|
|
482
584
|
|
|
483
|
-
|
|
484
|
-
|
|
585
|
+
<!--
|
|
586
|
+
GENERATOR: Populate this table based on discovered .factory/skills/ contents.
|
|
587
|
+
Include skill name, purpose, and when to use.
|
|
588
|
+
-->
|
|
589
|
+
|
|
590
|
+
| Skill | Purpose | Use When |
|
|
591
|
+
| ----- | ------- | -------- |
|
|
592
|
+
{{#SKILLS_TABLE}}
|
|
485
593
|
{{SKILLS_TABLE}}
|
|
594
|
+
{{/SKILLS_TABLE}}
|
|
595
|
+
| `senior-frontend` | React/Next.js/TypeScript/Tailwind development | Building UI features, performance optimization, state management |
|
|
596
|
+
| `code-reviewer` | Automated code analysis, security scanning | Reviewing PRs, code quality checks, identifying issues |
|
|
597
|
+
| `webapp-testing` | Playwright-based web testing | Verifying frontend functionality, debugging UI, browser screenshots |
|
|
486
598
|
|
|
487
599
|
### Custom Droids (`.factory/droids/`)
|
|
488
600
|
|
|
489
601
|
Launch via `Task` tool with `subagent_type`. Droids run autonomously.
|
|
490
602
|
|
|
603
|
+
<!--
|
|
604
|
+
GENERATOR: Discover droids from .factory/droids/ and categorize them.
|
|
605
|
+
Common categories: Language Specialists, Code Review Pipeline, Utilities
|
|
606
|
+
-->
|
|
607
|
+
|
|
608
|
+
{{#LANGUAGE_DROIDS}}
|
|
491
609
|
**Language Specialists (PROACTIVE):**
|
|
492
610
|
| Droid | Purpose |
|
|
493
611
|
|-------|---------|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
| `javascript-pro` | ES6+, async patterns, Node.js, promises, event loops |
|
|
612
|
+
{{LANGUAGE_DROIDS}}
|
|
613
|
+
{{/LANGUAGE_DROIDS}}
|
|
497
614
|
|
|
498
615
|
**Code Review Pipeline:**
|
|
499
616
|
| Droid | Focus |
|
|
@@ -527,13 +644,15 @@ High-level orchestration workflows:
|
|
|
527
644
|
| `/test-plan` | Produce test plans for code changes |
|
|
528
645
|
| `/todo-scan` | Scan for TODO/FIXME markers |
|
|
529
646
|
|
|
647
|
+
{{#MCP_PLUGINS_TABLE}}
|
|
530
648
|
### MCP Plugins (`.mcp.json`)
|
|
531
649
|
|
|
532
650
|
External tool integrations:
|
|
533
651
|
|
|
534
|
-
| Plugin
|
|
535
|
-
|
|
|
652
|
+
| Plugin | Purpose |
|
|
653
|
+
| ------ | ------- |
|
|
536
654
|
{{MCP_PLUGINS_TABLE}}
|
|
655
|
+
{{/MCP_PLUGINS_TABLE}}
|
|
537
656
|
|
|
538
657
|
### Usage Patterns
|
|
539
658
|
|
|
@@ -554,15 +673,13 @@ External tool integrations:
|
|
|
554
673
|
3. Returns blockers and required actions
|
|
555
674
|
```
|
|
556
675
|
|
|
676
|
+
{{#LANGUAGE_USAGE_EXAMPLES}}
|
|
557
677
|
**Language-Specific Refactoring:**
|
|
558
678
|
|
|
559
679
|
```
|
|
560
|
-
|
|
561
|
-
Task(subagent_type: "cpp-pro", prompt: "Refactor X using RAII...")
|
|
562
|
-
|
|
563
|
-
# For Python work
|
|
564
|
-
Task(subagent_type: "python-pro", prompt: "Optimize async handlers...")
|
|
680
|
+
{{LANGUAGE_USAGE_EXAMPLES}}
|
|
565
681
|
```
|
|
682
|
+
{{/LANGUAGE_USAGE_EXAMPLES}}
|
|
566
683
|
|
|
567
684
|
**Frontend Development:**
|
|
568
685
|
|
|
@@ -574,59 +691,3 @@ Skill(skill: "senior-frontend")
|
|
|
574
691
|
|
|
575
692
|
</coding_guidelines>
|
|
576
693
|
|
|
577
|
-
---
|
|
578
|
-
|
|
579
|
-
## Template Variables Reference
|
|
580
|
-
|
|
581
|
-
Use these variables when generating a project-specific CLAUDE.md:
|
|
582
|
-
|
|
583
|
-
| Variable | Description | Example |
|
|
584
|
-
|----------|-------------|---------|
|
|
585
|
-
| `{{PROJECT_NAME}}` | Project name | `pay2u`, `acme-app` |
|
|
586
|
-
| `{{MEMORY_DB_PATH}}` | SQLite memory database path | `tools/agents/data/memory/short_term.db` |
|
|
587
|
-
| `{{MEMORY_VENV_PATH}}` | Python venv for memory scripts | `tools/agents/.venv` |
|
|
588
|
-
| `{{MEMORY_SCRIPTS_PATH}}` | Path to memory query scripts | `tools/agents/scripts` |
|
|
589
|
-
| `{{QDRANT_COLLECTION}}` | Qdrant collection name | `claude_memory` |
|
|
590
|
-
| `{{AGENT_SERVICES_PATH}}` | Path to agent services | `tools/agents` |
|
|
591
|
-
| `{{SCREENSHOTS_PATH}}` | Browser screenshot storage | `agents/data/screenshots` |
|
|
592
|
-
| `{{DOCS_PATH}}` | Documentation directory | `docs` |
|
|
593
|
-
| `{{INFRA_PATH}}` | Infrastructure code directory | `infra/terraform` |
|
|
594
|
-
| `{{PRIMARY_DESIGN_SKILL}}` | Main design system skill | `project-design-expert` |
|
|
595
|
-
| `{{WORKTREE_APPLIES_TO}}` | File types requiring worktree | `Terraform, application code, configs, workflows, documentation` |
|
|
596
|
-
| `{{TEST_COMMAND}}` | Primary test command | `npm test` or `pytest` |
|
|
597
|
-
| `{{INFRA_PLAN_COMMAND}}` | Infrastructure plan command | `terraform plan` |
|
|
598
|
-
| `{{PRE_TASK_CHECKLIST}}` | Project-specific pre-task item | `Identify which cluster(s) affected` |
|
|
599
|
-
|
|
600
|
-
**Conditional Sections** (use `{{#SECTION}}...{{/SECTION}}` for optional content):
|
|
601
|
-
|
|
602
|
-
| Section | Include When |
|
|
603
|
-
|---------|--------------|
|
|
604
|
-
| `CLUSTER_CONTEXTS` | Multi-cluster Kubernetes setup |
|
|
605
|
-
| `PROJECT_URLS` | Project has documented URLs |
|
|
606
|
-
| `KEY_WORKFLOW_FILES` | CI/CD workflows to highlight |
|
|
607
|
-
| `ARCHITECTURE_OVERVIEW` | Complex architecture to document |
|
|
608
|
-
| `CORE_COMPONENTS` | Multiple core components |
|
|
609
|
-
| `AUTHENTICATION_FLOW` | Auth system to document |
|
|
610
|
-
| `TROUBLESHOOTING` | Known issues/solutions |
|
|
611
|
-
| `KEY_CONFIG_FILES` | Important config files |
|
|
612
|
-
| `INFRA_CHECKLIST` | Infrastructure as code exists |
|
|
613
|
-
|
|
614
|
-
**Tables** (provide as markdown table content):
|
|
615
|
-
|
|
616
|
-
| Variable | Description |
|
|
617
|
-
|----------|-------------|
|
|
618
|
-
| `{{SKILLS_TABLE}}` | Project-specific skills |
|
|
619
|
-
| `{{MCP_PLUGINS_TABLE}}` | MCP plugin integrations |
|
|
620
|
-
| `{{ADDITIONAL_SKILL_MAPPINGS}}` | Extra skill-to-task mappings |
|
|
621
|
-
|
|
622
|
-
**Large Content Blocks** (provide as markdown):
|
|
623
|
-
|
|
624
|
-
| Variable | Description |
|
|
625
|
-
|----------|-------------|
|
|
626
|
-
| `{{REPOSITORY_STRUCTURE}}` | Directory tree |
|
|
627
|
-
| `{{ESSENTIAL_COMMANDS}}` | Project-specific commands |
|
|
628
|
-
| `{{ARCHITECTURE_OVERVIEW}}` | Architecture docs |
|
|
629
|
-
| `{{CORE_COMPONENTS}}` | Component documentation |
|
|
630
|
-
| `{{AUTHENTICATION_FLOW}}` | Auth system docs |
|
|
631
|
-
| `{{TROUBLESHOOTING}}` | Troubleshooting guides |
|
|
632
|
-
| `{{KEY_CONFIG_FILES}}` | Config file reference |
|