universal-agent-memory 0.5.3 โ†’ 0.5.5

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.
@@ -1,12 +1,12 @@
1
1
  <!--
2
- CLAUDE.md Universal Template - v8.0
2
+ CLAUDE.md Universal Template - v9.0
3
3
 
4
4
  CHANGES IN THIS VERSION:
5
- - Context Field integration (code field + inhibition-style directives)
6
- - Inhibition > Instruction: "Do not X" creates blockers, "Do X" creates preferences
7
- - 4-line code field for 100% assumption stating, 89% bug detection
8
- - Simplified setup (auto-works, no clicking required)
9
- - Database protection (never delete existing data)
5
+ - Fully universal with Handlebars placeholders (no hardcoded project content)
6
+ - Context Field integration with Code Field prompt
7
+ - Inhibition-style directives ("Do not X" creates blockers)
8
+ - Optimized token usage with conditional sections
9
+ - Database protection (memory persists with project)
10
10
 
11
11
  CODE FIELD ATTRIBUTION:
12
12
  The Code Field prompt technique is based on research from:
@@ -37,15 +37,15 @@
37
37
  {{DOCKER_COMPOSE_PATH}}
38
38
 
39
39
  Commands:
40
- {{TEST_COMMAND}}, {{BUILD_COMMAND}}, {{LINT_COMMAND}}, {{INSTALL_HOOKS_CMD}}
40
+ {{TEST_COMMAND}}, {{BUILD_COMMAND}}, {{LINT_COMMAND}}
41
41
  -->
42
42
 
43
43
  <coding_guidelines>
44
44
 
45
45
  # {{PROJECT_NAME}} - Autonomous Agent Guide
46
46
 
