@shahmilsaari/memory-core 1.0.33 → 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.
- package/README.md +8 -6
- package/dist/{approval-queue-YBYRGBHP.js → approval-queue-4RK46FNE.js} +2 -1
- package/dist/{ast-analyzer-JM4CIOFY.js → ast-analyzer-WGTJKGAP.js} +1 -0
- package/dist/{check-cache-6NWRTZJD.js → check-cache-ZVFHTA2C.js} +1 -0
- package/dist/{check-logger-5HYSWA3S.js → check-logger-F4DW4LBY.js} +1 -0
- package/dist/chunk-2LNDQGDD.js +37 -0
- package/dist/{chunk-23GUWJ6F.js → chunk-4QWIYO2G.js} +3071 -3271
- package/dist/{chunk-GIPKVQSA.js → chunk-5T2QBBYT.js} +3 -29
- package/dist/chunk-FPRSYCOZ.js +77 -0
- package/dist/chunk-HJCPBM7B.js +238 -0
- package/dist/chunk-K3NQKI34.js +10 -0
- package/dist/chunk-SKR44CRD.js +35 -0
- package/dist/{chunk-W6WEAV3S.js → chunk-UMYJQWIE.js} +13 -11
- package/dist/{chunk-PQBWHAZN.js → chunk-XAE3RY5D.js} +5 -2
- package/dist/{classifier-MZ65R7FK.js → classifier-D5K3X7FQ.js} +1 -0
- package/dist/cli.js +246 -82
- package/dist/{confidence-gate-ZQDAOS6P.js → confidence-gate-AT2MW4NK.js} +8 -6
- package/dist/dashboard/assets/index-BcDOsQwz.css +1 -0
- package/dist/dashboard/assets/index-DGx4sRHq.js +2 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dashboard-server-LWMXEJHE.js → dashboard-server-UBZHOPRC.js} +273 -20
- package/dist/{db-FLFZZXG3.js → db-RE23O4DV.js} +3 -1
- package/dist/{deterministic-validator-PP56B46I.js → deterministic-validator-3LB234OG.js} +1 -0
- package/dist/draft-rule-NUXOSRRS.js +11 -0
- package/dist/embedding-VIMV6O2P.js +9 -0
- package/dist/{evidence-HVMSONTT.js → evidence-WFMGWSOP.js} +1 -0
- package/dist/{graph-TFNTB5OK.js → graph-UJJAKNHD.js} +1 -0
- package/dist/{incident-capture-RVPZULS7.js → incident-capture-5YUVJJM3.js} +11 -0
- package/dist/mcp-server-3N7R46BS.js +14958 -0
- package/dist/memory-selection-A5CQ6ZT5.js +29 -0
- package/dist/{deepseek-critique-MALVIYGF.js → model-critique-E2GNZ42U.js} +18 -32
- package/dist/{ollama-judge-D2LFK5PB.js → ollama-judge-6ZEZN4JV.js} +29 -41
- package/dist/{rate-limiter-SLIPCXRF.js → rate-limiter-KIMXTAAU.js} +1 -0
- package/dist/{rules-V3QMN3AR.js → rules-UUVIKEDM.js} +1 -0
- package/dist/{watch-errors-B3FA26N4.js → watch-errors-DZMW3CFN.js} +28 -33
- package/package.json +2 -1
- package/templates/AGENTS.md.hbs +11 -27
- package/templates/AI_RULES.md.hbs +9 -23
- package/templates/ARCHITECTURE.md.hbs +9 -30
- package/templates/CLAUDE.md.hbs +10 -35
- package/templates/DEVIN.md.hbs +7 -16
- package/templates/PROJECT_MEMORY.md.hbs +5 -21
- package/templates/amazonq-guidelines.md.hbs +7 -16
- package/templates/clinerules.hbs +8 -17
- package/templates/copilot-instructions.md.hbs +7 -16
- package/templates/cursor-rule.mdc.hbs +4 -9
- package/templates/cursorrules.hbs +8 -14
- package/templates/gemini-styleguide.md.hbs +7 -16
- package/templates/jetbrains-ai.md.hbs +6 -15
- package/templates/roo-rule.md.hbs +6 -15
- package/templates/windsurfrules.hbs +9 -18
- package/dist/dashboard/assets/index-DqbNcMwV.js +0 -2
- 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-
|
|
4
|
+
} from "./chunk-XAE3RY5D.js";
|
|
5
|
+
import "./chunk-K3NQKI34.js";
|
|
5
6
|
|
|
6
|
-
// src/models/
|
|
7
|
-
function
|
|
7
|
+
// src/models/model-critique.ts
|
|
8
|
+
function loadCritiqueConfig(_configDir) {
|
|
8
9
|
return {};
|
|
9
10
|
}
|
|
10
|
-
var
|
|
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: "
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
81
|
-
|
|
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-
|
|
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: "
|
|
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
|
|
56
|
-
|
|
57
|
-
${
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
${
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
${
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
${packet.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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,11 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ApprovalQueue
|
|
4
|
-
} from "./chunk-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
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.
|
|
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",
|
package/templates/AGENTS.md.hbs
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
1
|
# AGENTS.md — {{projectName}}
|
|
2
|
-
<!--
|
|
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
|
|
6
|
+
## Backend — {{backendArchitecture}}
|
|
10
7
|
{{bullet backendRules}}
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
<!--
|
|
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
|
-
{{
|
|
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
|
-
{{
|
|
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
|
-
<!--
|
|
2
|
+
<!-- memory-core {{generatedAt}} -->
|
|
3
3
|
|
|
4
|
-
**Type:** {{projectType}}
|
|
5
|
-
|
|
6
|
-
---
|
|
4
|
+
**Type:** {{projectType}} · **Language:** {{language}}
|
|
7
5
|
{{#if hasBackend}}
|
|
8
6
|
## Backend — {{backendArchitecture}}
|
|
9
|
-
|
|
10
7
|
{{backendDescription}}
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
**Rules:**
|
|
13
10
|
{{numbered backendRules}}
|
|
14
11
|
|
|
15
|
-
|
|
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
|
-
|
|
19
|
+
**Rules:**
|
|
32
20
|
{{numbered frontendRules}}
|
|
33
21
|
|
|
34
|
-
|
|
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}}
|
package/templates/CLAUDE.md.hbs
CHANGED
|
@@ -1,52 +1,27 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
|
-
<!--
|
|
2
|
+
<!-- memory-core {{generatedAt}} -->
|
|
3
3
|
|
|
4
|
-
|
|
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
|
-
##
|
|
14
|
-
> {{backendDescription}}
|
|
15
|
-
|
|
16
|
-
### Rules
|
|
6
|
+
## Architecture — {{backendArchitecture}}
|
|
17
7
|
{{bullet backendRules}}
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
{{bullet
|
|
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
|
-
|
|
34
|
-
{{bullet
|
|
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}}
|
package/templates/DEVIN.md.hbs
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
# DEVIN.md — {{projectName}}
|
|
2
|
-
<!--
|
|
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
|
-
|
|
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
|
-
<!--
|
|
2
|
+
<!-- memory-core {{generatedAt}} -->
|
|
3
3
|
|
|
4
|
-
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
|
-
<!--
|
|
2
|
+
<!-- memory-core {{generatedAt}} -->
|
|
3
3
|
|
|
4
|
-
{{#if hasBackend}}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Coding Rules
|
|
4
|
+
**Project:** {{projectName}} · {{language}}{{#if hasBackend}} · {{backendArchitecture}}{{/if}}{{#if hasFrontend}} · {{frontendFramework}}{{/if}}
|
|
5
|
+
## Rules
|
|
8
6
|
{{bullet rules}}
|
|
9
|
-
|
|
10
|
-
|
|
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}}
|