[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7561HVES9AZCSM15YVSTQV0":3,"skill-same:01M7561HVES9AZCSM15YVSTQV0":44},{"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},"01M7561HVES9AZCSM15YVSTQV0","design-docs",null,"Full execution protocol for MODE: DESIGN_DOCS — generate or sync structured, language-agnostic design docs (domain.md, technical-spec.md, behavior-spec.md, reference\u002F) for the project under build, with a stable section-ID registry and a design changelog. Loaded on demand by the architect when the design-docs command emits a [MODE: DESIGN_DOCS ...] signal (issue #1080).","AlexanderNarbaev\u002Fagi","AlexanderNarbaev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F33544956?v=4","01M755ZKB1JJ26ZBNZSDJ4C0TV","01M755ZKBX072HZMHVQBWK7MK7",1,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fdesign-docs\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: design-docs\ndescription: >\n  Full execution protocol for MODE: DESIGN_DOCS — generate or sync structured,\n  language-agnostic design docs (domain.md, technical-spec.md, behavior-spec.md,\n  reference\u002F) for the project under build, with a stable section-ID registry and\n  a design changelog. Loaded on demand by the architect when the design-docs\n  command emits a [MODE: DESIGN_DOCS ...] signal (issue #1080).\n---\n\n# Design-Doc Generation & Sync Protocol\n\nGenerate or maintain the project's structured design documentation. The work is delegated to the `docs_design` agent (a design-doc-author role variant of the docs agent). This mode authors a fixed set of version-controlled docs in the **target project repo** (NOT under `.swarm\u002F`). It does NOT modify source code, does NOT call `declare_scope`, and does NOT touch `.swarm\u002Fspec.md`, `CHANGELOG.md`, or `docs\u002Freleases\u002Fpending\u002F*`.\n\n### MODE: DESIGN_DOCS\n\n## Step 0 — Parse Header\n\nParse the `[MODE: DESIGN_DOCS ...]` header to extract:\n- `out`: output directory, project-relative (default `docs`)\n- `lang`: target language for `reference\u002F` docs, or `auto` (default `auto`)\n- `update`: boolean — `true` = sync existing docs to current code\u002Fspec; `false` = generate fresh\n- the trailing free text = the system description (required when `update=false`)\n\nIf the header is malformed, report the error and stop.\n\n## Step 1 — Preconditions\n\n1. Confirm `design_docs.enabled` is true (the `docs_design` agent only exists when enabled). If it is not, tell the user to set `design_docs.enabled: true` in `opencode-swarm.json` and stop.\n2. If a spec-staleness block is active (`.swarm\u002Fspec-staleness.json` present), resolve\u002Facknowledge spec staleness FIRST — otherwise design-doc writes may be blocked by the guardrail. Do not blindly retry on `SPEC_STALENESS_BLOCK`.\n3. Read `.swarm\u002Fspec.md` if present — it is the authoritative requirements source (FR-### IDs). The design docs must be consistent with it.\n\n## Step 2 — Index Existing State (always)\n\nHave the `docs_design` agent (or `doc_scan`) index `\u003Cout>\u002F` to discover any existing design docs. If `\u003Cout>\u002Freference\u002Ftraceability.json` exists, it is the section-ID registry — load it. Existing section IDs MUST be preserved on regeneration.\n\n## Step 3 — Generate or Sync\n\nDispatch the **`docs_design`** agent (the active swarm's `docs_design` — never the standard `docs` agent) with:\n- `TASK`, `MODE` (generate|sync), `OUT_DIR`, `LANGUAGE`\n- For sync: `FILES CHANGED` and `CHANGES SUMMARY` from the current phase\u002Fdiff\n- `SKILLS: file:.opencode\u002Fskills\u002Fdesign-docs\u002FSKILL.md` (this skill)\n\nThe agent owns exactly these files under `\u003Cout>` and creates NOTHING else:\n\n```\n\u003Cout>\u002F\n├── domain.md              # 100% language-agnostic. Entities in neutral notation\n│                          #   (field: type-class), domain invariants. ZERO framework\n│                          #   names in normative text. Section IDs: D-###\n├── technical-spec.md      # Language-agnostic architecture: layers, dependency rules,\n│                          #   contract SHAPES (inputs→outputs→error-kinds), algorithms,\n│                          #   invariants. + the traceability table. Section IDs: S-###\n├── behavior-spec.md       # 100% language-agnostic Given\u002FWhen\u002FThen specs. IDs: B-###\n├── design-changelog.md    # Keep-a-Changelog log of design-doc changes (NOT release notes)\n└── reference\u002F             # ALL [INCIDENTAL] language\u002Fframework-specific material here.\n    ├── reference-impl.md  #   Exact signatures, CLI strings, SQL, code. Mapped to\n    │                      #   spec sections by ID. Section IDs: R-###\n    ├── idiom-notes.md     #   \"Here is how the reference solved X\" — examples only.\n    └── traceability.json  #   Machine-readable section-ID registry (source of truth)\n```\n\n## Step 4 — Invariants the docs MUST satisfy\n\n- **Language-agnostic normative text**: `domain.md`, `technical-spec.md`, and `behavior-spec.md` contain ZERO framework\u002Flibrary\u002Flanguage names in normative content. All such material lives ONLY in `reference\u002F`.\n- **Version header** on every doc:\n  `\u003C!-- design-doc: \u003Cname>  version: \u003Cphase-or-counter>  generated: \u003CISO-8601>  spec-hash: \u003C8 chars> -->`\n- **Stable section IDs**: assigned once, never renumbered. `D-###` domain, `S-###` technical-spec, `B-###` behavior-spec, `R-###` reference. On sync, reuse every existing ID; mint new IDs only for genuinely new sections.\n- **Traceability footer** ending each section: `> Traceability: FR-012, FR-013 | invariant: \u003Cid-or-none>`.\n- **traceability.json** kept in sync: `{ \"schema_version\": 1, \"sections\": [ { \"section_id\", \"doc\", \"title\", \"spec_frs\": [], \"invariants\": [], \"code_anchors\": [] } ] }`. `technical-spec.md` renders a human-readable mirror table `| Doc Section | Spec FR | Invariant | Code anchors |`.\n- **design-changelog.md**: append one entry per generate\u002Fsync under `## [Unreleased]` (Added\u002FChanged\u002FRemoved), e.g. `- \u003CISO date> phase \u003CN>: \u003Csections touched> (\u003CFR refs>)`. This file is SEPARATE from release-please artifacts — never edit `CHANGELOG.md` or `docs\u002Freleases\u002Fpending\u002F*` here.\n\n## Step 5 — Verify & Report\n\n1. Confirm the agent created\u002Fupdated only the allowed files and `traceability.json` is consistent with the docs.\n2. Confirm no normative doc names a framework (spot-check) and every section has an ID + traceability footer.\n3. Report `UPDATED` \u002F `ADDED` \u002F `REMOVED` \u002F `SUMMARY` back to the user.\n\n## Notes on the PHASE-WRAP sync path\n\nDuring PHASE-WRAP, the deterministic design-doc drift check (`runDesignDocDriftCheck`) writes `.swarm\u002Fdoc-drift-phase-N.json`. If the verdict is `DOC_STALE` and `design_docs.enabled`, dispatch `docs_design` in **sync** mode for the affected sections only, then append a design-changelog entry. This is advisory and non-blocking — never block phase completion on design-doc lag.\n","# Design-Doc Generation & Sync Protocol\n\nGenerate or maintain the project's structured design documentation. The work is delegated to the `docs_design` agent (a design-doc-author role variant of the docs agent). This mode authors a fixed set of version-controlled docs in the **target project repo** (NOT under `.swarm\u002F`). It does NOT modify source code, does NOT call `declare_scope`, and does NOT touch `.swarm\u002Fspec.md`, `CHANGELOG.md`, or `docs\u002Freleases\u002Fpending\u002F*`.\n\n### MODE: DESIGN_DOCS\n\n## Step 0 — Parse Header\n\nParse the `[MODE: DESIGN_DOCS ...]` header to extract:\n- `out`: output directory, project-relative (default `docs`)\n- `lang`: target language for `reference\u002F` docs, or `auto` (default `auto`)\n- `update`: boolean — `true` = sync existing docs to current code\u002Fspec; `false` = generate fresh\n- the trailing free text = the system description (required when `update=false`)\n\nIf the header is malformed, report the error and stop.\n\n## Step 1 — Preconditions\n\n1. Confirm `design_docs.enabled` is true (the `docs_design` agent only exists when enabled). If it is not, tell the user to set `design_docs.enabled: true` in `opencode-swarm.json` and stop.\n2. If a spec-staleness block is active (`.swarm\u002Fspec-staleness.json` present), resolve\u002Facknowledge spec staleness FIRST — otherwise design-doc writes may be blocked by the guardrail. Do not blindly retry on `SPEC_STALENESS_BLOCK`.\n3. Read `.swarm\u002Fspec.md` if present — it is the authoritative requirements source (FR-### IDs). The design docs must be consistent with it.\n\n## Step 2 — Index Existing State (always)\n\nHave the `docs_design` agent (or `doc_scan`) index `\u003Cout>\u002F` to discover any existing design docs. If `\u003Cout>\u002Freference\u002Ftraceability.json` exists, it is the section-ID registry — load it. Existing section IDs MUST be preserved on regeneration.\n\n## Step 3 — Generate or Sync\n\nDispatch the **`docs_design`** agent (the active swarm's `docs_design` — never the standard `docs` agent) with:\n- `TASK`, `MODE` (generate|sync), `OUT_DIR`, `LANGUAGE`\n- For sync: `FILES CHANGED` and `CHANGES SUMMARY` from the current phase\u002Fdiff\n- `SKILLS: file:.opencode\u002Fskills\u002Fdesign-docs\u002FSKILL.md` (this skill)\n\nThe agent owns exactly these files under `\u003Cout>` and creates NOTHING else:\n\n```\n\u003Cout>\u002F\n├── domain.md              # 100% language-agnostic. Entities in neutral notation\n│                          #   (field: type-class), domain invariants. ZERO framework\n│                          #   names in normative text. Section IDs: D-###\n├── technical-spec.md      # Language-agnostic architecture: layers, dependency rules,\n│                          #   contract SHAPES (inputs→outputs→error-kinds), algorithms,\n│                          #   invariants. + the traceability table. Section IDs: S-###\n├── behavior-spec.md       # 100% language-agnostic Given\u002FWhen\u002FThen specs. IDs: B-###\n├── design-changelog.md    # Keep-a-Changelog log of design-doc changes (NOT release notes)\n└── reference\u002F             # ALL [INCIDENTAL] language\u002Fframework-specific material here.\n    ├── reference-impl.md  #   Exact signatures, CLI strings, SQL, code. Mapped to\n    │                      #   spec sections by ID. Section IDs: R-###\n    ├── idiom-notes.md     #   \"Here is how the reference solved X\" — examples only.\n    └── traceability.json  #   Machine-readable section-ID registry (source of truth)\n```\n\n## Step 4 — Invariants the docs MUST satisfy\n\n- **Language-agnostic normative text**: `domain.md`, `technical-spec.md`, and `behavior-spec.md` contain ZERO framework\u002Flibrary\u002Flanguage names in normative content. All such material lives ONLY in `reference\u002F`.\n- **Version header** on every doc:\n  `\u003C!-- design-doc: \u003Cname>  version: \u003Cphase-or-counter>  generated: \u003CISO-8601>  spec-hash: \u003C8 chars> -->`\n- **Stable section IDs**: assigned once, never renumbered. `D-###` domain, `S-###` technical-spec, `B-###` behavior-spec, `R-###` reference. On sync, reuse every existing ID; mint new IDs only for genuinely new sections.\n- **Traceability footer** ending each section: `> Traceability: FR-012, FR-013 | invariant: \u003Cid-or-none>`.\n- **traceability.json** kept in sync: `{ \"schema_version\": 1, \"sections\": [ { \"section_id\", \"doc\", \"title\", \"spec_frs\": [], \"invariants\": [], \"code_anchors\": [] } ] }`. `technical-spec.md` renders a human-readable mirror table `| Doc Section | Spec FR | Invariant | Code anchors |`.\n- **design-changelog.md**: append one entry per generate\u002Fsync under `## [Unreleased]` (Added\u002FChanged\u002FRemoved), e.g. `- \u003CISO date> phase \u003CN>: \u003Csections touched> (\u003CFR refs>)`. This file is SEPARATE from release-please artifacts — never edit `CHANGELOG.md` or `docs\u002Freleases\u002Fpending\u002F*` here.\n\n## Step 5 — Verify & Report\n\n1. Confirm the agent created\u002Fupdated only the allowed files and `traceability.json` is consistent with the docs.\n2. Confirm no normative doc names a framework (spot-check) and every section has an ID + traceability footer.\n3. Report `UPDATED` \u002F `ADDED` \u002F `REMOVED` \u002F `SUMMARY` back to the user.\n\n## Notes on the PHASE-WRAP sync path\n\nDuring PHASE-WRAP, the deterministic design-doc drift check (`runDesignDocDriftCheck`) writes `.swarm\u002Fdoc-drift-phase-N.json`. If the verdict is `DOC_STALE` and `design_docs.enabled`, dispatch `docs_design` in **sync** mode for the affected sections only, then append a design-changelog entry. This is advisory and non-blocking — never block phase completion on design-doc lag.\n",{"name":5,"description":7},"main","7709dc9e5ebd3bd641124ad2a3f6bb053ac2dab6",".opencode\u002Fskills\u002Fdesign-docs",0,"https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev","2026-11-15 04:35:36",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add AlexanderNarbaev\u002Fagi --skill design-docs",{"tool":36,"command":37},"bunx","bunx skills add AlexanderNarbaev\u002Fagi --skill design-docs",{"tool":39,"command":40},"pnpm","pnpm dlx skills add AlexanderNarbaev\u002Fagi --skill design-docs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fdesign-docs\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M76RZHYHMGE1WP9JBCMNA801","springboot-patterns","Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fspringboot-patterns\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M76RZE6JNZH5HV7Q8JM7R0PN","search-first","Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fsearch-first\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M76RZBV42EMQV77H7GMFY4AJ","scholar-evaluation","Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fscholar-evaluation\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M76RZ97GC3XAY48H126C30PM","redis-patterns","Redis data structure patterns, caching strategies, distributed locks, rate limiting, pub\u002Fsub, and connection management for production applications.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fredis-patterns\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M76RZ528FANTKX7Q9XR0CXM7","react-patterns","React 18\u002F19 patterns including hooks discipline, server\u002Fclient component boundaries, Suspense + error boundaries, form actions, data fetching, state management decision trees, and accessibility-first composition. Use when writing or reviewing React components.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Freact-patterns\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M76RZ1244PZQRQV5HBQ4PVYQ","query-patterns","SQL patterns, relational database design, query optimization, transactions, analytics, and dialect-aware best practices.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fquery-patterns\u002FSKILL.md",[],[]]