@vheins/local-memory-mcp 0.8.30 → 0.8.33
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/dist/{chunk-GKTYOE7T.js → chunk-EDVBG5RJ.js} +29 -2
- package/dist/dashboard/public/assets/{index-DUiu6ncn.js → index-C2Zuk5Bn.js} +1 -1
- package/dist/dashboard/public/index.html +1 -1
- package/dist/dashboard/server.js +8 -3
- package/dist/mcp/server.js +1 -1
- package/dist/prompts/architecture-design.md +8 -8
- package/dist/prompts/create-task.md +49 -121
- package/dist/prompts/documentation-sync.md +6 -6
- package/dist/prompts/export-task-to-github.md +27 -48
- package/dist/prompts/fix-suggestion.md +13 -14
- package/dist/prompts/import-github-issues.md +21 -20
- package/dist/prompts/learning-retrospective.md +11 -8
- package/dist/prompts/memory-agent-core.md +19 -32
- package/dist/prompts/memory-guided-review.md +7 -7
- package/dist/prompts/memory-index-policy.md +12 -12
- package/dist/prompts/project-briefing.md +7 -7
- package/dist/prompts/review-and-audit.md +41 -124
- package/dist/prompts/review-and-post-issue.md +39 -92
- package/dist/prompts/root-cause-analysis.md +13 -13
- package/dist/prompts/security-triage.md +12 -12
- package/dist/prompts/senior-code-review.md +17 -18
- package/dist/prompts/session-planner.md +9 -9
- package/dist/prompts/task-management-guidelines.md +15 -20
- package/dist/prompts/task-memory-executor.md +40 -53
- package/dist/prompts/tech-affinity-scout.md +7 -7
- package/dist/prompts/technical-planning.md +11 -11
- package/dist/prompts/tool-usage-guidelines.md +13 -13
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-C2Zuk5Bn.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-Don00sJ3.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/dist/dashboard/server.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createFileSink,
|
|
9
9
|
listResources,
|
|
10
10
|
logger
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-EDVBG5RJ.js";
|
|
12
12
|
|
|
13
13
|
// src/dashboard/server.ts
|
|
14
14
|
import express from "express";
|
|
@@ -621,14 +621,17 @@ var TasksController = class {
|
|
|
621
621
|
const pageSize = Math.min(100, Math.max(1, parseInt(req.query.pageSize || "20", 10)));
|
|
622
622
|
if (!repo) return res.status(400).json(jsonApiError("repo is required", 400));
|
|
623
623
|
let tasks;
|
|
624
|
+
let totalItems;
|
|
624
625
|
if (status && status.includes(",")) {
|
|
626
|
+
const statuses = status.split(",");
|
|
625
627
|
tasks = db.tasks.getTasksByMultipleStatuses(
|
|
626
628
|
repo,
|
|
627
|
-
|
|
629
|
+
statuses,
|
|
628
630
|
pageSize,
|
|
629
631
|
(page - 1) * pageSize,
|
|
630
632
|
search
|
|
631
633
|
);
|
|
634
|
+
totalItems = db.tasks.countTasksByMultipleStatuses(repo, statuses, search);
|
|
632
635
|
} else {
|
|
633
636
|
tasks = db.tasks.getTasksByRepo(
|
|
634
637
|
repo,
|
|
@@ -637,8 +640,10 @@ var TasksController = class {
|
|
|
637
640
|
(page - 1) * pageSize,
|
|
638
641
|
search
|
|
639
642
|
);
|
|
643
|
+
totalItems = db.tasks.countTasks(repo, status, search);
|
|
640
644
|
}
|
|
641
|
-
|
|
645
|
+
const totalPages = Math.ceil(totalItems / pageSize);
|
|
646
|
+
res.json(jsonApiRes(tasks, "task", { meta: { page, pageSize, totalItems, totalPages } }));
|
|
642
647
|
} catch (err) {
|
|
643
648
|
const message = err instanceof Error ? err.message : "Internal server error";
|
|
644
649
|
res.status(500).json(jsonApiError(message));
|
package/dist/mcp/server.js
CHANGED
|
@@ -6,18 +6,18 @@ arguments:
|
|
|
6
6
|
description: Technology stack
|
|
7
7
|
required: true
|
|
8
8
|
- name: requirements
|
|
9
|
-
description: Key
|
|
9
|
+
description: Key requirements
|
|
10
10
|
required: true
|
|
11
11
|
agent: System Architect
|
|
12
12
|
---
|
|
13
|
-
Design
|
|
13
|
+
Design system architecture for repository.
|
|
14
14
|
|
|
15
15
|
Stack: {{tech_stack}}
|
|
16
16
|
Requirements: {{requirements}}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
1. **Component Diagram**:
|
|
20
|
-
2. **Data Flow**:
|
|
21
|
-
3. **
|
|
22
|
-
4. **Scalability
|
|
23
|
-
5. **Security
|
|
18
|
+
Output:
|
|
19
|
+
1. **Component Diagram**: Blocks & responsibilities.
|
|
20
|
+
2. **Data Flow**: Information movement.
|
|
21
|
+
3. **ADRs**: Rationale for patterns.
|
|
22
|
+
4. **Scalability/Reliability**: Growth & failure handling.
|
|
23
|
+
5. **Security**: Identity, protection, boundaries.
|
|
@@ -1,128 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-task
|
|
3
|
-
description:
|
|
3
|
+
description: Create structured, atomic tasks in Local Memory MCP.
|
|
4
4
|
arguments:
|
|
5
5
|
- name: instruction
|
|
6
|
-
description:
|
|
6
|
+
description: Directive to analyze and break into tasks.
|
|
7
7
|
required: true
|
|
8
8
|
agent: Task Planner
|
|
9
9
|
---
|
|
10
|
-
# Skill: create-task
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
2. **Conflict Prevention**: Respect the 0.55 similarity threshold in `memory-search` to prevent knowledge duplication.
|
|
58
|
-
3. **Sync backlog**: Call `local-memory-mcp` MCP tools `task-list` (defaults to active tasks: in_progress/pending). **CRITICAL: Do NOT create a new task if a similar, redundant task already exists in `backlog` or `pending` status. If your new findings are distinct but related to an existing task, link them using `parent_id` or `depends_on` instead of creating an isolated task.**
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
### 2. TASK DESIGN PRINCIPLES
|
|
63
|
-
|
|
64
|
-
Each task MUST be:
|
|
65
|
-
* **Atomic & Independent**: Exactly ONE logical change per task.
|
|
66
|
-
* **Context-Rich**: Include file paths, class/function names, and API endpoints.
|
|
67
|
-
* **Layer-Aware**: Specify if it's Database, Service, State, or UI layer.
|
|
68
|
-
* **Contract-First**: Follow project API standards (include request/response shapes).
|
|
69
|
-
* **Test-Ready**: Include at least one Positive and one Negative test case.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
### 3. TASK ATTRIBUTES (MANDATORY)
|
|
74
|
-
|
|
75
|
-
Each `local-memory-mcp` MCP tools `task-create` MUST include:
|
|
76
|
-
* `task_code`: (e.g., FEAT-123 / FIX-456 / REFACTOR-789)
|
|
77
|
-
* `phase`: (Discovery / Implementation / Testing)
|
|
78
|
-
* `priority`: (1–5)
|
|
79
|
-
* `agent`: Current agent's name/role
|
|
80
|
-
* `model`: Current AI model being used
|
|
81
|
-
|
|
82
|
-
#### 🔥 DESCRIPTION FORMAT (STRICT)
|
|
83
|
-
The `description` field MUST follow this structure EXACTLY:
|
|
84
|
-
|
|
85
|
-
#### 1. Context & Analysis
|
|
86
|
-
* **Instruction / Trigger**: The user directive or finding that triggered this task.
|
|
87
|
-
* **Observation & Analysis**: The results of your context reading and technical reasoning.
|
|
88
|
-
* **Goal**: A clear, non-redundant statement of what needs to be achieved.
|
|
89
|
-
|
|
90
|
-
#### 2. Target Files & Implementation
|
|
91
|
-
* Group by layer or exact file path. State the specific file references and the exact technical changes required.
|
|
92
|
-
* **Constraint**: Do NOT separate scope, references, and steps into different sections. Combine them here to avoid redundancy.
|
|
93
|
-
|
|
94
|
-
#### 3. Acceptance & Verification
|
|
95
|
-
* **Checklist**: Actionable criteria (e.g., `[ ] Condition 1`) that prove the goal is met.
|
|
96
|
-
* **Testing**: Brief Positive/Negative scenarios to confirm success.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
### metadata (MANDATORY)
|
|
101
|
-
* Required agent role.
|
|
102
|
-
* Additional technical context.
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
### 4. MEMORY STORAGE (CONDITIONAL)
|
|
107
|
-
If the instruction or prompt involves a decision, new feature, or architectural change, you MUST log it as a memory using `local-memory-mcp` MCP tools `memory-store` with `type: decision`. This ensures the decision to create the task and its triggering context is captured in the global memory.
|
|
108
|
-
**CRITICAL**: Do NOT log tasks as decisions if they are purely for bug fixes or straightforward defect resolutions.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
### 5. MULTI-TASK HANDLING
|
|
113
|
-
If a directive is complex:
|
|
114
|
-
1. Create a parent task.
|
|
115
|
-
2. Create child tasks using `parent_id` and `depends_on`.
|
|
116
|
-
3. **Bulk Limit**: You are limited to 500 records per transaction for bulk task operations.
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
### 6. FINAL SELF-CHECK (MANDATORY)
|
|
121
|
-
Before finishing, validate:
|
|
122
|
-
* ❌ No code was written.
|
|
123
|
-
* ❌ No execution was performed.
|
|
124
|
-
* ✅ Only MCP task operations exist.
|
|
125
|
-
|
|
126
|
-
If this check fails → ABORT OUTPUT.
|
|
127
|
-
|
|
128
|
-
Analyze and create task for this instruction : {{instruction}}
|
|
10
|
+
# Skill: create-task (Task Creation Orchestrator)
|
|
11
|
+
|
|
12
|
+
## 🚫 FORBIDDEN: NON-EXECUTION
|
|
13
|
+
DO NOT edit/create/delete files, run commands, or implement code.
|
|
14
|
+
**Allowed**: Read code, `task-create`, `memory-store`, `task-list`, `memory-search`.
|
|
15
|
+
|
|
16
|
+
## ✅ OUTPUT: MCP ONLY
|
|
17
|
+
ONLY call MCP tools. No prose, no code, no plans outside MCP.
|
|
18
|
+
|
|
19
|
+
## 1. PRE-ANALYSIS
|
|
20
|
+
1. **Search Memory**: Call `memory-search` (architecture/history).
|
|
21
|
+
2. **Research Codebase**: Read relevant source files to verify current implementation and paths.
|
|
22
|
+
3. **De-duplicate**: Call `task-list`. DO NOT duplicate existing tasks. Link related tasks via `parent_id`/`depends_on`.
|
|
23
|
+
|
|
24
|
+
## 2. TASK DESIGN
|
|
25
|
+
- **Atomic**: One logical change per task.
|
|
26
|
+
- **Context**: Paths, symbols, APIs.
|
|
27
|
+
- **Layered**: DB/Service/State/UI.
|
|
28
|
+
- **Tests**: Min 1 Positive + 1 Negative.
|
|
29
|
+
|
|
30
|
+
## 3. ATTRIBUTES & FORMAT
|
|
31
|
+
- `task_code`: FEAT/FIX/REFACTOR-XXX.
|
|
32
|
+
- `phase`: Discovery/Implementation/Testing.
|
|
33
|
+
- `priority`: 1-5.
|
|
34
|
+
- `description` (STRICT FORMAT):
|
|
35
|
+
### 1. Context & Analysis
|
|
36
|
+
- **Trigger**: Instruction/finding.
|
|
37
|
+
- **Observation**: Technical reasoning.
|
|
38
|
+
- **Goal**: Clear objective.
|
|
39
|
+
### 2. Target Files & Implementation
|
|
40
|
+
- Combined scope/steps per path/layer.
|
|
41
|
+
### 3. Acceptance & Verification
|
|
42
|
+
- **Checklist**: `[ ]` criteria.
|
|
43
|
+
- **Testing**: Scenarios.
|
|
44
|
+
|
|
45
|
+
## 4. MEMORY
|
|
46
|
+
Log architectural/feature changes as `type: decision` via `memory-store`. Skip for simple bug fixes.
|
|
47
|
+
|
|
48
|
+
## 5. MULTI-TASK
|
|
49
|
+
- Parent/Child logic for complex directives.
|
|
50
|
+
- Bulk limit: 500 records.
|
|
51
|
+
|
|
52
|
+
## 6. SELF-CHECK
|
|
53
|
+
- ❌ No code/execution.
|
|
54
|
+
- ✅ ONLY MCP tool calls.
|
|
55
|
+
|
|
56
|
+
Analyze: {{instruction}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: documentation-sync
|
|
3
|
-
description:
|
|
3
|
+
description: Sync memory decisions with repository markdown files
|
|
4
4
|
arguments: []
|
|
5
5
|
agent: Documentation Specialist
|
|
6
6
|
---
|
|
7
|
-
|
|
7
|
+
Reconcile local documentation with stored memories.
|
|
8
8
|
|
|
9
9
|
Steps:
|
|
10
|
-
1. **
|
|
11
|
-
2. **
|
|
12
|
-
3. **Identify
|
|
13
|
-
4. **
|
|
10
|
+
1. **Search**: Find `type: decision` memories via `memory-search`.
|
|
11
|
+
2. **Scan**: Read `README.md`, `docs/`, `.agents/documents/`, and `.kiro/`.
|
|
12
|
+
3. **Compare**: Identify missing or outdated durable knowledge.
|
|
13
|
+
4. **Update**: Propose specific changes to align docs with current source of truth.
|
|
@@ -1,61 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: export-task-to-github
|
|
3
|
-
description:
|
|
3
|
+
description: Export local tasks to GitHub Issues
|
|
4
4
|
arguments:
|
|
5
5
|
- name: owner
|
|
6
|
-
description: GitHub
|
|
6
|
+
description: GitHub repo owner
|
|
7
7
|
required: true
|
|
8
8
|
- name: repo
|
|
9
|
-
description: GitHub
|
|
9
|
+
description: GitHub repo name
|
|
10
10
|
required: true
|
|
11
11
|
- name: task_id
|
|
12
|
-
description:
|
|
12
|
+
description: Local task ID
|
|
13
13
|
required: true
|
|
14
14
|
agent: Integration Architect
|
|
15
15
|
---
|
|
16
16
|
# Skill: export-task-to-github
|
|
17
17
|
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
2. **Task Update**: Use `local-memory-mcp` tool `task-update` to:
|
|
42
|
-
- Add the GitHub URL to `metadata`.
|
|
43
|
-
- Add a comment stating "Exported to GitHub Issue #{{number}}".
|
|
44
|
-
|
|
45
|
-
### 5. Confirmation
|
|
46
|
-
Provide the link to the newly created (or existing) GitHub issue.
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
### ✅ ALLOWED OUTPUT (STRICT)
|
|
51
|
-
Your output MUST ONLY consist of calls to:
|
|
52
|
-
- `mcp_local-memory_task-detail`
|
|
53
|
-
- `mcp_local-memory_task-update`
|
|
54
|
-
- `mcp_github-mcp-server_search_issues`
|
|
55
|
-
- `mcp_github-mcp-server_issue_write`
|
|
56
|
-
- `mcp_github-mcp-server_add_issue_comment`
|
|
57
|
-
|
|
58
|
-
**❌ DO NOT:**
|
|
59
|
-
- Output explanations or narrative text during execution.
|
|
60
|
-
- Modify the original title or description of the task when exporting.
|
|
61
|
-
- Create duplicate issues.
|
|
18
|
+
## 1. RETRIEVE
|
|
19
|
+
1. **Fetch**: Call `task-detail` for `task_id`.
|
|
20
|
+
2. **Verify**: Ensure title/description exist. Use `memory-search` for gaps.
|
|
21
|
+
|
|
22
|
+
## 2. SYNC CHECK
|
|
23
|
+
1. **Search**: Use `search_issues` for `task_code`.
|
|
24
|
+
2. **De-duplicate**: If issue exists, update local task `metadata` with URL. DO NOT re-create.
|
|
25
|
+
|
|
26
|
+
## 3. CREATE ISSUE
|
|
27
|
+
If new:
|
|
28
|
+
- **Write**: Use `issue_write` (method: 'create').
|
|
29
|
+
- **Content**: Match local title/body exactly.
|
|
30
|
+
- **Traceability**: Append `task_code` and `task_id` to body.
|
|
31
|
+
- **Comments**: Post local comments via `add_issue_comment`.
|
|
32
|
+
|
|
33
|
+
## 4. LINK
|
|
34
|
+
- **Update**: Call `task-update`.
|
|
35
|
+
- **Metadata**: Add GitHub URL.
|
|
36
|
+
- **Comment**: "Exported to GitHub Issue #X".
|
|
37
|
+
|
|
38
|
+
## ✅ OUTPUT: MCP ONLY
|
|
39
|
+
ONLY call: `task-detail`, `task-update`, `search_issues`, `issue_write`, `add_issue_comment`.
|
|
40
|
+
No prose. No modifications to original content.
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fix-suggestion
|
|
3
|
-
description:
|
|
3
|
+
description: Targeted fix with before/after code and test case.
|
|
4
4
|
arguments:
|
|
5
5
|
- name: tech_stack
|
|
6
|
-
description: Target
|
|
6
|
+
description: Target tech stack.
|
|
7
7
|
required: true
|
|
8
8
|
- name: bug_description
|
|
9
|
-
description:
|
|
9
|
+
description: Bug behavior.
|
|
10
10
|
required: true
|
|
11
11
|
- name: root_cause
|
|
12
|
-
description:
|
|
12
|
+
description: Identified root cause.
|
|
13
13
|
required: true
|
|
14
14
|
agent: Debugging Expert
|
|
15
15
|
---
|
|
16
|
-
|
|
16
|
+
Provide precise, minimal fix for confirmed bug.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
Bug
|
|
20
|
-
|
|
18
|
+
Stack: {{tech_stack}}
|
|
19
|
+
Bug: {{bug_description}}
|
|
20
|
+
Cause: {{root_cause}}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
1. **
|
|
24
|
-
2. **Before
|
|
25
|
-
3. **
|
|
26
|
-
4. **
|
|
27
|
-
5. **Test Case**: A regression test case to verify the fix.
|
|
22
|
+
Output:
|
|
23
|
+
1. **Explanation**: Why it happens & how fix works.
|
|
24
|
+
2. **Before/After**: Diff style code blocks with comments.
|
|
25
|
+
3. **Checklist**: Meta changes (config, migrations).
|
|
26
|
+
4. **Verification**: Regression test case.
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: import-github-issues
|
|
3
|
-
description:
|
|
3
|
+
description: Import GitHub Issues as local tasks.
|
|
4
4
|
arguments: []
|
|
5
5
|
agent: Integration Scout
|
|
6
6
|
---
|
|
7
|
-
|
|
7
|
+
# Skill: import-github-issues
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 1. FETCH
|
|
10
|
+
- **Primary**: Use `github-mcp-server` to list open issues.
|
|
11
|
+
- **Fallback**: Terminal `gh issue list --json number,title,body,labels,url`.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
2. **Review Existing Tasks**: Call `local-memory-mcp` MCP tools `task-list` for the current repository to identify tasks already imported.
|
|
14
|
-
3. **Map and Create**: For each relevant issue that hasn't been imported yet:
|
|
15
|
-
- Use 'task-manage' with action='create'.
|
|
16
|
-
- **MANDATORY**: Keep the original GitHub **title** and **description** exactly as they are. Do NOT summarize or modify them.
|
|
17
|
-
- Set 'task_code' to 'GH-{{issue_number}}' (e.g., GH-123).
|
|
18
|
-
- Set 'title' to the issue title.
|
|
19
|
-
- Set 'description' to the issue body.
|
|
20
|
-
- Map GitHub labels to 'tags' if applicable.
|
|
21
|
-
- Default 'phase' to 'backlog' or 'triage'.
|
|
22
|
-
- Set 'metadata' to include the original GitHub URL.
|
|
23
|
-
4. **Import Comments**: If the issue has comments:
|
|
24
|
-
- Use `github-mcp-server`'s `issue_read` tool with `method='get_comments'` to fetch all comments.
|
|
25
|
-
- For each comment, add it to the created task using the `task-update` tool, appending it to the `comments` array or adding a specific comment metadata.
|
|
26
|
-
5. **Avoid Duplicates**: Do not import issues that already have a corresponding 'GH-{{number}}' task code in our system.
|
|
27
|
-
6. **Confirmation**: Provide a summary of how many tasks were successfully created.
|
|
13
|
+
## 2. DE-DUPLICATE
|
|
14
|
+
- **Scan**: Call `task-list`. Skip issues already existing as `GH-{{number}}` task codes.
|
|
28
15
|
|
|
16
|
+
## 3. MAP & CREATE
|
|
17
|
+
For each new issue, use `task-create`:
|
|
18
|
+
- **`task_code`**: `GH-{{number}}`.
|
|
19
|
+
- **`title` / `description`**: EXACT match from GitHub. DO NOT summarize.
|
|
20
|
+
- **`tags`**: GitHub labels.
|
|
21
|
+
- **`phase`**: `backlog` or `triage`.
|
|
22
|
+
- **`metadata`**: include GitHub URL.
|
|
23
|
+
|
|
24
|
+
## 4. COMMENTS
|
|
25
|
+
- **Fetch**: Use `issue_read` (method='get_comments').
|
|
26
|
+
- **Import**: Add comments to local task via `task-update`.
|
|
27
|
+
|
|
28
|
+
## 5. SUMMARY
|
|
29
|
+
Report count of tasks created.
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: learning-retrospective
|
|
3
|
-
description:
|
|
3
|
+
description: Harvest knowledge from completed work.
|
|
4
4
|
arguments:
|
|
5
5
|
- name: task_id
|
|
6
|
-
description:
|
|
6
|
+
description: ID of completed task.
|
|
7
7
|
required: false
|
|
8
8
|
agent: Knowledge Harvester
|
|
9
9
|
---
|
|
10
|
-
|
|
10
|
+
Extract durable knowledge from task {{task_id}} for repository.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
1. **Mistakes**:
|
|
14
|
-
2. **Decisions**:
|
|
15
|
-
3. **Patterns**:
|
|
12
|
+
Identify and `memory-store`:
|
|
13
|
+
1. **Mistakes**: Hard-to-find bugs or environment quirks.
|
|
14
|
+
2. **Decisions**: Trade-offs, library choices, architectural pivots.
|
|
15
|
+
3. **Patterns**: Repeatable implementations or conventions.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Directives:
|
|
18
|
+
- Use `type: mistake | decision | pattern`.
|
|
19
|
+
- Include technology tags.
|
|
20
|
+
- Keep content concise.
|
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memory-agent-core
|
|
3
|
-
description:
|
|
3
|
+
description: Behavioral contract for memory-aware agents.
|
|
4
4
|
arguments: []
|
|
5
5
|
agent: Memory Guardian
|
|
6
6
|
---
|
|
7
|
-
|
|
7
|
+
# Memory Guardian Protocol
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
You are a memory-aware agent. Memory is project truth, not a suggestion.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
11
|
+
## Core Rules
|
|
12
|
+
1. **Consistency**: Never contradict stored decisions without `memory-update` or `supersedes`.
|
|
13
|
+
2. **Mistake Prevention**: Never repeat documented mistakes.
|
|
14
|
+
3. **Affinity**: Only use cross-repo memory if tech tags match or it's marked `Global`.
|
|
15
|
+
4. **Conflicts**: If memory clashes with user request, ask for clarification or propose `supersedes`.
|
|
16
|
+
5. **Acknowledge**: After code generation using memory, you MUST call `memory-acknowledge`.
|
|
17
|
+
6. **Search Mechanics**: Hybrid Search (70% Cosine, 30% BM25). 0.55 similarity threshold prevents duplication.
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4. If memory conflicts with the user's new request, detect the conflict and ask for clarification or propose a 'supersedes' update.
|
|
21
|
-
5. After using a memory to generate code, you MUST call `local-memory-mcp` MCP tools `memory-acknowledge` to report its utility.
|
|
22
|
-
6. The system uses Hybrid Search: Score = (Cosine_Similarity * 0.7) + (BM25_Score * 0.3).
|
|
23
|
-
7. Semantic Conflict Detection: A 0.55 similarity threshold is enforced to prevent redundant entries.
|
|
19
|
+
## Execution Policy
|
|
20
|
+
1. **Search**: Call `memory-search` with `current_file_path` and `current_tags` before coding.
|
|
21
|
+
2. **Retrieve**: Use `memory-detail` for full content if search snippets are insufficient.
|
|
22
|
+
3. **Select**: Use ONLY highly relevant memories.
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
1.
|
|
28
|
-
2.
|
|
29
|
-
3. If more context is needed than provided in search results, fetch the full content via `local-memory-mcp` MCP tools `memory-detail`.
|
|
30
|
-
4. Use memory ONLY if clearly relevant. Prefer fewer, stronger memories over many weak ones.
|
|
24
|
+
## Creation Policy
|
|
25
|
+
Store memory ONLY if knowledge is durable (architecture, patterns, fixes) and affects future behavior.
|
|
26
|
+
1. **Categorize**: Use technology `tags`.
|
|
27
|
+
2. **Maintain**: Use `supersedes` for overrides.
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
You MAY store memory ONLY if:
|
|
34
|
-
- The information affects future behavior.
|
|
35
|
-
- The knowledge is durable (e.g., architecture, styling rules, bug fixes).
|
|
36
|
-
- You use 'tags' to categorize by technology (e.g., ['nestjs', 'typescript']).
|
|
37
|
-
|
|
38
|
-
Before storing memory:
|
|
39
|
-
- If this replaces an old rule, find the old memory ID and use 'supersedes'.
|
|
40
|
-
- Explain briefly why it should be stored.
|
|
41
|
-
|
|
42
|
-
Behave like a trusted senior engineer who remembers past decisions and protects the long-term health of the codebase across all user projects.
|
|
29
|
+
Protect codebase health by respecting project history.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memory-guided-review
|
|
3
|
-
description: Review code for compliance with stored
|
|
3
|
+
description: Review code for compliance with stored decisions.
|
|
4
4
|
arguments:
|
|
5
5
|
- name: file_path
|
|
6
|
-
description:
|
|
6
|
+
description: File to review.
|
|
7
7
|
required: true
|
|
8
8
|
agent: Code Auditor
|
|
9
9
|
---
|
|
10
|
-
|
|
10
|
+
Audit {{file_path}} against stored project knowledge.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
1. **Search
|
|
14
|
-
2. **Evaluate
|
|
15
|
-
3. **Feedback**:
|
|
12
|
+
Steps:
|
|
13
|
+
1. **Search**: Call `memory-search` using `current_file_path='{{file_path}}'`.
|
|
14
|
+
2. **Evaluate**: Check for compliance with established patterns and avoidance of documented mistakes.
|
|
15
|
+
3. **Feedback**: Suggest fixes for any decision violations found.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memory-index-policy
|
|
3
|
-
description:
|
|
3
|
+
description: Strict memory storage criteria.
|
|
4
4
|
arguments: []
|
|
5
5
|
agent: Memory Auditor
|
|
6
6
|
---
|
|
7
|
-
|
|
8
|
-
- Temporary discussions or brainstorming.
|
|
9
|
-
- Subjective opinions without consensus.
|
|
10
|
-
- Generic coding knowledge available in public docs.
|
|
7
|
+
# Memory Indexing Rules
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- Hard-won bug fixes (Mistakes to avoid).
|
|
17
|
-
- Persistence: Only mark as `is_global` if the knowledge applies beyond a single repository (e.g., framework-specific anti-patterns).
|
|
9
|
+
## ❌ FORBIDDEN
|
|
10
|
+
- Temporary discussions/brainstorming.
|
|
11
|
+
- Opinions without consensus.
|
|
12
|
+
- Generic knowledge from public docs.
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
## ✅ MANDATORY
|
|
15
|
+
Only store durable, project-specific knowledge.
|
|
16
|
+
- **Types**: `code_fact`, `decision`, `mistake`, `pattern`, `agent_handoff`, `agent_registered`, `file_claim`, `task_archive`.
|
|
17
|
+
- **Content**: Architecture, UI/UX choices, stack patterns, hard-won bug fixes.
|
|
18
|
+
- **Global**: Set `is_global` only if applicable across repositories (e.g., framework anti-patterns).
|
|
19
|
+
- **Categorization**: Use accurate technology tags.
|