universal-agent-memory 1.0.15 → 1.0.17
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/package.json +1 -1
- package/templates/CLAUDE.template.md +123 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-agent-memory",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
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,7 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
CLAUDE.md Universal Template - v10.
|
|
2
|
+
CLAUDE.md Universal Template - v10.12
|
|
3
3
|
|
|
4
4
|
CHANGES IN THIS VERSION:
|
|
5
|
+
- SECRETS CLARIFICATION: All secrets in GitHub, secret-dependent ops MUST use pipelines
|
|
6
|
+
- Ephemeral pipelines for one-time secret operations (self-destruct after run)
|
|
7
|
+
- Local testing limited to non-secret operations (read-only kubectl, cloud console)
|
|
8
|
+
- Clear pipeline routing table for secret-dependent operations
|
|
9
|
+
|
|
10
|
+
PREVIOUS (v10.11):
|
|
11
|
+
- INFRASTRUCTURE POLICY UPDATE: Local testing now ALLOWED for proving solutions
|
|
12
|
+
- IaC parity MANDATORY before completion (test locally, then codify in IaC)
|
|
13
|
+
- Two-phase workflow: Phase 1 (local proof) → Phase 2 (IaC parity verification)
|
|
14
|
+
- Parity verification checklist with state diff confirmation
|
|
15
|
+
- Updated completion checklist for infrastructure tasks
|
|
16
|
+
|
|
17
|
+
PREVIOUS (v10.10):
|
|
5
18
|
- PROJECT.md SEPARATION: Project-specific content can now be in .factory/PROJECT.md
|
|
6
19
|
- Seamless template upgrades without merge conflicts
|
|
7
20
|
- Generator auto-detects PROJECT.md and imports as Handlebars partial
|
|
@@ -181,10 +194,10 @@ Under what conditions does this work?
|
|
|
181
194
|
- Solve problems you weren't asked to solve
|
|
182
195
|
- Produce code you wouldn't want to debug at 3am
|
|
183
196
|
{{#if HAS_PIPELINE_POLICY}}
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
197
|
+
- Leave manual infrastructure changes without IaC parity
|
|
198
|
+
- Skip pipeline deployment after local testing
|
|
199
|
+
- Create production secrets via kubectl (use Sealed Secrets)
|
|
200
|
+
- Mark infrastructure work complete without verifying IaC matches live state
|
|
188
201
|
{{/if}}
|
|
189
202
|
|
|
190
203
|
### Expected Output Format
|
|
@@ -198,45 +211,121 @@ Under what conditions does this work?
|
|
|
198
211
|
---
|
|
199
212
|
|
|
200
213
|
{{#if HAS_INFRA}}
|
|
201
|
-
## 🚫
|
|
214
|
+
## 🚫 INFRASTRUCTURE AS CODE POLICY - IaC PARITY REQUIRED
|
|
202
215
|
|
|
203
|
-
**
|
|
216
|
+
**Local testing is ALLOWED for proving solutions. IaC parity is MANDATORY before completion.**
|
|
204
217
|
|
|
205
|
-
###
|
|
218
|
+
### Critical: Secrets Are in GitHub
|
|
219
|
+
|
|
220
|
+
**ALL secrets are stored in GitHub Actions secrets.** Operations requiring secrets MUST use pipelines:
|
|
221
|
+
|
|
222
|
+
| If operation needs... | Use this pipeline |
|
|
223
|
+
|-----------------------|-------------------|
|
|
224
|
+
| Terraform with secrets | `iac-terraform-cicd.yml` or `ops-ephemeral-terraform.yml` |
|
|
225
|
+
| kubectl with secrets | `ops-approved-operations.yml` |
|
|
226
|
+
| One-time secret operation | `ops-create-ephemeral.yml` (self-destructs after run) |
|
|
227
|
+
|
|
228
|
+
**Local commands without secrets** (read-only, public resources) are allowed for testing.
|
|
229
|
+
|
|
230
|
+
### Two-Phase Infrastructure Workflow
|
|
206
231
|
|
|
207
232
|
```
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
233
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
234
|
+
│ PHASE 1: LOCAL PROOF (ALLOWED - NO SECRETS) │
|
|
235
|
+
│ ───────────────────────────────────────────────────────────── │
|
|
236
|
+
│ ✓ kubectl get/describe/logs (read-only operations) │
|
|
237
|
+
│ ✓ terraform plan (uses GitHub pipeline for secrets) │
|
|
238
|
+
│ ✓ Direct cloud console changes for rapid prototyping │
|
|
239
|
+
│ ✓ Manual commands to verify behavior (public resources) │
|
|
240
|
+
│ │
|
|
241
|
+
│ ⚠️ SECRETS REQUIRED? → Use pipeline, not local commands │
|
|
242
|
+
│ │
|
|
243
|
+
│ PURPOSE: Prove the solution works before codifying │
|
|
244
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
245
|
+
│ PHASE 2: IaC PARITY (MANDATORY - VIA PIPELINE) │
|
|
246
|
+
│ ───────────────────────────────────────────────────────────── │
|
|
247
|
+
│ ☐ Translate ALL manual changes to Terraform/Kubernetes YAML │
|
|
248
|
+
│ ☐ Commit IaC changes to feature branch │
|
|
249
|
+
│ ☐ Run `terraform plan` via pipeline (has secrets) │
|
|
250
|
+
│ ☐ Deploy via pipeline to confirm 100% match │
|
|
251
|
+
│ ☐ Delete any manual/ephemeral resources │
|
|
252
|
+
│ │
|
|
253
|
+
│ RULE: Work is NOT complete until IaC matches live state │
|
|
254
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Core Principle
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
Local testing proves the solution. IaC ensures reproducibility.
|
|
261
|
+
Manual changes are TEMPORARY. IaC changes are PERMANENT.
|
|
262
|
+
If it's not in IaC, it doesn't exist (will be destroyed/lost).
|
|
263
|
+
Secrets live in GitHub - use pipelines for secret-dependent operations.
|
|
212
264
|
```
|
|
213
265
|
|
|
214
266
|
### Approved Pipelines
|
|
215
267
|
|
|
216
|
-
| Task | Pipeline | Trigger |
|
|
217
|
-
|
|
218
|
-
| Kubernetes operations | `ops-approved-operations.yml` | Manual dispatch |
|
|
219
|
-
| Ephemeral environments | `ops-create-ephemeral.yml` | Manual dispatch |
|
|
220
|
-
| Terraform changes | `iac-terraform-cicd.yml` | PR to main |
|
|
221
|
-
| Ephemeral Terraform | `ops-ephemeral-terraform.yml` | Manual dispatch |
|
|
268
|
+
| Task | Pipeline | Trigger | Notes |
|
|
269
|
+
|------|----------|---------|-------|
|
|
270
|
+
| Kubernetes operations | `ops-approved-operations.yml` | Manual dispatch | Has cluster secrets |
|
|
271
|
+
| Ephemeral environments | `ops-create-ephemeral.yml` | Manual dispatch | Self-destructs after run |
|
|
272
|
+
| Terraform changes | `iac-terraform-cicd.yml` | PR to main | Has TF secrets |
|
|
273
|
+
| Ephemeral Terraform | `ops-ephemeral-terraform.yml` | Manual dispatch | One-time TF operations |
|
|
222
274
|
|
|
223
|
-
### One-Time Operations
|
|
275
|
+
### Using Ephemeral Pipelines for One-Time Operations
|
|
276
|
+
|
|
277
|
+
For operations that need secrets but are one-time (migrations, testing, data fixes):
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Create ephemeral pipeline that self-destructs after completion
|
|
281
|
+
gh workflow run ops-create-ephemeral.yml \
|
|
282
|
+
-f operation_name="test-new-config" \
|
|
283
|
+
-f commands="terraform apply -target=module.new_feature"
|
|
284
|
+
|
|
285
|
+
# Pipeline runs with secrets, then self-removes
|
|
286
|
+
```
|
|
224
287
|
|
|
225
|
-
|
|
288
|
+
### Parity Verification Checklist
|
|
226
289
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
290
|
+
Before marking infrastructure work complete:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
# 1. Capture current state (after testing via pipeline)
|
|
294
|
+
kubectl get all -n <namespace> -o yaml > /tmp/current-state.yaml
|
|
295
|
+
|
|
296
|
+
# 2. Destroy test resources (via pipeline if secrets needed)
|
|
297
|
+
gh workflow run ops-approved-operations.yml \
|
|
298
|
+
-f operation="delete" \
|
|
299
|
+
-f target="test-resources"
|
|
300
|
+
|
|
301
|
+
# 3. Apply ONLY from IaC (via pipeline - has secrets)
|
|
302
|
+
# Push IaC changes → PR → iac-terraform-cicd.yml runs automatically
|
|
303
|
+
|
|
304
|
+
# 4. Verify parity - must produce IDENTICAL state
|
|
305
|
+
kubectl get all -n <namespace> -o yaml > /tmp/iac-state.yaml
|
|
306
|
+
diff /tmp/current-state.yaml /tmp/iac-state.yaml # Should be empty
|
|
307
|
+
```
|
|
231
308
|
|
|
232
309
|
### What This Means for Agents
|
|
233
310
|
|
|
234
|
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
|
|
311
|
+
**PHASE 1 - Local Testing (ALLOWED for non-secret operations):**
|
|
312
|
+
- ✓ Run read-only commands: `kubectl get`, `kubectl describe`, `kubectl logs`
|
|
313
|
+
- ✓ Run `terraform plan` via pipeline (needs secrets)
|
|
314
|
+
- ✓ Make cloud console changes to prototype
|
|
315
|
+
- ✓ Use ephemeral pipelines for secret-dependent testing
|
|
316
|
+
|
|
317
|
+
**PHASE 2 - IaC Parity (MANDATORY - always via pipeline):**
|
|
318
|
+
- ☐ ALL manual changes MUST be translated to IaC (Terraform/K8s YAML)
|
|
319
|
+
- ☐ IaC MUST be committed to version control
|
|
320
|
+
- ☐ Deployment MUST go through CI/CD pipeline (has secrets)
|
|
321
|
+
- ☐ Final state MUST match IaC exactly (verify with diff)
|
|
322
|
+
- ☐ Manual/ephemeral resources MUST be cleaned up
|
|
323
|
+
|
|
324
|
+
**NEVER:**
|
|
325
|
+
- Run `terraform apply` locally (no secrets available)
|
|
326
|
+
- Run `kubectl apply` with secret-dependent resources locally
|
|
327
|
+
- Create secrets via `kubectl create secret` (use Sealed Secrets)
|
|
328
|
+
- Hardcode or expose secrets in code/logs
|
|
240
329
|
|
|
241
330
|
📖 See: `docs/adr/ADR-0006-pipeline-only-infrastructure-changes.md`
|
|
242
331
|
|
|
@@ -1367,9 +1456,10 @@ kubectl create secret ...
|
|
|
1367
1456
|
☐ Terraform plan verified
|
|
1368
1457
|
{{/if}}
|
|
1369
1458
|
{{#if HAS_PIPELINE_POLICY}}
|
|
1370
|
-
☐
|
|
1371
|
-
☐
|
|
1372
|
-
☐
|
|
1459
|
+
☐ IaC parity verified (manual changes translated to Terraform/K8s YAML)
|
|
1460
|
+
☐ Final deployment via pipeline (iac-terraform-cicd.yml)
|
|
1461
|
+
☐ State diff confirmed empty (IaC matches live)
|
|
1462
|
+
☐ Manual/ephemeral resources cleaned up
|
|
1373
1463
|
{{/if}}
|
|
1374
1464
|
☐ No secrets in code
|
|
1375
1465
|
```
|