@shahmilsaari/memory-core 1.0.32 → 1.0.35

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 (53) hide show
  1. package/README.md +8 -6
  2. package/dist/{approval-queue-YBYRGBHP.js → approval-queue-4RK46FNE.js} +2 -1
  3. package/dist/{ast-analyzer-JM4CIOFY.js → ast-analyzer-WGTJKGAP.js} +1 -0
  4. package/dist/{check-cache-6NWRTZJD.js → check-cache-ZVFHTA2C.js} +1 -0
  5. package/dist/{check-logger-5HYSWA3S.js → check-logger-F4DW4LBY.js} +1 -0
  6. package/dist/chunk-2LNDQGDD.js +37 -0
  7. package/dist/{chunk-23GUWJ6F.js → chunk-4QWIYO2G.js} +3071 -3271
  8. package/dist/{chunk-GIPKVQSA.js → chunk-5T2QBBYT.js} +3 -29
  9. package/dist/chunk-FPRSYCOZ.js +77 -0
  10. package/dist/chunk-HJCPBM7B.js +238 -0
  11. package/dist/chunk-K3NQKI34.js +10 -0
  12. package/dist/chunk-SKR44CRD.js +35 -0
  13. package/dist/{chunk-W6WEAV3S.js → chunk-UMYJQWIE.js} +13 -11
  14. package/dist/{chunk-PQBWHAZN.js → chunk-XAE3RY5D.js} +5 -2
  15. package/dist/{classifier-MZ65R7FK.js → classifier-D5K3X7FQ.js} +1 -0
  16. package/dist/cli.js +244 -80
  17. package/dist/{confidence-gate-ZQDAOS6P.js → confidence-gate-AT2MW4NK.js} +8 -6
  18. package/dist/dashboard/assets/index-BcDOsQwz.css +1 -0
  19. package/dist/dashboard/assets/index-DGx4sRHq.js +2 -0
  20. package/dist/dashboard/index.html +2 -2
  21. package/dist/{dashboard-server-MD6NVL2F.js → dashboard-server-UBZHOPRC.js} +274 -21
  22. package/dist/{db-FLFZZXG3.js → db-RE23O4DV.js} +3 -1
  23. package/dist/{deterministic-validator-PP56B46I.js → deterministic-validator-3LB234OG.js} +1 -0
  24. package/dist/draft-rule-NUXOSRRS.js +11 -0
  25. package/dist/embedding-VIMV6O2P.js +9 -0
  26. package/dist/{evidence-HVMSONTT.js → evidence-WFMGWSOP.js} +1 -0
  27. package/dist/{graph-TFNTB5OK.js → graph-UJJAKNHD.js} +1 -0
  28. package/dist/{incident-capture-RVPZULS7.js → incident-capture-5YUVJJM3.js} +11 -0
  29. package/dist/mcp-server-3N7R46BS.js +14958 -0
  30. package/dist/memory-selection-A5CQ6ZT5.js +29 -0
  31. package/dist/{deepseek-critique-MALVIYGF.js → model-critique-E2GNZ42U.js} +18 -32
  32. package/dist/{ollama-judge-D2LFK5PB.js → ollama-judge-6ZEZN4JV.js} +29 -41
  33. package/dist/{rate-limiter-SLIPCXRF.js → rate-limiter-KIMXTAAU.js} +1 -0
  34. package/dist/{rules-V3QMN3AR.js → rules-UUVIKEDM.js} +1 -0
  35. package/dist/{watch-errors-B3FA26N4.js → watch-errors-DZMW3CFN.js} +28 -33
  36. package/package.json +2 -1
  37. package/templates/AGENTS.md.hbs +11 -27
  38. package/templates/AI_RULES.md.hbs +9 -23
  39. package/templates/ARCHITECTURE.md.hbs +9 -30
  40. package/templates/CLAUDE.md.hbs +10 -35
  41. package/templates/DEVIN.md.hbs +7 -16
  42. package/templates/PROJECT_MEMORY.md.hbs +5 -21
  43. package/templates/amazonq-guidelines.md.hbs +7 -16
  44. package/templates/clinerules.hbs +8 -17
  45. package/templates/copilot-instructions.md.hbs +7 -16
  46. package/templates/cursor-rule.mdc.hbs +4 -9
  47. package/templates/cursorrules.hbs +8 -14
  48. package/templates/gemini-styleguide.md.hbs +7 -16
  49. package/templates/jetbrains-ai.md.hbs +6 -15
  50. package/templates/roo-rule.md.hbs +6 -15
  51. package/templates/windsurfrules.hbs +9 -18
  52. package/dist/dashboard/assets/index-BFwqVRYO.js +0 -2
  53. package/dist/dashboard/assets/index-y7eHWJtq.css +0 -1
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ buildContextQuery,
4
+ dedupeMemories,
5
+ explainMemorySelection,
6
+ filterRelevantMemories,
7
+ getAllowPatterns,
8
+ inferProjectArchitectures,
9
+ retrieveContextualMemories,
10
+ retrieveMemorySelection,
11
+ similarityScore
12
+ } from "./chunk-4QWIYO2G.js";
13
+ import "./chunk-ZZBQEXEO.js";
14
+ import "./chunk-SKR44CRD.js";
15
+ import "./chunk-5T2QBBYT.js";
16
+ import "./chunk-2LNDQGDD.js";
17
+ import "./chunk-XAE3RY5D.js";
18
+ import "./chunk-K3NQKI34.js";
19
+ export {
20
+ buildContextQuery,
21
+ dedupeMemories,
22
+ explainMemorySelection,
23
+ filterRelevantMemories,
24
+ getAllowPatterns,
25
+ inferProjectArchitectures,
26
+ retrieveContextualMemories,
27
+ retrieveMemorySelection,
28
+ similarityScore
29
+ };
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callChatModel
4
- } from "./chunk-PQBWHAZN.js";
4
+ } from "./chunk-XAE3RY5D.js";
5
+ import "./chunk-K3NQKI34.js";
5
6
 