47
- {{#if ISSUE_TRACKER}}
48
- > {{{ISSUE_TRACKER}}}
47
+ {{#if DESCRIPTION}}
48
+ > {{DESCRIPTION}}
49
49
  {{/if}}
50
50
 
51
51
  ---
@@ -63,9 +63,11 @@
63
63
 
64
64
  ---
65
65
 
66
- ## ๐Ÿ”’ CODE FIELD - MANDATORY FOR ALL CODE
66
+ ## ๐Ÿงฌ CODE FIELD - COGNITIVE ENVIRONMENT
67
67
 
68
- **Before writing ANY code, apply these constraints:**
68
+ **Apply to ALL code generation. Creates conditions where better code emerges naturally.**
69
+
70
+ ### Core Inhibitions
69
71
 
70
72
  ```
71
73
  Do not write code before stating assumptions.
@@ -74,25 +76,29 @@ Do not handle only the happy path.
74
76
  Under what conditions does this work?
75
77
  ```
76
78
 
77
- ### Code Generation Protocol
79
+ ### Before Writing Code
80
+
81
+ - What are you assuming about the input?
82
+ - What are you assuming about the environment?
83
+ - What would break this?
84
+ - What would a malicious caller do?
85
+
86
+ ### Do Not
78
87
 
79
- **BEFORE CODE** (required):
80
- - State assumptions about input, environment, dependencies
81
- - Enumerate edge cases and failure modes
82
- - Define explicit scope ("This handles X, not Y")
83
- - Ask: "What would break this? What would a malicious caller do?"
88
+ - Write code before stating assumptions
89
+ - Claim correctness you haven't verified
90
+ - Handle the happy path and gesture at the rest
91
+ - Import complexity you don't need
92
+ - Solve problems you weren't asked to solve
93
+ - Produce code you wouldn't want to debug at 3am
84
94
 
85
- **IN CODE**:
86
- - Comments explain *why*, not *what*
87
- - Edge cases handled OR explicitly rejected with clear errors
88
- - Error paths as considered as happy paths
89
- - Smaller than your first instinct
95
+ ### Expected Output Format
90
96
 
91
- **AFTER CODE** (required):
92
- - "What this handles" section
93
- - "What this does NOT handle" section
94
- - Known limitations documented
95
- - Conditions for correctness stated
97
+ **Before code**: Assumptions stated explicitly, scope bounded
98
+ **In code**: Smaller than expected, edge cases handled or explicitly rejected
99
+ **After code**: "What this handles" and "What this does NOT handle" sections
100
+
101
+ *Attribution: Based on [context-field research](https://github.com/NeoVertex1/context-field)*
96
102
 
97
103
  ---
98
104
 
@@ -102,7 +108,8 @@ Under what conditions does this work?
102
108
 
103
109
  ```bash
104
110
  uam task ready # Check existing work
105
- uam memory query "recent context" # Check memory for context
111
+ sqlite3 {{MEMORY_DB_PATH}} "SELECT * FROM memories ORDER BY id DESC LIMIT 10;"
112
+ sqlite3 {{MEMORY_DB_PATH}} "SELECT * FROM session_memories WHERE session_id='current' ORDER BY id DESC LIMIT 5;"
106
113
  uam agent status # Check other active agents
107
114
  ```
108
115
 
@@ -110,22 +117,6 @@ uam agent status # Check other active agents
110
117
 
111
118
  ---
112
119
 
113
- ## ๐Ÿ›‘ CRITICAL INHIBITIONS
114
-
115
- **These are BLOCKERS, not suggestions. Do not proceed without satisfying them.**
116
-
117
- | Inhibition | Rationale |
118
- |------------|-----------|
119
- | Do not begin work without querying memory | Context prevents duplicate work |
120
- | Do not commit to {{DEFAULT_BRANCH}} | All changes require worktree + PR |
121
- | Do not claim work without overlap check | Prevents merge conflicts |
122
- | Do not create PR with failing tests | Broken code must not merge |
123
- | Do not complete task without storing learnings | Memory enables endless context |
124
- | Do not write code without stating assumptions | Prevents hidden bugs |
125
- | Do not handle only the happy path | Edge cases are where bugs live |
126
-
127
- ---
128
-
129
120
  ## ๐Ÿค– MULTI-AGENT COORDINATION PROTOCOL
130
121
 
131
122
  ### Before Claiming Any Work
@@ -160,9 +151,20 @@ uam agent announce \
160
151
  | `high` | Wait or split work | Same file, different sections |
161
152
  | `critical` | STOP - request handoff | Same file, same sections |
162
153
 
163
- ### Agent Capability Routing
154
+ ### Parallel Work Patterns
155
+
156
+ ```bash
157
+ # CORRECT: Independent droids can run in parallel
158
+ Task(subagent_type: "code-quality-guardian", ...)
159
+ Task(subagent_type: "security-auditor", ...) # Runs concurrently
160
+ Task(subagent_type: "performance-optimizer", ...) # Runs concurrently
161
+
162
+ # CORRECT: Coordinate merge order for overlapping changes
163
+ # Agent A finishes first โ†’ merges first
164
+ # Agent B rebases โ†’ merges second
165
+ ```
164
166
 
165
- Route tasks to specialized droids for optimal results:
167
+ ### Agent Capability Routing
166
168
 
167
169
  | Task Type | Route To | Capabilities |
168
170
  |-----------|----------|--------------|
@@ -173,8 +175,6 @@ Route tasks to specialized droids for optimal results:
173
175
  | Documentation | `documentation-expert` | jsdoc, readme, api-docs |
174
176
  | Code quality | `code-quality-guardian` | complexity, naming, solid |
175
177
 
176
- **Missing expert?** Generate one: `uam droids add <name> --capabilities "..." --triggers "..."`
177
-
178
178
  ---
179
179
 
180
180
  ## ๐Ÿ“‹ MANDATORY DECISION LOOP
@@ -184,75 +184,87 @@ Route tasks to specialized droids for optimal results:
184
184
  โ”‚ EXECUTE FOR EVERY TASK โ”‚
185
185
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
186
186
  โ”‚ โ”‚
187
- โ”‚ 1. MEMORY โ”‚ Do not begin without: uam memory query "<keywords>"โ”‚
188
- โ”‚ โ”‚ Check for relevant past context โ”‚
187
+ โ”‚ 1. MEMORY โ”‚ sqlite3 {{MEMORY_DB_PATH}} "...LIMIT 20" โ”‚
188
+ โ”‚ โ”‚ {{MEMORY_QUERY_CMD}} "<keywords>" โ”‚
189
+ โ”‚ โ”‚ Check session_memories for current context โ”‚
189
190
  โ”‚ โ”‚
190
- โ”‚ 2. AGENTS โ”‚ Do not claim without: uam agent overlaps โ”‚
191
+ โ”‚ 2. AGENTS โ”‚ uam agent overlaps --resource "<files>" โ”‚
191
192
  โ”‚ โ”‚ If overlap: coordinate or wait โ”‚
192
193
  โ”‚ โ”‚
193
194
  โ”‚ 3. SKILLS โ”‚ Check {{SKILLS_PATH}} for applicable skill โ”‚
194
- โ”‚ โ”‚ Missing skill? Generate: uam droids add โ”‚
195
195
  โ”‚ โ”‚ Invoke BEFORE implementing โ”‚
196
196
  โ”‚ โ”‚
197
- โ”‚ 4. WORKTREE โ”‚ Do not commit to {{DEFAULT_BRANCH}} โ”‚
198
- โ”‚ โ”‚ {{WORKTREE_CREATE_CMD}} <slug> โ”‚
199
- โ”‚ โ”‚ cd {{WORKTREE_DIR}}/NNN-<slug>/ โ”‚
197
+ โ”‚ 4. WORKTREE โ”‚ {{WORKTREE_CREATE_CMD}} <slug> โ”‚
198
+ โ”‚ โ”‚ cd {{WORKTREE_DIR}}/NNN-<slug>/ โ”‚
199
+ โ”‚ โ”‚ NEVER commit to {{DEFAULT_BRANCH}} โ”‚
200
200
  โ”‚ โ”‚
201
- โ”‚ 5. CODE โ”‚ Apply CODE FIELD constraints (above) โ”‚
202
- โ”‚ โ”‚ State assumptions โ†’ Implement โ†’ Test โ”‚
201
+ โ”‚ 5. WORK โ”‚ Implement โ†’ Test โ†’ {{WORKTREE_PR_CMD}} โ”‚
203
202
  โ”‚ โ”‚
204
- โ”‚ 6. PR โ”‚ Do not merge with failing tests โ”‚
205
- โ”‚ โ”‚ {{WORKTREE_PR_CMD}} โ†’ parallel reviews โ”‚
203
+ โ”‚ 6. MEMORY โ”‚ Update short-term after actions โ”‚
204
+ โ”‚ โ”‚ Update session_memories for decisions โ”‚
205
+ โ”‚ โ”‚ Store lessons in long-term (importance 7+) โ”‚
206
206
  โ”‚ โ”‚
207
- โ”‚ 7. MEMORY โ”‚ Do not complete without storing learnings โ”‚
208
- โ”‚ โ”‚ uam memory store "lesson" --importance 7+ โ”‚
207
+ โ”‚ 7. VERIFY โ”‚ โ˜ Memory โ˜ Worktree โ˜ PR โ˜ Skills โ˜ Agents โ”‚
209
208
  โ”‚ โ”‚
210
209
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
211
210
  ```
212
211
 
213
212
  ---
214
213
 
215
- ## ๐Ÿง  ENDLESS CONTEXT - PROJECT MEMORY SYSTEM
216
-
217
- **Your context is NOT limited to this conversation.**
218
-
219
- Memory persists with the project, enabling:
220
- - Recall of decisions from weeks/months ago
221
- - Learning from past mistakes (gotchas)
222
- - Understanding of why code is the way it is
223
- - Handoff between sessions without information loss
214
+ ## ๐Ÿง  FOUR-LAYER MEMORY SYSTEM
224
215
 
225
216
  ```
226
217
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
227
- โ”‚ L1: WORKING โ”‚ Recent actions โ”‚ {{SHORT_TERM_LIMIT}} max โ”‚ SQLite โ”‚
228
- โ”‚ L2: SESSION โ”‚ Current session โ”‚ Per session โ”‚ SQLite โ”‚
229
- โ”‚ L3: SEMANTIC โ”‚ Long-term learnings โ”‚ {{LONG_TERM_BACKEND}} โ”‚ Vector searchโ”‚
230
- โ”‚ L4: KNOWLEDGE โ”‚ Entity relationships โ”‚ SQLite โ”‚ Graph โ”‚
218
+ โ”‚ L1: WORKING โ”‚ SQLite memories โ”‚ {{SHORT_TERM_LIMIT}} max โ”‚ <1ms โ”‚
219
+ โ”‚ L2: SESSION โ”‚ SQLite session_mem โ”‚ Current session โ”‚ <5ms โ”‚
220
+ โ”‚ L3: SEMANTIC โ”‚ {{LONG_TERM_BACKEND}}โ”‚ Vector search โ”‚ ~50ms โ”‚
221
+ โ”‚ L4: KNOWLEDGE โ”‚ SQLite entities โ”‚ Graph relationships โ”‚ <20ms โ”‚
231
222
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
232
223
  ```
233
224
 
234
- ### When to Store Memories
225
+ ### Layer Selection
235
226
 
236
- | Situation | Action |
237
- |-----------|--------|
238
- | Learned something reusable | `uam memory store "lesson" --importance 8` |
239
- | Fixed a tricky bug | `uam memory store "bug fix" --tags bug-fix --importance 7` |
240
- | Discovered a gotcha | `uam memory store "gotcha" --tags gotcha --importance 9` |
241
- | Made architectural decision | `uam memory store "decision: X because Y" --importance 8` |
227
+ | Question | YES โ†’ Layer |
228
+ |----------|-------------|
229
+ | Just did this (last few minutes)? | L1: Working |
230
+ | Session-specific decision/context? | L2: Session |
231
+ | Reusable learning for future? | L3: Semantic |
232
+ | Entity relationships? | L4: Knowledge Graph |
242
233
 
243
- ### When to Query Memories
234
+ ### Memory Commands
244
235
 
245
- | Situation | Action |
246
- |-----------|--------|
247
- | Starting ANY new work | `uam memory query "relevant keywords"` |
248
- | Debugging unfamiliar code | `uam memory query "similar error"` |
249
- | Understanding past decisions | `uam memory query "why we did X"` |
236
+ ```bash
237
+ # L1: Working Memory
238
+ sqlite3 {{MEMORY_DB_PATH}} "INSERT INTO memories (timestamp,type,content) VALUES (datetime('now'),'action','...');"
239
+
240
+ # L2: Session Memory
241
+ sqlite3 {{MEMORY_DB_PATH}} "INSERT INTO session_memories (session_id,timestamp,type,content,importance) VALUES ('current',datetime('now'),'decision','...',7);"
242
+
243
+ # L3: Semantic Memory
244
+ {{MEMORY_STORE_CMD}} lesson "..." --tags t1,t2 --importance 8
245
+
246
+ # L4: Knowledge Graph
247
+ sqlite3 {{MEMORY_DB_PATH}} "INSERT INTO entities (type,name,first_seen,last_seen,mention_count) VALUES ('file','x.ts',datetime('now'),datetime('now'),1);"
248
+ sqlite3 {{MEMORY_DB_PATH}} "INSERT INTO relationships (source_id,target_id,relation,timestamp) VALUES (1,2,'depends_on',datetime('now'));"
249
+ ```
250
+
251
+ ### Consolidation Rules
252
+
253
+ - **Trigger**: Every 10 working memory entries
254
+ - **Action**: Summarize โ†’ session_memories, Extract lessons โ†’ semantic memory
255
+ - **Dedup**: Skip if content_hash exists OR similarity > 0.92
256
+
257
+ ### Decay Formula
258
+
259
+ ```
260
+ effective_importance = importance ร— (0.95 ^ days_since_access)
261
+ ```
250
262
 
251
263
  ---
252
264
 
253
265
  ## ๐ŸŒณ WORKTREE WORKFLOW
254
266
 
255
- **Do not commit to {{DEFAULT_BRANCH}}. NO EXCEPTIONS.**
267
+ **ALL code changes use worktrees. NO EXCEPTIONS.**
256
268
 
257
269
  ```bash
258
270
  # Create
@@ -309,7 +321,7 @@ Task(subagent_type: "documentation-expert", prompt: "Check: <files>")
309
321
  | feature request | `uam task create --type feature` |
310
322
  | code file for editing | check overlaps โ†’ skills โ†’ worktree |
311
323
  | review/check/look | query memory first |
312
- | ANY code change | apply CODE FIELD, tests required |
324
+ | ANY code change | tests required |
313
325
 
314
326
  ---
315
327
 
@@ -327,32 +339,20 @@ Task(subagent_type: "documentation-expert", prompt: "Check: <files>")
327
339
 
328
340
  {{{ARCHITECTURE_OVERVIEW}}}
329
341
 
330
- ---
331
342
  {{/if}}
332
-
333
343
  {{#if CORE_COMPONENTS}}
334
344
  ## ๐Ÿ”ง Components
335
345
 
336
346
  {{{CORE_COMPONENTS}}}
337
347
 
338
- ---
339
348
  {{/if}}
340
-
341
- {{#if DATABASE_ARCHITECTURE}}
342
- ## ๐Ÿ—„๏ธ Database
343
-
344
- {{{DATABASE_ARCHITECTURE}}}
345
-
346
- ---
347
- {{/if}}
348
-
349
349
  {{#if AUTH_FLOW}}
350
350
  ## ๐Ÿ” Authentication
351
351
 
352
352
  {{{AUTH_FLOW}}}
353
353
 
354
- ---
355
354
  {{/if}}
355
+ ---
356
356
 
357
357
  ## ๐Ÿ“‹ Quick Reference
358
358
 
@@ -361,33 +361,27 @@ Task(subagent_type: "documentation-expert", prompt: "Check: <files>")
361
361
  ```bash
362
362
  {{{CLUSTER_CONTEXTS}}}
363
363
  ```
364
+
364
365
  {{/if}}
366
+ {{#if PROJECT_URLS}}
367
+ ### URLs
368
+ {{{PROJECT_URLS}}}
365
369
 
370
+ {{/if}}
366
371
  {{#if KEY_WORKFLOWS}}
367
372
  ### Workflows
368
373
  ```
369
374
  {{{KEY_WORKFLOWS}}}
370
375
  ```
371
- {{/if}}
372
376
 
377
+ {{/if}}
378
+ {{#if ESSENTIAL_COMMANDS}}
373
379
  ### Commands
374
380
  ```bash
375
- {{#if TEST_COMMAND}}
376
- # Tests
377
- {{TEST_COMMAND}}
378
- {{/if}}
379
-
380
- {{#if BUILD_COMMAND}}
381
- # Build
382
- {{BUILD_COMMAND}}
383
- {{/if}}
384
-
385
- {{#if LINT_COMMAND}}
386
- # Linting
387
- {{LINT_COMMAND}}
388
- {{/if}}
381
+ {{{ESSENTIAL_COMMANDS}}}
389
382
  ```
390
383
 
384
+ {{/if}}
391
385
  ---
392
386
 
393
387
  {{#if LANGUAGE_DROIDS}}
@@ -395,22 +389,24 @@ Task(subagent_type: "documentation-expert", prompt: "Check: <files>")
395
389
  | Droid | Purpose |
396
390
  |-------|---------|
397
391
  {{{LANGUAGE_DROIDS}}}
398
- {{/if}}
399
392
 
400
- {{#if DISCOVERED_SKILLS}}
401
- ### Skills
402
- | Skill | Purpose | When to Use |
403
- |-------|---------|-------------|
404
- {{{DISCOVERED_SKILLS}}}
405
393
  {{/if}}
394
+ {{#if DISCOVERED_SKILLS}}
395
+ ### Commands
396
+ | Command | Purpose |
397
+ |---------|---------|
398
+ | `/worktree` | Manage worktrees (create, list, pr, cleanup) |
399
+ | `/code-review` | Full parallel review pipeline |
400
+ | `/pr-ready` | Validate branch, create PR |
406
401
 
402
+ {{/if}}
407
403
  {{#if MCP_PLUGINS}}
408
404
  ### MCP Plugins
409
405
  | Plugin | Purpose |
410
406
  |--------|---------|
411
407
  {{{MCP_PLUGINS}}}
412
- {{/if}}
413
408
 
409
+ {{/if}}
414
410
  ---
415
411
 
416
412
  {{#if HAS_INFRA}}
@@ -418,52 +414,47 @@ Task(subagent_type: "documentation-expert", prompt: "Check: <files>")
418
414
 
419
415
  {{{INFRA_WORKFLOW}}}
420
416
 
421
- ---
422
417
  {{/if}}
423
-
424
418
  ## ๐Ÿงช Testing Requirements
425
-
426
419
  1. Create worktree
427
- 2. Apply CODE FIELD (state assumptions first)
428
- 3. Update/create tests
429
- 4. Run `{{TEST_COMMAND}}`
430
- {{#if LINT_COMMAND}}
431
- 5. Run `{{LINT_COMMAND}}`
432
- {{/if}}
433
- 6. Create PR (do not merge with failing tests)
420
+ 2. Update/create tests
421
+ 3. Run `{{TEST_COMMAND}}`
422
+ 4. Run linting
423
+ 5. Create PR
434
424
 
435
425
  ---
436
426
 
437
427
  {{#if TROUBLESHOOTING}}
438
428
  ## ๐Ÿ”ง Troubleshooting
439
-
440
429
  {{{TROUBLESHOOTING}}}
441
430
 
442
- ---
443
431
  {{/if}}
444
-
445
- {{#if KEY_CONFIG_FILES}}
446
432
  ## โš™๏ธ Config Files
447
-
448
433
  | File | Purpose |
449
434
  |------|---------|
435
+ {{#if KEY_CONFIG_FILES}}
450
436
  {{{KEY_CONFIG_FILES}}}
437
+ {{else}}
438
+ | `README.md` | Project documentation |
439
+ | `.uam.json` | UAM agent memory configuration |
440
+ | `package.json` | Node.js project configuration |
441
+ | `tsconfig.json` | TypeScript configuration |
442
+ | `.gitignore` | Git ignore patterns |
443
+ {{/if}}
451
444
 
452
445
  ---
453
- {{/if}}
454
446
 
455
447
  ## โœ… Completion Checklist
456
448
 
457
449
  ```
458
- โ˜ Memory queried before starting
459
- โ˜ CODE FIELD applied (assumptions stated)
460
450
  โ˜ Tests pass
461
451
  โ˜ Lint/typecheck pass
462
452
  โ˜ Worktree used (not {{DEFAULT_BRANCH}})
463
- โ˜ Learnings stored in memory
464
- โ˜ PR created with parallel reviews
453
+ โ˜ Memory updated
454
+ โ˜ PR created
455
+ โ˜ Parallel reviews passed
465
456
  {{#if HAS_INFRA}}
466
- โ˜ Infrastructure plan verified
457
+ โ˜ Terraform plan verified
467
458
  {{/if}}
468
459
  โ˜ No secrets in code
469
460
  ```
@@ -498,24 +489,23 @@ Task(subagent_type: "documentation-expert", prompt: "Check: <files>")
498
489
  โ”‚ โ”‚
499
490
  โ”‚ 4. FIX (if issues found) โ”‚
500
491
  โ”‚ โ”œโ”€ Create new worktree for fix โ”‚
501
- โ”‚ โ”œโ”€ Apply CODE FIELD for fix โ”‚
492
+ โ”‚ โ”œโ”€ Fix the issue โ”‚
502
493
  โ”‚ โ”œโ”€ GOTO step 1 (Merge) โ”‚
503
494
  โ”‚ โ””โ”€ Repeat until 100% working โ”‚
504
495
  โ”‚ โ”‚
505
496
  โ”‚ 5. COMPLETE โ”‚
506
- โ”‚ โ”œโ”€ Do not skip: uam memory store "what I learned" โ”‚
497
+ โ”‚ โ”œโ”€ Update memory with learnings โ”‚
507
498
  โ”‚ โ”œโ”€ Close related tasks/issues โ”‚
508
499
  โ”‚ โ””โ”€ Announce completion โ”‚
509
500
  โ”‚ โ”‚
510
501
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
511
502
  ```
512
503
 
513
- **โš ๏ธ Do not say "done" or "complete" until:**
504
+ **โš ๏ธ NEVER say "done" or "complete" until:**
514
505
  - PR is merged (not just created)
515
506
  - Deployment succeeded (not just triggered)
516
507
  - Functionality verified working (not just "should work")
517
508
  - All errors/issues fixed (iterate as needed)
518
- - Learnings stored in memory
519
509
 
520
510
  **Commands for completion:**
521
511
  ```bash
@@ -530,7 +520,7 @@ gh run view <run-id>
530
520
 
531
521
  # If issues found, fix immediately
532
522
  {{WORKTREE_CREATE_CMD}} hotfix-<issue>
533
- # ... apply CODE FIELD, fix, test, PR, merge, repeat
523
+ # ... fix, test, PR, merge, repeat
534
524
  ```
535
525
 
536
526
  ---
@@ -541,22 +531,31 @@ gh run view <run-id>
541
531
  {{#if RECENT_ACTIVITY}}
542
532
  ### Recent Activity
543
533
  {{{RECENT_ACTIVITY}}}
544
- {{/if}}
545
534
 
535
+ {{/if}}
546
536
  {{#if LEARNED_LESSONS}}
547
537
  ### Lessons
548
538
  {{{LEARNED_LESSONS}}}
549
- {{/if}}
550
539
 
540
+ {{/if}}
551
541
  {{#if KNOWN_GOTCHAS}}
552
542
  ### Gotchas
553
543
  {{{KNOWN_GOTCHAS}}}
554
- {{/if}}
555
544
 
545
+ {{/if}}
556
546
  {{#if HOT_SPOTS}}
557
547
  ### Hot Spots
558
548
  {{{HOT_SPOTS}}}
549
+
559
550
  {{/if}}
560
551
  {{/if}}
561
-
562
552
  </coding_guidelines>
553
+
554
+ ---
555
+
556
+ ## Repository Structure
557
+
558
+ ```
559
+ {{PROJECT_NAME}}/
560
+ {{{REPOSITORY_STRUCTURE}}}
561
+ ```