@skedulo/memory-hub-mcp 0.2.25 → 0.2.26
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 +43 -5
- package/assets/session-start.sh +74 -12
- package/assets/session-stop.sh +16 -3
- package/assets/skills/ask/SKILL.md +11 -4
- package/assets/skills/delegate-ticket/SKILL.md +49 -2
- package/assets/skills/delegate-ticket/references/sub-issue-template.md +69 -4
- package/assets/skills/fold-findings/SKILL.md +3 -3
- package/assets/skills/plan-ticket/SKILL.md +50 -3
- package/assets/skills/setup/SKILL.md +168 -0
- package/assets/user-prompt-submit.sh +26 -8
- package/dist/cli.js +15 -4
- package/dist/client.js +21 -3
- package/dist/credentials.js +51 -0
- package/dist/extension-update.js +34 -0
- package/dist/index.js +40 -14
- package/dist/login-tool.js +129 -0
- package/dist/login.js +309 -0
- package/dist/setup.js +21 -1
- package/package.json +1 -1
- package/skill-guide.md +6 -1
package/README.md
CHANGED
|
@@ -55,13 +55,30 @@ have no equivalent there, and nothing is saved unless Claude calls `memory_save`
|
|
|
55
55
|
`session-stop.sh` shells out to `claude -p --resume`, which is CLI-only. Anything worth
|
|
56
56
|
keeping must be saved with `memory_save` before the conversation ends.
|
|
57
57
|
|
|
58
|
+
People without Node install the `memory-hub.mcpb` desktop extension instead: the same server with its
|
|
59
|
+
own `node_modules`, signed in with `memory_login`. It is attached to each GitHub release (see
|
|
60
|
+
[Releasing](#releasing)), and the root README has the fixed download link. In extension mode it
|
|
61
|
+
skips the asset refresh, since there is no `~/.claude` to update, and `memory_sessionContext` adds a
|
|
62
|
+
line when a newer extension is out.
|
|
63
|
+
|
|
58
64
|
### Install and set up
|
|
59
65
|
|
|
60
66
|
For Claude Code, `setup` installs the `memory-hub` plugin from the repo's marketplace when the
|
|
61
67
|
`claude` CLI and your GitHub access allow it, and turns its auto-update on; otherwise, or with
|
|
62
|
-
`--no-plugin`, it installs the hooks and skill directly as described below.
|
|
68
|
+
`--no-plugin`, it installs the hooks and skill directly as described below. It also adds an allow rule
|
|
69
|
+
for all of Memory Hub's tools, including delete and share (`mcp__plugin_memory-hub_memory-hub__*` with
|
|
70
|
+
the plugin, `mcp__memory-hub__*` with `--no-plugin`), to `permissions.allow` in `~/.claude/settings.json`,
|
|
71
|
+
so they stop asking for approval; pass `--no-allow` to skip that.
|
|
63
72
|
Older installs (`memory-hub@se-ai-memory-hub`) move to the `memory-hub@memory-hub` ID by themselves at the end of a session, except ones with a pasted token, which keep working and move when you run `setup`.
|
|
64
73
|
|
|
74
|
+
Plugin only, no `npm` or `sked`: install it with `claude plugin marketplace add Skedulo/se-ai-memory-hub`
|
|
75
|
+
and `claude plugin install memory-hub@memory-hub` (in the desktop app: + → Plugins), start a session,
|
|
76
|
+
and sign in in the browser tab that opens. The plugin needs Node from [nodejs.org](https://nodejs.org)
|
|
77
|
+
(the LTS installer) and, for the hooks, `jq`; `/memory-hub:setup` checks for both, signs you in again,
|
|
78
|
+
and says what to install. `memory-hub-mcp login` runs the same browser sign-in from a terminal. To paste
|
|
79
|
+
a token instead, use `/plugin configure memory-hub@memory-hub`. The two commands below are the other
|
|
80
|
+
route, for developers with `sked`.
|
|
81
|
+
|
|
65
82
|
Two commands, no config file to edit. No GitHub access, no git clone, no build step, no npm
|
|
66
83
|
account:
|
|
67
84
|
|
|
@@ -113,20 +130,41 @@ download (about 16 seconds).
|
|
|
113
130
|
### Releasing
|
|
114
131
|
|
|
115
132
|
`main` is the release branch: npm is published from it, and the plugin marketplace follows it. A
|
|
116
|
-
release has
|
|
133
|
+
release has five steps:
|
|
117
134
|
|
|
118
|
-
1. Bump `version` in this `package.json
|
|
119
|
-
same number (
|
|
135
|
+
1. Bump `version` in this `package.json`, in `.claude-plugin/plugin.json` at the repo root, and in
|
|
136
|
+
`mcpb/manifest.json` to the same number (tests fail until all three match), and merge that to
|
|
137
|
+
`dev`.
|
|
120
138
|
2. Merge `dev` into `main` ("Release dev to main"). Only a new version updates installed plugins, so
|
|
121
139
|
this is what brings plugin users the new hooks and skill, at their next session.
|
|
122
140
|
3. Publish from `main` straight away, so the hooks don't run ahead of the server for long.
|
|
123
141
|
`@latest` reaches everyone at their next start, so stage it first:
|
|
142
|
+
|
|
124
143
|
```sh
|
|
125
144
|
npm publish --tag next # latest is untouched
|
|
126
145
|
npx -y @skedulo/memory-hub-mcp@next embed hello # try it: prints a vector
|
|
127
|
-
npm dist-tag add @skedulo/memory-hub-mcp@<version> latest # release it
|
|
128
146
|
```
|
|
129
147
|
|
|
148
|
+
4. Attach the desktop extension to a GitHub release, before moving `latest`, so the update notice
|
|
149
|
+
never points at a stale or missing asset. `pack-mcpb.sh` builds `memory-hub.mcpb` with its own
|
|
150
|
+
`node_modules` for macOS and Windows (about 130 MB, a few minutes), so the release page serves
|
|
151
|
+
it at the fixed link in the root README. It needs `jq`, `yarn`, `npm` and a network connection,
|
|
152
|
+
and must run from an up-to-date `main` checkout:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
./scripts/pack-mcpb.sh
|
|
156
|
+
gh release create v<version> memory-hub.mcpb --repo Skedulo/se-ai-memory-hub --target main --title v<version>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
5. Release it:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
npm dist-tag add @skedulo/memory-hub-mcp@<version> latest
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Move `latest` as soon as `dev` is merged to `main`: the plugin's hooks reach users at the merge,
|
|
166
|
+
and `memory-hub-mcp login` only reaches them with `latest`.
|
|
167
|
+
|
|
130
168
|
A hook or skill fix on its own still ships as a patch release.
|
|
131
169
|
|
|
132
170
|
Roll back by pointing `latest` at the previous version:
|
package/assets/session-start.sh
CHANGED
|
@@ -6,26 +6,78 @@ set -u
|
|
|
6
6
|
|
|
7
7
|
[ -n "${MEMORY_HUB_STOP_HOOK_ACTIVE:-}" ] && exit 0
|
|
8
8
|
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
# >>> token lookup: keep identical in session-start.sh, user-prompt-submit.sh, session-stop.sh
|
|
10
|
+
TOKEN="" TOKEN_SOURCE="" FILE_API_BASE=""
|
|
11
|
+
for pair in "env:${MEMORY_HUB_MCP_TOKEN:-}" "option:${CLAUDE_PLUGIN_OPTION_TOKEN:-}"; do
|
|
12
|
+
value="${pair#*:}"
|
|
13
|
+
case "$value" in '' | '${'*) continue ;; esac
|
|
14
|
+
TOKEN="$value" TOKEN_SOURCE="${pair%%:*}"
|
|
15
|
+
break
|
|
16
|
+
done
|
|
17
|
+
TOKEN_FILE="${MEMORY_HUB_TOKEN_FILE:-${XDG_CONFIG_HOME:-$HOME/.config}/memory-hub/token.json}"
|
|
18
|
+
if [ -z "$TOKEN" ] && [ -r "$TOKEN_FILE" ] && command -v jq >/dev/null 2>&1; then
|
|
19
|
+
TOKEN=$(jq -r '.token // empty' "$TOKEN_FILE" 2>/dev/null || true)
|
|
20
|
+
FILE_API_BASE=$(jq -r '.apiBase // empty' "$TOKEN_FILE" 2>/dev/null || true)
|
|
21
|
+
[ -n "$TOKEN" ] && TOKEN_SOURCE=file
|
|
22
|
+
fi
|
|
23
|
+
FUNCTION_URL="${MEMORY_HUB_FUNCTION_URL:-${FILE_API_BASE:-https://dev-api.test.skl.io}/function/memory-hub/memory-hub}"
|
|
24
|
+
# <<< token lookup
|
|
13
25
|
|
|
14
|
-
PLUGIN_ID=memory-hub@memory-hub
|
|
15
26
|
OLD_ID_ROOT=false
|
|
16
|
-
case "${CLAUDE_PLUGIN_ROOT:-}" in */se-ai-memory-hub/*)
|
|
27
|
+
case "${CLAUDE_PLUGIN_ROOT:-}" in */se-ai-memory-hub/*) OLD_ID_ROOT=true ;; esac
|
|
28
|
+
|
|
29
|
+
STATE_DIR="${MEMORY_HUB_STATE_DIR:-$HOME/.claude/memory-hub-hook/state}"
|
|
30
|
+
|
|
31
|
+
DISABLE_GUIDANCE="If they'd rather not use Memory Hub, they can turn it off: in a terminal, /plugin → Installed → memory-hub → Disable; in the desktop app, + → Plugins → Manage plugins → memory-hub off."
|
|
32
|
+
|
|
33
|
+
emit_context() {
|
|
34
|
+
printf '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "memory-hub plugin: %s %s"}}\n' "$1" "$DISABLE_GUIDANCE"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
emit_jq_missing() {
|
|
38
|
+
printf '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "memory-hub needs jq, which is not installed, so memory is off this session. Tell the user to install it (macOS: brew install jq; Debian/Ubuntu: sudo apt install jq) and restart Claude Code.%s"}}\n' "${1:+ $1}"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
npx_available() {
|
|
42
|
+
local dir
|
|
43
|
+
if [ -n "${MEMORY_HUB_NPX_SEARCH:-}" ]; then
|
|
44
|
+
for dir in $MEMORY_HUB_NPX_SEARCH; do
|
|
45
|
+
[ -x "$dir/npx" ] && return 0
|
|
46
|
+
done
|
|
47
|
+
return 1
|
|
48
|
+
fi
|
|
49
|
+
command -v npx >/dev/null 2>&1 && return 0
|
|
50
|
+
for dir in /opt/homebrew/bin /usr/local/bin "$HOME/.volta/bin" $(ls -d "$HOME"/.nvm/versions/node/*/bin 2>/dev/null | sort -rV); do
|
|
51
|
+
[ -x "$dir/npx" ] && return 0
|
|
52
|
+
done
|
|
53
|
+
return 1
|
|
54
|
+
}
|
|
17
55
|
|
|
18
56
|
if [ -z "$TOKEN" ]; then
|
|
19
|
-
# A plugin install has no setup step of its own, so it says how to add the token.
|
|
20
57
|
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
|
|
21
|
-
|
|
58
|
+
marker="$STATE_DIR/login-attempted"
|
|
59
|
+
if [ -e "$TOKEN_FILE" ] && ! command -v jq >/dev/null 2>&1; then
|
|
60
|
+
emit_jq_missing "$DISABLE_GUIDANCE"
|
|
61
|
+
elif ! npx_available; then
|
|
62
|
+
emit_context "Memory Hub needs Node.js, which isn't installed, so memory is off this session. Tell the user to install the LTS version from https://nodejs.org (the macOS or Windows installer), then restart Claude."
|
|
63
|
+
# noclobber makes creating the marker atomic: of two sessions starting together, only one opens a tab.
|
|
64
|
+
elif [ ! -e "$marker" ] && mkdir -p "$STATE_DIR" 2>/dev/null && (set -o noclobber; : > "$marker") 2>/dev/null; then
|
|
65
|
+
if [ -n "${MEMORY_HUB_LOGIN_CMD:-}" ]; then
|
|
66
|
+
nohup $MEMORY_HUB_LOGIN_CMD </dev/null >"$STATE_DIR/login.log" 2>&1 &
|
|
67
|
+
else
|
|
68
|
+
nohup "$CLAUDE_PLUGIN_ROOT/memory-hub-hook/mcp-server.sh" login </dev/null >"$STATE_DIR/login.log" 2>&1 &
|
|
69
|
+
fi
|
|
70
|
+
emit_context "This is the first session with Memory Hub, so a browser tab is opening on the Skedulo sign-in (the first time it can take a minute). Tell the user to sign in there; memory starts working from their next message. If no tab opened, call memory_login. Once they're signed in, offer once to stop Memory Hub's approval prompts with /memory-hub:setup."
|
|
71
|
+
else
|
|
72
|
+
emit_context "Memory Hub isn't signed in, so memory is off. Offer once to sign the user in; if they agree, call memory_login, which opens a Skedulo sign-in in their browser."
|
|
73
|
+
fi
|
|
22
74
|
fi
|
|
23
75
|
exit 0
|
|
24
76
|
fi
|
|
25
77
|
|
|
26
78
|
# Without jq the JSON below cannot be built, and an invalid line is dropped without a word.
|
|
27
79
|
if ! command -v jq >/dev/null 2>&1; then
|
|
28
|
-
|
|
80
|
+
emit_jq_missing
|
|
29
81
|
exit 0
|
|
30
82
|
fi
|
|
31
83
|
|
|
@@ -46,6 +98,7 @@ call() {
|
|
|
46
98
|
mkdir -p "$MEMORY_HUB_FIXTURE_DIR/requests" 2>/dev/null
|
|
47
99
|
printf '%s' "$body" > "$MEMORY_HUB_FIXTURE_DIR/requests/$(basename "$out_file")" 2>/dev/null
|
|
48
100
|
cp "$MEMORY_HUB_FIXTURE_DIR/$(basename "$out_file")" "$out_file" 2>/dev/null || true
|
|
101
|
+
cp "$MEMORY_HUB_FIXTURE_DIR/$(basename "$out_file").code" "$out_file.code" 2>/dev/null || true
|
|
49
102
|
return 0
|
|
50
103
|
fi
|
|
51
104
|
|
|
@@ -54,7 +107,7 @@ call() {
|
|
|
54
107
|
-H "Authorization: Bearer ${TOKEN}" \
|
|
55
108
|
-H "Content-Type: application/json" \
|
|
56
109
|
-d "$body" \
|
|
57
|
-
-o "$out_file" 2>/dev/null || true
|
|
110
|
+
-o "$out_file" -w '%{http_code}' > "$out_file.code" 2>/dev/null || true
|
|
58
111
|
}
|
|
59
112
|
|
|
60
113
|
# Canonicalize a git remote URL to owner/name, per the repo/team grouping spec §3.
|
|
@@ -165,6 +218,17 @@ if [ -n "$REPO_NAME" ]; then
|
|
|
165
218
|
fi
|
|
166
219
|
wait
|
|
167
220
|
|
|
221
|
+
SELF_CODE=$(cat "$TMP_DIR/facts_self.json.code" 2>/dev/null)
|
|
222
|
+
if [ "$SELF_CODE" = 401 ] || [ "$SELF_CODE" = 403 ]; then
|
|
223
|
+
EXPIRED="The Memory Hub sign-in has expired or was revoked (HTTP $SELF_CODE), so memory is off. Offer to sign in again with memory_login."
|
|
224
|
+
case "$TOKEN_SOURCE" in
|
|
225
|
+
env) EXPIRED="$EXPIRED The rejected token is MEMORY_HUB_MCP_TOKEN in ~/.claude/settings.json; it wins over a new sign-in, so offer to remove it first and restart Claude." ;;
|
|
226
|
+
option) EXPIRED="$EXPIRED The rejected token is the plugin's token option; clear it with /plugin configure first, then restart Claude." ;;
|
|
227
|
+
esac
|
|
228
|
+
emit_context "$EXPIRED"
|
|
229
|
+
exit 0
|
|
230
|
+
fi
|
|
231
|
+
|
|
168
232
|
# The repo-scoped recall can only run once resolve-repo has returned a uid, so it's a
|
|
169
233
|
# second round rather than part of the batch above. Both calls carry the same 3s cap
|
|
170
234
|
# as everything else — worst case the hook takes two short rounds, never blocks.
|
|
@@ -467,8 +531,6 @@ else
|
|
|
467
531
|
SAVE_LINE='What follows is an automatic recall only - nothing in this session is saved unless you call memory_save.'
|
|
468
532
|
fi
|
|
469
533
|
|
|
470
|
-
STATE_DIR="${MEMORY_HUB_STATE_DIR:-$HOME/.claude/memory-hub-hook/state}"
|
|
471
|
-
|
|
472
534
|
# Lists captures the session-stop.sh hook saved in the background.
|
|
473
535
|
# Renders capture log lines as "<line number><TAB>notice"; the same in session-start.sh and user-prompt-submit.sh, change both together.
|
|
474
536
|
render_capture_notices() {
|
package/assets/session-stop.sh
CHANGED
|
@@ -72,11 +72,24 @@ if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && ! capture_enabled; then
|
|
|
72
72
|
exit 0
|
|
73
73
|
fi
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
# >>> token lookup: keep identical in session-start.sh, user-prompt-submit.sh, session-stop.sh
|
|
76
|
+
TOKEN="" TOKEN_SOURCE="" FILE_API_BASE=""
|
|
77
|
+
for pair in "env:${MEMORY_HUB_MCP_TOKEN:-}" "option:${CLAUDE_PLUGIN_OPTION_TOKEN:-}"; do
|
|
78
|
+
value="${pair#*:}"
|
|
79
|
+
case "$value" in '' | '${'*) continue ;; esac
|
|
80
|
+
TOKEN="$value" TOKEN_SOURCE="${pair%%:*}"
|
|
81
|
+
break
|
|
82
|
+
done
|
|
83
|
+
TOKEN_FILE="${MEMORY_HUB_TOKEN_FILE:-${XDG_CONFIG_HOME:-$HOME/.config}/memory-hub/token.json}"
|
|
84
|
+
if [ -z "$TOKEN" ] && [ -r "$TOKEN_FILE" ] && command -v jq >/dev/null 2>&1; then
|
|
85
|
+
TOKEN=$(jq -r '.token // empty' "$TOKEN_FILE" 2>/dev/null || true)
|
|
86
|
+
FILE_API_BASE=$(jq -r '.apiBase // empty' "$TOKEN_FILE" 2>/dev/null || true)
|
|
87
|
+
[ -n "$TOKEN" ] && TOKEN_SOURCE=file
|
|
88
|
+
fi
|
|
89
|
+
FUNCTION_URL="${MEMORY_HUB_FUNCTION_URL:-${FILE_API_BASE:-https://dev-api.test.skl.io}/function/memory-hub/memory-hub}"
|
|
90
|
+
# <<< token lookup
|
|
76
91
|
[ -n "$TOKEN" ] || exit 0
|
|
77
92
|
|
|
78
|
-
# Same default as session-start.sh; change both together.
|
|
79
|
-
FUNCTION_URL="${MEMORY_HUB_FUNCTION_URL:-https://dev-api.test.skl.io/function/memory-hub/memory-hub}"
|
|
80
93
|
CLAUDE_BIN="${MEMORY_HUB_CLAUDE_BIN:-claude}"
|
|
81
94
|
INTERVAL_MIN="${MEMORY_HUB_CAPTURE_INTERVAL_MIN:-30}"
|
|
82
95
|
MIN_NEW_LINES="${MEMORY_HUB_CAPTURE_MIN_NEW_LINES:-40}"
|
|
@@ -28,8 +28,8 @@ a PR moved, and grows the hub when it did not know. It answers in the role the q
|
|
|
28
28
|
Look at the parameters of the `memory_recall`, `memory_list`, `memory_save` and `memory_update`
|
|
29
29
|
tools; if only their names are listed, load their schemas first. If any of them is missing, the
|
|
30
30
|
memory-hub server is not connected: say so and stop. If `memory_update` has no
|
|
31
|
-
`expectedLastModified` parameter,
|
|
32
|
-
server is older than this release. Stop, do nothing else, and say it must be updated:
|
|
31
|
+
`expectedLastModified` parameter, if `memory_save` has no `supersedes` parameter, or if there is no
|
|
32
|
+
`memory_related` tool, the memory-hub server is older than this release. Stop, do nothing else, and say it must be updated:
|
|
33
33
|
|
|
34
34
|
- plugin installs, and `setup` installs with auto-update: restart Claude Code or Claude Desktop;
|
|
35
35
|
- pinned installs: re-run `npx -y @skedulo/memory-hub-mcp@latest setup --no-auto-update`;
|
|
@@ -87,8 +87,15 @@ steps 4 to 7 say what changes.
|
|
|
87
87
|
came from and treat it as precedent, not as that project's rule. Keep the other customer's
|
|
88
88
|
names, data and terms out of anything meant for this one.
|
|
89
89
|
4. Read with `memory_get` every item you will rely on whose text came back cut short.
|
|
90
|
-
5.
|
|
91
|
-
|
|
90
|
+
5. For every item you will rely on, call `memory_related` once and read with `memory_get` the
|
|
91
|
+
neighbours that bear on the question: a wiki page's linked pages and backlinks, a Scenario's
|
|
92
|
+
facts, a `superseded by` candidate, and items on the same ticket or citing the same file.
|
|
93
|
+
Read at most 5 extra items per answer. Go one level only: never call `memory_related` on a
|
|
94
|
+
neighbour.
|
|
95
|
+
6. When an item has `superseded: true`, prefer the newer memory that replaced it. A
|
|
96
|
+
`superseded by` entry from `memory_related` is a candidate: check that it restates the older
|
|
97
|
+
item. The route only infers it between items of the same type on the same ticket, so there may
|
|
98
|
+
be none, or several. When none fits, find the newer memory with `memory_recall`.
|
|
92
99
|
|
|
93
100
|
## 3. When a named project's pages are not found
|
|
94
101
|
|
|
@@ -105,6 +105,42 @@ For each outcome that is not held back:
|
|
|
105
105
|
image URL; when a mockup has no URL, describe it in text in the body (layout, fields, labels,
|
|
106
106
|
states). Never point the agent at a Linear attachment: it cannot read attachments.
|
|
107
107
|
|
|
108
|
+
Then fill what an agent that sees only this issue cannot find out for itself. A plan saved before
|
|
109
|
+
this release has none of the fields named below: derive each one the way plan-ticket step 5 describes,
|
|
110
|
+
from the pages and the code at the pinned commit, and say in your report which ones you derived.
|
|
111
|
+
|
|
112
|
+
4. Decisions that apply: copy the plan's Decisions lines that the outcome's `Decisions:` field lists.
|
|
113
|
+
Without the field, take the ones that name this outcome, its files, its rules or its goal.
|
|
114
|
+
5. Interfaces: for each `Consumes:` item, copy the producing outcome's `Produces:` text exactly, so
|
|
115
|
+
both bodies spell every name the same; for each `Produces:` item, name the outcomes that consume
|
|
116
|
+
it. A name no longer in the code at the pinned commit, or spelled differently there, is corrected
|
|
117
|
+
from the code in both drafts; say so in your report. Without the fields, look for what one
|
|
118
|
+
outcome's files define (a field, route, exported function, prop or event topic) and another
|
|
119
|
+
outcome's goal uses, and write it into both.
|
|
120
|
+
6. Data model and APIs used: for each field, picklist and endpoint the outcome reads or writes, copy
|
|
121
|
+
the line verbatim from the reference page the outcome's `Data model and APIs:` field names
|
|
122
|
+
(`memory_list type=Wiki repo=<delivery repo uid> titlePrefix="<Project> › Reference"`, then
|
|
123
|
+
`memory_get` on every part). When no page holds it, copy it from the schema or definition file at
|
|
124
|
+
the pinned commit (custom field JSON, `types.ts`, the route table) and cite `<path>@<short sha>`.
|
|
125
|
+
7. Edge cases: take the outcome's 3 to 5 edge cases, and check each expected behaviour against the
|
|
126
|
+
code at the pinned commit and the rules copied in 2.1. When the plan has fewer than 3, add from the
|
|
127
|
+
sources plan-ticket step 5 lists. Each one becomes an Acceptance Criteria item, except one that
|
|
128
|
+
code outside the files it may change already handles: keep that one under Edge cases, with the
|
|
129
|
+
path that handles it, and give it no Acceptance Criteria item.
|
|
130
|
+
8. Cross-repo impact: start from the outcome's field, then look for every caller of each route,
|
|
131
|
+
exported function, field and event topic the outcome changes: the architecture-map edges that touch
|
|
132
|
+
its files (`memory_list type=Skill tags=["ArchitectureMap"]`, then `memory_get`), and a code search
|
|
133
|
+
for each name in this repo at the pinned commit and in the repos those maps name (`git grep`,
|
|
134
|
+
`gh search code`). Note what each caller relies on. With no map and no caller, write "None found"
|
|
135
|
+
and where you looked.
|
|
136
|
+
9. How to verify: check that the test file the outcome names exists at the pinned commit, and pick a
|
|
137
|
+
test in it to copy. Read its fakes and fixtures, and note what they do not simulate (a fake that
|
|
138
|
+
returns every fixture row without applying the query's filter makes a filter test pass for the
|
|
139
|
+
wrong reason). Take the test command from the repo's `package.json` or docs. A tenant check needs
|
|
140
|
+
an alias and seed data from the project's reference pages or the repo's own docs (`CLAUDE.md`,
|
|
141
|
+
`README.md`); when none names an alias, write the steps and leave the alias as
|
|
142
|
+
`<reviewer's alias>`. Never write credentials, tokens, or tenant URLs that carry one.
|
|
143
|
+
|
|
108
144
|
## 3. Draft and check
|
|
109
145
|
|
|
110
146
|
1. One sub-issue per outcome, sized for one agent session and one PR. Split an outcome that is bigger,
|
|
@@ -115,11 +151,21 @@ For each outcome that is not held back:
|
|
|
115
151
|
3. Check each draft and fix what fails:
|
|
116
152
|
- Could an agent implement it with only this issue? No "see parent", no hub links needed, every
|
|
117
153
|
rule copied in full with its ID, and any unverified entry labelled as one.
|
|
118
|
-
- Is every acceptance criterion testable?
|
|
154
|
+
- Is every acceptance criterion testable? Does every edge case have its own Acceptance Criteria
|
|
155
|
+
item, naming the test file it goes in, or the path that already handles it?
|
|
119
156
|
- Does it name the repo, the pinned commit, and the files it may change?
|
|
157
|
+
- Is every field, picklist and endpoint named in Requirements or Interfaces also under "Data model
|
|
158
|
+
and APIs used", copied verbatim with its source, not paraphrased?
|
|
159
|
+
- Does "How to verify" name a test file that exists at the pinned commit, and the command to run?
|
|
160
|
+
- Does "Cross-repo impact" list each caller with what it relies on, or say "None found" and where
|
|
161
|
+
you looked?
|
|
162
|
+
- Does "Decisions that apply" give the reason for each decision, naming roles, not people?
|
|
120
163
|
- Does it hold anything the confidentiality rules forbid (commercial terms, customer personal data,
|
|
121
164
|
verbatim contract text, customer data rows or production record IDs, credentials, tokens or
|
|
122
165
|
secrets)? Remove it.
|
|
166
|
+
4. Then check the drafts against each other: every name under a draft's Consumes matches, character
|
|
167
|
+
for character, a sibling's Produces, and every Produces item names the drafts that consume it. Fix
|
|
168
|
+
both drafts from the code when they disagree.
|
|
123
169
|
|
|
124
170
|
## 4. Create the sub-issues
|
|
125
171
|
|
|
@@ -150,7 +196,8 @@ With the Linear connector:
|
|
|
150
196
|
blocked-by relations that are not set yet, including one to each `<ID> (pending)` ticket, from the
|
|
151
197
|
plan's "Depends on" or derived in step 2.1, whose workflow state type is neither `completed` nor
|
|
152
198
|
`canceled` (step 1.6 held back outcomes whose ticket was canceled), and update each created body's
|
|
153
|
-
Dependencies
|
|
199
|
+
Dependencies and Interfaces sections with the real IDs. On a reused sub-issue, remove each
|
|
200
|
+
blocked-by relation its
|
|
154
201
|
outcome no longer maps to: one to a sibling sub-issue that is canceled, or that an earlier run of
|
|
155
202
|
this skill created (it has a delegate-ticket Fact) and that matches no current outcome (relate it
|
|
156
203
|
to the sub-issue that replaces it instead, when there is one, and drop it when that outcome is done
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
The sections follow the marketplace `agent-issue-template.md` (Context, Requirements, Implementation
|
|
4
4
|
Guide, Agent Instructions, Technical Details, Acceptance Criteria, Dependencies, Agent Notes), so
|
|
5
|
-
reviewers who know that template recognise these
|
|
6
|
-
|
|
5
|
+
reviewers who know that template recognise these. Added to them: Decisions that apply, Interfaces,
|
|
6
|
+
Data model and APIs used, Cross-repo impact, Edge cases, How to verify, a Delivery contract and PR
|
|
7
|
+
Description Instructions. Omit a section only where it says so.
|
|
7
8
|
|
|
8
9
|
The Linear Dev Agent reads the sub-issue's title, description, labels and comments, and nothing else:
|
|
9
10
|
not the parent issue, not the hub, not the planning chat. Every fact the work needs is in the body.
|
|
@@ -25,6 +26,39 @@ write "see parent".>
|
|
|
25
26
|
- <specific requirement>
|
|
26
27
|
- <specific requirement>
|
|
27
28
|
|
|
29
|
+
## Decisions that apply
|
|
30
|
+
|
|
31
|
+
<Each plan decision this outcome lists, copied as the plan states it: what was decided, why, and its
|
|
32
|
+
source. These are why the rules below are as they are; use them to choose where this issue is silent.
|
|
33
|
+
"None" if the outcome lists none.>
|
|
34
|
+
|
|
35
|
+
- <decision> Reason: <why> _Source: <ticket, comment date or document>_
|
|
36
|
+
|
|
37
|
+
## Interfaces
|
|
38
|
+
|
|
39
|
+
Other sub-issues are built by agents that never see this one. Use these names exactly; if one cannot
|
|
40
|
+
hold, stop under the stop rule rather than renaming it.
|
|
41
|
+
|
|
42
|
+
- **Produces** (used by <SUB-ID or "a later issue">):
|
|
43
|
+
- `<exact name>`: <type or shape: field API name and type, route with request and response shape,
|
|
44
|
+
exported function signature, component props, event topic and payload>
|
|
45
|
+
- **Consumes** (from <SUB-ID, or "existing code">):
|
|
46
|
+
- `<exact name>`: <type or shape>, from `<path>` or <SUB-ID>
|
|
47
|
+
|
|
48
|
+
<"None": this issue neither produces nor consumes anything another issue builds. Existing code that
|
|
49
|
+
calls what this issue changes goes under "Cross-repo impact", not here.>
|
|
50
|
+
|
|
51
|
+
## Data model and APIs used
|
|
52
|
+
|
|
53
|
+
<The fields, picklist values and endpoints this issue reads or writes, copied verbatim from the
|
|
54
|
+
project's reference pages, or from the schema files in the repo at the pinned commit when there is no
|
|
55
|
+
reference page. One line each, with its source. "None" when it reads and writes no fields or
|
|
56
|
+
endpoints.>
|
|
57
|
+
|
|
58
|
+
- `<Object>.<FieldApiName>` · <type> · <picklist values or constraints> _Source: <page title or
|
|
59
|
+
path@sha>_
|
|
60
|
+
- `<METHOD> <route>` · request `<shape>` · response `<shape>` _Source: <page title or path@sha>_
|
|
61
|
+
|
|
28
62
|
## Implementation Guide
|
|
29
63
|
|
|
30
64
|
- **GitHub Repo:** `Skedulo/<repo>`
|
|
@@ -34,6 +68,13 @@ write "see parent".>
|
|
|
34
68
|
- **Extension Point:** <mechanism>
|
|
35
69
|
- **Pattern to Follow:** <an existing file in the repo, by path>
|
|
36
70
|
|
|
71
|
+
## Cross-repo impact
|
|
72
|
+
|
|
73
|
+
<Every caller or consumer of what this issue changes, in this repo and others, and what each relies
|
|
74
|
+
on, so it keeps working. "None found" with where you looked, when there is none.>
|
|
75
|
+
|
|
76
|
+
- `<owner/repo>` `<path>`: <calls or reads what, and relies on what>
|
|
77
|
+
|
|
37
78
|
## Agent Instructions
|
|
38
79
|
|
|
39
80
|
<For a plugin-backed component:>
|
|
@@ -48,15 +89,34 @@ convention and how to validate.>
|
|
|
48
89
|
## Technical Details
|
|
49
90
|
|
|
50
91
|
<Key SDKs and imports, JSON structure, key patterns and pitfalls, from the code you read. Copy a
|
|
51
|
-
structure from a file in the repo rather than writing it from memory
|
|
92
|
+
structure from a file in the repo rather than writing it from memory. Fields and endpoints belong
|
|
93
|
+
under "Data model and APIs used", not here.>
|
|
94
|
+
|
|
95
|
+
## Edge cases
|
|
96
|
+
|
|
97
|
+
<The 3 to 5 inputs or conditions most likely to break this for a real user, each with its expected
|
|
98
|
+
behaviour. Each one is also an Acceptance Criteria item below, unless code outside the files this
|
|
99
|
+
issue may change already handles it: then name that path instead.>
|
|
100
|
+
|
|
101
|
+
- <condition> → <expected behaviour>
|
|
52
102
|
|
|
53
103
|
## Acceptance Criteria
|
|
54
104
|
|
|
55
105
|
- [ ] <each "Done when" check from the plan, as a testable statement>
|
|
106
|
+
- [ ] <each edge case, as a test: "Given <condition>, <expected behaviour>", naming the test file>
|
|
56
107
|
- [ ] Tests pass (`<the repo's test command>`)
|
|
57
108
|
- [ ] Every rule under "Project rules this issue must satisfy" holds, and nothing under "Do not
|
|
58
109
|
build" is built
|
|
59
110
|
|
|
111
|
+
## How to verify
|
|
112
|
+
|
|
113
|
+
- **Tests to extend:** `<existing test file>` (pattern: `<a test in it to copy>`). <What its fakes or
|
|
114
|
+
fixtures do not simulate, so a test does not pass for the wrong reason.>
|
|
115
|
+
- **Run:** `<the commands, from the directory to run them in>`
|
|
116
|
+
- <Only when a Done-when check needs a tenant:> **Tenant check** (for the reviewer after the PR; do
|
|
117
|
+
not deploy): alias `<sked alias>`, seed data <the records it needs, described, never production
|
|
118
|
+
record IDs>, then <the steps and what to see>.
|
|
119
|
+
|
|
60
120
|
## Dependencies
|
|
61
121
|
|
|
62
122
|
- **Blocked by:** <sub-issue IDs and titles, other tickets this waits for, or None>
|
|
@@ -64,7 +124,8 @@ structure from a file in the repo rather than writing it from memory.>
|
|
|
64
124
|
|
|
65
125
|
## Agent Notes
|
|
66
126
|
|
|
67
|
-
<
|
|
127
|
+
<Only what fits no section above, such as data volumes or a quirk of an external service. Omit if
|
|
128
|
+
none.>
|
|
68
129
|
|
|
69
130
|
## Delivery contract
|
|
70
131
|
|
|
@@ -120,6 +181,10 @@ Notes on the template:
|
|
|
120
181
|
not read attachments, so never refer it to one. Without an image URL, describe the mockup in text
|
|
121
182
|
(layout, fields, labels, states).
|
|
122
183
|
- Rule and don't-build lines are copied exactly as they appear on the hub pages, ID first.
|
|
184
|
+
- A name under Interfaces is spelled the same, character for character, in the producing sub-issue's
|
|
185
|
+
Produces and every consuming sub-issue's Consumes.
|
|
186
|
+
- Decisions that apply restate who decided by role ("the SA", "the customer's QA lead"), never by a
|
|
187
|
+
customer person's name, and keep the confidentiality rules like every other section.
|
|
123
188
|
|
|
124
189
|
## Labels
|
|
125
190
|
|
|
@@ -130,9 +130,9 @@ nothing else, and tell the developer to update it:
|
|
|
130
130
|
|
|
131
131
|
Before starting a candidate, refresh its contract, because the merges or a plan revision may have
|
|
132
132
|
changed what it relies on. Compare its body, with any earlier `Contract update` comments applied,
|
|
133
|
-
with the outcome it matches in the current plan (the Done-when checks, the Rules and
|
|
134
|
-
the files it may change) and with the current pages: re-read every rule, don't-build
|
|
135
|
-
unverified ID that the body or the outcome names, and handle retired, overridden and `Pending`
|
|
133
|
+
with the outcome it matches in the current plan (the Done-when checks and Edge cases, the Rules and
|
|
134
|
+
Must not IDs, the files it may change) and with the current pages: re-read every rule, don't-build
|
|
135
|
+
and unverified ID that the body or the outcome names, and handle retired, overridden and `Pending`
|
|
136
136
|
replacements as delegate-ticket step 2.1 does. A derived `<ID> (pending)` dependency gets a
|
|
137
137
|
blocked-by relation, and the candidate is not started: list it as waiting for `<ID>`, with "run
|
|
138
138
|
delegate-ticket on <PARENT-ID> once <ID> is done", and add the same sentence to the end of the
|
|
@@ -84,7 +84,9 @@ marked `Conflict: overridden by ...`, use the entry that overrides it, never the
|
|
|
84
84
|
1. Search the local checkout first, at the repo's default branch as it is on the remote: run
|
|
85
85
|
`git -C <checkout> fetch -q origin`, then search with `git -C <checkout> grep "<term>" origin/<default>`
|
|
86
86
|
and read files with `git -C <checkout> show origin/<default>:<path>`, never the working tree, which
|
|
87
|
-
may be on a feature branch.
|
|
87
|
+
may be on a feature branch. For each route, field, exported function or event topic the work
|
|
88
|
+
changes, search the whole repo for its callers (bundles, functions, API and end-to-end test
|
|
89
|
+
suites, not only `src/`), and note the test file beside each file the work changes.
|
|
88
90
|
2. Then the other repos the work touches: those named in `package.json` dependencies, in imports, and
|
|
89
91
|
in architecture-map edges (runtime calls that imports miss). Read them with `gh`:
|
|
90
92
|
`gh search code --repo <owner/name> "<term>"`, `gh api repos/<owner>/<name>/contents/<path>`.
|
|
@@ -158,9 +160,24 @@ Project: <Project> · Read at: <owner/name>@<full sha>, ... · Auto-assign: on
|
|
|
158
160
|
- Must not: <don't-build IDs and explicit exclusions>
|
|
159
161
|
- Files it may change: <paths or globs>
|
|
160
162
|
- Depends on: <outcome numbers, other tickets as `<ID> (pending)`, or none>
|
|
163
|
+
- Produces: <what a later outcome uses, by exact name: field API names with their types, function
|
|
164
|
+
routes with request and response shapes, exported functions with their signatures, component props,
|
|
165
|
+
event topics with their payload; or none>
|
|
166
|
+
- Consumes: <`<outcome number>: <name>` for each item an earlier outcome produces, copied exactly
|
|
167
|
+
from that outcome's Produces line; existing code it calls, with its path; or none>
|
|
168
|
+
- Data model and APIs: <the reference page entries or schema files that hold the fields, picklist
|
|
169
|
+
values and endpoints it reads or writes, by page title or path>
|
|
170
|
+
- Edge cases: <3 to 5 inputs or conditions most likely to break it for a real user, each as
|
|
171
|
+
`<condition> → <expected behaviour>`>
|
|
172
|
+
- Decisions: <the numbers of the Decisions below that shape this outcome, or none>
|
|
173
|
+
- Cross-repo impact: <callers or consumers of what it changes, in this repo and others, from the
|
|
174
|
+
architecture-map edges and a code search, each with what it relies on; or none found, saying where
|
|
175
|
+
you looked>
|
|
176
|
+
- Verify: <the existing test file to extend; when Done when needs a tenant, the sked alias and the
|
|
177
|
+
seed data it needs, or `<reviewer's alias>` when no source names one>
|
|
161
178
|
|
|
162
179
|
## Decisions
|
|
163
|
-
|
|
180
|
+
1. <each conflict or gap you settled, with the rule and source, and the features you matched, or "None">
|
|
164
181
|
|
|
165
182
|
## Knowledge changes
|
|
166
183
|
1. <from code | from ticket>: <the new or changed entry, with the decision that prompted it> (or "None")
|
|
@@ -170,7 +187,37 @@ Project: <Project> · Read at: <owner/name>@<full sha>, ... · Auto-assign: on
|
|
|
170
187
|
```
|
|
171
188
|
|
|
172
189
|
The `Rules:` line names existing IDs only; a new entry is a numbered item under "Knowledge changes"
|
|
173
|
-
without an ID.
|
|
190
|
+
without an ID.
|
|
191
|
+
|
|
192
|
+
Each sub-issue is built by a separate agent that sees only its own issue, so the fields from
|
|
193
|
+
Produces to Verify carry what it cannot find out for itself. Fill them from what steps 2 and 3 read,
|
|
194
|
+
never from memory:
|
|
195
|
+
|
|
196
|
+
- Produces and Consumes: when one outcome builds something another uses, write the name once, on the
|
|
197
|
+
producer's Produces line, and copy it exactly into the consumer's Consumes line. Name each item as
|
|
198
|
+
the code will spell it (`Jobs.SessionType: Picklist (Online, In-Person)`,
|
|
199
|
+
`GET /forecast/cell → { available: string[], booked: Booked[] }`), never by description.
|
|
200
|
+
- Data model and APIs: point at the reference page entries (data model, APIs) or, when the project has
|
|
201
|
+
no such page, at the schema or definition files in the repo (custom field JSON, `types.ts`, route
|
|
202
|
+
files). delegate-ticket copies the lines from there.
|
|
203
|
+
- Edge cases: take them from the rules and constraints the outcome must satisfy, the project's
|
|
204
|
+
troubleshooting page (known gaps), the code's handling of empty, missing and null values, and the
|
|
205
|
+
ticket's comments. Prefer a case a user can hit (an empty list, a missing optional field, a record
|
|
206
|
+
the caller cannot read, a time zone or month boundary, a duplicate submit) over one only a test can.
|
|
207
|
+
Each one becomes an acceptance criterion on the sub-issue, unless code outside the outcome's files
|
|
208
|
+
already handles it: then name that path.
|
|
209
|
+
- Decisions: number the Decisions list and keep the numbers when revising, as with outcomes. An
|
|
210
|
+
outcome lists the ones whose reasoning its agent needs to choose well where the issue is silent.
|
|
211
|
+
- Cross-repo impact: the architecture-map edges from step 2.7, and the callers that steps 3.1 and 3.2
|
|
212
|
+
found for each route, function, field or event the outcome changes. Say what each caller relies on, so the
|
|
213
|
+
agent knows what must keep working.
|
|
214
|
+
- Verify: the existing test file step 3.1 noted beside the code it changes, by path, and the repo's
|
|
215
|
+
test command.
|
|
216
|
+
Take a sked alias and seed data only from the project's reference pages or the repo's own docs
|
|
217
|
+
(`CLAUDE.md`, `README.md`); never guess one, and never write credentials, tokens or tenant URLs that
|
|
218
|
+
carry one.
|
|
219
|
+
|
|
220
|
+
`Auto-assign` is `on` for a first plan unless the developer says "don't assign". When
|
|
174
221
|
revising, copy the value from the existing plan Scenario's header (a header without it counts as
|
|
175
222
|
`off`), set it to `off` when the developer says "don't assign", and to `on` when they say "assign" or
|
|
176
223
|
"start the agent".
|