[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BX7DWDCY60PJSK316WPHQT":3,"skill-same:01M6BX7DWDCY60PJSK316WPHQT":121},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":15,"repositoryHtmlUrl":48,"repositoryHomepageUrl":17,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":17,"updatedAt":51,"install":52,"resources":64},"01M6BX7DWDCY60PJSK316WPHQT","setup-context","工程技能上下文配置","Configure and scaffold this repo for the engineering skills: context store, tickets\u002Fspecs, triage labels, domain-doc layout, and install the machine-wide `## Agent skills (defaults)` block. Run once before the other skills, or again to switch any of those choices.","为工程技能配置并搭建此代码库：上下文存储、工单\u002F规格（tickets\u002Fspecs）、分诊标签（triage labels）、领域文档布局，并安装机器级的 `## Agent skills (defaults)` 区块。应在其他技能之前运行一次，或再次运行以切换上述任意选项。","epr3\u002Fdotfiles","epr3","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F17836403?v=4","01M6BX69256YXCM19NTC0GJZ65","Eduard Predescu","01M6BX696ESQMPA9YYH6XXR72R",0,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38],"setup","setup context","triage","scaffold","run","engineering","doc","configure","2026-11-10 10:12:30",false,"---\nname: setup-context\ndescription: \"Configure and scaffold this repo for the engineering skills: context store, tickets\u002Fspecs, triage labels, domain-doc layout, and install the machine-wide `## Agent skills (defaults)` block. Run once before the other skills, or again to switch any of those choices.\"\ndisable-model-invocation: true\n---\n\n# Setup Context\n\nScaffold the per-repo configuration that the engineering skills assume. This is a prompt-driven skill, not a deterministic script: explore, present what you found, confirm with the user, then write. Machine-wide defaults live in global config; per-repo choices (made below) are recorded as an `## Agent skills` block + convention docs in the **config home**; every skill reads them without extra wiring.\n\n## Process\n\n### 1. Machine-wide defaults block: once per machine\n\nThe `## Agent skills (defaults)` block (domain-docs \u002F context+ADRs conventions) is machine-wide and repo-independent. Its home is the harness's global instructions file — `~\u002F.pi\u002Fagent\u002FAGENTS.md` (Pi) or `~\u002F.config\u002Fopencode\u002FAGENTS.md` (OpenCode) — which layers with project instruction files, so the block applies in every repo. Harness tooling is kept separate. Read the block in [global-rules.md](.\u002Fglobal-rules.md), then check what's installed in the current harness's global instructions file:\n\n- **absent** -> offer to install. On confirm: append `global-rules.md`'s block to the current harness's global instructions file — `~\u002F.pi\u002Fagent\u002FAGENTS.md` for Pi, `~\u002F.config\u002Fopencode\u002FAGENTS.md` for OpenCode — creating the file if missing.\n- **present and identical** -> report it installed, move on.\n- **present but drifted** -> show the difference (which clauses the installed copy lacks, which it has that the seed doesn't) and offer to update it in place: replace that block's body, leave surrounding content untouched, never duplicate. Don't overwrite silently; a local edit may be deliberate, so let the user decline per clause or wholesale. This is the block's only repair path; skipping \"present\" is what lets a copy installed once rot indefinitely.\n\nOptional: shared **context root**. To put every **context repo** under one fixed folder instead of `${AGENT_CONTEXT_HOME:-${XDG_DATA_HOME:-$HOME\u002F.local\u002Fshare}\u002Fagent\u002Fctx}`, set `AGENT_CONTEXT_HOME` (absolute path) in the environment the agent runs under (for example, its shell profile or launcher); offer it, skip if the documented shared default is fine.\n\n### 2. Explore\n\nLook at the current state. Read whatever exists; don't assume:\n\n- `git remote -v` + `.git\u002Fconfig`: GitHub? GitLab? which repo?\n- the repo's own agent-instructions file: does an `## Agent skills` block from a prior run already exist? (Re-running updates it in place.)\n- what the repo resolves to today: run the numbered procedure in [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md) → *Resolving the context store*, which also fixes the vocabulary used from here on. Then look at what's on disk: a **context repo** at `${AGENT_CONTEXT_HOME:-\u003Charness ctx dir>}\u002F\u003Cslug>`? a **context worktree** for the current branch? existing `domain.md` \u002F `GLOSSARY.md` \u002F `GLOSSARY-MAP.md`\n- in-tree `GLOSSARY.md` \u002F `GLOSSARY-MAP.md` \u002F `docs\u002Fadr\u002F` in the code repo: either a prior **in-repo context** choice or leftovers from an older setup; don't move anything yet, section A decides what it is.\n- is the `triage` skill installed (a `triage` folder beside this one, or `triage` among the available skills)? Decides whether section C runs at all.\n- monorepo signals: a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, a populated `packages\u002F*` with its own `src\u002F`. Their absence means single-context, which is almost every repo.\n\n### 3. Present + ask\n\nSummarise what's present and what's missing. Then take the sections in order, as **round**s in the `grilling` skill's question format. Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it. Section B depends on A's answer and C on B's, so they land in later rounds.\n\n**Section A: Context store.** This picks a *model*, not a location; the location follows from it.\n\n> Domain context + ADRs are what the skills read to orient and write as decisions crystallise. Two models: a **context repo** (a bare git repo mirroring this code repo, one **context worktree** per branch; personal, branch-aware, off the code tree; `offload-context` \u002F `merge-context` \u002F `rebase-context` manage it) or **in-repo context** (a plain `GLOSSARY.md` + `docs\u002Fadr\u002F` committed with the code: simpler, team-shared by default, no context repo machinery, and those three skills don't apply).\n\n- **Context repo** (default): the suite's standard model; pick this unless you want context in the code repo.\n- **In-repo context**: `GLOSSARY.md` \u002F `GLOSSARY-MAP.md` at the code repo root, ADRs under `docs\u002Fadr\u002F`, committed like any code.\n\nIf explore found in-tree context and the user picks **context repo**, offer to migrate it into the **context worktree**; if they pick **in-repo context**, it stays where it is.\n\n**Context repo follow-up: parent branch.** The branch's **context worktree** forks off its *parent's* context, so it inherits that ancestry's glossary and ADRs; forking off the wrong parent means inheriting the wrong context. Detect the code branch's base (merge-base against likely parents; `main`\u002F`master` when nothing closer), present it, and ask: fork off the detected parent, or name another branch. Default: the detected parent.\n\n**Section B: Tickets & specs.**\n\n> `to-spec` writes specs and `to-tickets` breaks them into tickets; `implement` picks tickets up, `code-review` reads them as the spec, and `wayfinder` keeps its planning map there. They need to know where that lives: local markdown (`.scratch\u002F` in the **context home** section A resolves to) or a real tracker.\n\n- **Local files** (default): `.scratch\u002F\u003Cfeature-slug>\u002F` at the board's recorded artifact location (default: the context home; its `spec.md` + `issues\u002F`, lowercase); no external service, and whether they're kept or discarded is the user's call (conventions in [issue-tracker-local.md](.\u002Fissue-tracker-local.md)).\n- **GitHub**: issues in the repo's GitHub Issues via the `gh` CLI; specs stay local files. Conventions seed: [issue-tracker-github.md](.\u002Fissue-tracker-github.md).\n- **GitLab**: issues in GitLab Issues via the `glab` CLI; specs stay local files. Conventions seed: [issue-tracker-gitlab.md](.\u002Fissue-tracker-gitlab.md).\n- **Other** (Jira, Linear, …): user describes the workflow in one paragraph; recorded as freeform prose for the skills to follow.\n\nPropose the tracker matching the remote found in explore; local files when there's no remote or the user prefers.\n\nThe GitHub\u002FGitLab seeds carry a **PRs (MRs) as a request surface** flag, default **off**: leave it off and don't raise it. On means `triage` pulls *external* PRs into the same queue, roles, and states as issues; a user who wants that flips the flag in `issue-tracker.md` (config home) later. Local files \u002F other: no PRs, nothing to record.\n\n**Section C: Triage labels.** Skip entirely when the `triage` skill isn't installed; an uninstalled skill needs no labels. Otherwise it applies if section B chose a tracker, or chose local files and the user wants a triage flow (state then lives as a `Status:` line per ticket file).\n\n> When issues live in a tracker, a small label vocabulary lets `to-tickets` mark what it creates, `implement` know what's safe to pick up, and the `triage` skill run its state machine. Skip it if you don't triage.\n\n- **No triage** (default): skills create\u002Fread tickets and issues with no label conventions.\n- **Yes**: record the five canonical roles, each overridable to match existing labels (seed table: [triage-labels.md](.\u002Ftriage-labels.md)): `needs-triage` (maintainer evaluates), `needs-info` (waiting on reporter), `ready-for-agent` (fully specified, AFK-ready), `ready-for-human`, `wontfix`. `to-tickets` publishes approved fully specified slices straight to `ready-for-agent` (agent-grabbable by construction, no re-triage); only slices left underspecified open `needs-triage`. `implement` treats `ready-for-agent` as the pick-up signal.\n\n**Section D: Domain docs layout.** No monorepo signals in explore -> **single-context**, one `GLOSSARY.md` at the glossary destination (the context-home default); write it without asking (at the recorded `glossary` destination, via [resolve-location.sh](.\u002Fresolve-location.sh)). Signals found -> confirm which:\n\n> The skills read `GLOSSARY.md` for the project's domain language. Need to know: one global context or multiple (e.g. monorepo, separate frontend\u002Fbackend) -> look in the right place.\n\n- **Single-context**: one `GLOSSARY.md` at the glossary destination. Most repos.\n- **Multi-context**: `GLOSSARY-MAP.md` -> per-context `GLOSSARY.md` files (mirroring the code's dirs). Typically monorepo.\n\n**Section E: Artifact locations.** Each durable artifact class records its own destination, one line per class in `artifact-locations.md` at the **config home**; consumers resolve per class with [resolve-location.sh](.\u002Fresolve-location.sh) (contract in [artifact-locations.md](.\u002Fartifact-locations.md)). Values: `context` (the context worktree, or the code repo root under in-repo context), `code` (the code repo's worktree), or `custom:\u003Cpath>` with `{branch}` = the current code branch; a custom path without `{branch}` gets `\u002F\u003Cbranch>` appended on record, so a **context repo**'s branches never mix outputs even for identical artifact names.\n\nDefaults equal what each class already had, so accepting the recommendation requires no reconfiguration:\n\n- **Glossary + ADRs**: context (default).\n- **Local board** (specs + issues): context (default; `board` records the class, the `.scratch\u002F` subpath stays the consumers').\n- **Research** notes: context (default).\n- **Explainers**: context (default; `explainers\u002F` subpath stays).\n- **Custom**: for any class whose outputs should live elsewhere, name the directory; setup appends `{branch}` when the path lacks it.\n\nTemporary reports and handoffs are never recorded here (they use the OS temp directory), and repo-wide rules stay in the config home regardless of these choices. Glossary files are written as `GLOSSARY.md` \u002F `GLOSSARY-MAP.md` (the only names; see GLOSSARY-FORMAT's naming note).\n\n### 4. Confirm + edit\n\nShow a draft of everything step 5 writes and let the user edit it first. The `## Agent skills` block gets one line per decision from sections A–D, section A's first (e.g. \"Store: context repo\" or \"Store: in-repo\" \u002F \"Issues: GitHub via `gh`, triage labels on; see `issue-tracker.md` in the config home\" \u002F \"Layout: single-context\").\n\n### 5. Write\n\n**Record the choices** as an `## Agent skills` block (`Store: context repo` or `Store: in-repo` first, then one line per section B–D) in the **config home** the procedure resolves for the chosen store, then write the docs files using the seed templates in this skill folder as a starting point:\n\n- **Context repo** (default) -> `agent-skills.md` there (`$proj\u002F.agents\u002F`, beside the **context worktree**s): one copy per context repo, read by all of its branches, never duplicated into them; do **not** import or append it into the global `AGENTS.md` or the code repo's instructions file. The code repo stays untouched.\n- **In-repo context** -> the code repo's instructions file, auto-loaded by the harness, so its lines may reference the convention docs directly (e.g. \"see `docs\u002Fagents\u002Fissue-tracker.md`\"). `AGENTS.md` at the repo root if it exists, else `CLAUDE.md` if that exists; if neither, ask the user which to create; never pick for them, never create one when the other exists.\n\nIf an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate.\n\n**Write the convention docs** into the same **config home**, per the choices: `issue-tracker.md` is **always written** (from [issue-tracker-github.md](.\u002Fissue-tracker-github.md), [issue-tracker-gitlab.md](.\u002Fissue-tracker-gitlab.md), or [issue-tracker-local.md](.\u002Fissue-tracker-local.md) to match section B, or from the user's description for \"other\"). Triage on -> also `triage-labels.md` from [triage-labels.md](.\u002Ftriage-labels.md) with the user's mappings. Section E -> also `artifact-locations.md` from the seed [artifact-locations.md](.\u002Fartifact-locations.md), the five class lines filled from section E's answers (durable classes only; custom paths carry `{branch}` as recorded). Re-running updates them in place.\n\n**Then scaffold the context home.** **In-repo context**: create `GLOSSARY.md` (or `GLOSSARY-MAP.md` + per-context stubs) and `docs\u002Fadr\u002F` at the code repo root, seed `domain.md` into `docs\u002Fagents\u002F` (the config home, beside the convention docs), commit with the code; the scripts below don't apply, plain git carries it. **Context repo** (default): continue below.\n\nResolve `\u003Cslug>` from the code repo's origin (formula in [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md) → *Layout*) and `proj=\"${AGENT_CONTEXT_HOME:-\u003Charness ctx dir>}\u002F\u003Cslug>\"`.\n\nRun every script below **by its path with cwd in the code repo**; they read the repo + branch from the cwd and locate their siblings themselves; don't `cd` into the skill folder (rule stated once in [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md) → *Running the helper scripts*). `\u003Cskill-dir>` below is this skill's folder.\n\n1. **Ensure the context repo + worktree**: run `\u003Cskill-dir>\u002Fctx-init.sh [team-remote]`, passing `--base \u003Cbranch>` with the parent confirmed in section A whenever it differs from the auto-detected base (matching answer -> omit the flag, detection is the default). It ensures the bare context repo at `$proj\u002F.git` (clones the team remote when given, else `git init --bare` + a seed) and a **context worktree** for the current code branch at `$proj\u002F\u003Cbranch>`, forked off the parent's context so the ancestry's glossary\u002FADRs carry over. Prints the worktree path: **edit context there.**\n2. **Build the manifest**: `\u003Cskill-dir>\u002Fmanifest.sh` from any directory inside the code repo, answers repo-root-relative; directory mode lists the root plus every ancestor directory of a tracked path (never root files, never untracked-only dirs), `--files` lists tracked files, `--has PATH` checks membership with the path taken literally. This is the allowed-path universe.\n3. **Inherited context**: the worktree was forked off its base, so it already carries the ancestry's glossary \u002F ADRs. Nothing to copy. (A legacy per-branch `domain.md` found at the worktree root is from the old layout; move it to `.agents\u002Fdomain.md`.)\n4. **Write `domain.md` to `$proj\u002F.agents\u002Fdomain.md`** (create `.agents\u002F` if missing) from the seed template [domain.md](.\u002Fdomain.md), its **Code repo** line filled with the origin URL + `\u003Cslug>`. This is in the config home, outside the worktree; the manifest doesn't govern it. Re-run: update in place.\n5. **Scaffold the worktree, from the manifest only**: (multi-context) `GLOSSARY-MAP.md` at the **worktree root**; for each manifest dir you designate a context that has no `GLOSSARY.md` yet, a stub `\u003Cdir>\u002FGLOSSARY.md` (glossary header only) + `\u003Cdir>\u002Fadr\u002F`. A `GLOSSARY-MAP` link or term pointing at a path **not** in the manifest is flagged dangling and **not** created; that is the grounding guarantee.\n6. Run `\u003Cskill-dir>\u002Fctx-index.sh` to refresh `INDEX.md`.\n\nYou edit this context directly in the **context worktree**; `offload-context` commits + pushes it to the team remote.\n\n### 6. Done\n\nTell user: machine-wide defaults block installed, already present, or updated from a drifted copy; which choices were recorded in the `## Agent skills` block and convention docs at the config home; where `domain.md` + context now live and which skills read them. Block and docs are plain markdown; edit them directly later; re-run only to switch **context store** \u002F tracker or restart.\n","# Setup Context\n\nScaffold the per-repo configuration that the engineering skills assume. This is a prompt-driven skill, not a deterministic script: explore, present what you found, confirm with the user, then write. Machine-wide defaults live in global config; per-repo choices (made below) are recorded as an `## Agent skills` block + convention docs in the **config home**; every skill reads them without extra wiring.\n\n## Process\n\n### 1. Machine-wide defaults block: once per machine\n\nThe `## Agent skills (defaults)` block (domain-docs \u002F context+ADRs conventions) is machine-wide and repo-independent. Its home is the harness's global instructions file — `~\u002F.pi\u002Fagent\u002FAGENTS.md` (Pi) or `~\u002F.config\u002Fopencode\u002FAGENTS.md` (OpenCode) — which layers with project instruction files, so the block applies in every repo. Harness tooling is kept separate. Read the block in [global-rules.md](.\u002Fglobal-rules.md), then check what's installed in the current harness's global instructions file:\n\n- **absent** -> offer to install. On confirm: append `global-rules.md`'s block to the current harness's global instructions file — `~\u002F.pi\u002Fagent\u002FAGENTS.md` for Pi, `~\u002F.config\u002Fopencode\u002FAGENTS.md` for OpenCode — creating the file if missing.\n- **present and identical** -> report it installed, move on.\n- **present but drifted** -> show the difference (which clauses the installed copy lacks, which it has that the seed doesn't) and offer to update it in place: replace that block's body, leave surrounding content untouched, never duplicate. Don't overwrite silently; a local edit may be deliberate, so let the user decline per clause or wholesale. This is the block's only repair path; skipping \"present\" is what lets a copy installed once rot indefinitely.\n\nOptional: shared **context root**. To put every **context repo** under one fixed folder instead of `${AGENT_CONTEXT_HOME:-${XDG_DATA_HOME:-$HOME\u002F.local\u002Fshare}\u002Fagent\u002Fctx}`, set `AGENT_CONTEXT_HOME` (absolute path) in the environment the agent runs under (for example, its shell profile or launcher); offer it, skip if the documented shared default is fine.\n\n### 2. Explore\n\nLook at the current state. Read whatever exists; don't assume:\n\n- `git remote -v` + `.git\u002Fconfig`: GitHub? GitLab? which repo?\n- the repo's own agent-instructions file: does an `## Agent skills` block from a prior run already exist? (Re-running updates it in place.)\n- what the repo resolves to today: run the numbered procedure in [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md) → *Resolving the context store*, which also fixes the vocabulary used from here on. Then look at what's on disk: a **context repo** at `${AGENT_CONTEXT_HOME:-\u003Charness ctx dir>}\u002F\u003Cslug>`? a **context worktree** for the current branch? existing `domain.md` \u002F `GLOSSARY.md` \u002F `GLOSSARY-MAP.md`\n- in-tree `GLOSSARY.md` \u002F `GLOSSARY-MAP.md` \u002F `docs\u002Fadr\u002F` in the code repo: either a prior **in-repo context** choice or leftovers from an older setup; don't move anything yet, section A decides what it is.\n- is the `triage` skill installed (a `triage` folder beside this one, or `triage` among the available skills)? Decides whether section C runs at all.\n- monorepo signals: a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, a populated `packages\u002F*` with its own `src\u002F`. Their absence means single-context, which is almost every repo.\n\n### 3. Present + ask\n\nSummarise what's present and what's missing. Then take the sections in order, as **round**s in the `grilling` skill's question format. Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it. Section B depends on A's answer and C on B's, so they land in later rounds.\n\n**Section A: Context store.** This picks a *model*, not a location; the location follows from it.\n\n> Domain context + ADRs are what the skills read to orient and write as decisions crystallise. Two models: a **context repo** (a bare git repo mirroring this code repo, one **context worktree** per branch; personal, branch-aware, off the code tree; `offload-context` \u002F `merge-context` \u002F `rebase-context` manage it) or **in-repo context** (a plain `GLOSSARY.md` + `docs\u002Fadr\u002F` committed with the code: simpler, team-shared by default, no context repo machinery, and those three skills don't apply).\n\n- **Context repo** (default): the suite's standard model; pick this unless you want context in the code repo.\n- **In-repo context**: `GLOSSARY.md` \u002F `GLOSSARY-MAP.md` at the code repo root, ADRs under `docs\u002Fadr\u002F`, committed like any code.\n\nIf explore found in-tree context and the user picks **context repo**, offer to migrate it into the **context worktree**; if they pick **in-repo context**, it stays where it is.\n\n**Context repo follow-up: parent branch.** The branch's **context worktree** forks off its *parent's* context, so it inherits that ancestry's glossary and ADRs; forking off the wrong parent means inheriting the wrong context. Detect the code branch's base (merge-base against likely parents; `main`\u002F`master` when nothing closer), present it, and ask: fork off the detected parent, or name another branch. Default: the detected parent.\n\n**Section B: Tickets & specs.**\n\n> `to-spec` writes specs and `to-tickets` breaks them into tickets; `implement` picks tickets up, `code-review` reads them as the spec, and `wayfinder` keeps its planning map there. They need to know where that lives: local markdown (`.scratch\u002F` in the **context home** section A resolves to) or a real tracker.\n\n- **Local files** (default): `.scratch\u002F\u003Cfeature-slug>\u002F` at the board's recorded artifact location (default: the context home; its `spec.md` + `issues\u002F`, lowercase); no external service, and whether they're kept or discarded is the user's call (conventions in [issue-tracker-local.md](.\u002Fissue-tracker-local.md)).\n- **GitHub**: issues in the repo's GitHub Issues via the `gh` CLI; specs stay local files. Conventions seed: [issue-tracker-github.md](.\u002Fissue-tracker-github.md).\n- **GitLab**: issues in GitLab Issues via the `glab` CLI; specs stay local files. Conventions seed: [issue-tracker-gitlab.md](.\u002Fissue-tracker-gitlab.md).\n- **Other** (Jira, Linear, …): user describes the workflow in one paragraph; recorded as freeform prose for the skills to follow.\n\nPropose the tracker matching the remote found in explore; local files when there's no remote or the user prefers.\n\nThe GitHub\u002FGitLab seeds carry a **PRs (MRs) as a request surface** flag, default **off**: leave it off and don't raise it. On means `triage` pulls *external* PRs into the same queue, roles, and states as issues; a user who wants that flips the flag in `issue-tracker.md` (config home) later. Local files \u002F other: no PRs, nothing to record.\n\n**Section C: Triage labels.** Skip entirely when the `triage` skill isn't installed; an uninstalled skill needs no labels. Otherwise it applies if section B chose a tracker, or chose local files and the user wants a triage flow (state then lives as a `Status:` line per ticket file).\n\n> When issues live in a tracker, a small label vocabulary lets `to-tickets` mark what it creates, `implement` know what's safe to pick up, and the `triage` skill run its state machine. Skip it if you don't triage.\n\n- **No triage** (default): skills create\u002Fread tickets and issues with no label conventions.\n- **Yes**: record the five canonical roles, each overridable to match existing labels (seed table: [triage-labels.md](.\u002Ftriage-labels.md)): `needs-triage` (maintainer evaluates), `needs-info` (waiting on reporter), `ready-for-agent` (fully specified, AFK-ready), `ready-for-human`, `wontfix`. `to-tickets` publishes approved fully specified slices straight to `ready-for-agent` (agent-grabbable by construction, no re-triage); only slices left underspecified open `needs-triage`. `implement` treats `ready-for-agent` as the pick-up signal.\n\n**Section D: Domain docs layout.** No monorepo signals in explore -> **single-context**, one `GLOSSARY.md` at the glossary destination (the context-home default); write it without asking (at the recorded `glossary` destination, via [resolve-location.sh](.\u002Fresolve-location.sh)). Signals found -> confirm which:\n\n> The skills read `GLOSSARY.md` for the project's domain language. Need to know: one global context or multiple (e.g. monorepo, separate frontend\u002Fbackend) -> look in the right place.\n\n- **Single-context**: one `GLOSSARY.md` at the glossary destination. Most repos.\n- **Multi-context**: `GLOSSARY-MAP.md` -> per-context `GLOSSARY.md` files (mirroring the code's dirs). Typically monorepo.\n\n**Section E: Artifact locations.** Each durable artifact class records its own destination, one line per class in `artifact-locations.md` at the **config home**; consumers resolve per class with [resolve-location.sh](.\u002Fresolve-location.sh) (contract in [artifact-locations.md](.\u002Fartifact-locations.md)). Values: `context` (the context worktree, or the code repo root under in-repo context), `code` (the code repo's worktree), or `custom:\u003Cpath>` with `{branch}` = the current code branch; a custom path without `{branch}` gets `\u002F\u003Cbranch>` appended on record, so a **context repo**'s branches never mix outputs even for identical artifact names.\n\nDefaults equal what each class already had, so accepting the recommendation requires no reconfiguration:\n\n- **Glossary + ADRs**: context (default).\n- **Local board** (specs + issues): context (default; `board` records the class, the `.scratch\u002F` subpath stays the consumers').\n- **Research** notes: context (default).\n- **Explainers**: context (default; `explainers\u002F` subpath stays).\n- **Custom**: for any class whose outputs should live elsewhere, name the directory; setup appends `{branch}` when the path lacks it.\n\nTemporary reports and handoffs are never recorded here (they use the OS temp directory), and repo-wide rules stay in the config home regardless of these choices. Glossary files are written as `GLOSSARY.md` \u002F `GLOSSARY-MAP.md` (the only names; see GLOSSARY-FORMAT's naming note).\n\n### 4. Confirm + edit\n\nShow a draft of everything step 5 writes and let the user edit it first. The `## Agent skills` block gets one line per decision from sections A–D, section A's first (e.g. \"Store: context repo\" or \"Store: in-repo\" \u002F \"Issues: GitHub via `gh`, triage labels on; see `issue-tracker.md` in the config home\" \u002F \"Layout: single-context\").\n\n### 5. Write\n\n**Record the choices** as an `## Agent skills` block (`Store: context repo` or `Store: in-repo` first, then one line per section B–D) in the **config home** the procedure resolves for the chosen store, then write the docs files using the seed templates in this skill folder as a starting point:\n\n- **Context repo** (default) -> `agent-skills.md` there (`$proj\u002F.agents\u002F`, beside the **context worktree**s): one copy per context repo, read by all of its branches, never duplicated into them; do **not** import or append it into the global `AGENTS.md` or the code repo's instructions file. The code repo stays untouched.\n- **In-repo context** -> the code repo's instructions file, auto-loaded by the harness, so its lines may reference the convention docs directly (e.g. \"see `docs\u002Fagents\u002Fissue-tracker.md`\"). `AGENTS.md` at the repo root if it exists, else `CLAUDE.md` if that exists; if neither, ask the user which to create; never pick for them, never create one when the other exists.\n\nIf an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate.\n\n**Write the convention docs** into the same **config home**, per the choices: `issue-tracker.md` is **always written** (from [issue-tracker-github.md](.\u002Fissue-tracker-github.md), [issue-tracker-gitlab.md](.\u002Fissue-tracker-gitlab.md), or [issue-tracker-local.md](.\u002Fissue-tracker-local.md) to match section B, or from the user's description for \"other\"). Triage on -> also `triage-labels.md` from [triage-labels.md](.\u002Ftriage-labels.md) with the user's mappings. Section E -> also `artifact-locations.md` from the seed [artifact-locations.md](.\u002Fartifact-locations.md), the five class lines filled from section E's answers (durable classes only; custom paths carry `{branch}` as recorded). Re-running updates them in place.\n\n**Then scaffold the context home.** **In-repo context**: create `GLOSSARY.md` (or `GLOSSARY-MAP.md` + per-context stubs) and `docs\u002Fadr\u002F` at the code repo root, seed `domain.md` into `docs\u002Fagents\u002F` (the config home, beside the convention docs), commit with the code; the scripts below don't apply, plain git carries it. **Context repo** (default): continue below.\n\nResolve `\u003Cslug>` from the code repo's origin (formula in [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md) → *Layout*) and `proj=\"${AGENT_CONTEXT_HOME:-\u003Charness ctx dir>}\u002F\u003Cslug>\"`.\n\nRun every script below **by its path with cwd in the code repo**; they read the repo + branch from the cwd and locate their siblings themselves; don't `cd` into the skill folder (rule stated once in [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md) → *Running the helper scripts*). `\u003Cskill-dir>` below is this skill's folder.\n\n1. **Ensure the context repo + worktree**: run `\u003Cskill-dir>\u002Fctx-init.sh [team-remote]`, passing `--base \u003Cbranch>` with the parent confirmed in section A whenever it differs from the auto-detected base (matching answer -> omit the flag, detection is the default). It ensures the bare context repo at `$proj\u002F.git` (clones the team remote when given, else `git init --bare` + a seed) and a **context worktree** for the current code branch at `$proj\u002F\u003Cbranch>`, forked off the parent's context so the ancestry's glossary\u002FADRs carry over. Prints the worktree path: **edit context there.**\n2. **Build the manifest**: `\u003Cskill-dir>\u002Fmanifest.sh` from any directory inside the code repo, answers repo-root-relative; directory mode lists the root plus every ancestor directory of a tracked path (never root files, never untracked-only dirs), `--files` lists tracked files, `--has PATH` checks membership with the path taken literally. This is the allowed-path universe.\n3. **Inherited context**: the worktree was forked off its base, so it already carries the ancestry's glossary \u002F ADRs. Nothing to copy. (A legacy per-branch `domain.md` found at the worktree root is from the old layout; move it to `.agents\u002Fdomain.md`.)\n4. **Write `domain.md` to `$proj\u002F.agents\u002Fdomain.md`** (create `.agents\u002F` if missing) from the seed template [domain.md](.\u002Fdomain.md), its **Code repo** line filled with the origin URL + `\u003Cslug>`. This is in the config home, outside the worktree; the manifest doesn't govern it. Re-run: update in place.\n5. **Scaffold the worktree, from the manifest only**: (multi-context) `GLOSSARY-MAP.md` at the **worktree root**; for each manifest dir you designate a context that has no `GLOSSARY.md` yet, a stub `\u003Cdir>\u002FGLOSSARY.md` (glossary header only) + `\u003Cdir>\u002Fadr\u002F`. A `GLOSSARY-MAP` link or term pointing at a path **not** in the manifest is flagged dangling and **not** created; that is the grounding guarantee.\n6. Run `\u003Cskill-dir>\u002Fctx-index.sh` to refresh `INDEX.md`.\n\nYou edit this context directly in the **context worktree**; `offload-context` commits + pushes it to the team remote.\n\n### 6. Done\n\nTell user: machine-wide defaults block installed, already present, or updated from a drifted copy; which choices were recorded in the `## Agent skills` block and convention docs at the config home; where `domain.md` + context now live and which skills read them. Block and docs are plain markdown; edit them directly later; re-run only to switch **context store** \u002F tracker or restart.\n",{"name":5,"description":7,"disable-model-invocation":44},true,"main","65bf09779e3f07885f06c48871a49186950e4f73","skills\u002Fsetup-context","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fepr3","https:\u002F\u002Feduar.dev","2026-11-14 21:58:53",{"source":9,"skillName":5,"commands":53,"prompt":63,"zipAvailable":44},[54,57,60],{"tool":55,"command":56},"npx","npx skills add epr3\u002Fdotfiles --skill setup-context",{"tool":58,"command":59},"bunx","bunx skills add epr3\u002Fdotfiles --skill setup-context",{"tool":61,"command":62},"pnpm","pnpm dlx skills add epr3\u002Fdotfiles --skill setup-context","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002FSKILL.md",[65,71,77,81,85,89,93,97,101,105,109,113,117],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"artifact-locations.md","REFERENCE","参考文档",1323,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fartifact-locations.md",{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"ctx-index.sh","SCRIPT","脚本",821,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fctx-index.sh",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"ctx-init.sh",5414,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fctx-init.sh",{"path":82,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":83,"sourceHtmlUrl":84},"domain.md",2231,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fdomain.md",{"path":86,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":87,"sourceHtmlUrl":88},"global-rules.md",3498,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fglobal-rules.md",{"path":90,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":91,"sourceHtmlUrl":92},"issue-tracker-github.md",4337,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fissue-tracker-github.md",{"path":94,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":95,"sourceHtmlUrl":96},"issue-tracker-gitlab.md",4312,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fissue-tracker-gitlab.md",{"path":98,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":99,"sourceHtmlUrl":100},"issue-tracker-local.md",3130,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fissue-tracker-local.md",{"path":102,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":103,"sourceHtmlUrl":104},"manifest.sh",2560,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fmanifest.sh",{"path":106,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fcode-standards-bidirectional-contract-2026-07-15.md",5730,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fsoftware-development\u002Fslash-command-layering\u002Freferences\u002Fcode-standards-bidirectional-contract-2026-07-15.md",{"path":110,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Fslash-cmd-absent-false-claim-2026-07-20.md",5751,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fsoftware-development\u002Fslash-command-layering\u002Freferences\u002Fslash-cmd-absent-false-claim-2026-07-20.md",{"path":114,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":115,"sourceHtmlUrl":116},"resolve-location.sh",3512,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Fresolve-location.sh",{"path":118,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":119,"sourceHtmlUrl":120},"triage-labels.md",972,"https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-context\u002Ftriage-labels.md",[122,140,163,180,197,214],{"skillNo":123,"name":124,"nameZh":125,"description":126,"descriptionZh":127,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":136,"publishedAt":39},"01M6BX801Z8NPQWTCRDMW3SX7S","writing-for-agents","智能体技能文档编写","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","为智能体编写文档。在创建或编辑技能（skill），或修改 AGENTS.md、CLAUDE.md 时使用。","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":134,"categoryName":135,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[137,138,139],"writing for agents","writing","documents",{"skillNo":141,"name":142,"nameZh":143,"description":144,"descriptionZh":145,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":146,"categories":147,"keywords":154,"publishedAt":39},"01M6BX7XYN6BGV4QVHQDV3P0BN","wizard","交互式 Bash 向导生成","Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.","生成交互式 bash 向导，引导人类逐步完成只有本人才能执行的步骤。适用于配置基础设施、设置凭证或 CI 密钥、熟悉陌生的第三方仪表板，或执行一次性迁移\u002F切换。不要将其用于智能体自身即可执行的步骤。","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fwizard\u002FSKILL.md",[148,151],{"categoryNo":149,"categoryName":150,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":152,"categoryName":153,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理",[142,155,156,157,158,159,160,161,162],"ci","infrastructure","secrets","Bash","generate","dashboard","provisioning","credentials",{"skillNo":164,"name":165,"nameZh":166,"description":167,"descriptionZh":168,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":169,"categories":170,"keywords":177,"publishedAt":39},"01M6BX7WS9T1Z0ERRAAMYVZB1J","wayfinder","大型任务决策规划","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","将大量工作（超出单个 agent 会话可承载的范围）规划为问题跟踪器上的决策工单共享地图，并逐个解决，直到通往目标的路径清晰明了。","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fwayfinder\u002FSKILL.md",[171,174],{"categoryNo":172,"categoryName":173,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTBRTQXJ9T5TABNS7XP1A0","任务规划与分解",{"categoryNo":175,"categoryName":176,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C31AVFVV99RWJEGF9PS85F","项目经理",[165,178,179],"plan","chunk",{"skillNo":181,"name":182,"nameZh":183,"description":184,"descriptionZh":185,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":186,"categories":187,"keywords":194,"publishedAt":39},"01M6BX7V35DB7K3MW5GWNSVTSG","wait-what","重述上一条消息","Stop. That last message did not land: re-pitch it.","停。上一条消息没有被理解：重新表述它。","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fwait-what\u002FSKILL.md",[188,191],{"categoryNo":189,"categoryName":190,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":192,"categoryName":193,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C1YEW2680C003GGBD6QCKB","回复风格与输出控制",[195,196],"wait what","land",{"skillNo":198,"name":33,"nameZh":199,"description":200,"descriptionZh":201,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":202,"categories":203,"keywords":210,"publishedAt":39},"01M6BX7S81DD62SEEM2HCBWK7P","工单与 PR 分诊","Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.","让问题和外部 PR 经过分诊角色的状态机流转，进行分类、验证，必要时深入质询，并编写可供 agent 直接使用的简报。","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[204,207],{"categoryNo":205,"categoryName":206,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C2MZSDTE56BDKER3VPW2JM","工单与问题跟踪管理",{"categoryNo":208,"categoryName":209,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C76K09CC8W2T14CWAVWBKD","开源社区运营专员",[33,211,212,213],"issues","verify","state",{"skillNo":215,"name":216,"nameZh":217,"description":218,"descriptionZh":219,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":220,"categories":221,"keywords":224,"publishedAt":39},"01M6BX7QBN7VK4YWBM7PC4M5MG","to-tickets","计划拆解为工单","Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).","将计划、规格说明或当前对话拆分为一系列环环相扣的工单，每个工单声明其阻塞依赖关系，并发布到配置的跟踪器（本地以文本形式记录在每个工单一个文件中，或在真实跟踪器上使用原生阻塞链接）。","https:\u002F\u002Fgithub.com\u002Fepr3\u002Fdotfiles\u002Fblob\u002Fmain\u002Fskills\u002Fto-tickets\u002FSKILL.md",[222,223],{"categoryNo":205,"categoryName":206,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":175,"categoryName":176,"taxonomyType":23,"taxonomyTypeDesc":24},[225,226,227,178,228,229],"to tickets","spec","file","SET","text"]