$npx -y skills add comol/ai_rules_1c --skill handoffCompact the current conversation into a self-contained handoff document so a fresh agent (new chat, another machine, another AI client) can continue the work without re-discovering the context. References durable artifacts (openspec/, memory.md, commits, 1c-templates-mcp no
| 1 | # handoff — session transfer to the next agent |
| 2 | |
| 3 | Adapted from [`mattpocock/skills`](https://github.com/mattpocock/skills) (`skills/productivity/handoff`, MIT). Compresses the current conversation into a self-contained document for the next session. Principle: **reference durable artifacts, do not duplicate them**. |
| 4 | |
| 5 | ## Triggers |
| 6 | |
| 7 | Use this skill when the user says: |
| 8 | |
| 9 | - "handoff", "compact session", "/handoff" |
| 10 | - "save context for continuation", "brief the next session" |
| 11 | - equivalent Russian phrases such as "сделай handoff", "передай контекст", "сохрани контекст для продолжения" |
| 12 | |
| 13 | ## Argument |
| 14 | |
| 15 | - If the argument looks like a path (ends with `.md` or points to an existing directory) → **target path**. |
| 16 | - Otherwise → **focus** of the next session (insert it into the handoff header). |
| 17 | - If both are present, treat the first token as the path and the rest as focus. |
| 18 | - Without an argument, ask the user for the focus in one line and continue with the default path. |
| 19 | |
| 20 | ## Where to write |
| 21 | |
| 22 | 1. Default directory: `handoffs/` at the project root. Create it if missing. |
| 23 | 2. Default file name: `handoff-<YYYYMMDD-HHMMSS>.md` (local time). |
| 24 | 3. If the user provided a path, use it (overwrite without confirmation). |
| 25 | 4. **Before writing**, read the target file through Read. The expected "does not exist" error is fine; this is protection against overwriting an unrelated existing file with the same name. |
| 26 | 5. If the project has `.gitignore` and `handoffs/` is not mentioned there, **offer** to add it (handoffs are session artifacts, not code), but **do not add it automatically**. |
| 27 | |
| 28 | PowerShell conventions (`\` in paths, quotes around paths with spaces) — see the `powershell-windows` skill. |
| 29 | |
| 30 | ## Document structure |
| 31 | |
| 32 | ```markdown |
| 33 | # Handoff: <one-line session goal> |
| 34 | |
| 35 | **When**: <YYYY-MM-DD HH:MM local> |
| 36 | **Branch / commit**: <branch>, latest commit <short SHA + subject> |
| 37 | **Next session focus**: <argument focus, if provided> |
| 38 | |
| 39 | ## Current State |
| 40 | 1-3 sentences: what was done last, what remains unfinished, what is blocked. |
| 41 | |
| 42 | ## Open Questions |
| 43 | Bulleted list of real unresolved questions (architectural forks, waiting for the user, unclear contract). If empty, omit the section. |
| 44 | |
| 45 | ## Files Changed In This Session |
| 46 | - `path/to/file.bsl` — what changed and why. |
| 47 | - `path/to/file.xml` — same. |
| 48 | Only include the current session diff. If nothing changed, omit the section. |
| 49 | |
| 50 | ## Verification State |
| 51 | Which gates from `verification-checklist.md` passed / failed / were skipped. Latest `syntaxcheck` / `check_1c_code` / `review_1c_code` result in brief (error count, key messages). |
| 52 | |
| 53 | ## Next Steps |
| 54 | 1-5 imperative items ("Check movements for `РегистрНакопления.<Имя>`", "Finish `ОбработкаПроведения` for document `<Имя>`"). |
| 55 | |
| 56 | ## What To Load Next Session |
| 57 | - **Subagents**: `1c-<name>` when the task matches their role (see `subagents.md`). |
| 58 | - **On-demand rules**: `<name>.md` based on the task trigger (see `AGENTS.md → Additional rules`). |
| 59 | - **MCP tools**: especially relevant tools (`get_object_dossier` for X, `trace_impact` before refactoring Y, `ssl_search` for topic Z). |
| 60 | - **Slash commands**: `/opsx:apply` when there is an active OpenSpec proposal, `/getconfigfiles` for metadata re-export, etc. |
| 61 | |
| 62 | ## Links (DO NOT copy content) |
| 63 | - `openspec/changes/<id>/proposal.md`, `design.md`, `tasks.md` |
| 64 | - `memory.md` — relevant sections |
| 65 | - `1c-templates-mcp` notes — `recall` keys: `<term1>`, `<term2>` |
| 66 | - Commits / PR / Issue |
| 67 | - ITS articles, platform documentation pages |
| 68 | ``` |
| 69 | |
| 70 | ## What NOT to write in the handoff |
| 71 | |
| 72 | - Contents of existing artifacts (PRD, OpenSpec proposal/design/tasks, ADR, ITS page, commit, PR description). Link only. |
| 73 | - Full module code. Only include a short change description and path. |
| 74 | - Secrets, tokens, passwords, `.dev.env` contents, infobase connection strings. |
| 75 | - Long MCP output dumps. Include only the result and call parameters so the check can be repeated if needed. |
| 76 | |
| 77 | ## After writing |
| 78 | |
| 79 | 1. Tell the user the absolute path of the created file and its line count. |
| 80 | 2. If the session produced corrections / facts that may qualify for `memory.md` or `1c-templates-mcp` (`remember`) under `AGENTS.md → Project memory`, **list them separately** as candidates for long-term memory. Do not save automatically (`memory.md` is strict, `remember` is targeted). |
| 81 | |
| 82 | ## Boundaries |
| 83 | |
| 84 | - Handoff is a session artifact, not configuration and not code. Do not run `syntaxcheck` / `check_1c_code` / `review_1c_code` against it. |
| 85 | - Handoff **does not replace** an OpenSpec proposal. If the task req |