6
- // src/models/deepseek-critique.ts
7
- function loadDeepSeekConfig(_configDir) {
7
+ // src/models/model-critique.ts
8
+ function loadCritiqueConfig(_configDir) {
8
9
  return {};
9
10
  }
10
- var DeepSeekCritique = class {
11
+ var ModelCritique = class {
11
12
  constructor(_config) {
12
13
  }
13
14
  async critique(packet, primaryDecision) {
@@ -15,7 +16,8 @@ var DeepSeekCritique = class {
15
16
  const result = await callChatModel([
16
17
  {
17
18
  role: "system",
18
- content: "You are an expert architecture reviewer. Validate or override model decisions based only on the provided evidence. Return ONLY valid JSON."
19
+ content: "Validate architecture review decisions. Return valid JSON only.",
20
+ cache: true
19
21
  },
20
22
  {
21
23
  role: "user",
@@ -34,32 +36,16 @@ var DeepSeekCritique = class {
34
36
  }
35
37
  };
36
38
  function buildCritiquePrompt(packet, primary) {
37
- return `Validate this architecture review decision.
39
+ const parts = [
40
+ `Primary: ${primary.decision}(${primary.confidence}) ${primary.reasoning}`,
41
+ `Violations: ${primary.violations.join(",") || "none"}`
42
+ ];
43
+ if (packet.changedFiles.length > 0) parts.push(`Files: ${packet.changedFiles.map((f) => f.file).join(",")}`);
44
+ if (packet.violations.length > 0) parts.push(`Detected: ${packet.violations.map((v) => v.rule.name).join(",")}`);
45
+ if (packet.graphViolations.length > 0) parts.push(`Graph: ${packet.graphViolations.map((v) => v.ruleName).join(",")}`);
46
+ return `${parts.join("\n")}
38
47
 
39
- PRIMARY DECISION:
40
- - Decision: ${primary.decision}
41
- - Confidence: ${primary.confidence}
42
- - Reasoning: ${primary.reasoning}
43
- - Violations cited: ${primary.violations.join(", ") || "none"}
44
-
45
- EVIDENCE SUMMARY:
46
- - Changed files: ${packet.changedFiles.map((f) => `${f.file} (${f.layer})`).join(", ") || "none"}
47
- - Violations: ${packet.violations.map((v) => `${v.rule.name}: ${v.fromFile} \u2192 ${v.toFile}`).join(", ") || "none"}
48
- - Graph violations: ${packet.graphViolations.map((v) => v.ruleName).join(", ") || "none"}
49
- - Matched rules: ${packet.matchedRules.map((r) => r.name).join(", ") || "none"}
50
-
51
- TASK:
52
- 1. Is the primary decision supported by the evidence?
53
- 2. Were any violations missed?
54
- 3. Should the decision be overridden?
55
-
56
- Return ONLY this JSON, no other text:
57
- {
58
- "decision": "allow",
59
- "confidence": 0.9,
60
- "reasoning": "",
61
- "override": false
62
- }`;
48
+ Return JSON: {"decision":"allow|warn|block","confidence":0.X,"reasoning":"","override":false}`;
63
49
  }
64
50
  function parseDecision(raw, fallback) {
65
51
  try {
@@ -77,6 +63,6 @@ function parseDecision(raw, fallback) {
77
63
  }
78
64
  }
79
65
  export {
80
- DeepSeekCritique,
81
- loadDeepSeekConfig
66
+ ModelCritique,
67
+ loadCritiqueConfig
82
68
  };
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callChatModel
4
- } from "./chunk-PQBWHAZN.js";
4
+ } from "./chunk-XAE3RY5D.js";
5
+ import "./chunk-K3NQKI34.js";
5
6
 
6
7
  // src/models/ollama-judge.ts
7
8
  function loadOllamaConfig(_configDir) {
@@ -38,7 +39,8 @@ var OllamaJudge = class {
38
39
  const result = await withRetry(() => callChatModel([
39
40
  {
40
41
  role: "system",
41
- content: "You are an architecture review system. Analyze evidence and return ONLY valid JSON with no extra text."
42
+ content: "Architecture reviewer. Return valid JSON only \u2014 no markdown, no explanation outside JSON.",
43
+ cache: true
42
44
  },
43
45
  {
44
46
  role: "user",
@@ -52,45 +54,31 @@ var OllamaJudge = class {
52
54
  }
53
55
  };
54
56
  function buildPrompt(packet, memories = []) {
55
- const memoriesSection = memories.length > 0 ? `
56
- PROJECT RULES FROM MEMORY:
57
- ${memories.map((m) => `- [${m.type}] ${m.content}${m.reason ? ` (reason: ${m.reason})` : ""}`).join("\n")}
58
- ` : "";
59
- return `Analyze the following architecture evidence and return ONLY valid JSON.
60
-
61
- RULES THAT APPLY:
62
- ${packet.matchedRules.map((r) => `- ${r.name} (${r.severity}): ${r.description}`).join("\n") || "None"}
63
- ${memoriesSection}
64
- CHANGED FILES:
65
- ${packet.changedFiles.map((f) => `- ${f.file} (layer: ${f.layer})`).join("\n") || "None"}
66
-
67
- IMPORTS ANALYZED:
68
- ${packet.imports.map((i) => `${i.file}:
69
- ${i.imports.map((imp) => ` - "${imp.module}"${imp.isExternal ? " [external]" : ""}`).join("\n")}`).join("\n") || "None"}
70
-
71
- VIOLATIONS DETECTED:
72
- ${packet.violations.length > 0 ? packet.violations.map((v) => `- ${v.rule.name} (${v.rule.severity}): ${v.fromFile} \u2192 ${v.toFile}`).join("\n") : "None"}
73
-
74
- GRAPH VIOLATIONS:
75
- ${packet.graphViolations.length > 0 ? packet.graphViolations.map((v) => `- ${v.ruleName}: ${v.fromLayer} \u2192 ${v.toLayer}`).join("\n") : "None"}
76
-
77
- TASK:
78
- 1. Do the violations represent real rule breaches?
79
- 2. Are there hidden violations not yet detected?
80
- 3. Is this change safe to merge?
81
-
82
- CONSTRAINTS:
83
- - Only cite evidence from the packet above \u2014 do NOT invent project conventions
84
- - If uncertain, return "warn" not "block"
85
- - Return ONLY this JSON structure, no other text:
86
- {
87
- "decision": "allow",
88
- "confidence": 0.9,
89
- "violations": [],
90
- "evidence": [],
91
- "suggestedFix": "",
92
- "reasoning": ""
93
- }`;
57
+ const parts = [];
58
+ if (packet.matchedRules.length > 0) {
59
+ parts.push(`Rules: ${packet.matchedRules.map((r) => `${r.name}(${r.severity}):${r.description}`).join(" | ")}`);
60
+ }
61
+ if (memories.length > 0) {
62
+ parts.push(`Memory: ${memories.map((m) => m.content).join(" | ")}`);
63
+ }
64
+ if (packet.changedFiles.length > 0) {
65
+ parts.push(`Files: ${packet.changedFiles.map((f) => `${f.file}[${f.layer}]`).join(", ")}`);
66
+ }
67
+ if (packet.imports.length > 0) {
68
+ parts.push(`Imports: ${packet.imports.map((i) => `${i.file}{${i.imports.map((imp) => imp.module).join(",")}}`).join("; ")}`);
69
+ }
70
+ if (packet.violations.length > 0) {
71
+ parts.push(`Violations: ${packet.violations.map((v) => `${v.rule.name}(${v.rule.severity}):${v.fromFile}->${v.toFile}`).join(" | ")}`);
72
+ }
73
+ if (packet.graphViolations.length > 0) {
74
+ parts.push(`Graph: ${packet.graphViolations.map((v) => `${v.ruleName}:${v.fromLayer}->${v.toLayer}`).join(" | ")}`);
75
+ }
76
+ parts.push(
77
+ "Constrain: only evidence from above\u2014no invented rules. If uncertain\u2192warn not block.",
78
+ "Task: real breaches? hidden violations? safe to merge?",
79
+ 'Return JSON: {"decision":"allow|warn|block","confidence":0.X,"violations":[...],"evidence":[...],"suggestedFix":"","reasoning":""}'
80
+ );
81
+ return parts.join("\n");
94
82
  }
95
83
  function parseDecision(raw) {
96
84
  const match = raw.match(/\{[\s\S]*\}/);
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import "./chunk-K3NQKI34.js";
2
3
 
3
4
  // src/core/rate-limiter.ts
4
5
  import { writeFileSync, unlinkSync, existsSync, mkdirSync } from "fs";
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import "./chunk-K3NQKI34.js";
2
3
 
3
4
  // src/core/rules.ts
4
5
  import { existsSync, readFileSync } from "fs";
@@ -1,11 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ApprovalQueue
4
- } from "./chunk-W6WEAV3S.js";
4
+ } from "./chunk-UMYJQWIE.js";
5
+ import {
6
+ draftRuleFallback,
7
+ draftRuleWithAI
8
+ } from "./chunk-FPRSYCOZ.js";
9
+ import "./chunk-XAE3RY5D.js";
10
+ import "./chunk-K3NQKI34.js";
5
11
 
6
12
  // src/automation/watch-errors.ts
7
13
  import { spawn } from "child_process";
8
- import { existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
14
+ import { existsSync, mkdirSync, readFileSync } from "fs";
9
15
  import { join } from "path";
10
16
  function loadWatchConfig(configDir) {
11
17
  const cfgPath = join(configDir, "watch-errors.json");
@@ -26,29 +32,24 @@ function defaultWatchConfig(configDir) {
26
32
  };
27
33
  }
28
34
  var WatchErrors = class {
29
- constructor(config, configDir) {
35
+ constructor(config, configDir, saveToDb) {
30
36
  this.config = config;
31
- this.configDir = configDir;
32
37
  this.queue = new ApprovalQueue(configDir);
38
+ this.saveToDb = saveToDb;
33
39
  if (!existsSync(config.outputDir)) {
34
40
  mkdirSync(config.outputDir, { recursive: true });
35
41
  }
36
42
  }
37
43
  config;
38
- configDir;
39
44
  processes = /* @__PURE__ */ new Map();
40
45
  queue;
46
+ saveToDb;
41
47
  start(onDraft) {
42
48
  for (const cmd of this.config.commands) {
43
49
  const [bin, ...args] = cmd.split(" ");
44
50
  const proc = spawn(bin, args, { shell: true, stdio: ["ignore", "pipe", "pipe"] });
45
51
  const handleLine = (line) => {
46
- const rule = this.analyzeErrorLine(line);
47
- if (rule) {
48
- this.queue.add(rule, "watch", "low");
49
- this.saveRuleToDisk(rule);
50
- onDraft?.(rule);
51
- }
52
+ void this.analyzeLine(line, onDraft);
52
53
  };
53
54
  let buffer = "";
54
55
  const flush = (chunk) => {
@@ -64,32 +65,26 @@ var WatchErrors = class {
64
65
  }
65
66
  }
66
67
  stop() {
67
- for (const proc of this.processes.values()) {
68
- proc.kill();
69
- }
68
+ for (const proc of this.processes.values()) proc.kill();
70
69
  this.processes.clear();
71
70
  }
72
- analyzeErrorLine(line) {
73
- for (const [key, pattern] of Object.entries(this.config.patterns)) {
74
- const match = line.match(new RegExp(pattern.regex));
75
- if (match) {
76
- return {
77
- id: `auto-watch-${Date.now()}`,
78
- name: `[WATCH] ${key}: ${(match[1] ?? "").slice(0, 50)}`,
79
- description: line.trim().slice(0, 200),
80
- fromLayer: "*",
81
- toLayer: "*",
82
- allowed: true,
83
- severity: "low",
84
- enforcement: "suggest"
85
- };
71
+ matchesPattern(line) {
72
+ return Object.values(this.config.patterns).some((p) => new RegExp(p.regex).test(line));
73
+ }
74
+ async analyzeLine(line, onDraft) {
75
+ if (!this.matchesPattern(line)) return;
76
+ const aiResult = await draftRuleWithAI({ context: line.trim(), source: "watch" });
77
+ const { rule, confidence } = aiResult ?? draftRuleFallback({ context: line.trim(), source: "watch" });
78
+ if (confidence === "high" && this.saveToDb) {
79
+ try {
80
+ await this.saveToDb(rule);
81
+ onDraft?.(rule, true);
82
+ return;
83
+ } catch {
86
84
  }
87
85
  }
88
- return null;
89
- }
90
- saveRuleToDisk(rule) {
91
- const filename = join(this.config.outputDir, `${rule.id}.json`);
92
- writeFileSync(filename, JSON.stringify(rule, null, 2));
86
+ this.queue.add(rule, "watch", confidence, { evidence: line.trim().slice(0, 300) });
87
+ onDraft?.(rule, false);
93
88
  }
94
89
  };
95
90
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shahmilsaari/memory-core",
3
- "version": "1.0.32",
3
+ "version": "1.0.35",
4
4
  "description": "Universal AI memory core — generate AI context files from architecture profiles with RAG support",
5
5
  "homepage": "https://memory-core.shahmilsaari.my/",
6
6
  "type": "module",
@@ -33,6 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@inquirer/prompts": "^5.0.0",
36
+ "@modelcontextprotocol/sdk": "^1.29.0",
36
37
  "bcryptjs": "^3.0.3",
37
38
  "chalk": "^5.3.0",
38
39
  "chokidar": "^5.0.0",
@@ -1,41 +1,25 @@
1
1
  # AGENTS.md — {{projectName}}
2
- <!-- Generated by memory-core on {{generatedAt}} — auto-sync keeps this fresh; manual refresh: memory-core sync -->
3
-
4
- **Type:** {{projectType}} | **Language:** {{language}}
5
- {{#if hasBackend}}**Backend:** {{backendArchitecture}}{{/if}}
6
- {{#if hasFrontend}}**Frontend:** {{frontendFramework}}{{/if}}
2
+ <!-- memory-core {{generatedAt}} -->
7
3
 
4
+ **Project:** {{projectName}} · {{projectType}} · {{language}}{{#if hasBackend}} · {{backendArchitecture}}{{/if}}{{#if hasFrontend}} · {{frontendFramework}}{{/if}}
8
5
  {{#if hasBackend}}
9
- ## Backend Rules — {{backendArchitecture}}
6
+ ## Backend — {{backendArchitecture}}
10
7
  {{bullet backendRules}}
11
-
12
- ### Structure
13
- {{bullet backendFolders}}
14
-
15
- ### Never
16
- {{bullet backendAvoid}}
8
+ **Structure:** {{bullet backendFolders}}
9
+ **Never:** {{bullet backendAvoid}}
17
10
  {{/if}}
18
11
  {{#if hasFrontend}}
19
-
20
- ## Frontend Rules — {{frontendFramework}}
12
+ ## Frontend — {{frontendFramework}}
21
13
  {{bullet frontendRules}}
22
-
23
- ### Structure
24
- {{bullet frontendFolders}}
25
-
26
- ### Never
27
- {{bullet frontendAvoid}}
14
+ **Structure:** {{bullet frontendFolders}}
15
+ **Never:** {{bullet frontendAvoid}}
28
16
  {{/if}}
29
17
  {{#if hasMemories}}
30
-
31
- ---
32
- ## Relevant Memory from Previous Projects
18
+ ## Memory
33
19
  {{#each memories}}
34
- {{memoryBlock this}}
20
+ - {{memoryBlock this}}
35
21
  {{/each}}
36
22
  {{/if}}
37
23
  {{#if caveman.enabled}}
38
-
39
- ---
40
- Caveman ({{caveman.intensity}}): terse fragments only.
24
+ **Token mode:** terse fragments only ({{caveman.intensity}})
41
25
  {{/if}}
@@ -1,37 +1,23 @@
1
1
  # AI Rules — {{projectName}}
2
- <!-- Generated by memory-core on {{generatedAt}} -->
3
-
4
- These rules apply to ALL AI agents in this project.
5
-
6
- **Type:** {{projectType}} | **Language:** {{language}}
7
- {{#if hasBackend}}**Backend:** {{backendArchitecture}}{{/if}}
8
- {{#if hasFrontend}}**Frontend:** {{frontendFramework}}{{/if}}
2
+ <!-- memory-core {{generatedAt}} -->
9
3
 
4
+ **Project:** {{projectName}} · {{projectType}} · {{language}}{{#if hasBackend}} · {{backendArchitecture}}{{/if}}{{#if hasFrontend}} · {{frontendFramework}}{{/if}}
10
5
  {{#if hasBackend}}
11
6
  ## Backend — {{backendArchitecture}}
12
- {{numbered backendRules}}
13
-
14
- **Avoid:**
15
- {{bullet backendAvoid}}
7
+ {{bullet backendRules}}
8
+ **Avoid:** {{bullet backendAvoid}}
16
9
  {{/if}}
17
10
  {{#if hasFrontend}}
18
-
19
11
  ## Frontend — {{frontendFramework}}
20
- {{numbered frontendRules}}
21
-
22
- **Avoid:**
23
- {{bullet frontendAvoid}}
12
+ {{bullet frontendRules}}
13
+ **Avoid:** {{bullet frontendAvoid}}
24
14
  {{/if}}
25
15
  {{#if hasMemories}}
26
-
27
- ---
28
- ## Relevant Inherited Decisions
16
+ ## Memory
29
17
  {{#each memories}}
30
- {{memoryBlock this}}
18
+ - {{memoryBlock this}}
31
19
  {{/each}}
32
20
  {{/if}}
33
21
  {{#if caveman.enabled}}
34
-
35
- ---
36
- _Caveman {{caveman.intensity}} active — terse output only._
22
+ **Token mode:** terse fragments only ({{caveman.intensity}})
37
23
  {{/if}}
@@ -1,51 +1,30 @@
1
1
  # Architecture — {{projectName}}
2
- <!-- Generated by memory-core on {{generatedAt}} -->
2
+ <!-- memory-core {{generatedAt}} -->
3
3
 
4
- **Type:** {{projectType}} | **Language:** {{language}}
5
-
6
- ---
4
+ **Type:** {{projectType}} · **Language:** {{language}}
7
5
  {{#if hasBackend}}
8
6
  ## Backend — {{backendArchitecture}}
9
-
10
7
  {{backendDescription}}
11
8
 
12
- ### Rules
9
+ **Rules:**
13
10
  {{numbered backendRules}}
14
11
 
15
- ### Folder Structure
16
- ```
17
- {{#each backendFolders}}
18
- {{this}}/
19
- {{/each}}
20
- ```
21
-
22
- ### Avoid
23
- {{bullet backendAvoid}}
12
+ **Structure:** {{bullet backendFolders}}
13
+ **Avoid:** {{bullet backendAvoid}}
24
14
  {{/if}}
25
15
  {{#if hasFrontend}}
26
-
27
16
  ## Frontend — {{frontendFramework}}
28
-
29
17
  {{frontendDescription}}
30
18
 
31
- ### Rules
19
+ **Rules:**
32
20
  {{numbered frontendRules}}
33
21
 
34
- ### Folder Structure
35
- ```
36
- {{#each frontendFolders}}
37
- {{this}}/
38
- {{/each}}
39
- ```
40
-
41
- ### Avoid
42
- {{bullet frontendAvoid}}
22
+ **Structure:** {{bullet frontendFolders}}
23
+ **Avoid:** {{bullet frontendAvoid}}
43
24
  {{/if}}
44
25
  {{#if hasMemories}}
45
-
46
- ---
47
26
  ## Architectural Decisions
48
27
  {{#each memories}}
49
- {{memoryBlock this}}
28
+ - {{memoryBlock this}}
50
29
  {{/each}}
51
30
  {{/if}}
@@ -1,52 +1,27 @@
1
1
  # CLAUDE.md
2
- <!-- Generated by memory-core on {{generatedAt}} — auto-sync keeps this fresh; manual refresh: memory-core sync -->
2
+ <!-- memory-core {{generatedAt}} -->
3
3
 
4
- ## Project
5
- **Name:** {{projectName}}
6
- **Type:** {{projectType}}
7
- **Language:** {{language}}
8
- {{#if hasBackend}}**Backend:** {{backendArchitecture}}{{/if}}
9
- {{#if hasFrontend}}**Frontend:** {{frontendFramework}}{{/if}}
10
-
11
- ---
4
+ **Project:** {{projectName}} · {{projectType}} · {{language}}{{#if hasBackend}} · {{backendArchitecture}}{{/if}}{{#if hasFrontend}} · {{frontendFramework}}{{/if}}
12
5
  {{#if hasBackend}}
13
- ## Backend — {{backendArchitecture}}
14
- > {{backendDescription}}
15
-
16
- ### Rules
6
+ ## Architecture — {{backendArchitecture}}
17
7
  {{bullet backendRules}}
18
8
 
19
- ### Structure
20
- {{bullet backendFolders}}
21
-
22
- ### Avoid
23
- {{bullet backendAvoid}}
9
+ **Structure:** {{bullet backendFolders}}
10
+ **Avoid:** {{bullet backendAvoid}}
24
11
  {{/if}}
25
12
  {{#if hasFrontend}}
26
-
27
13
  ## Frontend — {{frontendFramework}}
28
- > {{frontendDescription}}
29
-
30
- ### Rules
31
14
  {{bullet frontendRules}}
32
15
 
33
- ### Structure
34
- {{bullet frontendFolders}}
35
-
36
- ### Avoid
37
- {{bullet frontendAvoid}}
16
+ **Structure:** {{bullet frontendFolders}}
17
+ **Avoid:** {{bullet frontendAvoid}}
38
18
  {{/if}}
39
19
  {{#if hasMemories}}
40
-
41
- ---
42
- ## Relevant Memories
20
+ ## Rules
43
21
  {{#each memories}}
44
- {{memoryBlock this}}
22
+ - {{memoryBlock this}}
45
23
  {{/each}}
46
24
  {{/if}}
47
25
  {{#if caveman.enabled}}
48
-
49
- ---
50
- ## Token Optimization
51
- Caveman active ({{caveman.intensity}}). Terse fragments. No summaries unless asked.
26
+ **Token mode:** terse fragments, no summaries unless asked ({{caveman.intensity}})
52
27
  {{/if}}
@@ -1,26 +1,17 @@
1
1
  # DEVIN.md — {{projectName}}
2
- <!-- Generated by memory-core on {{generatedAt}} -->
3
-
4
- ## Architecture
5
- {{architecture}} — {{language}} / {{framework}}
2
+ <!-- memory-core {{generatedAt}} -->
6
3
 
4
+ **Project:** {{projectName}} · {{architecture}} · {{language}} · {{framework}}
7
5
  ## Rules
8
6
  {{bullet rules}}
9
-
10
- ## Structure
11
- {{bullet folders}}
12
-
13
- ## Avoid
14
- {{bullet avoid}}
7
+ **Structure:** {{bullet folders}}
8
+ **Avoid:** {{bullet avoid}}
15
9
  {{#if hasMemories}}
16
-
17
- ## Project Memory
10
+ ## Memory
18
11
  {{#each memories}}
19
- {{memoryBlock this}}
12
+ - {{memoryBlock this}}
20
13
  {{/each}}
21
14
  {{/if}}
22
15
  {{#if caveman.enabled}}
23
-
24
- ## Response Style
25
- Terse. Minimal. No padding. Caveman {{caveman.intensity}}.
16
+ **Token mode:** terse ({{caveman.intensity}})
26
17
  {{/if}}
@@ -1,28 +1,12 @@
1
1
  # Project Memory — {{projectName}}
2
- <!-- Generated by memory-core on {{generatedAt}} — auto-sync keeps this fresh; manual refresh: memory-core sync -->
2
+ <!-- memory-core {{generatedAt}} -->
3
3
 
4
- Architecture: {{architecture}}
5
- Stack: {{language}}
4
+ **Architecture:** {{architecture}} · {{language}}
6
5
  {{#if hasMemories}}
7
-
8
- ## Retrieved Memories
9
- _Pulled from central memory via semantic search on "{{architecture}} {{language}}"_
10
-
6
+ ## Memory
11
7
  {{#each memories}}
12
- {{memoryBlock this}}
13
-
8
+ - {{memoryBlock this}}
14
9
  {{/each}}
15
10
  {{else}}
16
-
17
- ## No memories yet.
18
-
19
- Save your first memory:
20
- ```bash
21
- memory-core remember "Your architectural decision here"
22
- ```
11
+ No memories yet. Run: `memory-core remember "Your architectural decision"`
23
12
  {{/if}}
24
-
25
- ---
26
- _Add memories: `memory-core remember "..."`_
27
- _Search memories: `memory-core search "..."`_
28
- _Auto-sync is enabled by default after memory changes. Manual refresh: `memory-core sync`._
@@ -1,26 +1,17 @@
1
1
  # Amazon Q Guidelines — {{projectName}}
2
- <!-- Generated by memory-core on {{generatedAt}} -->
2
+ <!-- memory-core {{generatedAt}} -->
3
3
 
4
- {{#if hasBackend}}Backend: {{backendArchitecture}}{{/if}}{{#if hasFrontend}} | Frontend: {{frontendFramework}}{{/if}}
5
- Stack: {{language}}
6
-
7
- ## Coding Rules
4
+ **Project:** {{projectName}} · {{language}}{{#if hasBackend}} · {{backendArchitecture}}{{/if}}{{#if hasFrontend}} · {{frontendFramework}}{{/if}}
5
+ ## Rules
8
6
  {{bullet rules}}
9
-
10
- ## Project Structure
11
- {{bullet folders}}
12
-
13
- ## Do Not
14
- {{bullet avoid}}
7
+ **Structure:** {{bullet folders}}
8
+ **Never:** {{bullet avoid}}
15
9
  {{#if hasMemories}}
16
-
17
10
  ## Memory
18
11
  {{#each memories}}
19
- {{memoryBlock this}}
12
+ - {{memoryBlock this}}
20
13
  {{/each}}
21
14
  {{/if}}
22
15
  {{#if caveman.enabled}}
23
-
24
- ## Output Style
25
- Terse. Minimal. Caveman {{caveman.intensity}}.
16
+ **Token mode:** terse ({{caveman.intensity}})
26
17
  {{/if}}