[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MT42524T83D6817X9DYTS":3,"skill-same:01M75MT42524T83D6817X9DYTS":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M75MT42524T83D6817X9DYTS","writing-specs",null,"Use when producing a technical design spec for a feature or Jira story. Enforces consistent spec structure covering data model, API surface, permissions, offline-sync rules where applicable, and web\u002Fmobile UI. Run before writing-plans.","whimzyLive\u002Fnightshift-ai","whimzyLive","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22066605?v=4","01M75MMH22XX6R3NTAFHD7HEN7","Rushi Patel","01M75MMH32DHVVC61XRSHWVEV2",3,"MIT","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fplugins\u002Fsdlc\u002Fskills\u002Fwriting-specs\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: writing-specs\ndescription: Use when producing a technical design spec for a feature or Jira story. Enforces consistent spec structure covering data model, API surface, permissions, offline-sync rules where applicable, and web\u002Fmobile UI. Run before writing-plans.\n---\n\n# writing-specs — Technical Spec\n\n**Core principle:** A spec says WHAT to build — not HOW to implement it line by line. Every section must be concrete enough that an implementation agent can execute without asking questions.\n\n**Announce at start:** \"I'm using the writing-specs skill to produce this spec.\"\n\n## When to Use\n\n- Before any implementation planning (`writing-plans` consumes this output)\n- When given a Jira story key or a product feature doc\n- When requirements exist but no technical design has been written\n\n## Output File\n\n```text\nsave_path := docs\u002Fsuperpowers\u002Fspecs\u002F\u003CSTORY-KEY>.md   # story key is globally unique -> any agent derives this path with no Jira lookup, e.g. docs\u002Fsuperpowers\u002Fspecs\u002FCER-2037.md\nbranch := spec\u002F\u003CSTORY-KEY>\npr_title := docs(spec): \u003CSTORY-KEY> \u003Cstory summary>\nPR merged -> post breadcrumb comment on the story   # human reference only; other agents still derive save_path from the story key, not from this comment\n```\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fjira-site-guard.sh || exit 1\nacli jira workitem comment create --key \u003CSTORY-KEY> \\\n  --body \"Spec: docs\u002Fsuperpowers\u002Fspecs\u002F\u003CSTORY-KEY>.md | PR: \u003CPR_URL>\"\n```\n\n**Guard:** If you did not successfully fetch the Jira ticket before calling this skill, STOP and return to fetch it first. Never generate spec content from repository files alone.\n\n---\n\n## Spec Template\n\nArtifact encoding contract: unpadded tables, no section dropped, one-line N\u002FA, verbatim contracts, rationale as annotation, prose \u003C 10 lines between headings. plugins\u002Fsdlc\u002Frefs\u002Fartifact-encoding.md\n\n`## Design & Dev Notes` is filled from the story's **Design** and **Dev Notes** sections — resolve and read the design per `${CLAUDE_PLUGIN_ROOT}\u002Frefs\u002Fdesign-references.md` before writing it.\n\n````markdown\n# [Feature Name] — Technical Spec\n\n**Story:** [JIRA-KEY — link or key]\n**Feature:** [link to docs\u002Ffeatures\u002F*.md if available]\n**Date:** YYYY-MM-DD\n\n## Overview\n\n[What this builds and why — 2 sentences max. No implementation detail.]\n\n## Data Model\n\n### New Entities\n\n| Field | Type | Nullable | Default | Notes |\n| --- | --- | --- | --- | --- |\n| id | uuid | No | gen_random_uuid() | PK |\n| ... | ... | ... | ... | ... |\n\nEntity base class: choose the correct base class per the project's entity\u002FORM conventions (see project-context) — state explicitly which and why.\n\n### Modified Entities\n\n[Which existing entity, which fields added\u002Fremoved\u002Fchanged — one row per change]\n\n### Relationships\n\n[Text ERD — explicit cardinality]\n\n- Organisation (1) → (many) [Entity] via organisation_id\n- [Entity] (1) → (many) [ChildEntity] via [entity]\\_id\n\n## API Surface\n\n### New Endpoints\n\n| Method | Path | Auth\u002FRoute Type | Description |\n| --- | --- | --- | --- |\n| GET | \u002F[entity] | [auth type] | List all for org |\n| POST | \u002F[entity] | [auth type] | Create |\n| GET | \u002F[entity]\u002F:id | [auth type] | Get by ID |\n| PATCH | \u002F[entity]\u002F:id | [auth type] | Update |\n| DELETE | \u002F[entity]\u002F:id | [auth type] | Soft delete |\n\nAuth\u002Froute type — state exactly one per endpoint, using the project's route\u002Fauth conventions (see project-context). Distinguish at minimum:\n\n- authenticated, tenant\u002Forg context required\n- authenticated, full user object resolved (for creates and auditable mutations)\n- public, no auth (only for genuinely public endpoints)\n\n### Request \u002F Response Shapes\n\n```typescript\n\u002F\u002F POST \u002F[entity]\ninterface Create[Entity]Body {\n  field: string;        \u002F\u002F required\n  optionalField?: string;\n}\n\ninterface [Entity]Response {\n  id: string;\n  field: string;\n  createdAt: string;\n}\n```\n\nAll TypeScript interfaces must be fully typed. No `any`.\n\n### Permissions\n\n| Role | List | Get | Create | Update | Delete |\n| --- | --- | --- | --- | --- | --- |\n| [role-1] | ✓ own org | ✓ own org | ✓ | ✓ own | ✗ |\n| [role-2] | ✓ assigned | ✓ assigned | ✗ | ✗ | ✗ |\n| [role-3] | ✓ org | ✓ org | ✓ | ✓ | ✓ |\n\nDerive role\u002Fpermission names from the project's permission source (see project-context) — never invent. Locate that source and enumerate the actual roles before filling this table.\n\n## Backend Implementation\n\n**API \u002F infra layer:** the project's API\u002Finfra definition (see the project-context workspace→path table) — state the exact file.\n\n**Application layer:** state the exact files this introduces, following the project's layering conventions (implementations, mappers, DTOs, or the project's equivalents), one per operation.\n\n**Handlers \u002F entry points:** the project's request entry points — thin, one per operation; state exact paths.\n\n**Permissions:** the project's permission source (see project-context) — list the exact permission keys to add.\n\n## Web UI\n\nOmit this section if not web-scoped.\n\n**Pages:**\n| Route | File | Description |\n| --- | --- | --- |\n| \u002F[domain] | src\u002Fpages\u002F[domain]\u002Findex.tsx | List view |\n| \u002F[domain]\u002F[id] | src\u002Fpages\u002F[domain]\u002F[id].tsx | Detail view |\n\n**Components:** the project's web component location (see project-context) — list names and responsibilities.\n\n**Data hooks:** the project's server-data fetching layer (per the web stack in project-context) — list the data hooks\u002Fqueries needed, one per operation.\n\n**State:** client state changes (per the project's web stack in project-context) — list which stores\u002Fslices change and why.\n\n**Route permissions:** the project's route-permission config (see project-context) — which roles can access which routes.\n\n## Mobile UI\n\nOmit this section if not mobile-scoped.\n\n**Screens:**\n| Route | File | Description |\n| --- | --- | --- |\n| \u002F(app)\u002F[domain] | app\u002F(app)\u002F[domain]\u002Findex.tsx | List screen |\n| \u002F(app)\u002F[domain]\u002F[id] | app\u002F(app)\u002F[domain]\u002F[id].tsx | Detail screen |\n\n**Online reads:** REST via the project's API client — same endpoints as Web UI.\n\n**Offline reads:** if the project uses offline sync (see project-context), state the read hook\u002Flocation and the data it exposes. Every offline read MUST apply a tenant\u002Forg-scoped filter so a device only ever sees its own tenant's data (e.g. a JOIN or WHERE constraint on the owning tenant\u002Forg id) — describe the exact scoping filter for this entity.\n\n**Offline writes:** if the project uses offline sync, list the offline write\u002Ftransaction builders needed (one per mutating operation) and state their location per the project's sync layer (see project-context).\n\n## Offline Sync\n\nOmit this section entirely if the project has no offline sync — see project-context.\n\nIf the project uses offline sync, the spec MUST cover:\n\n- **Which entities sync** — list every entity that must be available offline.\n- **Scoping \u002F tenant-isolation filter** — the rule that limits each device's synced data to its own tenant\u002Forg. State it explicitly per entity. Bucket\u002Fpartition scoping in the sync config alone is often insufficient — the read path must also enforce a tenant\u002Forg-scoped filter (see Offline reads above).\n- **Read hooks** — where offline reads live and what each exposes.\n- **Write hooks \u002F transaction builders** — list each one needed, what it uploads to, and which API endpoint it calls.\n\nDefine these using the project's offline-sync technology and config location (see project-context); state the exact files.\n\n## Design & Dev Notes\n\nOne-line N\u002FA when the story's Design and Dev Notes are both \"None\".\n\n| UI surface | Design row(s) | Match |\n| --- | --- | --- |\n| [page \u002F screen \u002F component] | docs\u002Fdesign\u002F[slug]\u002Frenders\u002F[page].png | [layout, states, copy to match; design-system tokens that replace mock values] |\n\n| Dev Note (verbatim) | Honoured by | Deviation |\n| --- | --- | --- |\n| [requester directive] | [spec section \u002F file] | none, or [reason] |\n\n## Reuse\n\nOne-line N\u002FA when the story has no component-plan rows (`${CLAUDE_PLUGIN_ROOT}\u002Frefs\u002Fcomponent-plan.md`). Copy the rows; add none.\n\n| Surface | Template | Component | Action | Story |\n| --- | --- | --- | --- | --- |\n| [visible surface] | [page template] | [bundle component] | reuse \u002F extend \u002F new | [library story key, or — for reuse] |\n\nA `new` row with no library story is an open question; the spec cannot be approved while it stays open.\n\n## Error Handling\n\n| Scenario | Behaviour | HTTP Status |\n| --- | --- | --- |\n| [Entity] not found | Return 404 | 404 |\n| Unauthorised role | Return 403 | 403 |\n| Validation failure | Return 400 with field errors | 400 |\n| [Domain-specific error] | [behaviour] | [status] |\n\n**Offline behaviour:** [what happens if user submits offline write while disconnected — does it queue, fail, or show an error?]\n\n## Out of Scope\n\n- [Thing that sounds related but is NOT in this spec]\n- [Future enhancement explicitly excluded]\n\n## Decisions\n\n[Every question the spec raised, settled with the user before approval — none left open]\n\n- **[Question]** — [answer]\n\n````\n\n---\n\n## Project-Specific Rules (resolve from project-context)\n\n### Entity rules\n- Choose the correct entity base class per the project's conventions (see project-context) — standalone vs tenant\u002Fproject-scoped — and state why.\n- Never say \"add a column\" — say \"add field to entity + generate migration\".\n- State the exact entity file using the project's entity\u002FORM layer (see the project-context workspace→path table).\n\n### Route \u002F auth rules\n- State the exact auth\u002Froute type per endpoint using the project's conventions (authenticated with tenant\u002Forg context; authenticated with full user object for creates and auditable mutations; public only when genuinely public).\n- Never leave a raw, unwrapped handler — always use the project's standard route\u002Fauth wrapper.\n\n### Offline sync rules (only if the project uses offline sync — see project-context)\n- Any entity visible offline **must** have an Offline Sync section.\n- Devices over-sync — partition\u002Fbucket scoping alone is NOT sufficient.\n- Every offline read must enforce a tenant\u002Forg-scoped filter (see Offline reads).\n- Never specify edits to a generated sync schema\u002Ftypes file — spec the sync-config\u002Frule change instead; the schema is regenerated by the project's typegen step.\n\n### Role names\nAlways derive from the project's permission source (see project-context) — never invent. Enumerate the actual roles before writing the Permissions table.\n\n---\n\n## Self-Review Checklist (run before saving)\n\n```text\ngate := [\n  no TBDs — every open question has a concrete answer OR a flagged decision with a suggested default,\n  every new endpoint has a row in the Permissions table,\n  every offline-synced entity has an Offline Sync section with an explicit tenant\u002Forg-scoped filter (only if the project uses offline sync),\n  entity relationships state exact cardinality (1:1, 1:N, M:N),\n  auth\u002Froute type stated for every endpoint, using the project's conventions,\n  all TypeScript interfaces fully typed — no `any`,\n  spec says WHAT to build — no HOW (no line-by-line implementation instructions), except a HOW a Dev Note dictates,\n  Web \u002F Mobile \u002F Offline Sync sections omitted if not applicable to this story,\n  every story Design row maps to a UI surface and every Dev Note has an Honoured-by or a Deviation reason,\n  entity base class choice stated and justified per the project's conventions\n]\nbefore saving -> every item in gate must hold\n```\n\n---\n\n## Anti-Patterns\n\n| Anti-pattern | Fix |\n|---|---|\n| \"Add a column to the table\" | \"Add field `x: string` to `[Entity]` entity + generate migration\" |\n| Inventing a role name | Check the project's permission source first (see project-context) |\n| Missing tenant\u002Forg-scoped filter in an offline read | Always enforce a tenant\u002Forg-scoped filter on every offline read |\n| Editing a generated sync schema\u002Ftypes file in the spec | Never — it's generated; spec the sync-config\u002Frule change instead |\n| `any` in TypeScript interfaces | Fully type every field |\n| TBD without a suggested default | Add \"Suggested default: X\" so impl can proceed |\n| Spec contains implementation code | Move to agent instructions, not spec |\n| Offline Sync section absent for an offline-synced entity | Add the section — the sync implementer needs it |\n| Hand-rolled parser\u002Fsanitiser\u002Fescaper for untrusted input | Name the maintained library; if none fits, record why under `## Decisions` |\n","# writing-specs — Technical Spec\n\n**Core principle:** A spec says WHAT to build — not HOW to implement it line by line. Every section must be concrete enough that an implementation agent can execute without asking questions.\n\n**Announce at start:** \"I'm using the writing-specs skill to produce this spec.\"\n\n## When to Use\n\n- Before any implementation planning (`writing-plans` consumes this output)\n- When given a Jira story key or a product feature doc\n- When requirements exist but no technical design has been written\n\n## Output File\n\n```text\nsave_path := docs\u002Fsuperpowers\u002Fspecs\u002F\u003CSTORY-KEY>.md   # story key is globally unique -> any agent derives this path with no Jira lookup, e.g. docs\u002Fsuperpowers\u002Fspecs\u002FCER-2037.md\nbranch := spec\u002F\u003CSTORY-KEY>\npr_title := docs(spec): \u003CSTORY-KEY> \u003Cstory summary>\nPR merged -> post breadcrumb comment on the story   # human reference only; other agents still derive save_path from the story key, not from this comment\n```\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fjira-site-guard.sh || exit 1\nacli jira workitem comment create --key \u003CSTORY-KEY> \\\n  --body \"Spec: docs\u002Fsuperpowers\u002Fspecs\u002F\u003CSTORY-KEY>.md | PR: \u003CPR_URL>\"\n```\n\n**Guard:** If you did not successfully fetch the Jira ticket before calling this skill, STOP and return to fetch it first. Never generate spec content from repository files alone.\n\n---\n\n## Spec Template\n\nArtifact encoding contract: unpadded tables, no section dropped, one-line N\u002FA, verbatim contracts, rationale as annotation, prose \u003C 10 lines between headings. plugins\u002Fsdlc\u002Frefs\u002Fartifact-encoding.md\n\n`## Design & Dev Notes` is filled from the story's **Design** and **Dev Notes** sections — resolve and read the design per `${CLAUDE_PLUGIN_ROOT}\u002Frefs\u002Fdesign-references.md` before writing it.\n\n````markdown\n# [Feature Name] — Technical Spec\n\n**Story:** [JIRA-KEY — link or key]\n**Feature:** [link to docs\u002Ffeatures\u002F*.md if available]\n**Date:** YYYY-MM-DD\n\n## Overview\n\n[What this builds and why — 2 sentences max. No implementation detail.]\n\n## Data Model\n\n### New Entities\n\n| Field | Type | Nullable | Default | Notes |\n| --- | --- | --- | --- | --- |\n| id | uuid | No | gen_random_uuid() | PK |\n| ... | ... | ... | ... | ... |\n\nEntity base class: choose the correct base class per the project's entity\u002FORM conventions (see project-context) — state explicitly which and why.\n\n### Modified Entities\n\n[Which existing entity, which fields added\u002Fremoved\u002Fchanged — one row per change]\n\n### Relationships\n\n[Text ERD — explicit cardinality]\n\n- Organisation (1) → (many) [Entity] via organisation_id\n- [Entity] (1) → (many) [ChildEntity] via [entity]\\_id\n\n## API Surface\n\n### New Endpoints\n\n| Method | Path | Auth\u002FRoute Type | Description |\n| --- | --- | --- | --- |\n| GET | \u002F[entity] | [auth type] | List all for org |\n| POST | \u002F[entity] | [auth type] | Create |\n| GET | \u002F[entity]\u002F:id | [auth type] | Get by ID |\n| PATCH | \u002F[entity]\u002F:id | [auth type] | Update |\n| DELETE | \u002F[entity]\u002F:id | [auth type] | Soft delete |\n\nAuth\u002Froute type — state exactly one per endpoint, using the project's route\u002Fauth conventions (see project-context). Distinguish at minimum:\n\n- authenticated, tenant\u002Forg context required\n- authenticated, full user object resolved (for creates and auditable mutations)\n- public, no auth (only for genuinely public endpoints)\n\n### Request \u002F Response Shapes\n\n```typescript\n\u002F\u002F POST \u002F[entity]\ninterface Create[Entity]Body {\n  field: string;        \u002F\u002F required\n  optionalField?: string;\n}\n\ninterface [Entity]Response {\n  id: string;\n  field: string;\n  createdAt: string;\n}\n```\n\nAll TypeScript interfaces must be fully typed. No `any`.\n\n### Permissions\n\n| Role | List | Get | Create | Update | Delete |\n| --- | --- | --- | --- | --- | --- |\n| [role-1] | ✓ own org | ✓ own org | ✓ | ✓ own | ✗ |\n| [role-2] | ✓ assigned | ✓ assigned | ✗ | ✗ | ✗ |\n| [role-3] | ✓ org | ✓ org | ✓ | ✓ | ✓ |\n\nDerive role\u002Fpermission names from the project's permission source (see project-context) — never invent. Locate that source and enumerate the actual roles before filling this table.\n\n## Backend Implementation\n\n**API \u002F infra layer:** the project's API\u002Finfra definition (see the project-context workspace→path table) — state the exact file.\n\n**Application layer:** state the exact files this introduces, following the project's layering conventions (implementations, mappers, DTOs, or the project's equivalents), one per operation.\n\n**Handlers \u002F entry points:** the project's request entry points — thin, one per operation; state exact paths.\n\n**Permissions:** the project's permission source (see project-context) — list the exact permission keys to add.\n\n## Web UI\n\nOmit this section if not web-scoped.\n\n**Pages:**\n| Route | File | Description |\n| --- | --- | --- |\n| \u002F[domain] | src\u002Fpages\u002F[domain]\u002Findex.tsx | List view |\n| \u002F[domain]\u002F[id] | src\u002Fpages\u002F[domain]\u002F[id].tsx | Detail view |\n\n**Components:** the project's web component location (see project-context) — list names and responsibilities.\n\n**Data hooks:** the project's server-data fetching layer (per the web stack in project-context) — list the data hooks\u002Fqueries needed, one per operation.\n\n**State:** client state changes (per the project's web stack in project-context) — list which stores\u002Fslices change and why.\n\n**Route permissions:** the project's route-permission config (see project-context) — which roles can access which routes.\n\n## Mobile UI\n\nOmit this section if not mobile-scoped.\n\n**Screens:**\n| Route | File | Description |\n| --- | --- | --- |\n| \u002F(app)\u002F[domain] | app\u002F(app)\u002F[domain]\u002Findex.tsx | List screen |\n| \u002F(app)\u002F[domain]\u002F[id] | app\u002F(app)\u002F[domain]\u002F[id].tsx | Detail screen |\n\n**Online reads:** REST via the project's API client — same endpoints as Web UI.\n\n**Offline reads:** if the project uses offline sync (see project-context), state the read hook\u002Flocation and the data it exposes. Every offline read MUST apply a tenant\u002Forg-scoped filter so a device only ever sees its own tenant's data (e.g. a JOIN or WHERE constraint on the owning tenant\u002Forg id) — describe the exact scoping filter for this entity.\n\n**Offline writes:** if the project uses offline sync, list the offline write\u002Ftransaction builders needed (one per mutating operation) and state their location per the project's sync layer (see project-context).\n\n## Offline Sync\n\nOmit this section entirely if the project has no offline sync — see project-context.\n\nIf the project uses offline sync, the spec MUST cover:\n\n- **Which entities sync** — list every entity that must be available offline.\n- **Scoping \u002F tenant-isolation filter** — the rule that limits each device's synced data to its own tenant\u002Forg. State it explicitly per entity. Bucket\u002Fpartition scoping in the sync config alone is often insufficient — the read path must also enforce a tenant\u002Forg-scoped filter (see Offline reads above).\n- **Read hooks** — where offline reads live and what each exposes.\n- **Write hooks \u002F transaction builders** — list each one needed, what it uploads to, and which API endpoint it calls.\n\nDefine these using the project's offline-sync technology and config location (see project-context); state the exact files.\n\n## Design & Dev Notes\n\nOne-line N\u002FA when the story's Design and Dev Notes are both \"None\".\n\n| UI surface | Design row(s) | Match |\n| --- | --- | --- |\n| [page \u002F screen \u002F component] | docs\u002Fdesign\u002F[slug]\u002Frenders\u002F[page].png | [layout, states, copy to match; design-system tokens that replace mock values] |\n\n| Dev Note (verbatim) | Honoured by | Deviation |\n| --- | --- | --- |\n| [requester directive] | [spec section \u002F file] | none, or [reason] |\n\n## Reuse\n\nOne-line N\u002FA when the story has no component-plan rows (`${CLAUDE_PLUGIN_ROOT}\u002Frefs\u002Fcomponent-plan.md`). Copy the rows; add none.\n\n| Surface | Template | Component | Action | Story |\n| --- | --- | --- | --- | --- |\n| [visible surface] | [page template] | [bundle component] | reuse \u002F extend \u002F new | [library story key, or — for reuse] |\n\nA `new` row with no library story is an open question; the spec cannot be approved while it stays open.\n\n## Error Handling\n\n| Scenario | Behaviour | HTTP Status |\n| --- | --- | --- |\n| [Entity] not found | Return 404 | 404 |\n| Unauthorised role | Return 403 | 403 |\n| Validation failure | Return 400 with field errors | 400 |\n| [Domain-specific error] | [behaviour] | [status] |\n\n**Offline behaviour:** [what happens if user submits offline write while disconnected — does it queue, fail, or show an error?]\n\n## Out of Scope\n\n- [Thing that sounds related but is NOT in this spec]\n- [Future enhancement explicitly excluded]\n\n## Decisions\n\n[Every question the spec raised, settled with the user before approval — none left open]\n\n- **[Question]** — [answer]\n\n````\n\n---\n\n## Project-Specific Rules (resolve from project-context)\n\n### Entity rules\n- Choose the correct entity base class per the project's conventions (see project-context) — standalone vs tenant\u002Fproject-scoped — and state why.\n- Never say \"add a column\" — say \"add field to entity + generate migration\".\n- State the exact entity file using the project's entity\u002FORM layer (see the project-context workspace→path table).\n\n### Route \u002F auth rules\n- State the exact auth\u002Froute type per endpoint using the project's conventions (authenticated with tenant\u002Forg context; authenticated with full user object for creates and auditable mutations; public only when genuinely public).\n- Never leave a raw, unwrapped handler — always use the project's standard route\u002Fauth wrapper.\n\n### Offline sync rules (only if the project uses offline sync — see project-context)\n- Any entity visible offline **must** have an Offline Sync section.\n- Devices over-sync — partition\u002Fbucket scoping alone is NOT sufficient.\n- Every offline read must enforce a tenant\u002Forg-scoped filter (see Offline reads).\n- Never specify edits to a generated sync schema\u002Ftypes file — spec the sync-config\u002Frule change instead; the schema is regenerated by the project's typegen step.\n\n### Role names\nAlways derive from the project's permission source (see project-context) — never invent. Enumerate the actual roles before writing the Permissions table.\n\n---\n\n## Self-Review Checklist (run before saving)\n\n```text\ngate := [\n  no TBDs — every open question has a concrete answer OR a flagged decision with a suggested default,\n  every new endpoint has a row in the Permissions table,\n  every offline-synced entity has an Offline Sync section with an explicit tenant\u002Forg-scoped filter (only if the project uses offline sync),\n  entity relationships state exact cardinality (1:1, 1:N, M:N),\n  auth\u002Froute type stated for every endpoint, using the project's conventions,\n  all TypeScript interfaces fully typed — no `any`,\n  spec says WHAT to build — no HOW (no line-by-line implementation instructions), except a HOW a Dev Note dictates,\n  Web \u002F Mobile \u002F Offline Sync sections omitted if not applicable to this story,\n  every story Design row maps to a UI surface and every Dev Note has an Honoured-by or a Deviation reason,\n  entity base class choice stated and justified per the project's conventions\n]\nbefore saving -> every item in gate must hold\n```\n\n---\n\n## Anti-Patterns\n\n| Anti-pattern | Fix |\n|---|---|\n| \"Add a column to the table\" | \"Add field `x: string` to `[Entity]` entity + generate migration\" |\n| Inventing a role name | Check the project's permission source first (see project-context) |\n| Missing tenant\u002Forg-scoped filter in an offline read | Always enforce a tenant\u002Forg-scoped filter on every offline read |\n| Editing a generated sync schema\u002Ftypes file in the spec | Never — it's generated; spec the sync-config\u002Frule change instead |\n| `any` in TypeScript interfaces | Fully type every field |\n| TBD without a suggested default | Add \"Suggested default: X\" so impl can proceed |\n| Spec contains implementation code | Move to agent instructions, not spec |\n| Offline Sync section absent for an offline-synced entity | Add the section — the sync implementer needs it |\n| Hand-rolled parser\u002Fsanitiser\u002Fescaper for untrusted input | Name the maintained library; if none fits, record why under `## Decisions` |\n",{"name":5,"description":7},"main","11e05872bf276564fb9707228d58e47cd9e61411","plugins\u002Fsdlc\u002Fskills\u002Fwriting-specs",0,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai","https:\u002F\u002Fwithnightshift.com\u002F","https:\u002F\u002Fgithub.com\u002FwhimzyLive","Creator of @typedorm","2026-11-14 22:45:42",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add whimzyLive\u002Fnightshift-ai --skill writing-specs",{"tool":39,"command":40},"bunx","bunx skills add whimzyLive\u002Fnightshift-ai --skill writing-specs",{"tool":42,"command":43},"pnpm","pnpm dlx skills add whimzyLive\u002Fnightshift-ai --skill writing-specs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fplugins\u002Fsdlc\u002Fskills\u002Fwriting-specs\u002FSKILL.md",true,[],[48,56,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":55},"01M7BCEWYHDS1FWAJ6G4CD9P54","designing-in-patterns","Use when designing, planning or auditing UI against a component library — naming surfaces with the repo's pattern vocabulary, deciding reuse versus extend versus new, exploring compositions, or writing the reuse table (component-plan.md, a spec's `## Reuse`, a UI audit). Carries the design method; the repo's own vocabulary, bundle and board rules come from project-context and the designer override.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fplugins\u002Fsdlc\u002Fskills\u002Fdesigning-in-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M75MVN6GACAC87SV9RBPBMKH","typeorm","Use when defining TypeORM entities, writing migrations, or building repository\u002Fquery-builder code in TypeScript. Covers entity and relation decorators, the Data Mapper pattern, migrations, the query builder, transactions, and multi-database configuration.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Ftypeorm\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M75MTEZV8SAZNS20YDSB7KG2","hono-api","Use when building or extending REST APIs with Hono + @hono\u002Fzod-openapi. Covers schema-first route declaration with createRoute, feature-grouped composable routers, a class-based service layer behind interfaces, the strategy pattern for multi-event webhooks, typed request validation, and auto-generated OpenAPI docs.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Fhono-api\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M75MTB91SB6HPB3ZRT20F950","electrodb","Use when defining DynamoDB entities, modeling indexes, or writing queries\u002Fmutations with the ElectroDB ORM. Covers entity schema, access patterns, CRUD operations, update expressions, and single-table design patterns.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Felectrodb\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M75MT7KT9A3XYX38TX5MY6MA","atomic-design","Use when structuring or decomposing any frontend UI into reusable components, regardless of framework. Applies Brad Frost's atomic design methodology — atoms, molecules, organisms, templates, and pages — to guide consistent component hierarchy, naming, and composition decisions.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Fatomic-design\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M75MSTQ54EY0K29PKBF212K1","writing-docs","Use when writing, restructuring, or reviewing any prose documentation — a tutorial, how-to guide, reference page, or explanation\u002Fconceptual doc — for a public docs site (e.g. Mintlify MDX, docs\u002F, README material), a getting-started guide, an API\u002FCLI reference page, or a \"why we built it this way\" conceptual page. Applies the Diátaxis framework (see https:\u002F\u002Fdiataxis.fr\u002F) — every document belongs to exactly one of the four quadrants (tutorial \u002F how-to guide \u002F reference \u002F explanation), and mixing quadrants inside one document is the single most common documentation failure. Covers the four-quadrant compass for picking the right form, per-quadrant structure templates, an anti-pattern list for quadrant drift, and generic voice\u002Fcraft rules — repo-specific voice and target output format (e.g. Mintlify MDX) are resolved from the repo's docs-manifest (falling back to project-context), never hardcoded here.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fplugins\u002Fsdlc\u002Fskills\u002Fwriting-docs\u002FSKILL.md",[],[]]