[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CQ7JAVC4NV9BXGRA7Q5SB3":3,"skill-same:01M7CQ7JAVC4NV9BXGRA7Q5SB3":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7CQ7JAVC4NV9BXGRA7Q5SB3","work-record",null,"Use when the work on a task or story is finished - resolve the task, write work.md into its task folder, set the task status to done and open a merge request.","maximk777\u002Fopencode-config","maximk777","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F205286132?v=4","01M7CQ4VVPFQ3MDCXJBFB0HPTZ","01M7CQ4VWA2GG0H2CNNREZ9AN9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Fkits\u002Fworkspace\u002F.agents\u002Fskills\u002Fwork-record\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: work-record\ndescription: Use when the work on a task or story is finished - resolve the task, write work.md into its task folder, set the task status to done and open a merge request.\n---\n# Close a finished task with a work record\n\n## Steps\n1. Go to the workspace root: the nearest directory, walking up from where you are, where `test -f .agents\u002Fkit.json` succeeds. Run every command below from there.\n2. Ask the person for the task: a tracker id, a `task:\u003Cslug>` key, or a story key `story:\u003Cproject>\u002F\u003Cdomain>\u002F\u003Cslug>`. Resolve it to exactly one task file `\u003Ctask file>`; the task folder `\u003Cfolder>` is the directory holding that file, and the task key is the frontmatter `key` of `\u003Ctask file>`. When resolution finds nothing, stop: it is not in this workspace. When it finds several tasks, stop and list them. Change nothing.\n   - `task:\u003Cslug>`: run `test -f tasks\u002F\u003Cslug>\u002Ftask.md`. When it fails, the task is not in this workspace.\n   - `story:\u003Cproject>\u002F\u003Cdomain>\u002F\u003Cslug>`: take the value of the key from `.agents\u002Findex.json`. When the index has no value, or `test -f \u003Cvalue>` fails, run `ls projects\u002F\u003Cproject>\u002Fdomains\u002F\u003Cdomain>\u002Fstreams\u002F*\u002Fstories\u002F\u003Cslug>\u002Fstory.md 2>\u002Fdev\u002Fnull` instead; exactly one printed path is `\u003Ctask file>` (also remember for the report that the index is stale; the fix is `python3 tools\u002Fgenerate.py`). Empty output means the story is not in this workspace.\n   - A tracker id `\u003Craw>`: validate it first (step 3). Then take the value of `\u003Craw>` from `.agents\u002Findex.json`. When the index has no value, run `grep -rlE \"^tracker: [\\\"']?\u003Craw>[\\\"']?$\" projects tasks 2>\u002Fdev\u002Fnull`: exactly one printed path is `\u003Ctask file>` (remember the stale-index line for the report), empty output means the id is not in this workspace, and several paths mean the id is used by more than one task - stop and list them.\n3. Validate a tracker id (only for a tracker-id input): read `tracker\u002Ftrackers.json`. Every entry of `trackers` carries `key` and `id_pattern`; JSON doubles every backslash, so `\\\\d` in the file means `\\d`. Rewrite each pattern for `grep -E` (write every `\\d` as `[0-9]`) and run `printf '%s\\n' '\u003Craw>' | grep -Ex '\u003Crewritten pattern>'` entry by entry until one matches. The `-x` makes the whole id match, not a part of it. When no entry matches, stop: the id is not in this workspace.\n4. Read the frontmatter of `\u003Ctask file>`: `status`, `tracker`. When `status` is not `in_progress`, stop and change nothing: a `waiting` task must be started first and a `done` task must be reopened - tell the person to run the `task-start` skill in both cases.\n5. Set `\u003CID>`: the task's `tracker` value when it is not empty, otherwise the task's slug (the `\u003Cslug>` of `task:\u003Cslug>`, or the story slug). The branch below is `work\u002F\u003CID>` and the draft is `.local\u002Fdrafts\u002F\u003CID>.md`.\n6. Read `.local\u002Fdrafts\u002F\u003CID>.md`. If it does not exist, ask the person four questions: what changed, which decisions were taken, what is still open, and what was verified. Wait for the answers before going on.\n7. Find the workspace default branch: run `git symbolic-ref --short refs\u002Fremotes\u002Forigin\u002FHEAD` and remove the `origin\u002F` prefix; when the command fails, use `main`. Call it `\u003Cdefault>`. Then run, one by one:\n   - `git status --porcelain --untracked-files=no`. When it prints anything, stop and tell the person: the workspace has uncommitted tracked changes. Commit nothing.\n   - `git switch \u003Cdefault>`\n   - `GIT_TERMINAL_PROMPT=0 git pull --ff-only`\n8. Collect commits. Read `repos.json`: the pull has just made it the manifest of `\u003Cdefault>`, and the record is checked against it - a repository that is not in the manifest cannot go into `repos`. For each entry of `repositories` whose directory `repos\u002F\u003Cname>` exists, with `\u003Cdefault_branch>` from the entry:\n   - Run `git -C repos\u002F\u003Cname> fetch --prune`.\n   - Run `git -C repos\u002F\u003Cname> for-each-ref --format='%(refname:short)' refs\u002Fheads refs\u002Fremotes | grep -E '(^|[^A-Za-z0-9])\u003CID>([^0-9]|$)'`. Each printed line is one `\u003Cbranch>`, used as printed. The grep keeps only names where `\u003CID>` is a whole token, so `TASK-1` does not match `feat\u002FTASK-10-y`.\n   - For every `\u003Cbranch>`, run `git -C repos\u002F\u003Cname> log --format=%H origin\u002F\u003Cdefault_branch>..\u003Cbranch>`.\n   - Run `git -C repos\u002F\u003Cname> log --format=%H -E --grep='\u003CID>([^0-9]|$)' origin\u002F\u003Cdefault_branch>` to find work that is already merged.\n   - Write each sha as `\u003Cname>@\u003Csha>`. Keep each value once, in the order found.\n   - A repository with at least one sha goes into `repos`.\n9. If no repository gave a sha, ask the person which repositories and branches hold the work, and repeat step 8 for them. A repository that is not in the manifest cannot go into `repos`; tell the person it must be merged into `\u003Cdefault>` first.\n10. Collect merge requests. For each repository in `repos`, look at its `forge` in the manifest:\n    - `gitlab`: if `command -v glab` and `glab auth status` both succeed, run `glab mr list --search \"\u003CID>\" --all --output json` inside `repos\u002F\u003Cname>` and take every `web_url` value that contains `\u002F-\u002Fmerge_requests\u002F` (the other `web_url` values are user profiles). Otherwise add `glab` to the `missing` list.\n    - `github`: if `command -v gh` and `gh auth status` both succeed, run `gh pr list --search \"\u003CID>\" --state all --json url --jq \".[].url\"` inside `repos\u002F\u003Cname>` and take every printed URL. Otherwise add `gh` to the `missing` list.\n    - `git`: there is no merge request data; add nothing.\n    - Keep each URL once, in the order found. Keep each name in `missing` once.\n11. Bring the branch `work\u002F\u003CID>` up:\n    - If `git rev-parse --verify --quiet work\u002F\u003CID>` or `git rev-parse --verify --quiet origin\u002Fwork\u002F\u003CID>` succeeds, the branch already exists:\n      - For each of `work\u002F\u003CID>` and `origin\u002Fwork\u002F\u003CID>` that exists, run `git diff --name-only origin\u002F\u003Cdefault>...\u003Cthat branch>`. A generated file in the list (the list of step 15) is expected on the branch - step 15 commits those files itself, for example `STATUS.md` - and never stops the skill. If any other printed path does not start with `\u003Cfolder>\u002F`, stop and tell the person which paths they are: the branch may touch the task folder and generated files only. Commit nothing.\n      - If `origin\u002Fwork\u002F\u003CID>` exists, the branch is already pushed. Its commits must never be rewritten. Then:\n        - When `git rev-parse --verify --quiet work\u002F\u003CID>` succeeds, run `git switch work\u002F\u003CID>`, then `git branch --set-upstream-to=origin\u002Fwork\u002F\u003CID>`.\n        - Otherwise run `git switch --track origin\u002Fwork\u002F\u003CID>`.\n        - Run `git pull --ff-only`. If it fails, stop and tell the person that the local and pushed `work\u002F\u003CID>` differ. Commit nothing.\n      - If only the local `work\u002F\u003CID>` exists, run `git switch work\u002F\u003CID>`.\n      - Bring the branch up to date: run `GIT_EDITOR=true git merge --no-edit origin\u002F\u003Cdefault>`. The branch may predate a repository merged into `\u003Cdefault>`; after the merge its `repos.json` equals the manifest of step 8, which the check tests the record against. The branch changes only `\u003Cfolder>\u002F` and generated files, so the merge is clean. On a conflict, follow `## Conflicts`.\n      - Skip the rest of this step.\n    - Otherwise run `git switch -c work\u002F\u003CID>`.\n12. Write `\u003Cfolder>\u002Fwork.md` from `.agents\u002Ftemplates\u002Fwork.md`:\n    - Run `date +%F` and put its output into the frontmatter line `recorded:`.\n    - `repos`, `merge_requests` and `commits` as block lists: the line `key:`, then one line `  - value` per value. Write `key: []` when the list is empty.\n    - Replace `\u003Ctask key>` in the title line with the task key and `\u003Cone-line summary>` with one line about the work.\n    - Fill `## Changed`, `## Decisions` and `## Verification` from the draft or the answers. Write \"None.\" in a section with nothing to say.\n    - `## Open questions` gets exactly `None.`: a done task keeps no open questions. When the draft names an open question, ask the person to resolve it first; when they cannot, stop and leave the task `in_progress`.\n    - Write a stand as a link to its key, `[stand:\u003Cname>](\u003Crelative path from \u003Cfolder> to environments.json>)`, never as an address. The path takes one `..` per folder level of `\u003Cfolder>`: from `tasks\u002F\u003Cslug>\u002F` (two levels) it is `..\u002F..\u002Fenvironments.json`, from a story folder `projects\u002F\u003Cp>\u002Fdomains\u002F\u003Cd>\u002Fstreams\u002F\u003Cs>\u002Fstories\u002F\u003Cslug>\u002F` (eight levels) it is `..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fenvironments.json`.\n    - Never link into `.local\u002F`.\n13. Flip the task status in `\u003Ctask file>`: change the `status:` line to `status: done` and empty the `owner:` and `started:` lines (the check requires them empty once the status is not `in_progress`; the history keeps who worked when). Change no other line.\n14. Update the generated files and run the check. First run `command -v python3`.\n    - When it prints a path: run `python3 tools\u002Fgenerate.py` (the record moves the task from the `## In progress` section of `STATUS.md` to `## Done recently`), then `python3 tools\u002Fcheck.py`, at most three runs in total. After each run, look only at findings that name a file this skill changed: `\u003Cfolder>\u002Fwork.md`, `\u003Ctask file>` and `STATUS.md`.\n      - Fix such a finding when the fix needs no new value, for example a wrong list form or a missing section. Then run both commands again.\n      - One finding is expected and is not yours to fix: `task-state` \"merge_requests must not be empty when the task is done\", when step 10 found no merge request. Do not stop for it; keep it for the report.\n      - When another finding on these files needs a value only the person has, or survives the third run: stop, do not commit, list the findings, and wait.\n      - Findings in other files: do not fix them; list them in the report.\n    - When it prints nothing: apply `## Recipe: STATUS.md done flip` to `STATUS.md` and remember the line `check not run: python3 missing` for the report.\n15. Commit: run `git status --short --untracked-files=all`. Stage `\u003Cfolder>\u002F` - the record and the task file. Then stage every other listed path that is a generated file: its path starts with `.claude\u002F`, `.opencode\u002F` or `.cursor\u002F`, or it is exactly `CLAUDE.md`, `.agents\u002Findex.json`, `REPOSITORIES.md` or `STATUS.md`, or it matches `projects\u002F*\u002Fdomains\u002F*\u002Fstreams\u002F*\u002FBREAKDOWN.md`. Normally that is `STATUS.md` alone. Do not stage any other path; mention it in the report instead. Run `git commit -m \"docs(work): record \u003CID>\"`.\n16. Update from the default branch:\n    - When step 11 found `origin\u002Fwork\u002F\u003CID>`: run `GIT_EDITOR=true git merge --no-edit origin\u002F\u003Cdefault>`.\n    - Otherwise: run `GIT_TERMINAL_PROMPT=0 git pull --rebase origin \u003Cdefault>`.\n    - On conflicts follow `## Conflicts`.\n17. Push and open the merge request by `params.forge` in `.agents\u002Fkit.json`:\n    - `gitlab`: run `GIT_TERMINAL_PROMPT=0 git push -u origin work\u002F\u003CID> -o merge_request.create -o merge_request.title=\"Work record \u003CID>\"`.\n    - `github`: run `GIT_TERMINAL_PROMPT=0 git push -u origin work\u002F\u003CID>`, then `gh pr create --title \"Work record \u003CID>\" --body \"\u003Cfolder>\u002Fwork.md\"`. If `gh` is missing or the command fails, print its error and ask the person to open the pull request for branch `work\u002F\u003CID>`.\n    - `git`: run `GIT_TERMINAL_PROMPT=0 git push -u origin work\u002F\u003CID>`, print the branch name `work\u002F\u003CID>` and ask the person to open the merge request.\n    - Never push with `--force` or `--force-with-lease`.\n18. If the push is rejected, print the error and these commands to finish by hand, then stop:\n    - When step 11 found `origin\u002Fwork\u002F\u003CID>`: `git pull --no-rebase --no-edit origin work\u002F\u003CID>`, then `GIT_EDITOR=true git merge --no-edit origin\u002F\u003Cdefault>`.\n    - Otherwise: `git pull --rebase origin \u003Cdefault>`. After fixing a conflict, run `git add \u003Cfile>`, then `GIT_EDITOR=true git rebase --continue`.\n    - Then the push for the forge:\n      - `gitlab`: `git push -u origin work\u002F\u003CID> -o merge_request.create -o merge_request.title=\"Work record \u003CID>\"`\n      - `github`: `git push -u origin work\u002F\u003CID>`, then `gh pr create --title \"Work record \u003CID>\" --body \"\u003Cfolder>\u002Fwork.md\"`\n      - `git`: `git push -u origin work\u002F\u003CID>`, then open the merge request for branch `work\u002F\u003CID>` in the forge web page.\n19. Report to the person:\n    - the record path `\u003Cfolder>\u002Fwork.md`;\n    - the task file `\u003Ctask file>` and that its `status` is now `done`;\n    - the branch `work\u002F\u003CID>`;\n    - the merge request link, or the instruction to open it;\n    - `missing: \u003Cnames from the missing list, joined with \", \">`, or `missing: none`; when the list names `glab` or `gh`, name the CLI and say that `merge_requests` stays empty until a person installs it and adds the merge request URLs to `\u003Cfolder>\u002Fwork.md`;\n    - the expected `merge_requests must not be empty when the task is done` finding, when step 10 found no merge request;\n    - the check findings left in other files, if any;\n    - as the last line, the check result, or `check not run: python3 missing`.\n\n## Conflicts\nThe branch touches the task folder and the generated files of step 15, so a conflict almost always lands in a generated file.\n\n1. List all conflicted files: `git diff --name-only --diff-filter=U`.\n2. A file is generated when its path starts with `.claude\u002F`, `.opencode\u002F` or `.cursor\u002F`, or it is exactly `CLAUDE.md`, `.agents\u002Findex.json`, `REPOSITORIES.md` or `STATUS.md`, or it matches `projects\u002F*\u002Fdomains\u002F*\u002Fstreams\u002F*\u002FBREAKDOWN.md`.\n3. When every conflicted file is generated: take the default-branch version of each - `git checkout --theirs -- \u003Cfile>` during a merge, `git checkout --ours -- \u003Cfile>` during a rebase (there `--ours` is the default branch) - then regenerate with `python3 tools\u002Fgenerate.py`, or apply `## Recipe: STATUS.md done flip` without Python. Run `git add \u003Cfile>` for each file, then continue with `GIT_EDITOR=true git rebase --continue` or `git commit --no-edit`.\n4. When some conflicted file is not generated: run `git merge --abort` or `git rebase --abort` (the command of the running step). For each file that is not generated, show the person both versions with their labels: \"default branch\" is the output of `git show origin\u002F\u003Cdefault>:\u003Cfile>`, and \"your branch\" is the output of `git show work\u002F\u003CID>:\u003Cfile>`. Then stop and wait.\n\n## Example record\n`projects\u002Fdemo\u002Fdomains\u002Foperations\u002Fstreams\u002Fmigration\u002Fstories\u002Fdocuments\u002Fwork.md` for the story `story:demo\u002Foperations\u002Fdocuments` with tracker `TASK-1`, work in repository `demo-bff`:\n\n```markdown\n---\nrepos:\n  - demo-bff\nmerge_requests:\n  - https:\u002F\u002Fgitlab.example\u002Fops\u002Fdemo-bff\u002F-\u002Fmerge_requests\u002F42\ncommits:\n  - demo-bff@2c0efd7072c42fb1df4dce53f4c284baf338a035\nrecorded: 2026-09-20\n---\n# story:demo\u002Foperations\u002Fdocuments: Show client documents in the new interface\n\n## Changed\ndemo-bff: the `\u002Fdocuments` endpoint now streams files straight from object storage.\n\n## Decisions\nFiles are fetched on demand; the nightly copy job stays for the audit export only.\n\n## Open questions\nNone.\n\n## Verification\nUnit tests pass in demo-bff. The screen was opened on [stand:test](..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fenvironments.json) and downloaded a test document.\n```\n\n## Without Python\n1. Skip `python3 tools\u002Fgenerate.py` and `python3 tools\u002Fcheck.py` everywhere in the steps.\n2. Update `STATUS.md` by `## Recipe: STATUS.md done flip`. A task that was started without Python carries a row written by `## Recipe: STATUS.md start flip` in `.agents\u002Fskills\u002Ftask-start\u002FSKILL.md`; that row is what step 1 of the recipe below deletes.\n3. End the report with the line:\n\ncheck not run: python3 missing\n\n## Recipe: STATUS.md done flip\nUse this only when `python3` is missing. The result equals what `python3 tools\u002Fgenerate.py` writes. Only the text between the `\u003C!-- status:... -->` markers changes; the `drift` section stays empty.\n\n1. `## In progress`: delete the row `| [\u003Ctask key>](\u003Ctask file>) | \u003Cstarted> |`, where `\u003Cstarted>` is the `started` value of the task file. When no row is left in that owner group, delete the whole group: the `### \u003Cowner>` line, the blank line, its two table lines `| Task | Started |` and `|---|---|`, and one neighbouring blank line when there is one, so no two blank lines stay together.\n2. `## Done recently`: `\u003Crecorded>` is today, the newest date the section keeps. When the section holds no rows between its markers, insert directly below the begin marker:\n   ```\n   | Task | Recorded |\n   |---|---|\n   | [\u003Ctask key>](\u003Ctask file>) | \u003Crecorded> |\n   ```\n   Otherwise insert the row `| [\u003Ctask key>](\u003Ctask file>) | \u003Crecorded> |` directly below the `|---|---|` line; when rows dated `\u003Crecorded>` already exist, insert it above the first of them whose key comes after the task key, or below the last of them when none does. Keys compare character by character from the left; the first different character decides in this order: `-`, then `.`, `\u002F`, digits `0` to `9`, `:`, upper-case letters `A` to `Z`, `_`, lower-case letters `a` to `z`. When one key is the start of the other, the shorter one comes first.\n3. Change nothing else in the file.\n\n### Example\n`maxim` records `story:demo\u002Foperations\u002Fdocuments` on 2026-09-20, and the section already holds a row of the same day for `story:demo\u002Foperations\u002Fdocuments-export`, whose key comes after. Step 2 inserts the new row above it:\n\n```\n| Task | Recorded |\n|---|---|\n| [story:demo\u002Foperations\u002Fdocuments](projects\u002Fdemo\u002Fdomains\u002Foperations\u002Fstreams\u002Fmigration\u002Fstories\u002Fdocuments\u002Fstory.md) | 2026-09-20 |\n| [story:demo\u002Foperations\u002Fdocuments-export](projects\u002Fdemo\u002Fdomains\u002Foperations\u002Fstreams\u002Fmigration\u002Fstories\u002Fdocuments-export\u002Fstory.md) | 2026-09-20 |\n```\n","# Close a finished task with a work record\n\n## Steps\n1. Go to the workspace root: the nearest directory, walking up from where you are, where `test -f .agents\u002Fkit.json` succeeds. Run every command below from there.\n2. Ask the person for the task: a tracker id, a `task:\u003Cslug>` key, or a story key `story:\u003Cproject>\u002F\u003Cdomain>\u002F\u003Cslug>`. Resolve it to exactly one task file `\u003Ctask file>`; the task folder `\u003Cfolder>` is the directory holding that file, and the task key is the frontmatter `key` of `\u003Ctask file>`. When resolution finds nothing, stop: it is not in this workspace. When it finds several tasks, stop and list them. Change nothing.\n   - `task:\u003Cslug>`: run `test -f tasks\u002F\u003Cslug>\u002Ftask.md`. When it fails, the task is not in this workspace.\n   - `story:\u003Cproject>\u002F\u003Cdomain>\u002F\u003Cslug>`: take the value of the key from `.agents\u002Findex.json`. When the index has no value, or `test -f \u003Cvalue>` fails, run `ls projects\u002F\u003Cproject>\u002Fdomains\u002F\u003Cdomain>\u002Fstreams\u002F*\u002Fstories\u002F\u003Cslug>\u002Fstory.md 2>\u002Fdev\u002Fnull` instead; exactly one printed path is `\u003Ctask file>` (also remember for the report that the index is stale; the fix is `python3 tools\u002Fgenerate.py`). Empty output means the story is not in this workspace.\n   - A tracker id `\u003Craw>`: validate it first (step 3). Then take the value of `\u003Craw>` from `.agents\u002Findex.json`. When the index has no value, run `grep -rlE \"^tracker: [\\\"']?\u003Craw>[\\\"']?$\" projects tasks 2>\u002Fdev\u002Fnull`: exactly one printed path is `\u003Ctask file>` (remember the stale-index line for the report), empty output means the id is not in this workspace, and several paths mean the id is used by more than one task - stop and list them.\n3. Validate a tracker id (only for a tracker-id input): read `tracker\u002Ftrackers.json`. Every entry of `trackers` carries `key` and `id_pattern`; JSON doubles every backslash, so `\\\\d` in the file means `\\d`. Rewrite each pattern for `grep -E` (write every `\\d` as `[0-9]`) and run `printf '%s\\n' '\u003Craw>' | grep -Ex '\u003Crewritten pattern>'` entry by entry until one matches. The `-x` makes the whole id match, not a part of it. When no entry matches, stop: the id is not in this workspace.\n4. Read the frontmatter of `\u003Ctask file>`: `status`, `tracker`. When `status` is not `in_progress`, stop and change nothing: a `waiting` task must be started first and a `done` task must be reopened - tell the person to run the `task-start` skill in both cases.\n5. Set `\u003CID>`: the task's `tracker` value when it is not empty, otherwise the task's slug (the `\u003Cslug>` of `task:\u003Cslug>`, or the story slug). The branch below is `work\u002F\u003CID>` and the draft is `.local\u002Fdrafts\u002F\u003CID>.md`.\n6. Read `.local\u002Fdrafts\u002F\u003CID>.md`. If it does not exist, ask the person four questions: what changed, which decisions were taken, what is still open, and what was verified. Wait for the answers before going on.\n7. Find the workspace default branch: run `git symbolic-ref --short refs\u002Fremotes\u002Forigin\u002FHEAD` and remove the `origin\u002F` prefix; when the command fails, use `main`. Call it `\u003Cdefault>`. Then run, one by one:\n   - `git status --porcelain --untracked-files=no`. When it prints anything, stop and tell the person: the workspace has uncommitted tracked changes. Commit nothing.\n   - `git switch \u003Cdefault>`\n   - `GIT_TERMINAL_PROMPT=0 git pull --ff-only`\n8. Collect commits. Read `repos.json`: the pull has just made it the manifest of `\u003Cdefault>`, and the record is checked against it - a repository that is not in the manifest cannot go into `repos`. For each entry of `repositories` whose directory `repos\u002F\u003Cname>` exists, with `\u003Cdefault_branch>` from the entry:\n   - Run `git -C repos\u002F\u003Cname> fetch --prune`.\n   - Run `git -C repos\u002F\u003Cname> for-each-ref --format='%(refname:short)' refs\u002Fheads refs\u002Fremotes | grep -E '(^|[^A-Za-z0-9])\u003CID>([^0-9]|$)'`. Each printed line is one `\u003Cbranch>`, used as printed. The grep keeps only names where `\u003CID>` is a whole token, so `TASK-1` does not match `feat\u002FTASK-10-y`.\n   - For every `\u003Cbranch>`, run `git -C repos\u002F\u003Cname> log --format=%H origin\u002F\u003Cdefault_branch>..\u003Cbranch>`.\n   - Run `git -C repos\u002F\u003Cname> log --format=%H -E --grep='\u003CID>([^0-9]|$)' origin\u002F\u003Cdefault_branch>` to find work that is already merged.\n   - Write each sha as `\u003Cname>@\u003Csha>`. Keep each value once, in the order found.\n   - A repository with at least one sha goes into `repos`.\n9. If no repository gave a sha, ask the person which repositories and branches hold the work, and repeat step 8 for them. A repository that is not in the manifest cannot go into `repos`; tell the person it must be merged into `\u003Cdefault>` first.\n10. Collect merge requests. For each repository in `repos`, look at its `forge` in the manifest:\n    - `gitlab`: if `command -v glab` and `glab auth status` both succeed, run `glab mr list --search \"\u003CID>\" --all --output json` inside `repos\u002F\u003Cname>` and take every `web_url` value that contains `\u002F-\u002Fmerge_requests\u002F` (the other `web_url` values are user profiles). Otherwise add `glab` to the `missing` list.\n    - `github`: if `command -v gh` and `gh auth status` both succeed, run `gh pr list --search \"\u003CID>\" --state all --json url --jq \".[].url\"` inside `repos\u002F\u003Cname>` and take every printed URL. Otherwise add `gh` to the `missing` list.\n    - `git`: there is no merge request data; add nothing.\n    - Keep each URL once, in the order found. Keep each name in `missing` once.\n11. Bring the branch `work\u002F\u003CID>` up:\n    - If `git rev-parse --verify --quiet work\u002F\u003CID>` or `git rev-parse --verify --quiet origin\u002Fwork\u002F\u003CID>` succeeds, the branch already exists:\n      - For each of `work\u002F\u003CID>` and `origin\u002Fwork\u002F\u003CID>` that exists, run `git diff --name-only origin\u002F\u003Cdefault>...\u003Cthat branch>`. A generated file in the list (the list of step 15) is expected on the branch - step 15 commits those files itself, for example `STATUS.md` - and never stops the skill. If any other printed path does not start with `\u003Cfolder>\u002F`, stop and tell the person which paths they are: the branch may touch the task folder and generated files only. Commit nothing.\n      - If `origin\u002Fwork\u002F\u003CID>` exists, the branch is already pushed. Its commits must never be rewritten. Then:\n        - When `git rev-parse --verify --quiet work\u002F\u003CID>` succeeds, run `git switch work\u002F\u003CID>`, then `git branch --set-upstream-to=origin\u002Fwork\u002F\u003CID>`.\n        - Otherwise run `git switch --track origin\u002Fwork\u002F\u003CID>`.\n        - Run `git pull --ff-only`. If it fails, stop and tell the person that the local and pushed `work\u002F\u003CID>` differ. Commit nothing.\n      - If only the local `work\u002F\u003CID>` exists, run `git switch work\u002F\u003CID>`.\n      - Bring the branch up to date: run `GIT_EDITOR=true git merge --no-edit origin\u002F\u003Cdefault>`. The branch may predate a repository merged into `\u003Cdefault>`; after the merge its `repos.json` equals the manifest of step 8, which the check tests the record against. The branch changes only `\u003Cfolder>\u002F` and generated files, so the merge is clean. On a conflict, follow `## Conflicts`.\n      - Skip the rest of this step.\n    - Otherwise run `git switch -c work\u002F\u003CID>`.\n12. Write `\u003Cfolder>\u002Fwork.md` from `.agents\u002Ftemplates\u002Fwork.md`:\n    - Run `date +%F` and put its output into the frontmatter line `recorded:`.\n    - `repos`, `merge_requests` and `commits` as block lists: the line `key:`, then one line `  - value` per value. Write `key: []` when the list is empty.\n    - Replace `\u003Ctask key>` in the title line with the task key and `\u003Cone-line summary>` with one line about the work.\n    - Fill `## Changed`, `## Decisions` and `## Verification` from the draft or the answers. Write \"None.\" in a section with nothing to say.\n    - `## Open questions` gets exactly `None.`: a done task keeps no open questions. When the draft names an open question, ask the person to resolve it first; when they cannot, stop and leave the task `in_progress`.\n    - Write a stand as a link to its key, `[stand:\u003Cname>](\u003Crelative path from \u003Cfolder> to environments.json>)`, never as an address. The path takes one `..` per folder level of `\u003Cfolder>`: from `tasks\u002F\u003Cslug>\u002F` (two levels) it is `..\u002F..\u002Fenvironments.json`, from a story folder `projects\u002F\u003Cp>\u002Fdomains\u002F\u003Cd>\u002Fstreams\u002F\u003Cs>\u002Fstories\u002F\u003Cslug>\u002F` (eight levels) it is `..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fenvironments.json`.\n    - Never link into `.local\u002F`.\n13. Flip the task status in `\u003Ctask file>`: change the `status:` line to `status: done` and empty the `owner:` and `started:` lines (the check requires them empty once the status is not `in_progress`; the history keeps who worked when). Change no other line.\n14. Update the generated files and run the check. First run `command -v python3`.\n    - When it prints a path: run `python3 tools\u002Fgenerate.py` (the record moves the task from the `## In progress` section of `STATUS.md` to `## Done recently`), then `python3 tools\u002Fcheck.py`, at most three runs in total. After each run, look only at findings that name a file this skill changed: `\u003Cfolder>\u002Fwork.md`, `\u003Ctask file>` and `STATUS.md`.\n      - Fix such a finding when the fix needs no new value, for example a wrong list form or a missing section. Then run both commands again.\n      - One finding is expected and is not yours to fix: `task-state` \"merge_requests must not be empty when the task is done\", when step 10 found no merge request. Do not stop for it; keep it for the report.\n      - When another finding on these files needs a value only the person has, or survives the third run: stop, do not commit, list the findings, and wait.\n      - Findings in other files: do not fix them; list them in the report.\n    - When it prints nothing: apply `## Recipe: STATUS.md done flip` to `STATUS.md` and remember the line `check not run: python3 missing` for the report.\n15. Commit: run `git status --short --untracked-files=all`. Stage `\u003Cfolder>\u002F` - the record and the task file. Then stage every other listed path that is a generated file: its path starts with `.claude\u002F`, `.opencode\u002F` or `.cursor\u002F`, or it is exactly `CLAUDE.md`, `.agents\u002Findex.json`, `REPOSITORIES.md` or `STATUS.md`, or it matches `projects\u002F*\u002Fdomains\u002F*\u002Fstreams\u002F*\u002FBREAKDOWN.md`. Normally that is `STATUS.md` alone. Do not stage any other path; mention it in the report instead. Run `git commit -m \"docs(work): record \u003CID>\"`.\n16. Update from the default branch:\n    - When step 11 found `origin\u002Fwork\u002F\u003CID>`: run `GIT_EDITOR=true git merge --no-edit origin\u002F\u003Cdefault>`.\n    - Otherwise: run `GIT_TERMINAL_PROMPT=0 git pull --rebase origin \u003Cdefault>`.\n    - On conflicts follow `## Conflicts`.\n17. Push and open the merge request by `params.forge` in `.agents\u002Fkit.json`:\n    - `gitlab`: run `GIT_TERMINAL_PROMPT=0 git push -u origin work\u002F\u003CID> -o merge_request.create -o merge_request.title=\"Work record \u003CID>\"`.\n    - `github`: run `GIT_TERMINAL_PROMPT=0 git push -u origin work\u002F\u003CID>`, then `gh pr create --title \"Work record \u003CID>\" --body \"\u003Cfolder>\u002Fwork.md\"`. If `gh` is missing or the command fails, print its error and ask the person to open the pull request for branch `work\u002F\u003CID>`.\n    - `git`: run `GIT_TERMINAL_PROMPT=0 git push -u origin work\u002F\u003CID>`, print the branch name `work\u002F\u003CID>` and ask the person to open the merge request.\n    - Never push with `--force` or `--force-with-lease`.\n18. If the push is rejected, print the error and these commands to finish by hand, then stop:\n    - When step 11 found `origin\u002Fwork\u002F\u003CID>`: `git pull --no-rebase --no-edit origin work\u002F\u003CID>`, then `GIT_EDITOR=true git merge --no-edit origin\u002F\u003Cdefault>`.\n    - Otherwise: `git pull --rebase origin \u003Cdefault>`. After fixing a conflict, run `git add \u003Cfile>`, then `GIT_EDITOR=true git rebase --continue`.\n    - Then the push for the forge:\n      - `gitlab`: `git push -u origin work\u002F\u003CID> -o merge_request.create -o merge_request.title=\"Work record \u003CID>\"`\n      - `github`: `git push -u origin work\u002F\u003CID>`, then `gh pr create --title \"Work record \u003CID>\" --body \"\u003Cfolder>\u002Fwork.md\"`\n      - `git`: `git push -u origin work\u002F\u003CID>`, then open the merge request for branch `work\u002F\u003CID>` in the forge web page.\n19. Report to the person:\n    - the record path `\u003Cfolder>\u002Fwork.md`;\n    - the task file `\u003Ctask file>` and that its `status` is now `done`;\n    - the branch `work\u002F\u003CID>`;\n    - the merge request link, or the instruction to open it;\n    - `missing: \u003Cnames from the missing list, joined with \", \">`, or `missing: none`; when the list names `glab` or `gh`, name the CLI and say that `merge_requests` stays empty until a person installs it and adds the merge request URLs to `\u003Cfolder>\u002Fwork.md`;\n    - the expected `merge_requests must not be empty when the task is done` finding, when step 10 found no merge request;\n    - the check findings left in other files, if any;\n    - as the last line, the check result, or `check not run: python3 missing`.\n\n## Conflicts\nThe branch touches the task folder and the generated files of step 15, so a conflict almost always lands in a generated file.\n\n1. List all conflicted files: `git diff --name-only --diff-filter=U`.\n2. A file is generated when its path starts with `.claude\u002F`, `.opencode\u002F` or `.cursor\u002F`, or it is exactly `CLAUDE.md`, `.agents\u002Findex.json`, `REPOSITORIES.md` or `STATUS.md`, or it matches `projects\u002F*\u002Fdomains\u002F*\u002Fstreams\u002F*\u002FBREAKDOWN.md`.\n3. When every conflicted file is generated: take the default-branch version of each - `git checkout --theirs -- \u003Cfile>` during a merge, `git checkout --ours -- \u003Cfile>` during a rebase (there `--ours` is the default branch) - then regenerate with `python3 tools\u002Fgenerate.py`, or apply `## Recipe: STATUS.md done flip` without Python. Run `git add \u003Cfile>` for each file, then continue with `GIT_EDITOR=true git rebase --continue` or `git commit --no-edit`.\n4. When some conflicted file is not generated: run `git merge --abort` or `git rebase --abort` (the command of the running step). For each file that is not generated, show the person both versions with their labels: \"default branch\" is the output of `git show origin\u002F\u003Cdefault>:\u003Cfile>`, and \"your branch\" is the output of `git show work\u002F\u003CID>:\u003Cfile>`. Then stop and wait.\n\n## Example record\n`projects\u002Fdemo\u002Fdomains\u002Foperations\u002Fstreams\u002Fmigration\u002Fstories\u002Fdocuments\u002Fwork.md` for the story `story:demo\u002Foperations\u002Fdocuments` with tracker `TASK-1`, work in repository `demo-bff`:\n\n```markdown\n---\nrepos:\n  - demo-bff\nmerge_requests:\n  - https:\u002F\u002Fgitlab.example\u002Fops\u002Fdemo-bff\u002F-\u002Fmerge_requests\u002F42\ncommits:\n  - demo-bff@2c0efd7072c42fb1df4dce53f4c284baf338a035\nrecorded: 2026-09-20\n---\n# story:demo\u002Foperations\u002Fdocuments: Show client documents in the new interface\n\n## Changed\ndemo-bff: the `\u002Fdocuments` endpoint now streams files straight from object storage.\n\n## Decisions\nFiles are fetched on demand; the nightly copy job stays for the audit export only.\n\n## Open questions\nNone.\n\n## Verification\nUnit tests pass in demo-bff. The screen was opened on [stand:test](..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fenvironments.json) and downloaded a test document.\n```\n\n## Without Python\n1. Skip `python3 tools\u002Fgenerate.py` and `python3 tools\u002Fcheck.py` everywhere in the steps.\n2. Update `STATUS.md` by `## Recipe: STATUS.md done flip`. A task that was started without Python carries a row written by `## Recipe: STATUS.md start flip` in `.agents\u002Fskills\u002Ftask-start\u002FSKILL.md`; that row is what step 1 of the recipe below deletes.\n3. End the report with the line:\n\ncheck not run: python3 missing\n\n## Recipe: STATUS.md done flip\nUse this only when `python3` is missing. The result equals what `python3 tools\u002Fgenerate.py` writes. Only the text between the `\u003C!-- status:... -->` markers changes; the `drift` section stays empty.\n\n1. `## In progress`: delete the row `| [\u003Ctask key>](\u003Ctask file>) | \u003Cstarted> |`, where `\u003Cstarted>` is the `started` value of the task file. When no row is left in that owner group, delete the whole group: the `### \u003Cowner>` line, the blank line, its two table lines `| Task | Started |` and `|---|---|`, and one neighbouring blank line when there is one, so no two blank lines stay together.\n2. `## Done recently`: `\u003Crecorded>` is today, the newest date the section keeps. When the section holds no rows between its markers, insert directly below the begin marker:\n   ```\n   | Task | Recorded |\n   |---|---|\n   | [\u003Ctask key>](\u003Ctask file>) | \u003Crecorded> |\n   ```\n   Otherwise insert the row `| [\u003Ctask key>](\u003Ctask file>) | \u003Crecorded> |` directly below the `|---|---|` line; when rows dated `\u003Crecorded>` already exist, insert it above the first of them whose key comes after the task key, or below the last of them when none does. Keys compare character by character from the left; the first different character decides in this order: `-`, then `.`, `\u002F`, digits `0` to `9`, `:`, upper-case letters `A` to `Z`, `_`, lower-case letters `a` to `z`. When one key is the start of the other, the shorter one comes first.\n3. Change nothing else in the file.\n\n### Example\n`maxim` records `story:demo\u002Foperations\u002Fdocuments` on 2026-09-20, and the section already holds a row of the same day for `story:demo\u002Foperations\u002Fdocuments-export`, whose key comes after. Step 2 inserts the new row above it:\n\n```\n| Task | Recorded |\n|---|---|\n| [story:demo\u002Foperations\u002Fdocuments](projects\u002Fdemo\u002Fdomains\u002Foperations\u002Fstreams\u002Fmigration\u002Fstories\u002Fdocuments\u002Fstory.md) | 2026-09-20 |\n| [story:demo\u002Foperations\u002Fdocuments-export](projects\u002Fdemo\u002Fdomains\u002Foperations\u002Fstreams\u002Fmigration\u002Fstories\u002Fdocuments-export\u002Fstory.md) | 2026-09-20 |\n```\n",{"name":5,"description":7},"main","84be7f584d7d6998f014342de57ee511e9596cd2","kits\u002Fworkspace\u002F.agents\u002Fskills\u002Fwork-record","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config","https:\u002F\u002Fgithub.com\u002Fmaximk777","2026-10-30 20:22:07",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add maximk777\u002Fopencode-config --skill work-record",{"tool":35,"command":36},"bunx","bunx skills add maximk777\u002Fopencode-config --skill work-record",{"tool":38,"command":39},"pnpm","pnpm dlx skills add maximk777\u002Fopencode-config --skill work-record","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Fkits\u002Fworkspace\u002F.agents\u002Fskills\u002Fwork-record\u002FSKILL.md",true,[],[44,51,57,64,71,78],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7CQCJ5WYEQM6E1T0RDVKWAY","verify","Use when a change in __SERVICE__ must be checked before review","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fworkspace-repo-kits\u002Fkit-1.1.0\u002Ffiles\u002Fskills\u002Fverify\u002FSKILL.md",[],[],{"skillNo":52,"name":5,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M7CQCG5MCSNDNS98TGAGXP7E","Use when you finished work on a tracker task and it must be recorded in the workspace through a merge request.","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fnormalize-team\u002F.claude\u002Fskills\u002Fwork-record\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M7CQCDGQBT2GXCKQAC1B5R0R","task-new","Use to create one story in a stream from the stream profile's story template, link it from its scope screens and open a merge request.","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fnormalize-team\u002F.claude\u002Fskills\u002Ftask-new\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7CQC93WN986EY48RFPZHZM7","task-decompose","Use to split a stream at the decomposition stage into stories - list scope screens without a story, create the accepted stories and close the stage through a merge request.","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fnormalize-team\u002F.claude\u002Fskills\u002Ftask-decompose\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7CQC5FZQWPTBK0J0FHWS513","task-context","Use to gather the context of a story key or a tracker id - its story, stream stage, scope screens, repositories, decisions, mockups and work records.","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fnormalize-team\u002F.claude\u002Fskills\u002Ftask-context\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7CQC1Q2YECCM2N9TPJAAJQA","repos-sync","Use to update clones of your repositories under repos\u002F and see their branch, lag and uncommitted changes.","https:\u002F\u002Fgithub.com\u002Fmaximk777\u002Fopencode-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fnormalize-team\u002F.claude\u002Fskills\u002Frepos-sync\u002FSKILL.md",[],[]]