@skedulo/memory-hub-mcp 0.2.14 → 0.2.16

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.
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: plan-ticket
3
+ description: Use when a developer wants to plan a Linear ticket for a customer project against that project's knowledge in the memory hub, e.g. "plan SOL-1234", "break this story down". Approving the plan creates the sub-issues and starts the Linear Dev Agent, unless the developer says "plan only" or "don't assign".
4
+ argument-hint: "<ticket, e.g. SOL-1234>"
5
+ ---
6
+
7
+ # Plan a ticket
8
+
9
+ Turn one Linear issue (the parent) into a master plan of outcomes, using the project's rules,
10
+ don't-build list and reference pages from the memory hub, and the code. The project knowledge format
11
+ is defined in the project-knowledge skill's `references/page-format.md`; the parts you need are
12
+ restated here.
13
+
14
+ Decide, then report. Resolve conflicts and gaps yourself with the rules in step 4 and write your
15
+ reasoning into the plan. The developer is asked one thing only: to approve the plan. Approval also
16
+ starts delivery: the plan is delegated and the first sub-issues go to the Linear Dev Agent, unless the
17
+ developer says "plan only" or "don't assign".
18
+
19
+ ## First, check the server version
20
+
21
+ Look at the parameters of the `memory_update` and `memory_save` tools; if only their names are
22
+ listed, load their schemas first. If either tool is missing, the memory-hub server is not connected:
23
+ say so and stop. If `memory_update` has no `expectedLastModified` parameter, or `memory_save`'s `tags`
24
+ values do not include `ProjectRules`, the memory-hub server is older than this release. Stop, do
25
+ nothing else, and tell the developer to update it:
26
+
27
+ - plugin installs, and `setup` installs with auto-update: restart Claude Code;
28
+ - pinned installs: re-run `npx -y @skedulo/memory-hub-mcp@latest setup --no-auto-update`;
29
+ - a checkout of the se-ai-memory-hub repo: pull and re-run `scripts/setup-dev.sh`.
30
+
31
+ ## 1. Read the ticket
32
+
33
+ With the Linear connector, read the parent issue: title, description, acceptance criteria, labels
34
+ (keep every `ref-repo:*` label), project, comments, and linked or related issues. If the Linear
35
+ connector is not connected, stop and tell the developer.
36
+
37
+ ## 2. Load only the knowledge this ticket needs
38
+
39
+ `memory_list` returns `total` and one page of items; call it again with `offset` until you have all
40
+ `total` of them.
41
+
42
+ 1. Find the project's team and delivery repo. Try in order: the team of the ticket's `repo/…` label
43
+ (`memory_listRepos`); the ticket's Linear project or team name matched to a `teamName` from
44
+ `memory_listRepos`, ignoring case and punctuation; the team linked to the current checkout
45
+ (`memory_checkRepoStatus`). When the checkout's team differs from one the ticket gives, the
46
+ ticket's own signals win; say so in the plan's Decisions. When only the checkout gives a team, it is
47
+ a guess: put it first in the plan's Decisions, so approving the plan confirms it. The delivery repo
48
+ is the team's repo that holds pages titled `<Project> › Rules ›` (list each of the team's repos with
49
+ `memory_list type=Wiki repo=<repo uid>`).
50
+ 2. If no repo of the team has Rules pages, or the delivery repo has them but no
51
+ `<Project> › Sources` page (an earlier run stopped partway), run the project-knowledge skill first
52
+ (`memory-hub:project-knowledge` when installed as a plugin), handing it the team and project from
53
+ step 1; it picks create or import itself. Never do this for a team only the checkout gave: end the
54
+ run instead, saying that no knowledge exists for the guessed team and that adding a
55
+ `repo/skedulo/<repo>` label to the ticket fixes it.
56
+ Then continue, and show its summary together with the plan in the approval message.
57
+ 3. Find the features the ticket touches with `<Project> › Reference › feature-map`: match the files,
58
+ repos and screens the ticket names, its labels, epic and project, and its wording against each
59
+ feature's code paths, tickets and business processes. Read those features' Rules pages in full with
60
+ `memory_get type=Wiki uid=<uid>` (every part of a split page), and say in the plan's Decisions which
61
+ features you matched and why. Without a feature map, pick from the Rules page titles. Always read
62
+ `<Project> › Don't build` (every part).
63
+ 4. Read only the reference pages the work needs (data model, APIs, workflows, troubleshooting).
64
+ 5. Read what the hub already knows about this ticket: `memory_recall type=Fact scope=team
65
+ externalRef=<parent>` and `memory_recall type=Scenario scope=team externalRef=<parent>`. Read an
66
+ existing plan Scenario in full with `memory_get`, because recall shortens items.
67
+ 6. For each repo involved, read its architecture map: `memory_list type=Skill tags=["ArchitectureMap"]`,
68
+ then `memory_get type=Skill uid=<uid>` on the ones for those repos.
69
+
70
+ Entry lines look like `- **LMB-R13** · core · verified — <rule> _Source: ..._`. `core` entries change
71
+ only with the developer's explicit confirmation. An `unverified` entry marked `Pending <ticket>` is a
72
+ decision the code does not have yet; any other `unverified` entry is backed by a single document, by
73
+ Slack, or was not found in the code. Ignore entries under a page's `## Retired` section. For an entry
74
+ marked `Conflict: overridden by ...`, use the entry that overrides it, never the overridden one.
75
+
76
+ ## 3. Read the code
77
+
78
+ 1. Search the local checkout first, at the repo's default branch as it is on the remote: run
79
+ `git -C <checkout> fetch -q origin`, then search with `git -C <checkout> grep "<term>" origin/<default>`
80
+ and read files with `git -C <checkout> show origin/<default>:<path>`, never the working tree, which
81
+ may be on a feature branch.
82
+ 2. Then the other repos the work touches: those named in `package.json` dependencies, in imports, and
83
+ in architecture-map edges (runtime calls that imports miss). Read them with `gh`:
84
+ `gh search code --repo <owner/name> "<term>"`, `gh api repos/<owner>/<name>/contents/<path>`.
85
+ 3. Note the commit each repo was read at: `git rev-parse origin/<default>` locally, or
86
+ `gh api repos/<owner>/<name>/commits/<branch> --jq .sha`. The plan records it.
87
+
88
+ ## 4. Decide instead of asking
89
+
90
+ Settle each of these yourself and record the decision under "Decisions" in the plan, one line each
91
+ with the reason and the source. These are the project-knowledge skill's decision rules:
92
+
93
+ - Sources disagree: a decided ticket wins over the code: one whose workflow state type is `started`,
94
+ one with a linked open PR, a confirmed bug report (a Bug label and a state type of `unstarted` or
95
+ `started`), or a ticket whose delivery plan was approved (a `Delivery plan (approved <date>)`
96
+ comment on it), whatever its state, until it is `completed` or `canceled`. Other tickets in
97
+ `triage`, `backlog` or `unstarted`, and `canceled` or duplicate tickets, are ideas, not decisions:
98
+ they never override the code. For `completed` tickets the code wins, because it already reflects
99
+ them. Otherwise the code wins. Among documents, after a newer ticket decision: on whether something
100
+ is in or out of scope, SOWs, work orders and change requests win over technical documents, and among
101
+ them the newer one wins (a change request amends the SOW). On how the system works, technical
102
+ documents win over business documents, and between two technical documents the newer one wins.
103
+ Slack comes last.
104
+ - The parent ticket being planned counts as a decided ticket. Where it contradicts a `standard` or
105
+ `detail` rule, follow the ticket and list the change under "Knowledge changes", marked
106
+ "from ticket".
107
+ - The ticket contradicts a `core` rule or a don't-build item: plan the outcome so it keeps the rule,
108
+ and put the conflict under "Open questions". Never plan work that breaks a `core` entry.
109
+ - An acceptance criterion cannot be tested as written: rewrite it as a testable check and note the
110
+ rewrite under "Decisions".
111
+ - An entry marked `Pending <ticket>`: if that ticket is the parent, plan it as this work's own
112
+ decision. If its ticket is still decided, plan for the pending decision and add `<ticket> (pending)`
113
+ to the outcome's "Depends on", so the sub-issue waits for that ticket. If its ticket is now
114
+ `completed`: when the code has the behaviour, list a "from code" Knowledge change that drops the
115
+ `Pending` note, makes the entry `verified` and removes its known-gap line from the troubleshooting
116
+ page; when it does not, the code wins: plan from what the code does and list a "from code" change
117
+ that replaces the `Pending` note with `(not found in code)`, keeping the entry `unverified` and its
118
+ gap on the troubleshooting page. If its ticket was `canceled` or is no longer decided by the rule
119
+ above, the code wins: list the entry under "Knowledge changes", marked "from code", with the
120
+ removal of its known-gap line from the troubleshooting page. Never list a still-pending entry under
121
+ "Knowledge changes".
122
+ - Any other `unverified` entry the work depends on: check it in the code. If the code confirms it,
123
+ say so. If not, plan from what the code does and list the entry under "Knowledge changes", marked
124
+ "from code".
125
+
126
+ ## 5. Write the plan
127
+
128
+ Outcomes are grouped by milestone and ordered: object model first, then functions and automations,
129
+ then UI. Each outcome is one pull request in one repo, small enough for one agent session. If one is
130
+ bigger, split it. When revising a plan, keep the numbers of the outcomes that remain.
131
+
132
+ ```markdown
133
+ # Delivery plan: <PARENT-ID> <title>
134
+
135
+ Project: <Project> · Read at: <owner/name>@<full sha>, ... · Auto-assign: on
136
+
137
+ ## Milestone 1: <name>
138
+
139
+ ### 1.1 <outcome title>
140
+ - Repo: <owner/name> · Base branch: <branch>
141
+ - Goal: <one sentence>
142
+ - Done when: <testable checks: commands to run, observable behaviour>
143
+ - Rules: <existing IDs it must satisfy, e.g. LMB-R13, LMB-C4, and `new: Knowledge change <n>` for a
144
+ change below>
145
+ - Must not: <don't-build IDs and explicit exclusions>
146
+ - Files it may change: <paths or globs>
147
+ - Depends on: <outcome numbers, other tickets as `<ID> (pending)`, or none>
148
+
149
+ ## Decisions
150
+ - <each conflict or gap you settled, with the rule and source, and the features you matched, or "None">
151
+
152
+ ## Knowledge changes
153
+ 1. <from code | from ticket>: <the new or changed entry, with the decision that prompted it> (or "None")
154
+
155
+ ## Open questions
156
+ - <only conflicts with core rules or don't-build items, naming the outcomes they affect, or "None">
157
+ ```
158
+
159
+ The `Rules:` line names existing IDs only; a new entry is a numbered item under "Knowledge changes"
160
+ without an ID. `Auto-assign` is `on` for a first plan unless the developer says "don't assign". When
161
+ revising, copy the value from the existing plan Scenario's header (a header without it counts as
162
+ `off`), set it to `off` when the developer says "don't assign", and to `on` when they say "assign" or
163
+ "start the agent".
164
+
165
+ Before showing the plan, apply the confidentiality rules to it, so the text the developer approves is
166
+ the text that is posted: no commercial terms (prices, rates, budgets, contract values, payment
167
+ terms), no customer personal data (names, emails or phone numbers of customer staff or end users), no
168
+ verbatim contract text (restate scope as function), no customer data rows or production record IDs
169
+ (UUIDs, Salesforce record IDs), no credentials, tokens or secrets.
170
+
171
+ Show the plan with a short note of what to look at first (the decisions and any open questions), and
172
+ end with what approval does: it posts the plan to <PARENT-ID>, saves it to the hub, creates one
173
+ sub-issue per outcome, and starts the Linear Dev Agent on the ones that are not blocked; "plan only"
174
+ or "don't assign" stops that. Approval is an explicit yes to the plan as last shown, with nothing to
175
+ change. If the reply asks for any change, even next to a yes, revise the plan, show it again and ask
176
+ again. Do not write anything to Linear or the hub before it is approved.
177
+
178
+ ## 6. Record the approved plan
179
+
180
+ 1. Check the approved plan against the confidentiality rules once more. If anything still has to be
181
+ removed, note it in your report.
182
+ 2. Unless the developer said "plan only", apply the "Knowledge changes" with the project-knowledge
183
+ skill's targeted update (`memory-hub:project-knowledge` when installed as a plugin), handing it the
184
+ delivery repo uid and the project. Approving the
185
+ plan approves the non-core changes; update mode asks once about any change to a `core` entry. Then
186
+ replace each `new: Knowledge change <n>`, in the outcomes and in the list, with the entry ID update
187
+ mode reports. Move each `core` change the developer declines, and each change update mode did not
188
+ save as an entry (it reports these with the reason), from "Knowledge changes" to "Open questions",
189
+ naming the outcomes that rely on it. Under "plan only", leave the changes unapplied:
190
+ delegate-ticket applies them later.
191
+ 3. Post the plan as a comment on the parent issue, headed `Delivery plan (approved <date>)`. A later
192
+ revision is a new comment with a new date, so the history stays on the issue.
193
+ 4. Save it in the hub as a Scenario on the delivery repo:
194
+ `memory_save type=Scenario repo=<delivery repo uid> externalRef=<parent> summary=<the plan>`, and
195
+ check the result reports `visibility: "Team"`. If step 2.5 found a plan Scenario for this ticket (a
196
+ Scenario whose summary starts with `# Delivery plan: <PARENT-ID>`), update that one instead:
197
+ `memory_get type=Scenario uid=<its uid>`, then `memory_update type=Scenario uid=<its uid>
198
+ summary=<the plan> expectedLastModified=<its lastModifiedDate>`. If it fails with `Conflict:`,
199
+ `memory_get` it again: if the other change is an older revision of the same plan, overwrite it with
200
+ the approved one; otherwise save the approved plan as a new Scenario and say so.
201
+ 5. Unless the developer said "plan only", run delegate-ticket straight away
202
+ (`memory-hub:delegate-ticket` when installed as a plugin). Then report what you posted, saved and
203
+ delegated in one message.