Set up scrum context for this project
scrum is installed at user scope, so it works in any repo, but each repo
still needs its own .claude/scrum-context.json — this skill creates or
updates that file without hand-editing JSON.
Steps
- Take the current working directory as the target project root (it's the repo the user is already working in). Only ask if that's ambiguous.
- Read
.claude/scrum-context.jsonif it exists and show the user its current values, so you only ask about what's missing or changing:mondayBoardId/mondayBoardUrl— the monday.com boarddriveDocsRootPath— Google Drive root(s) formanage-drive-docs(a string or array of strings)mondayEpics—{ "<monday group title>": "<Drive Epic folder path>" }entries used bysave-all.mjs/init-task.mjs, and also injected into<scrum-context>as<monday-epic>elements. A value may also be an object —{drivePath, repo: {url, epicBranch?, defaultBranch?}}— to additionally configuresync-repo.mjs's dedicated mirror clone for that Epic;repo.epicBranchis optional (auto-detected fromepic/*remote branches when omitted).repoWorkspacesRoot— local (non-Drive) root directorysync-repo.mjsclones repo mirrors under, default~/.pm-repos
- Extract the numeric board id from the URL's
/boards/<id>segment when the user gives a monday board URL. - When adding or changing a
mondayEpicsentry, check that the existingdriveDocsRootPathis an ancestor of the new folder path.manage-drive-docsonly searches underdriveDocsRootPath, so an Epic folder outside it becomes invisible to Drive lookups even thoughsave-all.mjs/init-task.mjs(which readmondayEpicsdirectly) still work. If it isn't an ancestor, point this out to the user and offer to broadendriveDocsRootPathto the common parent of allmondayEpicsfolders (see README'sdriveDocsRootPath/mondayEpicsnote) rather than silently leaving it scoped to one Epic. - Write the patch in one call — do not hand-edit the JSON file yourself:
Omit any key the user isn't setting. The script merges onto the existing config (node "${CLAUDE_PLUGIN_ROOT}/scripts/setup/init-scrum-context.mjs" <<'EOF' {"mondayBoardId": "...", "mondayBoardUrl": "...", "driveDocsRootPath": "...", "mondayEpics": {"...": "..."}, "repoWorkspacesRoot": "..."} EOFmondayEpicsmerges key-by-key, so prior entries survive) and ensures.claude/scrum-context.jsonis listed in.gitignore. - Report the script's JSON result to the user: which fields were written,
whether
.gitignorewas updated, and whetherMONDAY_TOKENis set in the environment (a courtesy check — point to https://developer.monday.com/api-reference/docs/authentication if not). - Tell the user a new session is needed: the
<scrum-context>block is only injected by the SessionStart hook, so this session won't see the change until they restart.
Reference
Full field meanings and the <scrum-context> XML the SessionStart hook
produces are documented in the scrum plugin README's "SessionStart hook"
section and hooks/scrum-context.example.json — this skill only automates
writing the file; it doesn't change what the fields mean.