[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77S218ZJ6F3XZBQNDMAD6P2":3,"skill-same:01M77S218ZJ6F3XZBQNDMAD6P2":50},{"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":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M77S218ZJ6F3XZBQNDMAD6P2","clock-in",null,"Start a working session from repository evidence instead of memory, pick up one topic, and orient both the project layer and the user's private journal. Use at the beginning of a day, when resuming after an interruption, when the user says clock in, or when starting a topic that will span more than one session.","docs-as-code-toolkit\u002Farchitecture-knowledge-toolkit","docs-as-code-toolkit","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273816461?v=4","01M77S1546130CS9RH10VAW9DT","01M77S1559YEN3JKTVX724CJ8K",4,"MIT","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fclock-in\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: clock-in\ndescription: Start a working session from repository evidence instead of memory, pick up one topic, and orient both the project layer and the user's private journal. Use at the beginning of a day, when resuming after an interruption, when the user says clock in, or when starting a topic that will span more than one session.\n---\n\n# Clock In\n\n## Purpose\n\nResume work without depending on what anyone remembers.\n\nA session that starts by asking \"where were we?\" gets an answer built from\nmemory. This skill starts from the repository instead, and only then asks the\none question the repository cannot answer: which topic to work on.\n\nThe counterpart is `skills\u002Fclock-out\u002FSKILL.md`.\n\n## The two layers\n\nA working day has two durable records, and they belong to different owners:\n\n| Layer | Owner | Holds |\n|---|---|---|\n| Project | the repository being worked in | topic plans, project diary, issues, branches |\n| Private | the user's own journal repository | the cross-project day, the daily focus, personal threads |\n\n**Both layers are always considered.** A clock-in that only touches one of them\nis incomplete, and it must say which one it skipped and why. A layer that is\nabsent is *recorded as absent*, never invented.\n\n## Session lead\n\nExactly one skill leads an invocation. The lead does the orchestration; anything\nit invokes runs **delegated** and does not orchestrate back.\n\n- Invoked inside a project that uses this toolkit, **this skill leads**. It\n  drives the project layer, then hands over to the private journal's own\n  clock-in skill in delegated mode.\n- Invoked outside such a project — the user says \"clock in\" with no project in\n  context — the private journal's clock-in skill leads on its own. This skill is\n  not involved, and the private journal skill must work without it.\n- A delegated skill never sweeps other repositories and never delegates back.\n  Without this rule the two layers call each other in a loop.\n\nThe multi-project view belongs to the private layer. This skill orients **one**\nrepository: the one it was invoked in.\n\n## Never delegate to yourself\n\nEvery delegation in this skill finds its target by path, not by identity, and\nthree of those paths resolve back to this file:\n\n- Inside the toolkit itself, `skills\u002Fclock-in\u002FSKILL.md` \"in the repository being\n  worked in\" **is** this file.\n- A project that installed the toolkit's skills into its own `skills\u002F` reaches\n  this file through a symlink that looks project-local.\n- A private journal bound to a repository whose clock skill defers back upward —\n  the normal shape of a project delta — arrives here again by way of the\n  binding.\n\nSo: **resolve every delegation target to its real path, following symlinks, and\ncompare it with the file you are executing.** Same file, and you are already the\ndelegate: do not delegate, and use the default layout instead.\n\nThe session lead rule does not cover this. It governs the loop *between* the two\nlayers and assumes the two skills are different files; self-delegation happens\n*inside* one layer, where that rule never fires.\n\n## Workflow\n\n**1. Establish the project state before asking anything.**\n\n```sh\ngit status --short && git branch --show-current\ngit log --oneline -5\ngh pr list --state open\ngh issue list --state open --limit 20\n```\n\nNote anything that contradicts what the topic files will claim. Uncommitted\nwork, a branch that is not the base branch, an open pull request — these are\nfacts about where the last session stopped, and they outrank any file.\n\nEvery one of those four commands describes the *current* branch, plus whatever\nbranches happen to carry an open pull request. A branch with commits and no pull\nrequest is invisible to all four, and that is the ordinary shape of work in\nprogress. So establish the state of the whole repository as well:\n\nThe enumeration names the base branch rather than assuming it, prints how far\neach ref is ahead of and behind it, and ends in one verdict. Listing refs is not\nthe point — divergence from the base is, and a list of names still leaves the\ncomparison to whoever reads it.\n\n```sh\ngap=\"\"\n\nbase=$(git symbolic-ref --quiet --short refs\u002Fremotes\u002Forigin\u002FHEAD) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:base (run git remote set-head origin --auto once)\"; exit 1; }\ngit fetch --quiet --prune origin ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:fetch\"; exit 1; }\nrefs=$(git for-each-ref --format='%(refname:short)' refs\u002Fheads refs\u002Fremotes\u002Forigin) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:refs\"; exit 1; }\nnames=$(printf '%s\\n' \"$refs\" | sed 's|^origin\u002F||' | sort -u) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:dedup\"; exit 1; }\n\nreport_ref() {\n  if ! counts=$(git rev-list --left-right --count \"$base...$1\" 2>\u002Fdev\u002Fnull); then\n    gap=\"$gap UNAVAILABLE:divergence($1)\"; return\n  fi\n  if ! newest=$(git log -1 --format=%cs \"$1\" 2>\u002Fdev\u002Fnull); then\n    gap=\"$gap UNAVAILABLE:date($1)\"; return\n  fi\n  echo \"$1: $(echo \"$counts\" | awk '{print $2}') ahead,\" \\\n       \"$(echo \"$counts\" | awk '{print $1}') behind $base, newest $newest\"\n}\n\nfor name in $names; do\n  case \"$name\" in \"${base#origin\u002F}\" | origin | HEAD) continue ;; esac\n  git show-ref --verify --quiet \"refs\u002Fheads\u002F$name\" && has_local=yes || has_local=no\n  git show-ref --verify --quiet \"refs\u002Fremotes\u002Forigin\u002F$name\" && has_remote=yes || has_remote=no\n\n  if [ \"$has_local\" = yes ] && [ \"$has_remote\" = yes ]; then\n    git merge-base --is-ancestor \"origin\u002F$name\" \"$name\" 2>\u002Fdev\u002Fnull\n    case $? in\n      0) report_ref \"$name\" ;;\n      1) echo \"$name: origin\u002F$name is not contained in local — both listed\"\n         report_ref \"$name\"\n         report_ref \"origin\u002F$name\" ;;\n      *) gap=\"$gap UNAVAILABLE:ancestry($name)\" ;;\n    esac\n  elif [ \"$has_local\" = yes ]; then\n    report_ref \"$name\"\n  else\n    report_ref \"origin\u002F$name\"\n  fi\ndone\n\nif [ -n \"$gap\" ]; then\n  echo \"SWEEP: BLOCKED —$gap\"\n  exit 1\nfi\necho \"SWEEP: CLEAR (base $base)\"\n```\n\n**One entry per branch name, except where that would hide something.** A local\nbranch and its remote counterpart are the same work in two places only while\n`origin\u002F\u003Cname>` is an ancestor of the local ref. Then the local one is ahead of\nit or equal to it, and reporting that one alone loses nothing.\n\nWhen it is not an ancestor — the local branch is behind what was pushed, or the\ntwo have diverged — collapsing them discards exactly the commits this sweep\nexists to find. Both refs are listed then, and the pair is named as what it is.\nThat is a state of the repository rather than a failed query, so it is reported\nand does not block. Where only one of the two exists, that one is used.\n\nWithout a checkout, the same question and the same verdict:\n\n```sh\nrepo=\u003Cowner>\u002F\u003Crepo>\ngap=\"\"\n\nbase=$(gh api \"repos\u002F$repo\" --jq .default_branch 2>\u002Fdev\u002Fnull) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:default-branch\"; exit 1; }\nbranches=$(gh api --paginate \"repos\u002F$repo\u002Fbranches?per_page=100\" --jq '.[].name' 2>\u002Fdev\u002Fnull) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:branch-list\"; exit 1; }\n\nfor b in $branches; do\n  [ \"$b\" = \"$base\" ] && continue\n  if line=$(gh api \"repos\u002F$repo\u002Fcompare\u002F$base...$b\" --jq \\\n      '\"\\(.ahead_by) ahead, \\(.behind_by) behind\" +\n       (if (.commits | length) > 0\n        then \", newest \\((.commits | last).commit.committer.date[0:10])\"\n        else \"\" end)' 2>\u002Fdev\u002Fnull); then\n    echo \"$b: $line\"\n  else\n    gap=\"$gap UNAVAILABLE:compare($b)\"\n  fi\ndone\n\nif [ -n \"$gap\" ]; then\n  echo \"SWEEP: BLOCKED —$gap\"\n  exit 1\nfi\necho \"SWEEP: CLEAR (base $base)\"\n```\n\n`--paginate` is not decoration. Without it the listing stops after the first\npage, and a repository with more than a hundred branches reports `SWEEP: CLEAR`\nhaving looked at part of itself — the same silent incompleteness this section\nexists to remove, arriving through the door marked \"success\". The checkout form\nhas no such limit; `for-each-ref` enumerates everything.\n\nThis is one repository's branches, not other repositories — the multi-project\nview still belongs to the private layer.\n\n**Both forms are fail-closed, and that is not decoration.** A query that did not\nrun says nothing about the branches, so every fetch is tested on its own and a\nfailed comparison is collected rather than skipped. Two shapes make this go\nwrong quietly and both are avoided above: a `gh api` or `git` command as the left\nmember of a pipeline, whose failure the pipeline swallows, and a `while read` fed\nby a pipe, which runs in a subshell and discards the gaps it collected. A session\nthat could not list the branches has not established that there were none.\n\n**2. Delegate to the project's own clock-in skill when it has one.**\n\nLook for `skills\u002Fclock-in\u002FSKILL.md` in the repository being worked in, and apply\n\"Never delegate to yourself\" to what you find. When it exists and is a different\nfile, read and execute it as the authoritative project-specific workflow: it owns\nthe project's paths, file formats, and diary wiring, and this skill owns only the\nritual around it. When it does not exist, or resolves to this file, use the\ndefault layout below.\n\n**3. Resolve the private journal binding.** See \"The private journal binding\".\nRecover its state *before* the focus question — an open day may be older than\ntoday, and only the private layer knows.\n\n**4. List the topics from the directory, not from an index.**\n\nEvery file in `progress\u002F` is a topic; there is no index to go stale. For each\none, take when it was last touched from git rather than from the file:\n\n```sh\ngit log -1 --format='%ad %s' --date=short -- progress\u002F\u003Cfile>\n```\n\n**5. Ask, once, which topic to continue.** Offer each existing topic, the\nactionable topics the private layer returned, starting a new one, and working\nwithout a topic — a one-off fix does not need a progress file, and creating one\nfor it is ceremony.\n\nAsk this as a single question covering both layers. Do not pair it with a second\none; the answers collide. The private journal binding is settled in step 3, not\nhere.\n\n**6. Read what the chosen topic depends on.**\n\n- `progress\u002F\u003Ctopic>.adoc` — the plan and where it stands.\n- The newest entry in the project's diary — what the last session learned, which\n  is often why the plan says what it says.\n- The issues the plan references, if the plan's next step names any.\n\n**7. Report the delta, then start.** Four things, briefly: where the topic\nstands, what the plan's next step is, what has changed on the base branch since\nthe file was last touched, and which other refs are ahead of it. If the two disagree, say so and fix the file —\nit describes now, so a stale statement in it is corrected on sight, not\npreserved.\n\n**8. For a new topic**, create `progress\u002F\u003Cslug>.adoc` from\n`templates\u002Fprogress.adoc` and fill the plan **with** the owner, not for them. A\nplan invented on their behalf is a guess wearing a checklist.\n\n## Say what was read\n\nThis skill claims to start from the repository rather than from memory. A session\nthat read the issues, the diary and the topic files and a session that\nreconstructed them from the conversation produce artifacts that look identical,\nso the claim needs a trace or it is only an intention.\n\nRecord, in the layer that outlives the session, which repository artifacts this\nsession actually fetched — the branch enumeration, the issues read by number, the\ntopic files, the diary entry, the delegated skills — each with a reference a later\nsession can re-fetch. `clock-out\u002FSKILL.md` says where that record lands.\n\nTwo rules keep it worth having:\n\n- **An artifact this session did not fetch does not go in the list.** A plausible\n  entry written from memory is worse than a short list, because it is the one\n  thing a later session will trust without checking.\n- **A failed fetch is an entry too**, naming what could not be read and why.\n\nBe clear about how much this is worth. The branch enumeration above is enforced\nby a command: run it or do not, the output is either there or it is not. This\nrecord is enforced by review — nothing in the toolkit can tell a truthful list\nfrom an invented one, because the diary form belongs to the project layer and\nthere is no single path to check. A consuming repository whose diary has a fixed\nshape can count the section instead, and one does. Saying that plainly is part of\nthe rule: a guard that claims more enforcement than it has is the same defect one\nlevel up.\n\n## The private journal binding\n\nA private journal is per user, not per project. Its location must therefore never\nbe recorded in this toolkit or in a consuming project — it differs on every\nmachine, and a project repository is the wrong place to name it.\n\nIt is resolved at session start, in this order:\n\n1. `ARCHITECTURE_KNOWLEDGE_TOOLKIT_JOURNAL` — a directory path, or `off`.\n2. The user-level binding written at adapter installation:\n   `${XDG_CONFIG_HOME:-$HOME\u002F.config}\u002Farchitecture-knowledge-toolkit\u002Fjournal.conf`.\n3. Neither is present: ask, once, and store the answer.\n\nRead it with the helper rather than parsing the file by hand:\n\n```sh\n\"$ARCHITECTURE_KNOWLEDGE_TOOLKIT\"\u002Fadapters\u002Fshared\u002Fjournal-config.sh get\n```\n\nIt prints `enabled`, `path`, `clock_in`, and `clock_out`, and exits `3` when no\nbinding has been recorded yet.\n\n**On exit 3, ask exactly one setup question**, before and separate from the topic\nquestion: does the user keep a private journal, and if so where. Three answers,\ntwo of them durable:\n\n| Answer | Store it with |\n|---|---|\n| yes, at `\u003Cdir>` | `journal-config.sh set --path \u003Cdir>` |\n| no, I do not keep one | `journal-config.sh disable` |\n| not now | store nothing; ask again next session |\n\n**\"No\" is an answer worth storing.** Without recording it, a user without a\nprivate journal is asked again every single session, and the mechanism becomes\nthe thing people work around.\n\nWhen the binding is enabled, read `\u003Cpath>\u002F\u003Cclock_in>` and execute it in\ndelegated mode — after checking it against \"Never delegate to yourself\", and\nafter checking that the binding does not name the repository being worked in. A\nbinding that points at the current repository describes one layer, not two.\n\n**A delegated invocation does not resolve the binding at all.** The lead resolved\nit already; re-resolving is what turns a project delta into a cycle. When the path is missing or unreachable — another machine, a\ncheckout not present — record the gap and finish the project layer anyway. The\nprivate layer is never allowed to block the project layer.\n\n## Direction of flow\n\nProject findings flow **up** into the private journal. Nothing flows down.\n\nWhat the private layer returns at clock-in — an open day, a focus, a personal\nthread — belongs in the conversation, not in project files. The private path\nitself never appears in a project artifact.\n\n## Default layout\n\nUsed when the project has no clock-in skill of its own. A project-local skill may\nnarrow any of it; that is what a local skill is for.\n\n- `progress\u002F\u003Ctopic>.adoc` — one file per topic, from `templates\u002Fprogress.adoc`.\n- The project's diary, in whatever form the project already keeps one.\n\n## What a progress file is for\n\nIt is the plan and the current status of one topic, sitting next to the code and\npresent the moment the repository is checked out. That is what it adds over the\nissue board: an order of work, and the reason for that order, which a board\ncannot show.\n\nIt refers to issues by number and never restates them. The issue owns the\nacceptance criteria; the file owns the sequence.\n\nIt carries no history. It describes now, is rewritten as often as needed, and is\ndeleted when its topic ends — what was learned along the way is in the diary by\nthen.\n\n**No number in it that a command can produce.** Not test counts, not coverage,\nnot bundle sizes. Write the command instead. A number copied into a file nobody\nre-runs is a claim that goes stale silently.\n\n## What this skill does not do\n\n- It does not decide the project's file formats or diary structure. A\n  project-local clock-in skill owns those.\n- It does not orchestrate other repositories. That is the private layer's job.\n- It does not record where the private journal lives anywhere inside a\n  repository.\n\n## Supporting files\n\n- `templates\u002Fprogress.adoc` — the shape of a progress file. The only copy;\n  `clock-out` references this one.\n- `..\u002F..\u002Fadapters\u002Fshared\u002Fjournal-config.sh` — resolves and stores the private\n  journal binding.\n","# Clock In\n\n## Purpose\n\nResume work without depending on what anyone remembers.\n\nA session that starts by asking \"where were we?\" gets an answer built from\nmemory. This skill starts from the repository instead, and only then asks the\none question the repository cannot answer: which topic to work on.\n\nThe counterpart is `skills\u002Fclock-out\u002FSKILL.md`.\n\n## The two layers\n\nA working day has two durable records, and they belong to different owners:\n\n| Layer | Owner | Holds |\n|---|---|---|\n| Project | the repository being worked in | topic plans, project diary, issues, branches |\n| Private | the user's own journal repository | the cross-project day, the daily focus, personal threads |\n\n**Both layers are always considered.** A clock-in that only touches one of them\nis incomplete, and it must say which one it skipped and why. A layer that is\nabsent is *recorded as absent*, never invented.\n\n## Session lead\n\nExactly one skill leads an invocation. The lead does the orchestration; anything\nit invokes runs **delegated** and does not orchestrate back.\n\n- Invoked inside a project that uses this toolkit, **this skill leads**. It\n  drives the project layer, then hands over to the private journal's own\n  clock-in skill in delegated mode.\n- Invoked outside such a project — the user says \"clock in\" with no project in\n  context — the private journal's clock-in skill leads on its own. This skill is\n  not involved, and the private journal skill must work without it.\n- A delegated skill never sweeps other repositories and never delegates back.\n  Without this rule the two layers call each other in a loop.\n\nThe multi-project view belongs to the private layer. This skill orients **one**\nrepository: the one it was invoked in.\n\n## Never delegate to yourself\n\nEvery delegation in this skill finds its target by path, not by identity, and\nthree of those paths resolve back to this file:\n\n- Inside the toolkit itself, `skills\u002Fclock-in\u002FSKILL.md` \"in the repository being\n  worked in\" **is** this file.\n- A project that installed the toolkit's skills into its own `skills\u002F` reaches\n  this file through a symlink that looks project-local.\n- A private journal bound to a repository whose clock skill defers back upward —\n  the normal shape of a project delta — arrives here again by way of the\n  binding.\n\nSo: **resolve every delegation target to its real path, following symlinks, and\ncompare it with the file you are executing.** Same file, and you are already the\ndelegate: do not delegate, and use the default layout instead.\n\nThe session lead rule does not cover this. It governs the loop *between* the two\nlayers and assumes the two skills are different files; self-delegation happens\n*inside* one layer, where that rule never fires.\n\n## Workflow\n\n**1. Establish the project state before asking anything.**\n\n```sh\ngit status --short && git branch --show-current\ngit log --oneline -5\ngh pr list --state open\ngh issue list --state open --limit 20\n```\n\nNote anything that contradicts what the topic files will claim. Uncommitted\nwork, a branch that is not the base branch, an open pull request — these are\nfacts about where the last session stopped, and they outrank any file.\n\nEvery one of those four commands describes the *current* branch, plus whatever\nbranches happen to carry an open pull request. A branch with commits and no pull\nrequest is invisible to all four, and that is the ordinary shape of work in\nprogress. So establish the state of the whole repository as well:\n\nThe enumeration names the base branch rather than assuming it, prints how far\neach ref is ahead of and behind it, and ends in one verdict. Listing refs is not\nthe point — divergence from the base is, and a list of names still leaves the\ncomparison to whoever reads it.\n\n```sh\ngap=\"\"\n\nbase=$(git symbolic-ref --quiet --short refs\u002Fremotes\u002Forigin\u002FHEAD) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:base (run git remote set-head origin --auto once)\"; exit 1; }\ngit fetch --quiet --prune origin ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:fetch\"; exit 1; }\nrefs=$(git for-each-ref --format='%(refname:short)' refs\u002Fheads refs\u002Fremotes\u002Forigin) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:refs\"; exit 1; }\nnames=$(printf '%s\\n' \"$refs\" | sed 's|^origin\u002F||' | sort -u) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:dedup\"; exit 1; }\n\nreport_ref() {\n  if ! counts=$(git rev-list --left-right --count \"$base...$1\" 2>\u002Fdev\u002Fnull); then\n    gap=\"$gap UNAVAILABLE:divergence($1)\"; return\n  fi\n  if ! newest=$(git log -1 --format=%cs \"$1\" 2>\u002Fdev\u002Fnull); then\n    gap=\"$gap UNAVAILABLE:date($1)\"; return\n  fi\n  echo \"$1: $(echo \"$counts\" | awk '{print $2}') ahead,\" \\\n       \"$(echo \"$counts\" | awk '{print $1}') behind $base, newest $newest\"\n}\n\nfor name in $names; do\n  case \"$name\" in \"${base#origin\u002F}\" | origin | HEAD) continue ;; esac\n  git show-ref --verify --quiet \"refs\u002Fheads\u002F$name\" && has_local=yes || has_local=no\n  git show-ref --verify --quiet \"refs\u002Fremotes\u002Forigin\u002F$name\" && has_remote=yes || has_remote=no\n\n  if [ \"$has_local\" = yes ] && [ \"$has_remote\" = yes ]; then\n    git merge-base --is-ancestor \"origin\u002F$name\" \"$name\" 2>\u002Fdev\u002Fnull\n    case $? in\n      0) report_ref \"$name\" ;;\n      1) echo \"$name: origin\u002F$name is not contained in local — both listed\"\n         report_ref \"$name\"\n         report_ref \"origin\u002F$name\" ;;\n      *) gap=\"$gap UNAVAILABLE:ancestry($name)\" ;;\n    esac\n  elif [ \"$has_local\" = yes ]; then\n    report_ref \"$name\"\n  else\n    report_ref \"origin\u002F$name\"\n  fi\ndone\n\nif [ -n \"$gap\" ]; then\n  echo \"SWEEP: BLOCKED —$gap\"\n  exit 1\nfi\necho \"SWEEP: CLEAR (base $base)\"\n```\n\n**One entry per branch name, except where that would hide something.** A local\nbranch and its remote counterpart are the same work in two places only while\n`origin\u002F\u003Cname>` is an ancestor of the local ref. Then the local one is ahead of\nit or equal to it, and reporting that one alone loses nothing.\n\nWhen it is not an ancestor — the local branch is behind what was pushed, or the\ntwo have diverged — collapsing them discards exactly the commits this sweep\nexists to find. Both refs are listed then, and the pair is named as what it is.\nThat is a state of the repository rather than a failed query, so it is reported\nand does not block. Where only one of the two exists, that one is used.\n\nWithout a checkout, the same question and the same verdict:\n\n```sh\nrepo=\u003Cowner>\u002F\u003Crepo>\ngap=\"\"\n\nbase=$(gh api \"repos\u002F$repo\" --jq .default_branch 2>\u002Fdev\u002Fnull) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:default-branch\"; exit 1; }\nbranches=$(gh api --paginate \"repos\u002F$repo\u002Fbranches?per_page=100\" --jq '.[].name' 2>\u002Fdev\u002Fnull) ||\n  { echo \"SWEEP: BLOCKED — UNAVAILABLE:branch-list\"; exit 1; }\n\nfor b in $branches; do\n  [ \"$b\" = \"$base\" ] && continue\n  if line=$(gh api \"repos\u002F$repo\u002Fcompare\u002F$base...$b\" --jq \\\n      '\"\\(.ahead_by) ahead, \\(.behind_by) behind\" +\n       (if (.commits | length) > 0\n        then \", newest \\((.commits | last).commit.committer.date[0:10])\"\n        else \"\" end)' 2>\u002Fdev\u002Fnull); then\n    echo \"$b: $line\"\n  else\n    gap=\"$gap UNAVAILABLE:compare($b)\"\n  fi\ndone\n\nif [ -n \"$gap\" ]; then\n  echo \"SWEEP: BLOCKED —$gap\"\n  exit 1\nfi\necho \"SWEEP: CLEAR (base $base)\"\n```\n\n`--paginate` is not decoration. Without it the listing stops after the first\npage, and a repository with more than a hundred branches reports `SWEEP: CLEAR`\nhaving looked at part of itself — the same silent incompleteness this section\nexists to remove, arriving through the door marked \"success\". The checkout form\nhas no such limit; `for-each-ref` enumerates everything.\n\nThis is one repository's branches, not other repositories — the multi-project\nview still belongs to the private layer.\n\n**Both forms are fail-closed, and that is not decoration.** A query that did not\nrun says nothing about the branches, so every fetch is tested on its own and a\nfailed comparison is collected rather than skipped. Two shapes make this go\nwrong quietly and both are avoided above: a `gh api` or `git` command as the left\nmember of a pipeline, whose failure the pipeline swallows, and a `while read` fed\nby a pipe, which runs in a subshell and discards the gaps it collected. A session\nthat could not list the branches has not established that there were none.\n\n**2. Delegate to the project's own clock-in skill when it has one.**\n\nLook for `skills\u002Fclock-in\u002FSKILL.md` in the repository being worked in, and apply\n\"Never delegate to yourself\" to what you find. When it exists and is a different\nfile, read and execute it as the authoritative project-specific workflow: it owns\nthe project's paths, file formats, and diary wiring, and this skill owns only the\nritual around it. When it does not exist, or resolves to this file, use the\ndefault layout below.\n\n**3. Resolve the private journal binding.** See \"The private journal binding\".\nRecover its state *before* the focus question — an open day may be older than\ntoday, and only the private layer knows.\n\n**4. List the topics from the directory, not from an index.**\n\nEvery file in `progress\u002F` is a topic; there is no index to go stale. For each\none, take when it was last touched from git rather than from the file:\n\n```sh\ngit log -1 --format='%ad %s' --date=short -- progress\u002F\u003Cfile>\n```\n\n**5. Ask, once, which topic to continue.** Offer each existing topic, the\nactionable topics the private layer returned, starting a new one, and working\nwithout a topic — a one-off fix does not need a progress file, and creating one\nfor it is ceremony.\n\nAsk this as a single question covering both layers. Do not pair it with a second\none; the answers collide. The private journal binding is settled in step 3, not\nhere.\n\n**6. Read what the chosen topic depends on.**\n\n- `progress\u002F\u003Ctopic>.adoc` — the plan and where it stands.\n- The newest entry in the project's diary — what the last session learned, which\n  is often why the plan says what it says.\n- The issues the plan references, if the plan's next step names any.\n\n**7. Report the delta, then start.** Four things, briefly: where the topic\nstands, what the plan's next step is, what has changed on the base branch since\nthe file was last touched, and which other refs are ahead of it. If the two disagree, say so and fix the file —\nit describes now, so a stale statement in it is corrected on sight, not\npreserved.\n\n**8. For a new topic**, create `progress\u002F\u003Cslug>.adoc` from\n`templates\u002Fprogress.adoc` and fill the plan **with** the owner, not for them. A\nplan invented on their behalf is a guess wearing a checklist.\n\n## Say what was read\n\nThis skill claims to start from the repository rather than from memory. A session\nthat read the issues, the diary and the topic files and a session that\nreconstructed them from the conversation produce artifacts that look identical,\nso the claim needs a trace or it is only an intention.\n\nRecord, in the layer that outlives the session, which repository artifacts this\nsession actually fetched — the branch enumeration, the issues read by number, the\ntopic files, the diary entry, the delegated skills — each with a reference a later\nsession can re-fetch. `clock-out\u002FSKILL.md` says where that record lands.\n\nTwo rules keep it worth having:\n\n- **An artifact this session did not fetch does not go in the list.** A plausible\n  entry written from memory is worse than a short list, because it is the one\n  thing a later session will trust without checking.\n- **A failed fetch is an entry too**, naming what could not be read and why.\n\nBe clear about how much this is worth. The branch enumeration above is enforced\nby a command: run it or do not, the output is either there or it is not. This\nrecord is enforced by review — nothing in the toolkit can tell a truthful list\nfrom an invented one, because the diary form belongs to the project layer and\nthere is no single path to check. A consuming repository whose diary has a fixed\nshape can count the section instead, and one does. Saying that plainly is part of\nthe rule: a guard that claims more enforcement than it has is the same defect one\nlevel up.\n\n## The private journal binding\n\nA private journal is per user, not per project. Its location must therefore never\nbe recorded in this toolkit or in a consuming project — it differs on every\nmachine, and a project repository is the wrong place to name it.\n\nIt is resolved at session start, in this order:\n\n1. `ARCHITECTURE_KNOWLEDGE_TOOLKIT_JOURNAL` — a directory path, or `off`.\n2. The user-level binding written at adapter installation:\n   `${XDG_CONFIG_HOME:-$HOME\u002F.config}\u002Farchitecture-knowledge-toolkit\u002Fjournal.conf`.\n3. Neither is present: ask, once, and store the answer.\n\nRead it with the helper rather than parsing the file by hand:\n\n```sh\n\"$ARCHITECTURE_KNOWLEDGE_TOOLKIT\"\u002Fadapters\u002Fshared\u002Fjournal-config.sh get\n```\n\nIt prints `enabled`, `path`, `clock_in`, and `clock_out`, and exits `3` when no\nbinding has been recorded yet.\n\n**On exit 3, ask exactly one setup question**, before and separate from the topic\nquestion: does the user keep a private journal, and if so where. Three answers,\ntwo of them durable:\n\n| Answer | Store it with |\n|---|---|\n| yes, at `\u003Cdir>` | `journal-config.sh set --path \u003Cdir>` |\n| no, I do not keep one | `journal-config.sh disable` |\n| not now | store nothing; ask again next session |\n\n**\"No\" is an answer worth storing.** Without recording it, a user without a\nprivate journal is asked again every single session, and the mechanism becomes\nthe thing people work around.\n\nWhen the binding is enabled, read `\u003Cpath>\u002F\u003Cclock_in>` and execute it in\ndelegated mode — after checking it against \"Never delegate to yourself\", and\nafter checking that the binding does not name the repository being worked in. A\nbinding that points at the current repository describes one layer, not two.\n\n**A delegated invocation does not resolve the binding at all.** The lead resolved\nit already; re-resolving is what turns a project delta into a cycle. When the path is missing or unreachable — another machine, a\ncheckout not present — record the gap and finish the project layer anyway. The\nprivate layer is never allowed to block the project layer.\n\n## Direction of flow\n\nProject findings flow **up** into the private journal. Nothing flows down.\n\nWhat the private layer returns at clock-in — an open day, a focus, a personal\nthread — belongs in the conversation, not in project files. The private path\nitself never appears in a project artifact.\n\n## Default layout\n\nUsed when the project has no clock-in skill of its own. A project-local skill may\nnarrow any of it; that is what a local skill is for.\n\n- `progress\u002F\u003Ctopic>.adoc` — one file per topic, from `templates\u002Fprogress.adoc`.\n- The project's diary, in whatever form the project already keeps one.\n\n## What a progress file is for\n\nIt is the plan and the current status of one topic, sitting next to the code and\npresent the moment the repository is checked out. That is what it adds over the\nissue board: an order of work, and the reason for that order, which a board\ncannot show.\n\nIt refers to issues by number and never restates them. The issue owns the\nacceptance criteria; the file owns the sequence.\n\nIt carries no history. It describes now, is rewritten as often as needed, and is\ndeleted when its topic ends — what was learned along the way is in the diary by\nthen.\n\n**No number in it that a command can produce.** Not test counts, not coverage,\nnot bundle sizes. Write the command instead. A number copied into a file nobody\nre-runs is a claim that goes stale silently.\n\n## What this skill does not do\n\n- It does not decide the project's file formats or diary structure. A\n  project-local clock-in skill owns those.\n- It does not orchestrate other repositories. That is the private layer's job.\n- It does not record where the private journal lives anywhere inside a\n  repository.\n\n## Supporting files\n\n- `templates\u002Fprogress.adoc` — the shape of a progress file. The only copy;\n  `clock-out` references this one.\n- `..\u002F..\u002Fadapters\u002Fshared\u002Fjournal-config.sh` — resolves and stores the private\n  journal binding.\n",{"name":5,"description":7},"main","209607df178aba11b58f76b19e45d58af0d44f52","skills\u002Fclock-in",2,"https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit","2026-11-10 03:36:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add docs-as-code-toolkit\u002Farchitecture-knowledge-toolkit --skill clock-in",{"tool":36,"command":37},"bunx","bunx skills add docs-as-code-toolkit\u002Farchitecture-knowledge-toolkit --skill clock-in",{"tool":39,"command":40},"pnpm","pnpm dlx skills add docs-as-code-toolkit\u002Farchitecture-knowledge-toolkit --skill clock-in","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fclock-in\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"templates\u002Fprogress.adoc","REFERENCE","参考文档",1001,"https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fclock-in\u002Ftemplates\u002Fprogress.adoc",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M77S3RY6VQPBNM5JA06GWSCF","traceability-review","Review explicit architecture traceability metadata for gaps, inconsistencies, unsupported claims, stale links, dangling references, and metamodel violations. Use when Codex needs to inspect artifact relations, validate ADR-to-risk or quality-scenario coverage, propose relation updates, or produce an evidence-backed traceability review report.","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Ftraceability-review\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M77S3NK6KC59ND1J2JSXFDW3","slice-issues","Slice GitHub parent issues into reviewable real sub-issues. Use when Codex is asked to split, slice, decompose, refine, or plan a GitHub issue into child issues, sub-issues, implementation slices, or reviewable follow-up issues before implementation work begins.","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fslice-issues\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M77S3GN6ZDB3WM0ACCWV03EV","risk","Create proposed architecture risk artifacts and analyze their traceability to ADRs, quality scenarios, requirements, components, controls, and evidence. Use when Codex needs to identify, draft, update, prioritize, or review architecture risks, separate risks from issues and decisions, propose mitigations, or produce a risk impact report without deciding acceptance.","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Frisk\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M77S3CH6QB0Y11BV002AS7PY","quality-scenario","Create proposed quality scenarios and analyze their traceability to quality objectives, ADRs, risks, requirements, architecture artifacts, and code evidence. Use when Codex needs to draft or update measurable quality scenarios, inspect existing arc42 Chapter 10 quality requirements, derive scenarios from source evidence without inventing targets, propose metadata relations, or produce a quality scenario impact report.","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fquality-scenario\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M77S394HQDDQKQFPQKP8V0XW","presentation","Create or update docs-as-code presentation material as AsciiDoc reveal.js decks rendered with docs-toolbox. Use when Codex needs to prepare talks, meetup or conference proposals, speaker notes, demo scripts, event-specific artifacts under talks\u002F, or slide decks that must remain repository-native rather than PowerPoint or Google Slides files.","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fpresentation\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M77S34KBA1J2VV3QHK9JFV3N","pr-review","Review GitHub pull requests and proposed branch changes for correctness, regressions, missing tests, documentation-contract violations, traceability gaps, and reviewability. Use when an AI assistant is asked to review a PR, review pull request changes, inspect a PR branch before merge, or produce PR review comments.","https:\u002F\u002Fgithub.com\u002Fdocs-as-code-toolkit\u002Farchitecture-knowledge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002FSKILL.md",[],[]]