@skedulo/memory-hub-mcp 0.2.15 → 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.
- package/README.md +10 -9
- package/assets/skills/delegate-ticket/SKILL.md +149 -47
- package/assets/skills/delegate-ticket/references/sub-issue-template.md +18 -9
- package/assets/skills/fold-findings/SKILL.md +119 -37
- package/assets/skills/plan-ticket/SKILL.md +136 -61
- package/assets/skills/project-knowledge/SKILL.md +497 -0
- package/assets/skills/project-knowledge/references/page-format.md +181 -0
- package/assets/skills/se-ai-memory-hub/SKILL.md +1 -0
- package/dist/cli.js +2 -2
- package/dist/import-cli.js +3 -3
- package/dist/index.js +5 -36
- package/dist/pack-import.js +4 -4
- package/dist/tags.js +37 -0
- package/package.json +1 -1
- package/skill-guide.md +10 -8
- package/assets/skills/product-knowledge/SKILL.md +0 -150
- package/assets/skills/product-knowledge/references/page-format.md +0 -133
package/README.md
CHANGED
|
@@ -163,15 +163,15 @@ design, discovery). `memory_checkRepoStatus` will not work from Desktop. `memory
|
|
|
163
163
|
does, but only if you name the repo — pass `repoName` explicitly, since there is nothing to
|
|
164
164
|
detect; `memory_listTeams` shows the team names to link it to.
|
|
165
165
|
|
|
166
|
-
## Importing
|
|
166
|
+
## Importing project knowledge
|
|
167
167
|
|
|
168
|
-
`memory-hub-mcp import` copies a knowledge pack into the hub as
|
|
168
|
+
`memory-hub-mcp import` copies a knowledge pack into the hub as project knowledge pages. A pack is
|
|
169
169
|
one folder per core or project team, `domains/<name>/` in the shared memory repo, holding
|
|
170
170
|
`rules.json`, `constraints.json`, `api.json` and `workflow.json`, each optionally split into
|
|
171
|
-
`<kind>-<area>.json` shards. The
|
|
172
|
-
|
|
171
|
+
`<kind>-<area>.json` shards. The project-knowledge skill runs the import, resolves the review itself and lists what it
|
|
172
|
+
removed; it has two steps, and only the second saves anything:
|
|
173
173
|
|
|
174
|
-
npx -y @skedulo/memory-hub-mcp@latest import convert <shared-memory-repo>/domains/<name> --
|
|
174
|
+
npx -y @skedulo/memory-hub-mcp@latest import convert <shared-memory-repo>/domains/<name> --project "<Project>" --prefix <PREFIX> --by "<your name>"
|
|
175
175
|
npx -y @skedulo/memory-hub-mcp@latest import apply <plan.json> --repo <owner/name>
|
|
176
176
|
|
|
177
177
|
`convert` writes a plan (JSON) and a review file (Markdown) that lists every value that looks like
|
|
@@ -183,7 +183,7 @@ repo, the pack's path and the HEAD commit, and every saved item carries that rep
|
|
|
183
183
|
has moved on.
|
|
184
184
|
|
|
185
185
|
`apply` refuses until each flagged value is removed or marked `resolved`, and refuses a repo that
|
|
186
|
-
already has pages titled `<
|
|
186
|
+
already has pages titled `<Project> ›` that this plan did not save, so a lost plan file cannot
|
|
187
187
|
cause a second import. It saves every page as Team on the repo with an embedding, and records each
|
|
188
188
|
saved uid in the plan, so running it again resumes. Packs in the older layout (JSON under
|
|
189
189
|
`memory/`, with `knowledge/` docs and clarification Q&A files) still convert; their clarifications
|
|
@@ -192,8 +192,9 @@ appear as Open tasks. `apply` reads `MEMORY_HUB_MCP_TOKEN` and `MEMORY_HUB_FUNCT
|
|
|
192
192
|
environment, as the hooks do.
|
|
193
193
|
|
|
194
194
|
After the import, the hub copy is the one developers edit. When the pack repo moves on,
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
project-knowledge update converts the pack again and applies the differences with its decision
|
|
196
|
+
rules, asking only about changes to `core` entries. `--product` still works as another name for
|
|
197
|
+
`--project`.
|
|
197
198
|
|
|
198
199
|
## Tags
|
|
199
200
|
|
|
@@ -202,7 +203,7 @@ matching the `AgentFacts`/`AgentSkills`/`AgentWikiPages` custom objects' `Tags`
|
|
|
202
203
|
`ConnectedFunction`, `HorizonComponent`, `TriggeredAction`, `ObjectModel`, `MobileExtension`,
|
|
203
204
|
`Deployment`, `Auth`, `Testing`, `BreezeUI`, `PSS`, `PSF`, `Optimization`, `Webhooks`, `Salesforce`,
|
|
204
205
|
`Other`, `ArchitectureMap`, `SOW`, `TDD`, `AI`, `API`, `Mobile`, `Infrastructure`, `Security`,
|
|
205
|
-
`Messaging`, `ProductRules
|
|
206
|
+
`Messaging`, `ProjectRules`, and `ProductRules`, its old name, kept for skills older than 0.2.16 (26 in all; `TAG_VALUES` in `src/index.ts` is the source of truth). The tool's Zod schema enforces this — any other value fails validation
|
|
206
207
|
before the request reaches the connected function (which otherwise 400s with no indication of
|
|
207
208
|
what went wrong). If the underlying Picklist's `allowedValues` ever changes, update `TAG_VALUES`
|
|
208
209
|
in `src/index.ts` to match.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: delegate-ticket
|
|
3
3
|
description: Use when a ticket's plan from plan-ticket is approved and should become Linear sub-issues that the Linear Dev Agent or a developer can implement without reading anything else, e.g. "delegate SOL-1234", "create the sub-issues for this plan".
|
|
4
|
+
argument-hint: "<planned ticket, e.g. SOL-1234>"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Delegate a planned ticket
|
|
@@ -10,12 +11,17 @@ Linear Dev Agent reads only the sub-issue's title, description, labels and comme
|
|
|
10
11
|
the hub or this conversation. Write every body from `references/sub-issue-template.md` in this
|
|
11
12
|
skill's folder.
|
|
12
13
|
|
|
14
|
+
The approved plan is the developer's go-ahead. Decide everything else yourself, note each decision in
|
|
15
|
+
your report, and do not ask for confirmation before creating the sub-issues. plan-ticket starts this
|
|
16
|
+
skill as soon as a plan is approved; it can also be run on its own, and running it again is safe.
|
|
17
|
+
|
|
13
18
|
## First, check the server version
|
|
14
19
|
|
|
15
|
-
Look at the parameters of the `memory_update`
|
|
16
|
-
|
|
17
|
-
If
|
|
18
|
-
|
|
20
|
+
Look at the parameters of the `memory_update` and `memory_save` tools; if only their names are
|
|
21
|
+
listed, load their schemas first. If either tool is missing, the memory-hub server is not connected:
|
|
22
|
+
say so and stop. If `memory_update` has no `expectedLastModified` parameter, or `memory_save`'s `tags`
|
|
23
|
+
values do not include `ProjectRules`, the memory-hub server is older than this release. Stop, do
|
|
24
|
+
nothing else, and tell the developer to update it:
|
|
19
25
|
|
|
20
26
|
- plugin installs, and `setup` installs with auto-update: restart Claude Code;
|
|
21
27
|
- pinned installs: re-run `npx -y @skedulo/memory-hub-mcp@latest setup --no-auto-update`;
|
|
@@ -26,46 +32,86 @@ cannot edit safely. Stop, do nothing else, and tell the developer to update it:
|
|
|
26
32
|
1. If the Linear connector is not connected, stop and tell the developer.
|
|
27
33
|
2. Read the plan: `memory_recall type=Scenario scope=team externalRef=<parent>`, then
|
|
28
34
|
`memory_get type=Scenario uid=<uid>` on the one whose summary starts with
|
|
29
|
-
`# Delivery plan: <PARENT-ID
|
|
30
|
-
|
|
31
|
-
(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
`# Delivery plan: <PARENT-ID>` (with several, the one most recently modified). Note its `repoId`
|
|
36
|
+
from the recall result: it is the delivery repo uid. Compare it with the latest
|
|
37
|
+
`Delivery plan (approved <date>)` comment on the parent issue (Linear connector). Use the comment
|
|
38
|
+
only when it was posted after the Scenario's `lastModifiedDate` (a revision whose hub save failed):
|
|
39
|
+
then update the Scenario with it (`memory_update` with `expectedLastModified`) and say so.
|
|
40
|
+
Otherwise the Scenario wins, because this skill records declines, Auto-assign changes and
|
|
41
|
+
done-upstream outcomes there after the comment is posted.
|
|
42
|
+
3. If there is no approved plan, run plan-ticket instead: the developer approves the plan there, and
|
|
43
|
+
it runs this skill again.
|
|
44
|
+
4. Auto-assign is the value on the plan's header line; a header without it (a plan saved before this
|
|
45
|
+
release) counts as `off`. If the developer says "don't assign" or "stop auto-assign", set it to
|
|
46
|
+
`off` on the plan Scenario; if they say "assign" or "start the agent", set it to `on` (`memory_get`,
|
|
47
|
+
then `memory_update` with `expectedLastModified`, adding the field when it is missing).
|
|
48
|
+
fold-findings reads it there.
|
|
49
|
+
5. Knowledge changes: for each item, find the saved entry on the project pages by its text and source
|
|
50
|
+
(for example the ticket in `Pending <ID>`), and use that entry's real ID wherever an outcome refers
|
|
51
|
+
to the change. Never trust an ID the plan gave a new entry. Apply the items that are not on the
|
|
52
|
+
pages yet with the project-knowledge skill's targeted update, handing it the delivery repo uid and
|
|
53
|
+
the project; it asks once about any change to a `core` entry. Then write the real IDs into the plan
|
|
54
|
+
Scenario in place of each `new: Knowledge change <n>` (`memory_get`, then `memory_update` with
|
|
55
|
+
`expectedLastModified`), so fold-findings compares real IDs. A `core` change the developer declined is already under "Open questions" (plan-ticket
|
|
56
|
+
moves it there) and is never asked about again. If they decline one now, or update mode reports
|
|
57
|
+
that a change did not become an entry, move it to "Open questions" on the plan Scenario too,
|
|
58
|
+
naming the outcomes that rely on it, so a later run does not ask again, and hold those outcomes
|
|
59
|
+
back.
|
|
60
|
+
6. Hold back outcomes: an outcome an open question affects, one that relies on a declined or
|
|
61
|
+
unapplied `core` change or on a Knowledge change that did not become an entry, one that names a
|
|
62
|
+
rule ID found on no page, one with a `<ID> (pending)` dependency whose ticket is now `canceled`, or
|
|
63
|
+
is not `completed` and no longer decided by the project-knowledge decision rule 1 (its outcome was
|
|
64
|
+
planned toward a decision that is gone; a `completed` one is a finished dependency), and every
|
|
65
|
+
outcome
|
|
66
|
+
that depends on a held-back one, directly or through others. Create no sub-issue for them. List each
|
|
67
|
+
in your report with the reason. They are created when plan-ticket is run again with the question
|
|
68
|
+
answered.
|
|
36
69
|
|
|
37
70
|
## 2. Gather what each sub-issue must carry
|
|
38
71
|
|
|
39
|
-
For each outcome:
|
|
72
|
+
For each outcome that is not held back:
|
|
40
73
|
|
|
41
|
-
1. Copy the exact entry lines for every rule and don't-build ID the outcome names, from the
|
|
42
|
-
pages (`memory_list type=Wiki repo=<delivery repo uid>
|
|
74
|
+
1. Copy the exact entry lines for every rule and don't-build ID the outcome names, from the project's
|
|
75
|
+
pages (`memory_list type=Wiki repo=<delivery repo uid> titlePrefix="<Project> ›"`, paging with
|
|
43
76
|
`offset` until you have all `total` items, then `memory_get type=Wiki uid=<uid>` on every part of
|
|
44
|
-
a split page).
|
|
45
|
-
`Conflict:` note
|
|
46
|
-
|
|
47
|
-
|
|
77
|
+
a split page).
|
|
78
|
+
- A retired entry, or one with a `Conflict:` note: use the entry that replaced it, and say so. A
|
|
79
|
+
retired entry with no replacement is left out, and noted in your report. When the replacement is
|
|
80
|
+
marked `Pending <ID>` and `<ID>` is neither the parent nor one of its sub-issues: if `<ID>` is
|
|
81
|
+
still decided by the project-knowledge decision rule 1, the outcome now waits for that ticket:
|
|
82
|
+
add `<ID> (pending)` to its dependencies (a derived dependency, set in step 4.3 like the plan's
|
|
83
|
+
own). If `<ID>` is `completed`, nothing waits: copy the entry under "Unverified entries" as it
|
|
84
|
+
is. If `<ID>` is `canceled`, or not `completed` and no longer decided, never copy that entry as
|
|
85
|
+
the behaviour to build: hold the outcome back as step 1.6 does, with the reason "replacement
|
|
86
|
+
entry pending on `<ID>`, which is no longer decided; run plan-ticket again".
|
|
87
|
+
- An `unverified` rule or constraint: put it under the template's "Unverified entries", never under
|
|
88
|
+
the rules the issue must satisfy. One marked `Pending <ticket>` is the behaviour to build toward,
|
|
89
|
+
and the template says so. An unverified don't-build entry still goes under "Do not build", as it
|
|
90
|
+
is, because not building is the safe default.
|
|
48
91
|
2. Pin the commit: take this repo's sha from the plan's `Read at:` line and compare it with
|
|
49
92
|
`gh api repos/<owner>/<name>/commits/<base branch> --jq .sha` (the default branch is
|
|
50
93
|
`gh api repos/<owner>/<name> --jq .default_branch`). If it moved, look at what changed in the files
|
|
51
|
-
the outcome may touch (`gh api repos/<owner>/<name>/compare/<old>...<new>`)
|
|
52
|
-
|
|
53
|
-
|
|
94
|
+
the outcome may touch (`gh api repos/<owner>/<name>/compare/<old>...<new>`). Pin the new commit,
|
|
95
|
+
re-read those files at it, and adjust the draft; note the re-pin in your report. If the code at the
|
|
96
|
+
new commit already meets the outcome's Done-when checks, create nothing for it, point any outcome
|
|
97
|
+
that depends on it at that outcome's own dependencies, and report it as done upstream. Record it on
|
|
98
|
+
the plan Scenario (`memory_get`, then `memory_update` with `expectedLastModified`) by adding
|
|
99
|
+
`Done upstream at <sha>` to that outcome's heading line, so fold-findings never starts a sub-issue
|
|
100
|
+
for it.
|
|
54
101
|
3. Read the files the outcome may change at the pinned commit (the local checkout, or
|
|
55
102
|
`gh api "repos/<owner>/<name>/contents/<path>?ref=<sha>"`) and collect file paths, a pattern file
|
|
56
|
-
and pitfalls from them. Take the mockups for UI work from the parent issue.
|
|
57
|
-
image URL
|
|
58
|
-
|
|
59
|
-
agent at a Linear attachment: it cannot read attachments.
|
|
103
|
+
and pitfalls from them. Take the mockups for UI work from the parent issue. Embed each one by its
|
|
104
|
+
image URL; when a mockup has no URL, describe it in text in the body (layout, fields, labels,
|
|
105
|
+
states). Never point the agent at a Linear attachment: it cannot read attachments.
|
|
60
106
|
|
|
61
107
|
## 3. Draft and check
|
|
62
108
|
|
|
63
109
|
1. One sub-issue per outcome, sized for one agent session and one PR. Split an outcome that is bigger,
|
|
64
110
|
and say so.
|
|
65
|
-
2. Fill the template
|
|
66
|
-
|
|
67
|
-
attachments.
|
|
68
|
-
3. Check each draft
|
|
111
|
+
2. Fill the template, including the `Outcome:` line of the Delivery contract. Put
|
|
112
|
+
`Base branch: <name>` as a plain line (no leading `- `) only when the base is not the repo's default
|
|
113
|
+
branch. Embed mockups as images in the description; never rely on attachments.
|
|
114
|
+
3. Check each draft and fix what fails:
|
|
69
115
|
- Could an agent implement it with only this issue? No "see parent", no hub links needed, every
|
|
70
116
|
rule copied in full with its ID, and any unverified entry labelled as one.
|
|
71
117
|
- Is every acceptance criterion testable?
|
|
@@ -73,36 +119,92 @@ For each outcome:
|
|
|
73
119
|
- Does it hold anything the confidentiality rules forbid (commercial terms, customer personal data,
|
|
74
120
|
verbatim contract text, customer data rows or production record IDs, credentials, tokens or
|
|
75
121
|
secrets)? Remove it.
|
|
76
|
-
4. Show all drafts with their labels and dependencies (by title until the sub-issues exist). Create nothing until the developer confirms.
|
|
77
122
|
|
|
78
123
|
## 4. Create the sub-issues
|
|
79
124
|
|
|
80
125
|
With the Linear connector:
|
|
81
126
|
|
|
82
|
-
1.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
127
|
+
1. List the parent's existing sub-issues, with their state, assignee, delegate, labels and linked PRs.
|
|
128
|
+
Match them to the drafts by what they build: the same repo, overlapping "Files it may change" and
|
|
129
|
+
the same goal, not by title (the `Outcome:` line is a hint only, because a revision can renumber
|
|
130
|
+
outcomes). A canceled sub-issue is never reused: leave it out of the matching, so a draft that
|
|
131
|
+
matches only a canceled one is created anew. A matched sub-issue is reused: leave its body as it
|
|
132
|
+
is, because someone may have edited it, and note any difference from the draft in your report.
|
|
133
|
+
When two sub-issues match one draft, reuse neither and hold that draft back with every outcome that
|
|
134
|
+
depends on it, directly or through others; list both sub-issues in your report for the developer
|
|
135
|
+
to merge or cancel. An existing sub-issue that matches no
|
|
136
|
+
draft and is not done or canceled is listed in your report as possibly replaced; if it is assigned,
|
|
137
|
+
delegated or started and overlaps a draft's files, treat that draft as held back: create no
|
|
138
|
+
sub-issue for it or for any outcome that depends on it, directly or through others, and list each
|
|
139
|
+
with the in-flight sub-issue's ID. They are created when this skill runs again after that sub-issue
|
|
140
|
+
is done or canceled.
|
|
141
|
+
Create only the drafts that are left, each under the parent, in the parent's team and project, with
|
|
142
|
+
the template body.
|
|
86
143
|
2. Labels: `repo/skedulo/<repo>`, `plugin/<builder>` where one applies, and the parent's `ref-repo:*`
|
|
87
|
-
labels (see the template's Labels section).
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
144
|
+
labels (see the template's Labels section). Create a missing `repo/skedulo/<repo>` label only after
|
|
145
|
+
`gh api repos/<owner>/<repo> --jq .name` confirms the repo exists, and a missing `plugin/...` label
|
|
146
|
+
only from the template's list; say so in your report.
|
|
147
|
+
3. Create them in dependency order: object model, then functions and automations, then UI, plus any
|
|
91
148
|
"Depends on" from the plan (mapped to the sub-issues an outcome was split into). Then set the
|
|
92
|
-
blocked-by relations that are not set yet
|
|
93
|
-
|
|
149
|
+
blocked-by relations that are not set yet, including one to each `<ID> (pending)` ticket, from the
|
|
150
|
+
plan's "Depends on" or derived in step 2.1, whose workflow state type is neither `completed` nor
|
|
151
|
+
`canceled` (step 1.6 held back outcomes whose ticket was canceled), and update each created body's
|
|
152
|
+
Dependencies section with the real IDs. On a reused sub-issue, remove each blocked-by relation its
|
|
153
|
+
outcome no longer maps to: one to a sibling sub-issue that is canceled, or that an earlier run of
|
|
154
|
+
this skill created (it has a delegate-ticket Fact) and that matches no current outcome (relate it
|
|
155
|
+
to the sub-issue that replaces it instead, when there is one, and drop it when that outcome is done
|
|
156
|
+
upstream); and one to a ticket outside this parent that an earlier plan listed as `(pending)`, or
|
|
157
|
+
that the sub-issue's delegate-ticket Fact names in "It waits for <ID>", when the outcome no longer
|
|
158
|
+
depends on it. Leave every other relation, such as one a person added in Linear. A canceled blocker otherwise never counts as done, here or in
|
|
159
|
+
fold-findings.
|
|
160
|
+
4. Reused sub-issues that are not started yet (no assignee, no delegate, a `backlog` or `unstarted`
|
|
161
|
+
state, no linked PR): compare each one's Delivery contract and Acceptance Criteria, with any earlier
|
|
162
|
+
`Contract update` comments applied, with its new draft: the commit, the files it may change, the
|
|
163
|
+
rule, don't-build and unverified entry lines, and the Done-when checks. Where they differ, and the
|
|
164
|
+
latest `Contract update` comment does not already say the same, post a comment headed
|
|
165
|
+
`Contract update (<date>)` before anything starts the agent on it. Open it with: "This replaces the
|
|
166
|
+
commit, files, Acceptance Criteria items and entry lines it names, and removes the entries and
|
|
167
|
+
Acceptance Criteria items it lists as removed; for each item, the latest Contract update wins."
|
|
168
|
+
Then give the new commit, the new files, each changed Acceptance Criteria item with the one it
|
|
169
|
+
replaces, each item the draft no longer has as `Acceptance Criteria item removed: <old text>`, each
|
|
170
|
+
new or changed entry line in full under its section (rules, do not build, unverified), and each
|
|
171
|
+
entry no longer in the contract as `<ID> removed: retired, no replacement` (or the reason).
|
|
172
|
+
5. Only then start the agent, when Auto-assign is `on`. Delegate to the Linear Dev Agent
|
|
173
|
+
(`Skedulo Dev Agent` in Linear) only the sub-issues that match a draft from this plan, have a
|
|
174
|
+
`repo/…` label and no unfinished blocker, and are either created by this run, or reused with no
|
|
175
|
+
assignee and no delegate, a `backlog` or `unstarted` state, and no linked PR. A sibling sub-issue
|
|
176
|
+
blocker is finished when a `Folded <ID>` Fact exists for it, or when it is `completed` with no
|
|
177
|
+
linked PR (its work landed elsewhere; say so in your report). For a merged one without the Fact,
|
|
178
|
+
leave its dependents unstarted and say "run fold-findings on <ID>" in your report. Another ticket is finished when its workflow state type is `completed`. Read each one back
|
|
179
|
+
and check the delegate is set. Leave blocked ones as they are. fold-findings starts a sub-issue when the
|
|
180
|
+
sub-issue blocking it is folded; one that waits for another ticket, or for an in-flight sub-issue
|
|
181
|
+
(step 4.1), starts when this skill runs again after that is done (step 6 says so).
|
|
94
182
|
|
|
95
183
|
## 5. Record them in the hub
|
|
96
184
|
|
|
97
|
-
For each sub-issue,
|
|
98
|
-
hub task:
|
|
185
|
+
For each sub-issue you created or reused, make sure there is one Fact on the project's delivery repo,
|
|
186
|
+
which records it as an Open hub task:
|
|
99
187
|
|
|
100
188
|
```
|
|
101
189
|
memory_save type=Fact repo=<delivery repo uid> externalRef=<SUB-ID> content="Delegated <SUB-ID> (<title>) from <PARENT-ID>. When its PR merges, run fold-findings on it."
|
|
102
190
|
```
|
|
103
191
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
192
|
+
For a sub-issue that waits for another ticket, end the content with: "It waits for <ID>: run
|
|
193
|
+
delegate-ticket on <PARENT-ID> once that is done." Skip a sub-issue that already has this Fact
|
|
194
|
+
(`memory_recall type=Fact scope=team externalRef=<SUB-ID>`), except to add that sentence when it
|
|
195
|
+
now waits for a ticket its Fact does not name yet (`memory_update` with `expectedLastModified`). Check each result reports
|
|
196
|
+
`visibility: "Team"`. Ignore duplicate notices between these Facts; each one stands for its own
|
|
197
|
+
sub-issue.
|
|
198
|
+
|
|
199
|
+
## 6. Report
|
|
200
|
+
|
|
201
|
+
One short report: each sub-issue with its link, the blocked-by chain and which ones the agent has
|
|
202
|
+
started; the held-back outcomes with their reasons; then what you decided (re-pins, replaced or
|
|
203
|
+
unverified entries, reused or possibly replaced sub-issues, done-upstream outcomes, new labels,
|
|
204
|
+
anything removed for confidentiality). For each sub-issue that waits for another ticket, and each
|
|
205
|
+
outcome held back for an in-flight sub-issue, name that ticket or sub-issue and say: "run
|
|
206
|
+
delegate-ticket on <PARENT-ID> once <ID> is done" (or canceled, for an in-flight sub-issue). For
|
|
207
|
+
outcomes held back for duplicate sub-issues, say: "run delegate-ticket on <PARENT-ID> once the
|
|
208
|
+
duplicates are merged or canceled". End by
|
|
209
|
+
saying that fold-findings should run on each sub-issue when its PR merges, which also starts the
|
|
210
|
+
sub-issues it unblocks.
|
|
@@ -54,12 +54,12 @@ structure from a file in the repo rather than writing it from memory.>
|
|
|
54
54
|
|
|
55
55
|
- [ ] <each "Done when" check from the plan, as a testable statement>
|
|
56
56
|
- [ ] Tests pass (`<the repo's test command>`)
|
|
57
|
-
- [ ] Every rule under "
|
|
57
|
+
- [ ] Every rule under "Project rules this issue must satisfy" holds, and nothing under "Do not
|
|
58
58
|
build" is built
|
|
59
59
|
|
|
60
60
|
## Dependencies
|
|
61
61
|
|
|
62
|
-
- **Blocked by:** <sub-issue IDs and titles, or None>
|
|
62
|
+
- **Blocked by:** <sub-issue IDs and titles, other tickets this waits for, or None>
|
|
63
63
|
- **Blocks:** <sub-issue IDs and titles, or None>
|
|
64
64
|
|
|
65
65
|
## Agent Notes
|
|
@@ -71,12 +71,13 @@ structure from a file in the repo rather than writing it from memory.>
|
|
|
71
71
|
<Only when the base is not the repo's default branch:>
|
|
72
72
|
Base branch: <branch>
|
|
73
73
|
|
|
74
|
+
- **Outcome:** <n.m> of the <PARENT-ID> delivery plan (<date approved>)
|
|
74
75
|
- **Repo:** Skedulo/<repo>
|
|
75
76
|
- **Read at:** commit `<full sha>` on `<branch>` (the plan was made against this commit)
|
|
76
77
|
- **Files you may change:** <paths or globs>; if the work needs any other file, stop under the stop
|
|
77
78
|
rule and explain why in the PR
|
|
78
79
|
|
|
79
|
-
**
|
|
80
|
+
**Project rules this issue must satisfy** (copied verbatim; the IDs are stable):
|
|
80
81
|
|
|
81
82
|
- **LMB-R13** · core · verified — <rule text> _Source: <source>_
|
|
82
83
|
|
|
@@ -85,19 +86,26 @@ Base branch: <branch>
|
|
|
85
86
|
- **LMB-D3** · core · verified — <item> Reason: <reason> _Source: <source>_
|
|
86
87
|
- <any exclusion specific to this issue>
|
|
87
88
|
|
|
88
|
-
<Only when the
|
|
89
|
+
<Only when the issue relies on an unverified entry:>
|
|
89
90
|
**Unverified entries** (not yet confirmed; check each against the code, and if one does not hold,
|
|
90
|
-
say so under Findings rather than forcing it
|
|
91
|
+
say so under Findings rather than forcing it. An entry marked `Pending <ticket>` is the behaviour to
|
|
92
|
+
build toward: the current code does not have it yet):
|
|
91
93
|
|
|
92
94
|
- **LMB-R20** · standard · unverified — <rule text> _Source: <source>_
|
|
93
95
|
|
|
96
|
+
A comment headed `Contract update (<date>)` replaces the commit, files, Acceptance Criteria items and
|
|
97
|
+
entry lines it names, and removes the entries and Acceptance Criteria items it lists as removed
|
|
98
|
+
(`LMB-R13 removed: retired, no replacement`, `Acceptance Criteria item removed: <old text>`); for each
|
|
99
|
+
item, the latest Contract update wins. The stop rule and the other Acceptance Criteria apply to the
|
|
100
|
+
updated contract.
|
|
101
|
+
|
|
94
102
|
**Stop rule:** if a step cannot be done as written (a rule this issue must satisfy cannot hold, a
|
|
95
103
|
file or API is not as described, a requirement conflicts with a rule), stop and explain it in the PR
|
|
96
104
|
description. Do not invent a different design.
|
|
97
105
|
|
|
98
106
|
## PR Description Instructions
|
|
99
107
|
|
|
100
|
-
End the PR description with a `## Findings` section listing what a later change to this
|
|
108
|
+
End the PR description with a `## Findings` section listing what a later change to this project would
|
|
101
109
|
need to know that this issue did not say: a rule that turned out different, a platform limit, a field
|
|
102
110
|
or API that behaves unexpectedly, a decision you had to make. Write "None" if there is nothing. If you
|
|
103
111
|
stopped under the stop rule, say what blocked you there.
|
|
@@ -109,14 +117,15 @@ Notes on the template:
|
|
|
109
117
|
repo's default branch; otherwise leave the line out. The agent's directive parser ignores the
|
|
110
118
|
bulleted form.
|
|
111
119
|
- Mockups go in the description as embedded images (``). The agent does
|
|
112
|
-
not read attachments, so never refer it to one. Without an image URL,
|
|
113
|
-
|
|
120
|
+
not read attachments, so never refer it to one. Without an image URL, describe the mockup in text
|
|
121
|
+
(layout, fields, labels, states).
|
|
114
122
|
- Rule and don't-build lines are copied exactly as they appear on the hub pages, ID first.
|
|
115
123
|
|
|
116
124
|
## Labels
|
|
117
125
|
|
|
118
126
|
- `repo/skedulo/<repo>`: in the `repo` label group, `<repo>` is the bare repository name (the part
|
|
119
|
-
after the last `/`). Never guess it
|
|
127
|
+
after the last `/`). Never guess it: take it from `gh api repos/<owner>/<name> --jq .name`. Create a
|
|
128
|
+
missing label only when that call confirms the repo exists.
|
|
120
129
|
- `plugin/<builder>` where a builder plugin applies (one per sub-issue):
|
|
121
130
|
- Connected Function: `plugin/connected-function`
|
|
122
131
|
- Custom Object, Custom Field: `plugin/object-models`
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fold-findings
|
|
3
|
-
description: Use when a sub-issue created by delegate-ticket has a merged PR and what the implementing agent learned should go back into the
|
|
3
|
+
description: Use when a sub-issue created by delegate-ticket has a merged PR and what the implementing agent learned should go back into the project knowledge, e.g. "fold the findings from SOL-1235", "fold findings for PR 42". It also starts the sub-issues that merge unblocks.
|
|
4
|
+
argument-hint: "<sub-issue or PR, e.g. SOL-1235 or PR 42>"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# Fold findings into
|
|
7
|
+
# Fold findings into project knowledge
|
|
7
8
|
|
|
8
9
|
The implementing agent ends each PR with a `## Findings` section. This skill turns those findings into
|
|
9
|
-
|
|
10
|
+
changes to the project's knowledge, applies them, and starts the work the merge unblocked. Decide
|
|
11
|
+
yourself with the project-knowledge skill's decision rules. Apart from the one question
|
|
12
|
+
project-knowledge update mode asks about changes to `core` entries, ask only for the PR link when the
|
|
13
|
+
Linear connector is not connected. Running it again on the same PR is safe.
|
|
10
14
|
|
|
11
15
|
## First, check the server version
|
|
12
16
|
|
|
13
|
-
Look at the parameters of the `memory_update`
|
|
14
|
-
|
|
15
|
-
If
|
|
16
|
-
|
|
17
|
+
Look at the parameters of the `memory_update` and `memory_save` tools; if only their names are
|
|
18
|
+
listed, load their schemas first. If either tool is missing, the memory-hub server is not connected:
|
|
19
|
+
say so and stop. If `memory_update` has no `expectedLastModified` parameter, or `memory_save`'s `tags`
|
|
20
|
+
values do not include `ProjectRules`, the memory-hub server is older than this release. Stop, do
|
|
21
|
+
nothing else, and tell the developer to update it:
|
|
17
22
|
|
|
18
23
|
- plugin installs, and `setup` installs with auto-update: restart Claude Code;
|
|
19
24
|
- pinned installs: re-run `npx -y @skedulo/memory-hub-mcp@latest setup --no-auto-update`;
|
|
@@ -21,8 +26,9 @@ cannot edit safely. Stop, do nothing else, and tell the developer to update it:
|
|
|
21
26
|
|
|
22
27
|
## 1. Find the merged PR
|
|
23
28
|
|
|
24
|
-
1. From a PR: `gh pr view <number or url> --repo <owner/name> --json url,title,body,mergedAt,headRefName`;
|
|
25
|
-
take `<SUB-ID>` from the head branch or the PR body's Linear link
|
|
29
|
+
1. From a PR: `gh pr view <number or url> --repo <owner/name> --json url,title,body,mergedAt,mergeCommit,headRefName,closingIssuesReferences`;
|
|
30
|
+
take `<SUB-ID>` from the head branch or the PR body's Linear link. If neither names one, carry on
|
|
31
|
+
without it and skip steps 3.3 and 3.4.
|
|
26
32
|
From a sub-issue: read it with the Linear connector and take the PR from its links or attachments.
|
|
27
33
|
If the Linear connector is not connected, ask for the PR link and say the sub-issue's comments were
|
|
28
34
|
not checked.
|
|
@@ -30,40 +36,116 @@ cannot edit safely. Stop, do nothing else, and tell the developer to update it:
|
|
|
30
36
|
3. Read the PR's `## Findings` section. If it is missing, also check the sub-issue's comments; if the
|
|
31
37
|
agent stopped under the stop rule, its explanation is a finding.
|
|
32
38
|
|
|
33
|
-
## 2.
|
|
39
|
+
## 2. Work out the changes
|
|
34
40
|
|
|
35
|
-
1. Find the delivery repo uid: `memory_recall type=Fact scope=team externalRef=<SUB-ID
|
|
36
|
-
`repoId` from the Fact delegate-ticket saved;
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`
|
|
41
|
-
`
|
|
42
|
-
|
|
43
|
-
`
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
1. Find the delivery repo uid: `memory_recall type=Fact scope=team externalRef=<SUB-ID>
|
|
42
|
+
maxCharsPerItem=4000 maxTotalChars=40000` and take `repoId` from the Fact delegate-ticket saved;
|
|
43
|
+
read any Fact still cut short with `memory_get`. If there is none, find the team of the PR's repo
|
|
44
|
+
with `memory_listRepos` and use that team's repo that holds `<Project> › Rules ›` pages, as
|
|
45
|
+
plan-ticket step 1 does. Load the pages the findings touch, and every Rules and Don't build page that has
|
|
46
|
+
a `Pending` entry naming this sub-issue, its parent, or a ticket the PR closes
|
|
47
|
+
(`memory_list type=Wiki repo=<delivery repo uid> titlePrefix="<Project> ›"`, then
|
|
48
|
+
`memory_get type=Wiki uid=<uid>` on every part of a split page); for new IDs, read every Rules and
|
|
49
|
+
Don't build page. `memory_list` returns `total` and one page of items; call it again with `offset`
|
|
50
|
+
until you have all of them. The entry format and the confidentiality rules are in the
|
|
51
|
+
project-knowledge skill's `references/page-format.md`.
|
|
52
|
+
2. Drop each finding that is already folded, judged per finding, never per page: a change-log line that
|
|
53
|
+
names this PR's URL also names the entry the finding changes or adds, the troubleshooting page
|
|
54
|
+
records the finding as a declined change from this PR, an entry's source names this PR's URL and
|
|
55
|
+
says what the finding says, or a Fact already says the same thing: one with `externalRef=<SUB-ID>`
|
|
56
|
+
from the recall in 2.1, whether or not it names the PR URL, or, when `<SUB-ID>` is unknown, one that
|
|
57
|
+
names this PR's URL (`memory_recall type=Fact scope=team query="<PR url>" maxCharsPerItem=4000
|
|
58
|
+
maxTotalChars=40000`). If every finding is dropped, make no finding changes, but still do step 2.4
|
|
59
|
+
and apply its changes with step 3.1, then step 3.3, and step 3.4 unless this run is a nested blocker
|
|
60
|
+
fold (see 3.4).
|
|
61
|
+
3. Sort each remaining finding into one of:
|
|
62
|
+
- a change to an existing entry (a finding that overrides a decision gets a
|
|
63
|
+
`Conflict: overridden by <PREFIX>-R<n> (code over <source>: <reason>)` note and a new entry, not
|
|
64
|
+
a silent rewrite), except an entry whose `Pending` ticket is still decided: never override that
|
|
65
|
+
with the code; note the difference on the troubleshooting page instead;
|
|
48
66
|
- an entry the finding shows no longer applies (retire it, with the reason);
|
|
49
|
-
- a new rule, constraint or don't-build item (
|
|
50
|
-
|
|
67
|
+
- a new rule, constraint or don't-build item (`verified` because it is in merged code, source
|
|
68
|
+
`code: <owner/name>@<merge sha> <path> · <SUB-ID> / <PR url>`);
|
|
51
69
|
- a reference page change (API, data model, troubleshooting);
|
|
70
|
+
- a feature-map change: code paths the PR added or moved that no feature in
|
|
71
|
+
`<Project> › Reference › feature-map` covers go to the closest feature, or to a new one;
|
|
52
72
|
- a plain fact about this ticket, which becomes a Fact, not a page edit;
|
|
53
73
|
- nothing to keep.
|
|
54
|
-
|
|
74
|
+
4. Pending entries: drop the `Pending` note from an entry and make it `verified`, citing the merged code
|
|
75
|
+
(`code: <owner/name>@<merge sha> <path> · <SUB-ID> / <PR url>`), only when the merged diff implements
|
|
76
|
+
that behaviour and the entry's ticket is this sub-issue or a ticket the PR closes, or the entry is
|
|
77
|
+
one this sub-issue's outcome names, under its rules or its unverified entries (a "from ticket"
|
|
78
|
+
entry marked `Pending <PARENT-ID>` is one). Also remove its known-gap line from the troubleshooting
|
|
79
|
+
page. Leave every other `Pending` entry as it is: another sub-issue of the same parent may be the
|
|
80
|
+
one that builds it.
|
|
81
|
+
5. Set tiers with the project-knowledge decision rules and drop anything the confidentiality rules
|
|
55
82
|
forbid.
|
|
56
83
|
|
|
57
|
-
## 3.
|
|
84
|
+
## 3. Apply and continue
|
|
58
85
|
|
|
59
|
-
1. Page changes: run the
|
|
60
|
-
(`memory-hub:
|
|
61
|
-
reason "findings from <SUB-ID> (<PR url>)". It applies them with
|
|
62
|
-
the change-log lines
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
1. Page changes: run the project-knowledge skill's targeted update
|
|
87
|
+
(`memory-hub:project-knowledge` when installed as a plugin) with the change list, the delivery repo
|
|
88
|
+
uid and project, and the reason "findings from <SUB-ID> (<PR url>)". It applies them with
|
|
89
|
+
`expectedLastModified`, writes the change-log lines with that reason, and asks once about any
|
|
90
|
+
change to a `core` entry. If it ends without applying them (no project pages on that repo), stop
|
|
91
|
+
before step 3.3 and report it: the sub-issue is not folded. A nested
|
|
92
|
+
blocker fold (see 3.4) never asks: tell the targeted update not to ask, so it applies only the
|
|
93
|
+
changes that do not touch a `core` entry. List the core changes it left in the report as waiting,
|
|
94
|
+
with "run fold-findings on <its SUB-ID> to decide them" (a later run finds them unfolded, because
|
|
95
|
+
no change-log line names them), and skip step 3.3 for that blocker: it is not done, and nothing it
|
|
96
|
+
blocks starts, until a run on it decides them.
|
|
97
|
+
2. Facts: `memory_save type=Fact repo=<delivery repo uid> externalRef=<SUB-ID> content="<PR url>:
|
|
98
|
+
<the fact>"`, with the PR URL first so a shortened recall still shows it. Check each result reports
|
|
99
|
+
`visibility: "Team"`, and ignore duplicate notices against the delegate-ticket Fact for the same
|
|
100
|
+
sub-issue.
|
|
101
|
+
3. Mark the sub-issue folded: `memory_setTaskStatus externalRef=<SUB-ID> status=Done`, and make sure
|
|
102
|
+
this Fact exists, saving it if it does not, even when there were no findings:
|
|
103
|
+
`memory_save type=Fact repo=<delivery repo uid> externalRef=<SUB-ID> content="Folded <SUB-ID> from <PR url>."`
|
|
104
|
+
Other runs read this Fact, because a hub task's status cannot be read back.
|
|
105
|
+
4. Start the next work. Read the parent's plan Scenario in full (`memory_recall type=Scenario
|
|
106
|
+
scope=team externalRef=<PARENT-ID>`, then `memory_get`), chosen as delegate-ticket step 1.2 does:
|
|
107
|
+
the most recently modified one, or the newer approved comment. Start candidates only when its header says
|
|
108
|
+
exactly `Auto-assign: on`; otherwise (`off`, no Auto-assign field, or no plan) list them instead.
|
|
109
|
+
With the Linear connector, list the parent's other sub-issues with their state, assignee, delegate,
|
|
110
|
+
labels and blocked-by relations. A candidate is a sub-issue that:
|
|
111
|
+
- matches an outcome of the current plan by delegate-ticket's matching rules (same repo, overlapping
|
|
112
|
+
files it may change, the same goal), and that outcome is not held back by delegate-ticket's
|
|
113
|
+
hold-back rules and not marked `Done upstream`. A canceled sub-issue never matches. When two
|
|
114
|
+
sub-issues match one outcome, start neither, nor any sub-issue whose outcome depends on that
|
|
115
|
+
outcome, and list them. An outcome that still names `new: Knowledge change <n>` relies on a
|
|
116
|
+
change not applied yet (a "plan only" revision): hold it back until delegate-ticket runs;
|
|
117
|
+
- has every blocker done. It need not be blocked by <SUB-ID>: this also starts one whose other
|
|
118
|
+
ticket finished since. A sub-issue blocker is done when it is this sub-issue, a `Folded <ID>`
|
|
119
|
+
Fact exists for it, or it is `completed` with no linked PR (its work landed elsewhere). A blocker whose PR merged but has no such Fact is folded first, as a nested
|
|
120
|
+
blocker fold: steps 1 to 3.3 of this skill only, once per run; it never starts work itself.
|
|
121
|
+
Another ticket the sub-issue waits for is done when its workflow state type is `completed`. A
|
|
122
|
+
`canceled` blocker never counts as done: list its dependents instead;
|
|
123
|
+
- has a `repo/…` label, an empty assignee and an empty delegate, and a `backlog` or `unstarted`
|
|
124
|
+
state, read again after any nested fold;
|
|
125
|
+
- relies on no entry that a core change waiting from a nested fold touches;
|
|
126
|
+
- has its own delegate-ticket Fact (`memory_recall type=Fact scope=team externalRef=<its ID>`).
|
|
68
127
|
|
|
69
|
-
|
|
128
|
+
Before starting a candidate, refresh its contract, because the merges or a plan revision may have
|
|
129
|
+
changed what it relies on. Compare its body, with any earlier `Contract update` comments applied,
|
|
130
|
+
with the outcome it matches in the current plan (the Done-when checks, the Rules and Must not IDs,
|
|
131
|
+
the files it may change) and with the current pages: re-read every rule, don't-build and
|
|
132
|
+
unverified ID that the body or the outcome names, and handle retired, overridden and `Pending`
|
|
133
|
+
replacements as delegate-ticket step 2.1 does. A derived `<ID> (pending)` dependency gets a
|
|
134
|
+
blocked-by relation, and the candidate is not started: list it as waiting for `<ID>`, with "run
|
|
135
|
+
delegate-ticket on <PARENT-ID> once <ID> is done", and add the same sentence to the end of the
|
|
136
|
+
candidate's delegate-ticket Fact unless it already has it (`memory_update` with
|
|
137
|
+
`expectedLastModified`). Handle a `completed`, `canceled` or no-longer-decided `<ID>` as
|
|
138
|
+
delegate-ticket step 2.1 does. Compare its
|
|
139
|
+
`Read at` commit with the base branch head (`gh api repos/<owner>/<name>/compare/<its sha>...<head>`)
|
|
140
|
+
for the files it may change, and read its blockers' Findings for anything it relies on. If anything
|
|
141
|
+
differs, and the latest `Contract update` comment does not already say the same, post a comment
|
|
142
|
+
headed `Contract update (<date>)` in the form delegate-ticket step 4.4 gives, opening with: "This
|
|
143
|
+
replaces the commit, files, Acceptance Criteria items and entry lines it names, and removes the
|
|
144
|
+
entries and Acceptance Criteria items it lists as removed; for each item, the latest Contract
|
|
145
|
+
update wins." Post it before
|
|
146
|
+
delegating, because delegating starts the agent. Then delegate the sub-issue to the Linear Dev
|
|
147
|
+
Agent (`Skedulo Dev Agent` in Linear), read it back, and check the delegate is set.
|
|
148
|
+
|
|
149
|
+
Report what changed, by page title and entry ID, what you decided and why, any `core` change the
|
|
150
|
+
developer declined, which sub-issues you started (with any contract updates), and which are still
|
|
151
|
+
waiting and why.
|