@vheins/local-memory-mcp 0.14.10 → 0.15.1
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-BBPQUVAA.js → chunk-NTU2HEEH.js} +75 -28
- package/dist/dashboard/server.js +1 -1
- package/dist/mcp/server.js +89 -55
- package/dist/prompts/architecture-design.md +3 -2
- package/dist/prompts/create-task.md +4 -3
- package/dist/prompts/csl-from-docs.md +45 -2
- package/dist/prompts/csl-scrapper.md +48 -2
- package/dist/prompts/documentation-sync.md +3 -2
- package/dist/prompts/export-task-to-github.md +5 -4
- package/dist/prompts/fix-suggestion.md +3 -2
- package/dist/prompts/import-github-issues.md +4 -3
- package/dist/prompts/learning-retrospective.md +9 -2
- package/dist/prompts/memory-agent-core.md +19 -4
- package/dist/prompts/memory-guided-review.md +3 -2
- package/dist/prompts/memory-index-policy.md +3 -2
- package/dist/prompts/project-briefing.md +3 -2
- package/dist/prompts/review-and-audit.md +14 -3
- package/dist/prompts/review-and-post-issue.md +20 -4
- package/dist/prompts/root-cause-analysis.md +3 -2
- package/dist/prompts/security-triage.md +8 -3
- package/dist/prompts/senior-code-review.md +3 -2
- package/dist/prompts/sentinel-issue-resolver.md +33 -2
- package/dist/prompts/server/instructions.md +22 -10
- package/dist/prompts/session-planner.md +4 -3
- package/dist/prompts/task-management-guidelines.md +33 -4
- package/dist/prompts/task-memory-executor.md +10 -7
- package/dist/prompts/tech-affinity-scout.md +10 -5
- package/dist/prompts/technical-planning.md +2 -1
- package/dist/prompts/tool-usage-guidelines.md +9 -6
- package/package.json +1 -1
|
@@ -11,9 +11,9 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [workflow, csl, coding-standards, documentation, mcp]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## CSL from Docs
|
|
15
15
|
|
|
16
|
-
Entry=G0 → S0 → S1 → S2 → S3
|
|
16
|
+
Entry=G0 → S0 → S1 → S2 → S3 → S4 Exit=stored|refused
|
|
17
17
|
Guard: S(N) req S(N-1)✅
|
|
18
18
|
|
|
19
19
|
G0 | path exists + readable + normative? | path provided? | → S0 / refuse | —
|
|
@@ -21,5 +21,48 @@ S0 | discover: if dir→list_directory then read_file each; if file→read_file
|
|
|
21
21
|
S1 | extract atomic rules: 1 entry=1 rule, keep code examples, split bundled, preserve source meaning, ignore boilerplate | S0✅ | atomic entries | —
|
|
22
22
|
S2 | dedup via standard-search (skip if high-confidence match; update if new source more authoritative) | S1✅ | filtered entries | —
|
|
23
23
|
S3 | store via standard-store: parent first→children with parent_id; context=topic area; version=1.0.0(default); is_global=true(unless repo-specific); metadata={original_path, evidence_excerpt} | S2✅ | CSL entries stored | —
|
|
24
|
+
S4 | verify: confirm stored count matches extracted, validate parent/child linkage, check metadata provenance | S3✅ | verified | —
|
|
25
|
+
|
|
26
|
+
## Atomic Entry Rules
|
|
27
|
+
|
|
28
|
+
- One entry = one rule. Split bundled guidance into separate entries.
|
|
29
|
+
- DO NOT emit duplicates. If standard-search returns a high-confidence match, skip the entry or update it if the new source is more authoritative.
|
|
30
|
+
- Use parent/child only for genuine hierarchy: parent = umbrella principle, child = narrower enforceable specialization.
|
|
31
|
+
- Keep content concise, imperative, and implementation-relevant.
|
|
32
|
+
- ALWAYS include relevant code examples or snippets from the source that illustrate or enforce the rule.
|
|
33
|
+
- Preserve the source meaning without inventing requirements.
|
|
34
|
+
- Ignore boilerplate, non-normative text, or metadata noise. Do NOT ignore code examples.
|
|
35
|
+
- Do not infer version, language, stack, or scope unless the source makes them explicit.
|
|
36
|
+
- Use metadata to preserve provenance, including the original file path and a short evidence_excerpt for each entry.
|
|
37
|
+
|
|
38
|
+
## Output Contract
|
|
39
|
+
|
|
40
|
+
- If tool calls are available:
|
|
41
|
+
- First, emit standard-search calls to verify existing data.
|
|
42
|
+
- Then, emit standard-store calls for every unique/new accepted entry.
|
|
43
|
+
- When parent/child hierarchy exists, emit the parent first, then emit children with parent_id referencing the created parent standard ID.
|
|
44
|
+
- If tool calls are unavailable, return a JSON object with:
|
|
45
|
+
- standards: Array of standard-store-compatible payloads.
|
|
46
|
+
- Use title-like names for the name field and store the atomic rule text along with its code examples in content.
|
|
47
|
+
- Use context for the topic area (e.g., naming, error-handling, routing, testing, hooks, security).
|
|
48
|
+
- Default version to 1.0.0 only when the source gives no versioning signal.
|
|
49
|
+
- Prefer is_global=true unless the content is clearly repo-specific.
|
|
50
|
+
|
|
51
|
+
## Refusal Rules
|
|
52
|
+
|
|
53
|
+
- Refuse when the path does not exist or is not readable.
|
|
54
|
+
- Refuse when the file content is not documentation or not clearly normative reference content.
|
|
55
|
+
- Refuse when the request asks you to guess, invent, or fill missing guidance from prior knowledge.
|
|
56
|
+
- Refuse when no source-backed coding standards can be extracted.
|
|
57
|
+
|
|
58
|
+
If you refuse, return exactly:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"action": "refuse",
|
|
63
|
+
"reason": "<short explanation>",
|
|
64
|
+
"missing": ["<missing evidence or source requirement>"]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
24
67
|
|
|
25
68
|
Path: {{path}} Repo: {{current_repo}}
|
|
@@ -11,9 +11,9 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [workflow, csl, scraping, coding-standards, mcp]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## CSL Scrapper
|
|
15
15
|
|
|
16
|
-
Entry=G0 → S0 → G1 → S1 → S2 → S3 → S4
|
|
16
|
+
Entry=G0 → S0 → G1 → S1 → S2 → S3 → S4 → S5 Exit=stored|refused
|
|
17
17
|
Guard: S(N) req S(N-1)✅
|
|
18
18
|
|
|
19
19
|
G0 | source_url provided? | source_url arg exists? | → S0 / refuse | —
|
|
@@ -23,5 +23,51 @@ S1 | extract atomic rules: 1 entry=1 rule, keep code examples, detect nav menus
|
|
|
23
23
|
S2 | dedup via standard-search (skip if high-confidence match; update if new source more authoritative) | S1✅ | filtered entries | —
|
|
24
24
|
S3 | store via standard-store: parent first→children with parent_id; context=topic area; version=1.0.0(default); is_global=true(unless repo-specific); metadata={source_url, evidence_excerpt} | S2✅ | CSL entries stored | —
|
|
25
25
|
S4 | create scrape tasks for each sub-page URL via task-create | sub-page URLs exist? | MCP tasks queued | —
|
|
26
|
+
S5 | verify: confirm stored entries match extracted count, validate parent/child linkage, verify sub-page tasks created | S4✅ | verified | —
|
|
27
|
+
|
|
28
|
+
## Atomic Entry Rules
|
|
29
|
+
|
|
30
|
+
- One entry = one rule. Split bundled guidance into separate entries.
|
|
31
|
+
- DO NOT emit duplicates. If standard-search returns a high-confidence match, skip the entry or update it if the new source is more authoritative.
|
|
32
|
+
- Use parent/child only for genuine hierarchy: parent = umbrella principle, child = narrower enforceable specialization.
|
|
33
|
+
- Keep content concise, imperative, and implementation-relevant.
|
|
34
|
+
- ALWAYS include relevant code examples or snippets from the source that illustrate or enforce the rule.
|
|
35
|
+
- Preserve the source meaning without inventing requirements.
|
|
36
|
+
- Ignore marketing copy, release notes, and changelog noise. Do NOT ignore code examples.
|
|
37
|
+
- Do not infer version, language, stack, or scope unless the source makes them explicit.
|
|
38
|
+
- Use metadata to preserve provenance, including the source_url and a short evidence_excerpt for each entry.
|
|
39
|
+
|
|
40
|
+
## Output Contract
|
|
41
|
+
|
|
42
|
+
- If tool calls are available:
|
|
43
|
+
- First, emit standard-search calls to verify existing data.
|
|
44
|
+
- Emit one standard-store call per unique/new accepted entry.
|
|
45
|
+
- When parent/child hierarchy exists, emit the parent first, then emit children with parent_id referencing the created parent standard ID.
|
|
46
|
+
- Emit one task-create call for each discovered documentation sub-page URL. Task title: "Scrape: [URL]".
|
|
47
|
+
- If tool calls are unavailable, return a JSON object with:
|
|
48
|
+
- standards: Array of standard-store-compatible payloads.
|
|
49
|
+
- next_urls: Array of sub-page URLs to scrape.
|
|
50
|
+
- Use title-like names for the name field and store the atomic rule text along with its code examples in content.
|
|
51
|
+
- Use context for the topic area (e.g., naming, error-handling, routing, testing, hooks, security).
|
|
52
|
+
- Use parent_id only when the source explicitly shows the rule is nested under a broader parent concept.
|
|
53
|
+
- Default version to 1.0.0 only when the source gives no versioning signal.
|
|
54
|
+
- Prefer is_global=true unless the source is clearly repo-specific.
|
|
55
|
+
|
|
56
|
+
## Refusal Rules
|
|
57
|
+
|
|
58
|
+
- Refuse when the URL content is not reachable, not documentation, or not clearly normative reference content.
|
|
59
|
+
- Refuse when the source is too incomplete to verify atomic rules.
|
|
60
|
+
- Refuse when the request asks you to guess, invent, or fill missing guidance from prior knowledge.
|
|
61
|
+
- Refuse when no source-backed coding standards can be extracted.
|
|
62
|
+
|
|
63
|
+
If you refuse, return exactly:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"action": "refuse",
|
|
68
|
+
"reason": "<short explanation>",
|
|
69
|
+
"missing": ["<missing evidence or source requirement>"]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
26
72
|
|
|
27
73
|
Source: {{source_url}} Repo: {{current_repo}}
|
|
@@ -8,12 +8,13 @@ version: "1.0.0"
|
|
|
8
8
|
tags: [workflow, documentation, memory, sync]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Documentation Sync
|
|
12
12
|
|
|
13
|
-
Entry=S0 → S1 → S2 → S3 Exit=aligned
|
|
13
|
+
Entry=S0 → S1 → S2 → S3 → S4 Exit=aligned
|
|
14
14
|
Guard: S(N) req S(N-1)✅
|
|
15
15
|
|
|
16
16
|
S0 | search decision memories via memory-search | — | memory entries | —
|
|
17
17
|
S1 | read_file(README.md) + glob & read_file(docs/**/\*.md, .agents/documents/**/_, .kiro/\*\*/_) | S0✅ | doc content | —
|
|
18
18
|
S2 | compare: identify missing/outdated knowledge | S1✅ | gap list | —
|
|
19
19
|
S3 | propose specific changes to align docs | S2✅ | update proposals | —
|
|
20
|
+
S4 | verify: confirm proposal covers all gaps, no contradictory updates | S3✅ | verified | —
|
|
@@ -3,10 +3,10 @@ name: export-task-to-github
|
|
|
3
3
|
description: Export local tasks to GitHub Issues
|
|
4
4
|
arguments:
|
|
5
5
|
- name: owner
|
|
6
|
-
description: GitHub repo owner (hint: run `git remote -v` to extract from origin URL)
|
|
6
|
+
description: "GitHub repo owner (hint: run `git remote -v` to extract from origin URL)"
|
|
7
7
|
required: true
|
|
8
8
|
- name: repo
|
|
9
|
-
description: GitHub repo name (hint: run `git remote -v` to extract from origin URL)
|
|
9
|
+
description: "GitHub repo name (hint: run `git remote -v` to extract from origin URL)"
|
|
10
10
|
required: true
|
|
11
11
|
- name: task_id
|
|
12
12
|
description: Local task ID
|
|
@@ -17,9 +17,9 @@ version: "1.0.0"
|
|
|
17
17
|
tags: [workflow, github, task-sync, mcp]
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Export Task to GitHub
|
|
21
21
|
|
|
22
|
-
Entry=S0 → S1 → G1 → S2 → S3 → S4 Exit=exported|skipped
|
|
22
|
+
Entry=S0 → S1 → G1 → S2 → S3 → S4 → S5 Exit=exported|skipped
|
|
23
23
|
Guard: S(N) req S(N-1)✅; MCP + GitHub tools ONLY
|
|
24
24
|
|
|
25
25
|
S0 | fetch task via task-detail | task_id exists? | task data | —
|
|
@@ -28,3 +28,4 @@ G1 | dedup gate — if exists→update local task metadata with URL, DO NOT re-c
|
|
|
28
28
|
S2 | create issue via issue_write (match title/body, append task_code+id) | G1→new | GitHub issue created | —
|
|
29
29
|
S3 | post comments via add_issue_comment | S2✅ | comments transferred | —
|
|
30
30
|
S4 | link: task-update with GitHub URL + comment | S3✅ | task updated | —
|
|
31
|
+
S5 | verify: confirm issue exists on GitHub, check URL in task metadata | S4✅ | verified | —
|
|
@@ -17,13 +17,14 @@ category: debugging
|
|
|
17
17
|
tags: [fix, patch, bug-fix, code-change, test-case, debugging]
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Fix Suggestion
|
|
21
21
|
|
|
22
|
-
Entry=S0 → S1 Exit=suggestion
|
|
22
|
+
Entry=S0 → S1 → S2 Exit=suggestion
|
|
23
23
|
Guard: S(N) req S(N-1)✅
|
|
24
24
|
|
|
25
25
|
S0 | analyze inputs (tech_stack, bug_description, root_cause) | all req provided? | diagnosis | —
|
|
26
26
|
S1 | produce: explanation + before/after diff(`diff ... `) + meta checklist + regression test | S0✅ | fix suggestion | —
|
|
27
|
+
S2 | verify: confirm fix addresses root cause, test covers regression | S1✅ | verified | —
|
|
27
28
|
|
|
28
29
|
## Output Format (S1)
|
|
29
30
|
|
|
@@ -8,14 +8,15 @@ version: "1.0.0"
|
|
|
8
8
|
tags: [workflow, github, issue-import, mcp]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Import GitHub Issues
|
|
12
12
|
|
|
13
|
-
Entry=S0 → S1 → S2 → S3 → S4 Exit=imported
|
|
13
|
+
Entry=S0 → S1 → S2 → S3 → S4 → S5 Exit=imported
|
|
14
14
|
Guard: S(N) req S(N-1)✅
|
|
15
15
|
Hint: If repo not auto-detected, run `git remote -v` to get owner/repo from origin URL.
|
|
16
16
|
|
|
17
17
|
S0 | fetch open issues: primary=github-mcp-server; fallback=`gh issue list --json number,title,body,labels,url` | — | issue list | —
|
|
18
18
|
S1 | dedup via task-list (skip if GH-{number} exists) | S0✅ | filtered issues | —
|
|
19
|
-
S2 | create MCP tasks: task_code=GH-{number}, EXACT title/body (DO NOT summarize), tags=labels, phase=backlog|triage, metadata=URL | S1✅ | tasks created | —
|
|
19
|
+
S2 | create MCP tasks: task_code=GH-{number} (auto-generated as TASK-xxx if omitted), EXACT title/body (DO NOT summarize), tags=labels, phase=backlog|triage, metadata=URL | S1✅ | tasks created | —
|
|
20
20
|
S3 | import comments via issue_read → task-update | S2✅ | comments linked | —
|
|
21
21
|
S4 | report created count | S3✅ | summary | —
|
|
22
|
+
S5 | verify: confirm created task count matches new issues, no duplicates | S4✅ | verified | —
|
|
@@ -11,12 +11,19 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [workflow, retrospective, memory, knowledge-management]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Learning Retrospective
|
|
15
15
|
|
|
16
|
-
Entry=S0 → S1
|
|
16
|
+
Entry=S0 → S1 → S2 Exit=stored
|
|
17
17
|
Guard: S(N) req S(N-1)✅
|
|
18
18
|
|
|
19
19
|
S0 | identify: mistakes (bugs/quirks), decisions (trade-offs/pivots), patterns (conventions) | task_id? | knowledge items | —
|
|
20
20
|
S1 | store via memory-store (type=mistake|decision|pattern, include tech tags, concise) | S0✅ | durable memories | —
|
|
21
|
+
S2 | verify: confirm stored count matches identified items, check type correctness | S1✅ | verified | —
|
|
22
|
+
|
|
23
|
+
## Directives
|
|
24
|
+
|
|
25
|
+
- Use type: mistake | decision | pattern.
|
|
26
|
+
- Include technology tags.
|
|
27
|
+
- Keep content concise.
|
|
21
28
|
|
|
22
29
|
Task: {{task_id}}
|
|
@@ -8,9 +8,22 @@ version: "1.0.0"
|
|
|
8
8
|
tags: [memory, workflow, guardrails, mcp]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Memory Guardian Protocol
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
You are a memory-aware agent. Memory is project truth, not a suggestion.
|
|
14
|
+
|
|
15
|
+
## Core Rules
|
|
16
|
+
|
|
17
|
+
- Use hybrid search (70% Cosine + 30% BM25) with 0.55 threshold.
|
|
18
|
+
- NEVER contradict stored decisions without memory-update or supersedes.
|
|
19
|
+
- Use ONLY highly relevant memories + standards.
|
|
20
|
+
- Acknowledge after code gen using memory: memory-acknowledge(used|irrelevant|contradictory).
|
|
21
|
+
- Store ONLY if durable + affects future behavior.
|
|
22
|
+
- NEVER store coordination state (claims, file ownership) as memory.
|
|
23
|
+
|
|
24
|
+
## Execution Policy
|
|
25
|
+
|
|
26
|
+
Entry=S0 → S1 → S2 → S3 → S4 → S5 → S6 Exit=act
|
|
14
27
|
Guard: S(N) req S(N-1)✅; NEVER contradict stored decisions without memory-update or supersedes
|
|
15
28
|
|
|
16
29
|
S0 | orient: task-list + handoff-list (close stale pending) | session start? | active context | —
|
|
@@ -19,11 +32,13 @@ S2 | search: memory-search(Hybrid: 70% Cosine+30% BM25, 0.55 threshold) + standa
|
|
|
19
32
|
S3 | retrieve: memory-detail for full content if pointer rows insufficient | S2✅ | hydrated entries | —
|
|
20
33
|
S4 | select: use ONLY highly relevant memories + standards | S3✅ | filtered knowledge | —
|
|
21
34
|
S5 | acknowledge: after code gen using memory → memory-acknowledge(used|irrelevant|contradictory) | code generated? | feedback | —
|
|
35
|
+
S6 | verify: confirm no stored decisions contradicted, acknowledge called after code gen | S5✅ | verified | —
|
|
22
36
|
|
|
23
|
-
##
|
|
37
|
+
## Creation Policy
|
|
24
38
|
|
|
25
|
-
Entry=S0 → S1
|
|
39
|
+
Entry=S0 → S1 → S2 Exit=stored
|
|
26
40
|
Guard: store ONLY if durable + affects future behavior; use supersedes for overrides
|
|
27
41
|
|
|
28
42
|
S0 | categorize: type + tech tags; NEVER store coordination state (claims, file ownership) as memory | is durable? | classified | —
|
|
29
43
|
S1 | store: memory-store(decisions/patterns) or standard-store(normative rules) or handoff-create(transfer ctx) | S0✅ | stored | —
|
|
44
|
+
S2 | verify: confirm stored entity matches category, no forbidden types mixed in | S1✅ | verified | —
|
|
@@ -11,14 +11,15 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [code-review, memory, compliance, mcp]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Memory Guided Review
|
|
15
15
|
|
|
16
|
-
Entry=S0 → S1 → S2 → S3 Exit=reviewed
|
|
16
|
+
Entry=S0 → S1 → S2 → S3 → S4 Exit=reviewed
|
|
17
17
|
Guard: S(N) req S(N-1)✅
|
|
18
18
|
|
|
19
19
|
S0 | search: memory-search (file_path) + standard-search (lang, stack, repo) | file_path provided? | relevant rules | —
|
|
20
20
|
S1 | hydrate: memory-detail for relevant pointers | S0✅ | full rules | —
|
|
21
21
|
S2 | evaluate compliance vs patterns, documented mistakes, standards | S1✅ | violation list | —
|
|
22
22
|
S3 | feedback: suggest fixes citing source (memory|standard) | S2✅ | review report | —
|
|
23
|
+
S4 | verify: confirm all relevant rules evaluated, no missed violations | S3✅ | verified | —
|
|
23
24
|
|
|
24
25
|
File: {{file_path}}
|
|
@@ -8,15 +8,16 @@ version: "1.0.0"
|
|
|
8
8
|
tags: [memory, indexing, policy, mcp]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Memory Index Policy
|
|
12
12
|
|
|
13
|
-
Entry=G0 → S0 → S1 → S2 Exit=stored|rejected
|
|
13
|
+
Entry=G0 → S0 → S1 → S2 → S3 Exit=stored|rejected
|
|
14
14
|
Guard: S(N) req S(N-1)✅
|
|
15
15
|
|
|
16
16
|
G0 | is durable + project-specific? NOT forbidden types? | content provided? | → S0 / reject | —
|
|
17
17
|
S0 | classify type (code_fact|decision|mistake|pattern|task_archive) + tech tags | G0✅ | classified | —
|
|
18
18
|
S1 | scope: is_global ONLY if cross-repo applicable | S0✅ | scoped | —
|
|
19
19
|
S2 | store via memory-store | S1✅ | memory created | —
|
|
20
|
+
S3 | verify: confirm type matches content, scope is correct, tags are accurate | S2✅ | verified | —
|
|
20
21
|
|
|
21
22
|
## Forbidden (G0→reject)
|
|
22
23
|
|
|
@@ -8,9 +8,9 @@ version: "1.0.0"
|
|
|
8
8
|
tags: [workflow, briefing, onboarding, memory, backlog]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Project Briefing
|
|
12
12
|
|
|
13
|
-
Entry=S0 → S1-4(parallel) → S5 → S6 Exit=briefed
|
|
13
|
+
Entry=S0 → S1-4(parallel) → S5 → S6 → S7 Exit=briefed
|
|
14
14
|
Guard: S(N) req S(N-1)✅
|
|
15
15
|
|
|
16
16
|
S0 | identify current repo | — | repo context | —
|
|
@@ -20,3 +20,4 @@ S3 | load memory: memory-search or memory-recap; hydrate via memory-detail | S0
|
|
|
20
20
|
S4 | load standards: standard-search (repo, stack) | S0✅ | applicable standards | —
|
|
21
21
|
S5 | summarize core: active task + pending handoffs + standards + top decisions | S1-4✅ | briefing | —
|
|
22
22
|
S6 | propose next steps based on active queue; priority: 1=Low 2=Normal 3=Medium 4=High 5=Critical | S5✅ | action plan | —
|
|
23
|
+
S7 | verify: confirm all sources loaded (tasks, handoffs, memory, standards), briefing complete | S6✅ | verified | —
|
|
@@ -11,15 +11,26 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [workflow, audit, ux, gap-analysis, mcp]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Review and Audit
|
|
15
15
|
|
|
16
|
-
Entry=S0 → S1 → S2 → S3
|
|
16
|
+
Entry=S0 → S1 → S2 → S3 → S4 Exit=done
|
|
17
17
|
Guard: S(N) req S(N-1)✅; NO code/edit/delete — read+MCP tools ONLY
|
|
18
18
|
|
|
19
19
|
S0 | sequential discovery: docs → code → UI (chrome-dev-tools) | — | findings | —
|
|
20
20
|
S1 | pre-task analysis: memory-search (0.55 threshold) + standard-search + handoff-list + task-list dedup | S0✅ | context | —
|
|
21
|
-
S2 | design tasks: atomic, attributes (task_code, phase, priority, agent, model), strict description format | S1✅ | task specs | —
|
|
21
|
+
S2 | design tasks: atomic, attributes (task_code optional — auto-generated as TASK-xxx, phase, priority, agent, model), strict description format | S1✅ | task specs | —
|
|
22
22
|
S3 | create via task-create + log decisions via memory-store + standard-store for coding rules | S2✅ | MCP tasks | —
|
|
23
|
+
S4 | verify: confirm task count matches gap count, description format compliance, parent/child linkage | S3✅ | verified | —
|
|
24
|
+
|
|
25
|
+
## FORBIDDEN: NON-EXECUTION
|
|
26
|
+
|
|
27
|
+
DO NOT edit/create/delete files, run commands, or implement code.
|
|
28
|
+
Allowed: Read code, chrome-dev-tools, task-create, memory-store, task-list, memory-search, standard-search, handoff-list, handoff-update.
|
|
29
|
+
|
|
30
|
+
## SELF-CHECK
|
|
31
|
+
|
|
32
|
+
- No implementation.
|
|
33
|
+
- ONLY MCP tool calls.
|
|
23
34
|
|
|
24
35
|
## Description Format (STRICT — used in S2)
|
|
25
36
|
|
|
@@ -3,10 +3,10 @@ name: review-and-post-issue
|
|
|
3
3
|
description: Audit documentation against implementation; generate GitHub issues for gaps.
|
|
4
4
|
arguments:
|
|
5
5
|
- name: owner
|
|
6
|
-
description: GitHub repo owner. (hint: run `git remote -v` to extract from origin URL)
|
|
6
|
+
description: "GitHub repo owner. (hint: run `git remote -v` to extract from origin URL)"
|
|
7
7
|
required: true
|
|
8
8
|
- name: repo
|
|
9
|
-
description: GitHub repo name. (hint: run `git remote -v` to extract from origin URL)
|
|
9
|
+
description: "GitHub repo name. (hint: run `git remote -v` to extract from origin URL)"
|
|
10
10
|
required: true
|
|
11
11
|
- name: target
|
|
12
12
|
description: Module, feature, or component to audit.
|
|
@@ -17,15 +17,31 @@ version: "1.0.0"
|
|
|
17
17
|
tags: [workflow, audit, github, issue-triage]
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Review and Post Issue
|
|
21
21
|
|
|
22
|
-
Entry=S0 → S1 → S2 → S3 Exit=done
|
|
22
|
+
Entry=S0 → S1 → S2 → S3 → S4 Exit=done
|
|
23
23
|
Guard: S(N) req S(N-1)✅; NO code/edit/delete — GitHub+MCP tools ONLY
|
|
24
24
|
|
|
25
25
|
S0 | sequential discovery: docs → code → UI (chrome-dev-tools if applicable) | — | findings | —
|
|
26
26
|
S1 | pre-issue analysis: memory-search (0.55 threshold) + search_issues dedup (comment on related if distinct) | S0✅ | context | —
|
|
27
27
|
S2 | design issues: atomic, strict body format, labels | S1✅ | issue specs | —
|
|
28
28
|
S3 | create via issue_write(method=create) | S2✅ | GitHub issues | —
|
|
29
|
+
S4 | verify: confirm issue count matches gap count, all issues created on GitHub | S3✅ | verified | —
|
|
30
|
+
|
|
31
|
+
## FORBIDDEN: NON-EXECUTION
|
|
32
|
+
|
|
33
|
+
DO NOT edit/create/delete files, run commands, or implement code.
|
|
34
|
+
Allowed: Read code, chrome-dev-tools, memory-search, GitHub search_issues, issue_write.
|
|
35
|
+
|
|
36
|
+
## OUTPUT: GITHUB ONLY
|
|
37
|
+
|
|
38
|
+
ONLY call: search_issues, issue_write (method: create), memory-search.
|
|
39
|
+
No prose. No external plans.
|
|
40
|
+
|
|
41
|
+
## SELF-CHECK
|
|
42
|
+
|
|
43
|
+
- No implementation.
|
|
44
|
+
- ONLY GitHub/Memory tool calls.
|
|
29
45
|
|
|
30
46
|
## Issue Body Format (STRICT — used in S2)
|
|
31
47
|
|
|
@@ -17,14 +17,15 @@ version: "1.0.0"
|
|
|
17
17
|
tags: [root-cause, 5-why, debugging, diagnosis]
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Root Cause Analysis
|
|
21
21
|
|
|
22
|
-
Entry=S0 → S1 → S2 → S3 Exit=diagnosis
|
|
22
|
+
Entry=S0 → S1 → S2 → S3 → S4 Exit=diagnosis
|
|
23
23
|
Guard: S(N) req S(N-1)✅
|
|
24
24
|
|
|
25
25
|
S0 | restate symptom: technical problem statement | tech_stack + bug_description provided? | symptom statement | —
|
|
26
26
|
S1 | 5-why analysis: causal chain from symptom to core failure | S0✅ | causal chain | —
|
|
27
27
|
S2 | identify root cause: "root cause is [X] because [Y], allowing [Z]" | S1✅ | root cause | —
|
|
28
28
|
S3 | recommend fix addressing root cause + prevention (monitoring/test) | S2✅ | recommendation | —
|
|
29
|
+
S4 | verify: confirm causal chain is logically sound, root cause is minimal sufficient explanation | S3✅ | verified | —
|
|
29
30
|
|
|
30
31
|
Stack: {{tech_stack}} Bug: {{bug_description}} Symptoms: {{symptoms}}
|
|
@@ -17,15 +17,20 @@ version: "1.0.0"
|
|
|
17
17
|
tags: [security, triage, vulnerability, cvss, appsec]
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Security Triage
|
|
21
21
|
|
|
22
|
-
Entry=S0 → S1 → S2 → S3 → S4
|
|
22
|
+
Entry=S0 → S1 → S2 → S3 → S4 → S5 Exit=assessment
|
|
23
23
|
Guard: S(N) req S(N-1)✅
|
|
24
24
|
|
|
25
|
-
S0 | classify: type, CVE, CVSS vector, score | tech_stack + vuln_report provided? | classification | —
|
|
25
|
+
S0 | classify: web_search (CVE/CVSS details) → type, CVE, CVSS vector, score | tech_stack + vuln_report provided? | classification | —
|
|
26
26
|
S1 | assess exploitability: reachability + attack scenarios | S0✅ | exploit scenarios | —
|
|
27
27
|
S2 | assess impact: CIA triad | S1✅ | impact assessment | —
|
|
28
28
|
S3 | remediate: priority P0-P3 + fix steps | S2✅ | remediation plan | —
|
|
29
29
|
S4 | verify: testing method to confirm fix | S3✅ | verification plan | —
|
|
30
|
+
S5 | verify: confirm remediation addresses all exploit scenarios, verification plan is actionable | S4✅ | verified | —
|
|
30
31
|
|
|
31
32
|
Stack: {{tech_stack}} Report: {{vulnerability_report}} Context: {{codebase_context}}
|
|
33
|
+
|
|
34
|
+
## Delegation
|
|
35
|
+
|
|
36
|
+
Web search MUST be delegated to a coding subagent (general/explore). Main agent must NOT execute web_search directly.
|
|
@@ -14,14 +14,15 @@ category: coding
|
|
|
14
14
|
tags: [code-review, production-readiness, security, observability, senior-review, architecture]
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Senior Code Review
|
|
18
18
|
|
|
19
|
-
Entry=S0 → S1 → S2 → S3 Exit=decision
|
|
19
|
+
Entry=S0 → S1 → S2 → S3 → S4 Exit=decision
|
|
20
20
|
Guard: S(N) req S(N-1)✅; cite code evidence only; ONE fix option per finding
|
|
21
21
|
|
|
22
22
|
S0 | audit 6 dimensions: errors, security, performance (N+1, cache, complexity), observability (logs, metrics, traces), testing (coverage, quality), docs (clarity) | tech_stack provided? | findings[] | —
|
|
23
23
|
S1 | check cross-domain invariants: lifecycle, concurrency guard, derived state, upload safety, file>500→refactor, doc hierarchy | S0✅ | invariant results | —
|
|
24
24
|
S2 | assign severity: CRITICAL (bug/data loss) | HIGH (concurrency/arch) | MEDIUM (maintainability) | LOW (cosmetic) | S0-1✅ | scored findings | —
|
|
25
25
|
S3 | produce: DECISION (APPROVE|REQUEST_CHANGES|NOT_READY) + SEVERITY_SCORE + MESSAGE (blockers only) | S2✅ | review decision | —
|
|
26
|
+
S4 | verify: confirm all 6 dimensions covered, severity scoring correct, no missed findings | S3✅ | verified | —
|
|
26
27
|
|
|
27
28
|
Stack: {{tech_stack}} Context: {{context}}
|
|
@@ -11,9 +11,9 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [workflow, github, issue-resolution, sentinel]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Sentinel Issue Resolver
|
|
15
15
|
|
|
16
|
-
Entry=S0 → S1 → S2 → S3 → S4 → S5 → S6 → S7 → S8 Exit=resolved
|
|
16
|
+
Entry=S0 → S1 → S2 → S3 → S4 → S5 → S6 → S7 → S8 → S9 Exit=resolved
|
|
17
17
|
Guard: S(N) req S(N-1)✅; autonomous — no permission per step
|
|
18
18
|
Hint: If repo not auto-detected from issue_url, run `git remote -v` to get owner/repo from origin URL.
|
|
19
19
|
|
|
@@ -26,5 +26,36 @@ S5 | research: memory-search + standard-search + codebase exploration (trace cal
|
|
|
26
26
|
S6 | register: task-create (link issue URL) + task-claim + task-update→in_progress | S5✅ | MCP task | —
|
|
27
27
|
S7 | implement fix + validate: tests, linters, e2e | S6✅ | verified changes | —
|
|
28
28
|
S8 | finalize: commit (type(scope): msg — fix #N) + task-update→completed + issue comment summary | S7✅ | resolution | —
|
|
29
|
+
S9 | verify: confirm commit pushed, issue comment posted, task marked completed | S8✅ | verified | —
|
|
30
|
+
|
|
31
|
+
## SENTINEL Protocol
|
|
32
|
+
|
|
33
|
+
You are SENTINEL, an elite issue resolution agent. Primary objective: eliminate errors and fulfill requirements described in GitHub issues with surgical precision.
|
|
34
|
+
|
|
35
|
+
## OUTPUT: AUTONOMOUS ACTION
|
|
36
|
+
|
|
37
|
+
Do not ask for permission for each step. Analyze, plan, fix, and verify. Provide a final summary of the resolution to the user.
|
|
38
|
+
|
|
39
|
+
## Intelligence Gathering
|
|
40
|
+
|
|
41
|
+
1. Analyze Issue: Prefer GitHub CLI (gh issue view --comments --json number,title,body,comments,url,labels) to fetch the issue body and all comments. This is the primary path because it uses authenticated GH CLI access for private repos.
|
|
42
|
+
2. Private Repo & Image Analysis: Run gh auth status and gh repo view --json nameWithOwner,isPrivate to confirm access, then use GH CLI to resolve private image/asset URLs.
|
|
43
|
+
3. Context Synthesis: Combine issue data with local codebase knowledge. Search project memory (memory-search) and coding standards (standard-search) to ensure fix aligns with existing architecture.
|
|
44
|
+
4. Task Registration: Use task-create to register your plan in MCP. Link the task to the GitHub Issue URL in metadata.
|
|
45
|
+
|
|
46
|
+
## Finalization & Commit
|
|
47
|
+
|
|
48
|
+
1. Identity: Use the local Git configuration (name/email) for all commits.
|
|
49
|
+
2. Commit Format:
|
|
50
|
+
type(scope): commit message
|
|
51
|
+
- {{task_title}}
|
|
52
|
+
{{summary_task}}
|
|
53
|
+
|
|
54
|
+
{{keyword}} #{{issue_number}}
|
|
55
|
+
|
|
56
|
+
Use fix for bug fixes, closes for features/chores, resolve as general. Extract issue number from issue_url.
|
|
57
|
+
|
|
58
|
+
3. MCP Update: Transition task to completed with a detailed comment linking to the resolution.
|
|
59
|
+
4. Issue Closure: Add a final comment to the GitHub issue summarizing the fix.
|
|
29
60
|
|
|
30
61
|
Target: {{issue_url}}
|
|
@@ -5,7 +5,7 @@ description: Main instructions for the MCP server
|
|
|
5
5
|
|
|
6
6
|
Local Memory MCP — persistent memory, task coordination, and coding standards for AI agents.
|
|
7
7
|
|
|
8
|
-
## Session Start
|
|
8
|
+
## Session Start Mode
|
|
9
9
|
|
|
10
10
|
Entry=orient → hydrate → ready Guard: S(N) req S(N-1)✅
|
|
11
11
|
|
|
@@ -40,16 +40,28 @@ S2 | continue to task or respond | S1✅ | ready | —
|
|
|
40
40
|
|
|
41
41
|
## Available Prompts (slash commands)
|
|
42
42
|
|
|
43
|
-
- `session-planner` — orient and plan at session start
|
|
44
|
-
- `task-memory-executor` — execute tasks with memory and standard enforcement
|
|
45
|
-
- `senior-code-review` — full code review against stored standards
|
|
46
|
-
- `memory-guided-review` — review using project memory as context
|
|
47
43
|
- `architecture-design` — architectural planning and ADR generation
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
44
|
+
- `create-task` — create structured, atomic tasks in Local Memory MCP
|
|
45
|
+
- `csl-from-docs` — create atomic CSL coding standards entries from a local file or directory path
|
|
46
|
+
- `csl-scrapper` — scrape trusted documentation from a URL into atomic CSL coding standards entries
|
|
47
|
+
- `documentation-sync` — sync docs with current codebase state
|
|
48
|
+
- `export-task-to-github` — export local tasks to GitHub Issues
|
|
50
49
|
- `fix-suggestion` — propose and validate fixes
|
|
51
|
-
- `
|
|
52
|
-
- `sentinel-issue-resolver` — autonomous GitHub issue resolution (SENTINEL identity)
|
|
50
|
+
- `import-github-issues` — import GitHub Issues as local tasks
|
|
53
51
|
- `learning-retrospective` — capture lessons and update memory
|
|
54
|
-
- `
|
|
52
|
+
- `memory-agent-core` — behavioral contract for memory-aware agents
|
|
53
|
+
- `memory-guided-review` — review using project memory as context
|
|
54
|
+
- `memory-index-policy` — strict memory storage criteria
|
|
55
55
|
- `project-briefing` — generate repository briefing from memory
|
|
56
|
+
- `review-and-audit` — audit documentation against implementation; generate local tasks for gaps
|
|
57
|
+
- `review-and-post-issue` — audit documentation against implementation; generate GitHub issues for gaps
|
|
58
|
+
- `root-cause-analysis` — structured bug / incident investigation
|
|
59
|
+
- `security-triage` — security risk assessment
|
|
60
|
+
- `senior-code-review` — full code review against stored standards
|
|
61
|
+
- `sentinel-issue-resolver` — autonomous GitHub issue resolution (SENTINEL identity)
|
|
62
|
+
- `session-planner` — orient and plan at session start
|
|
63
|
+
- `task-management-guidelines` — task tracking and progress management standards
|
|
64
|
+
- `task-memory-executor` — execute tasks with memory and standard enforcement
|
|
65
|
+
- `tech-affinity-scout` — scout best practices from similar tech projects
|
|
66
|
+
- `technical-planning` — feature planning with task decomposition
|
|
67
|
+
- `tool-usage-guidelines` — tool usage standards and data integrity
|
|
@@ -11,16 +11,17 @@ version: "1.0.0"
|
|
|
11
11
|
tags: [workflow, planning, task-breakdown]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Session Planner
|
|
15
15
|
|
|
16
|
-
Entry=S0 → S1 → S2 → S3 → S4 → S5
|
|
16
|
+
Entry=S0 → S1 → S2 → S3 → S4 → S5 → S6 Exit=planned
|
|
17
17
|
Guard: S(N) req S(N-1)✅
|
|
18
18
|
|
|
19
19
|
S0 | orient: task-list (avoid dupes) + standard-search (if code edits) + handoff-list (close stale) | objective provided? | existing state | —
|
|
20
20
|
S1 | analyze: break into 3-7 atomic verifiable tasks | S0✅ | task breakdown | —
|
|
21
21
|
S2 | phase: group into research / implementation / validation | S1✅ | phased tasks | —
|
|
22
22
|
S3 | hierarchy: parent_id + depends_on for sequencing; priority 1-5 scale | S2✅ | structured plan | —
|
|
23
|
-
S4 | create via task-create (stable task_code, tags, acceptance criteria) | S3✅ | MCP tasks | —
|
|
23
|
+
S4 | create via task-create (stable task_code or omit for auto-generated TASK-xxx, tags, suggested_skills if relevant, acceptance criteria) | S3✅ | MCP tasks | —
|
|
24
24
|
S5 | display final plan to user | S4✅ | user output | —
|
|
25
|
+
S6 | verify: confirm task count is 3-7, phases assigned, hierarchy correct | S5✅ | verified | —
|
|
25
26
|
|
|
26
27
|
Objective: {{objective}}
|
|
@@ -8,9 +8,9 @@ version: "1.0.0"
|
|
|
8
8
|
tags: [workflow, tasks, status-management, mcp]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Task Lifecycle
|
|
12
12
|
|
|
13
|
-
Entry=S0 → S1 → S2 → S3 → S4
|
|
13
|
+
Entry=S0 → S1 → S2 → S3 → S4 → S5 Exit=done|archived
|
|
14
14
|
Guard: S(N) req S(N-1)✅; MUST transition backlog/pending → in_progress → completed
|
|
15
15
|
|
|
16
16
|
S0 | plan: task-create for full lifecycle (Research→Strategy→Execution→Validation) | — | tasks | —
|
|
@@ -18,12 +18,41 @@ S1 | claim: task-claim with task_code; inspect via claim-list | S0✅, not claim
|
|
|
18
18
|
S2 | progress: task-update → in_progress | S1✅ | active work | —
|
|
19
19
|
S3 | validate: tests pass / explicit doc why verification skipped | S2✅ | evidence | —
|
|
20
20
|
S4 | complete: task-update → completed (auto-releases claims, expires handoffs, archives) | S3✅ | completion | —
|
|
21
|
+
S5 | verify: confirm completion evidence documented, auto-cleanup triggered | S4✅ | verified | —
|
|
21
22
|
|
|
22
|
-
##
|
|
23
|
+
## Navigation
|
|
23
24
|
|
|
24
|
-
Entry=S0 → S1 → S2
|
|
25
|
+
Entry=S0 → S1 → S2 → S3 Exit=mutated
|
|
25
26
|
Guard: S(N) req S(N-1)✅
|
|
26
27
|
|
|
27
28
|
S0 | list: task-list (in_progress, pending) | — | pointer table | —
|
|
28
29
|
S1 | detail: task-detail after selecting (includes claims + handoffs) | S0✅ | full context | —
|
|
29
30
|
S2 | mutate: task-create | task-update | task-delete | S1✅ | changed | —
|
|
31
|
+
S3 | verify: confirm mutation succeeded, check task-list reflects change | S2✅ | verified | —
|
|
32
|
+
|
|
33
|
+
## Navigation (task-list)
|
|
34
|
+
|
|
35
|
+
- Sync: Call task-list at every session start (default: in_progress,pending).
|
|
36
|
+
- Format: Compact pointer table: id, task_code, title, status, priority, updated_at, comments_count. Use query for keyword search.
|
|
37
|
+
- Priority Scale: Interpret priority with MCP semantics: 1=Low, 2=Normal, 3=Medium, 4=High, 5=Critical.
|
|
38
|
+
- Retrieve: Fetch full context via task-detail AFTER selecting a task. Hydrated task includes current coordination state (active claims, pending handoffs).
|
|
39
|
+
- Coordination: Check active ownership with task-claim and claim-list. NEVER work on tasks claimed by others. Focus on ONE task at a time.
|
|
40
|
+
|
|
41
|
+
## Detail Tools
|
|
42
|
+
|
|
43
|
+
- Tasks: Call task-detail for history/comments (ID or task_code).
|
|
44
|
+
- Memory: Call memory-detail for full entry content.
|
|
45
|
+
- Standards: Call standard-search before any code edit, test edit, refactor, migration, or implementation decision. If no relevant standards returned, note that.
|
|
46
|
+
- Handoffs: Call handoff-list to discover pending context transfers before starting a task. Close stale handoffs with handoff-update.
|
|
47
|
+
|
|
48
|
+
## Workflow Rules
|
|
49
|
+
|
|
50
|
+
- Planning: Create tasks for full lifecycle (Research → Strategy → Execution → Validation).
|
|
51
|
+
- Transition Safety: MUST move from backlog/pending → in_progress → completed. Skipping in_progress is forbidden.
|
|
52
|
+
- Automatic Cleanup: task-update to completed or canceled automatically releases active claims and expires pending handoffs linked to that task.
|
|
53
|
+
- Claiming: Use task-claim when taking ownership, with task_code when working from human-visible queues.
|
|
54
|
+
- Claim Inspection: Use claim-list when ownership is unclear or when triaging stale work.
|
|
55
|
+
- Claim Release: Use claim-release to clear stale ownership when a task is being handed back or reassigned.
|
|
56
|
+
- Handoff: Use handoff-create only when pausing or transferring unfinished work. Do not use pending handoffs for completion summaries.
|
|
57
|
+
- Validation: Only mark completed after passing tests or explicitly documenting why verification could not run.
|
|
58
|
+
- Archiving: Completion triggers auto-archive to task_archive memory with token reporting.
|