showdar-skills 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +67 -18
  3. package/bin/showdar.js +96 -8
  4. package/package.json +1 -1
  5. package/profiles/full.json +1 -1
  6. package/profiles/insurance.json +1 -0
  7. package/router/conflicts.yaml +8 -0
  8. package/router/skill-map.yaml +9 -0
  9. package/router/triggers.yaml +4 -0
  10. package/skills/showdar-insurance-domain/SKILL.md +132 -0
  11. package/skills/showdar-insurance-domain/references/concepts.md +23 -0
  12. package/skills/showdar-insurance-domain/references/glossary.md +70 -0
  13. package/skills/showdar-insurance-domain/references/source-protocol.md +42 -0
  14. package/skills/showdar-insurance-review/SKILL.md +129 -0
  15. package/skills/showdar-insurance-review/references/concepts.md +23 -0
  16. package/skills/showdar-insurance-review/references/glossary.md +70 -0
  17. package/skills/showdar-insurance-review/references/review-qa.md +29 -0
  18. package/skills/showdar-insurance-review/references/source-protocol.md +42 -0
  19. package/skills/showdar-insurance-workflows/SKILL.md +130 -0
  20. package/skills/showdar-insurance-workflows/references/concepts.md +23 -0
  21. package/skills/showdar-insurance-workflows/references/glossary.md +70 -0
  22. package/skills/showdar-insurance-workflows/references/lifecycle.md +29 -0
  23. package/skills/showdar-insurance-workflows/references/source-protocol.md +42 -0
  24. package/src/capabilities.js +3 -0
  25. package/src/catalog.js +4 -1
  26. package/src/pack-compat.js +197 -0
  27. package/src/pack-inspect.js +88 -13
  28. package/src/pack-plan.js +623 -0
  29. package/src/pack-scaffold.js +66 -62
  30. package/src/pack-update.js +8 -202
  31. package/src/project.js +7 -2
  32. package/src/validate.js +2 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.11.0]
10
+
11
+ ### Added
12
+
13
+ - Add three independently installable insurance skills for insurer domain terminology, cross-line-of-business workflows, and terminology/API review, with Vietnamese–English–technical mappings and insurer/product-specific scoping.
14
+ - Add an insurance profile and route insurance-domain requests to the relevant skills without limiting the system to motor insurance or HDInsurance.
15
+
16
+ ## [0.10.0]
17
+
18
+ ### Added
19
+
20
+ - `showdar update-pack <path> --dry-run` read-only snapshot preview using the same canonical planning logic as execution; explicit public projection with deterministic ordering, descriptive change categories (`source-only`, `skill-content`, `workflow-definition`, `profile-definition`, `metadata`, `reference`, `ownership`, `installed-drift`), and `executable` status.
21
+ - Canonical internal pack update planning (`src/pack-plan.js`): `planPackUpdate()`, `verifyPlanPreconditions()`, `executePackUpdate()` with same-lifecycle TOCTOU fingerprint protection (source, installed owned files, relevant manifest state, overrides bytes). Stale plans abort with zero mutation.
22
+ - `showdar inspect-pack <path> --checkpoint <file>` checkpoint compatibility explanation against the candidate effective catalog (current project + candidate pack + project overrides). Deterministic semantic reason codes (`workflow-missing`, `workflow-state-compat-unsupported`, `stage-removed`, `selected-stage-invalid`, `required-stage-conflict`, `skip-policy-invalid`, `recorded-skip-invalid`) with fixed precedence; malformed checkpoints report `schema-invalid` / `malformed-checkpoint`.
23
+ - `showdar list --extensions --json` and `showdar doctor --extensions --json` using the common CLI envelope (`schemaVersion: 1`). Doctor reports `checkpointCompatibility: "not-assessed"` without a checkpoint. Diagnostics exit 0 on successful report.
24
+
25
+ ### Changed
26
+
27
+ - `src/pack-update.js` refactored around canonical planning; v0.9 staged replacement and rollback safety preserved.
28
+ - `list --extensions` human output now shows pack health status and pack profiles.
29
+ - `create-pack` skill scaffold cleaned up (full required sections, substantive guidance, no filler) with validation guidance output.
30
+ - TOCTOU lifecycle clarified: `--dry-run` is a read-only snapshot, not an authorization token. A later `update-pack` re-plans from current state. Stale-plan protection applies within a single execution lifecycle (`planPackUpdate` → `verifyPlanPreconditions` → `executePackUpdate`).
31
+
32
+ ### Fixed
33
+
34
+ - `inspectCustomWorkflows` read `validateCustomWorkflowDoc` as `{ok, errors}` but the validator returns an error array, so `valid` was always `undefined` and doctor reported every workflow invalid. Now maps `errors.length === 0` to `valid`. Internal helper shape only; public CLI output unchanged.
35
+ - `executePackUpdate` referenced undefined `manifestPath`; now resolves the project manifest path before writing. Covered by real update-path regression test.
36
+
37
+ ### Compatibility / Safety
38
+
39
+ - v0.9 `validate-pack --json` (`{ok, errors}`) and plain `inspect-pack --json` shapes unchanged; backward-compat fixture tests added.
40
+ - No persisted preview plans or tokens. No manifest v3, no workflow-state schema change, no WorkflowState key change.
41
+ - Phase 6G authority, 15 primitives, 4 workflows, 6 profiles, 10 trace events frozen.
42
+ - Dry-run is a snapshot, not a stored plan. No migration required. No tarball, remote registry, or executable plugins.
43
+
9
44
  ## [0.9.0]
10
45
 
11
46
  ### Added
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/showdar-skills?logo=npm)](https://www.npmjs.com/package/showdar-skills)
4
4
  [![Node >=20](https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
5
5
  [![MIT License](https://img.shields.io/badge/license-MIT-blue?logo=opensourceinitiative&logoColor=white)](./LICENSE)
6
- [![19 skills](https://img.shields.io/badge/skills-19-6f42c1)](#skill-catalog)
6
+ [![22 skills](https://img.shields.io/badge/skills-22-6f42c1)](#skill-catalog)
7
7
 
8
8
  Production-grade software engineering skills for coding agents. Showdar covers
9
9
  the full lifecycle—from requirements and planning through implementation, QA,
@@ -42,7 +42,7 @@ you want all capabilities available.
42
42
 
43
43
  ## Why Showdar?
44
44
 
45
- - **15 focused primitive skills** plus 4 adaptive workflow skills (19 installable) instead of one oversized agent prompt.
45
+ - **18 focused primitive skills** plus 4 adaptive workflow skills (22 installable), including an opt-in insurance domain profile.
46
46
  - **Lifecycle coverage** from product rules to implementation, verification,
47
47
  security, operations, release readiness, and Git completion.
48
48
  - **Intent-based discovery** that selects the workflow matching the request.
@@ -72,7 +72,7 @@ SKILL.md
72
72
  only when needed
73
73
  ```
74
74
 
75
- The 15 primitive skills are not eagerly loaded as full prompts. Lightweight
75
+ The 18 primitive skills are not eagerly loaded as full prompts. Lightweight
76
76
  descriptions help the agent choose one skill; that skill then loads its
77
77
  workflow and deeper knowledge progressively. Workflow skills add a portable
78
78
  orchestration layer: a workflow selects the lifecycle stages a task actually
@@ -95,7 +95,7 @@ agent/subagent, or MCP behavior across harnesses.
95
95
 
96
96
  ## Adapter model
97
97
 
98
- The portable core (15 primitives + 4 workflows) never changes per harness.
98
+ The portable core (18 primitives + 4 workflows) never changes per harness.
99
99
  A thin native adapter layer renders harness-specific entry surfaces only:
100
100
 
101
101
  ```text
@@ -135,8 +135,8 @@ the same canonical semantic body as the `AGENTS.md`/`CLAUDE.md` blocks.
135
135
  `/showdar/skill` is generated for OpenCode/Claude as generic
136
136
  installed-skill discovery. Commands are generated dynamically from the
137
137
  installed skill set: `minimal` yields 8 direct commands plus the generic
138
- entry; adding `feature` yields 9 plus generic. All 19 commands never exist
139
- unless all 19 skills are installed.
138
+ entry; adding `feature` yields 9 plus generic. All 22 commands never exist
139
+ unless all 22 skills are installed.
140
140
 
141
141
  ## Native install examples
142
142
 
@@ -226,7 +226,8 @@ skill, but still does not eagerly load every skill body.
226
226
  | `backend` | 14 | APIs, services, and runtime operations |
227
227
  | `qa` | 9 | Testing and quality workflows |
228
228
  | `product` | 6 | Product, requirements, and design work |
229
- | `full` | 15 | All primitive capabilities |
229
+ | `insurance` | 3 | Insurance terminology, business flows, and UI/API review |
230
+ | `full` | 18 | All primitive capabilities |
230
231
 
231
232
  Legacy aliases remain compatible:
232
233
 
@@ -239,7 +240,7 @@ New manifests store the canonical `developer` profile.
239
240
 
240
241
  ## Skill catalog
241
242
 
242
- All 15 primitive entries are first-class Showdar skills. Four workflow skills
243
+ All 18 primitive entries are first-class Showdar skills. Four workflow skills
243
244
  compose them; see [Workflow skills](#workflow-skills).
244
245
 
245
246
  ### Analysis and planning
@@ -274,6 +275,14 @@ compose them; see [Workflow skills](#workflow-skills).
274
275
  | `showdar-security` | Assessing threat models, attack surfaces, trust boundaries, auth/authz, secrets, exposure, or exploitability. |
275
276
  | `showdar-ops` | Inspecting or changing CI/CD, containers, environments, deployment, observability, rollback, or runtime operations. |
276
277
 
278
+ ### Insurance
279
+
280
+ | Skill | Use when |
281
+ | --- | --- |
282
+ | `showdar-insurance-domain` | Vietnamese insurer terminology, product taxonomy, coverage concepts, and VI/EN glossary. |
283
+ | `showdar-insurance-workflows` | Product configuration, underwriting, pricing, policy lifecycle, collection, or claims flows. |
284
+ | `showdar-insurance-review` | Reviewing insurer UI, domain/API mappings, validations, and QA scenarios. |
285
+
277
286
  ### Delivery and recovery
278
287
 
279
288
  | Skill | Use when |
@@ -547,11 +556,27 @@ showdar add feature
547
556
  showdar add bugfix --ai cursor
548
557
  showdar add release --scope global --ai claude
549
558
  showdar add incident
559
+ showdar add insurance-domain
560
+ showdar add insurance-workflows
561
+ showdar add insurance-review
562
+ showdar init --profile insurance
550
563
  ```
551
564
 
552
- Accepted names are the short form (`debug`, `feature`) or the canonical form
553
- (`showdar-debug`, `showdar-feature`). The release ships exactly 15 primitive
554
- skills plus 4 workflow skills (19 installable total); profiles install
565
+ After a Showdar Skills release containing these entries is published, upgrade the CLI
566
+ and add one insurance skill at a time from the insurer project:
567
+
568
+ ```bash
569
+ npm install -g showdar-skills@latest
570
+ showdar add insurance-domain --ai codex
571
+ ```
572
+
573
+ Use `showdar add insurance-workflows --ai codex` and
574
+ `showdar add insurance-review --ai codex` when those are needed. For a new project
575
+ that wants all three, `showdar init --profile insurance --ai codex` installs the set.
576
+
577
+ Accepted names are the short form (`debug`, `feature`, `insurance-domain`)
578
+ or the canonical form (`showdar-debug`, `showdar-feature`). The release ships exactly 18 primitive
579
+ skills plus 4 workflow skills (22 installable total); profiles install
555
580
  primitive sets only. There is no `showdar workflow ...` command. `showdar add`
556
581
  is idempotent, preserves the configured profile, supports `--ai`/`--scope`
557
582
  overrides, and refuses to overwrite a foreign same-name skill directory that
@@ -570,23 +595,47 @@ executable hooks, lifecycle scripts, or remote code.
570
595
  ```bash
571
596
  showdar create-pack <path> [--vendor <v>] [--description <text>] [--with-workflow <id>] [--with-profile <name>]
572
597
  showdar validate-pack <local-path> [--json]
573
- showdar inspect-pack <local-path> [--json]
598
+ showdar inspect-pack <local-path> [--json] [--checkpoint <file>]
574
599
  ```
575
600
 
576
601
  **Install & lifecycle**
577
602
 
578
603
  ```bash
579
604
  showdar add-pack <local-path>
580
- showdar list --extensions
605
+ showdar list --extensions [--json]
581
606
  showdar remove-pack <name>
582
- showdar update-pack <local-path>
607
+ showdar update-pack <local-path> [--dry-run] [--json]
583
608
  ```
584
609
 
585
610
  **Diagnostics**
586
611
 
587
612
  ```bash
588
- showdar doctor --extensions
589
- ```
613
+ showdar doctor --extensions [--json]
614
+ ```
615
+
616
+ `update-pack --dry-run` previews changes without mutation: file add/replace/remove
617
+ counts, descriptive change categories (`source-only`, `skill-content`,
618
+ `workflow-definition`, `profile-definition`, `metadata`, `reference`,
619
+ `ownership`, `installed-drift`), ownership conflicts, and whether the update is
620
+ currently executable. Categories are descriptive only and never claim checkpoint
621
+ compatibility. The preview is a read-only snapshot, not an authorization token:
622
+ a later `update-pack` re-plans from current state. Within a single update
623
+ execution, if source, installed files, manifest, or overrides change between
624
+ planning and applying that same plan, execution aborts as a stale plan with
625
+ zero mutation.
626
+
627
+ `inspect-pack --checkpoint` validates a workflow checkpoint against the candidate
628
+ effective catalog (current project state + candidate pack + project overrides) and
629
+ reports `compatible`, `workflow-incompatible` (with deterministic reason code and
630
+ `replanRequired`), or `malformed`. Malformed checkpoints report `schema-invalid` /
631
+ `malformed-checkpoint`, never `workflow-incompatible`.
632
+
633
+ `list --extensions --json` and `doctor --extensions --json` use the common CLI
634
+ envelope (`schemaVersion: 1`, `command`, `ok`, `data`, `warnings`, `errors`).
635
+ Existing `validate-pack --json` and plain `inspect-pack --json` shapes are
636
+ unchanged. `doctor` without a checkpoint reports `checkpointCompatibility:
637
+ "not-assessed"`. Diagnostics exit 0 when they successfully report state, even when
638
+ unhealthy; validation and execution failures exit 1.
590
639
 
591
640
  **Pack metadata**
592
641
 
@@ -617,7 +666,7 @@ Project overrides live in the user-owned `.showdar/overrides.json` file:
617
666
  skill descriptions, discovery hints, advisory guidance text, custom
618
667
  workflow policy refinement, and new project-owned profiles. Showdar reads
619
668
  and validates the file but never rewrites or deletes it; built-in
620
- workflow semantics and the six built-in profiles cannot be overridden.
669
+ workflow semantics and the seven built-in profiles cannot be overridden.
621
670
  Pack-local profiles select pack-owned skills and workflows only.
622
671
 
623
672
  Showdar computes a full-tree SHA-256 over the validated pack source at
@@ -722,7 +771,7 @@ showdar remove [--scope <project|global>]
722
771
  Main flags are `--ai`, `--profile`, and `--scope`. `--ai` accepts `universal`,
723
772
  `codex`, `opencode`, `cursor`, `claude`, or `all` for `init` (single targets
724
773
  for `add`). `--scope` accepts `project` or `global` and defaults to `project`;
725
- `--profile` accepts the six canonical profiles and the deprecated
774
+ `--profile` accepts the seven canonical profiles and the deprecated
726
775
  `mobile`/`web` aliases. Run `showdar --help` or a command's `--help` for
727
776
  current options.
728
777
 
package/bin/showdar.js CHANGED
@@ -4,7 +4,9 @@ import { homedir } from 'node:os';
4
4
  import { readFile } from 'node:fs/promises';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { AI_TARGETS, PRIMITIVE_COUNT, PROFILE_ALIASES, PROFILES, SKILLS, TOTAL_COUNT, WORKFLOW_COUNT, canonicalProfile, isDeprecatedProfile, resolveProfile } from '../src/catalog.js';
7
- import { addPack, addSkill, addWorkflow, globalManifestPath, initGlobal, initProject, inspectGlobal, inspectProject, listExtensions, removeGlobal, removePack, removeProject, validatePackSource, createPack, inspectPack, doctor, updatePack, readProjectOverrides } from '../src/project.js';
7
+ import { addPack, addSkill, addWorkflow, globalManifestPath, initGlobal, initProject, inspectGlobal, inspectProject, listExtensions, listExtensionsDetailed, removeGlobal, removePack, removeProject, validatePackSource, createPack, inspectPack, doctor, updatePack, readProjectOverrides } from '../src/project.js';
8
+ import { formatPlanPreviewHuman, projectPackUpdatePreview } from '../src/pack-plan.js';
9
+ import { assessCheckpointAgainstCandidate } from '../src/pack-inspect.js';
8
10
  import { validateRepository } from '../src/validate.js';
9
11
 
10
12
  const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
@@ -43,7 +45,7 @@ function printHelp(version, command = null) {
43
45
  console.log(`Showdar Skills ${version}\n\nUsage:\n showdar add <skill> [--ai <universal|codex|opencode|cursor|claude>] [--scope <project|global>]\n\nExamples:\n showdar add debug\n showdar add showdar-security\n showdar add test --ai cursor\n showdar add review --scope global --ai claude\n\nDefault scope: project. Default AI target: universal, or the configured .showdar.json value when present.`);
44
46
  return;
45
47
  }
46
- console.log(`Showdar Skills ${version}\n\nUsage:\n showdar init ${scopeUsage} [--profile <name>] [--ai <universal|codex|opencode|cursor|claude|all>] [--pack <local-path>]\n showdar add <skill> [--ai <universal|codex|opencode|cursor|claude>] [--scope <project|global>]\n showdar add-pack <local-path>\n showdar remove-pack <name>\n showdar add-workflow <local-path>\n showdar status ${scopeUsage}\n showdar doctor ${scopeUsage}\n showdar validate\n showdar list [--extensions]\n showdar remove ${scopeUsage}\n showdar create-pack <path> [--vendor <vendor>] [--description <text>] [--with-workflow <id>] [--with-profile <name>]\n showdar validate-pack <local-path> [--json]\n showdar inspect-pack <local-path> [--json]\n showdar doctor ${scopeUsage}\n showdar update-pack <local-path>\n showdar validate\n showdar list [--extensions]\n showdar remove ${scopeUsage}\n\nExtension packs accept local directories/workspace paths only; tarball, URL, Git, and registry sources are rejected.\n\nDefaults: scope project, profile full, AI target universal.\nProfiles: ${Object.keys(PROFILES).join(', ')}\nDeprecated aliases: ${Object.entries(PROFILE_ALIASES).map(([alias, target]) => `${alias} -> ${target}`).join(', ')}\nAI targets: ${AI_TARGETS.join(', ')}`);
48
+ console.log(`Showdar Skills ${version}\n\nUsage:\n showdar init ${scopeUsage} [--profile <name>] [--ai <universal|codex|opencode|cursor|claude|all>] [--pack <local-path>]\n showdar add <skill> [--ai <universal|codex|opencode|cursor|claude>] [--scope <project|global>]\n showdar add-pack <local-path>\n showdar remove-pack <name>\n showdar add-workflow <local-path>\n showdar status ${scopeUsage}\n showdar doctor ${scopeUsage}\n showdar validate\n showdar list [--extensions]\n showdar remove ${scopeUsage}\n showdar create-pack <path> [--vendor <vendor>] [--description <text>] [--with-workflow <id>] [--with-profile <name>]\n showdar validate-pack <local-path> [--json]\n showdar inspect-pack <local-path> [--json] [--checkpoint <file>]\n showdar doctor ${scopeUsage} [--extensions] [--json]\n showdar update-pack <local-path> [--dry-run] [--json]\n showdar validate\n showdar list [--extensions] [--json]\n showdar remove ${scopeUsage}\n\nExtension packs accept local directories/workspace paths only; tarball, URL, Git, and registry sources are rejected.\n\nDefaults: scope project, profile full, AI target universal.\nProfiles: ${Object.keys(PROFILES).join(', ')}\nDeprecated aliases: ${Object.entries(PROFILE_ALIASES).map(([alias, target]) => `${alias} -> ${target}`).join(', ')}\nAI targets: ${AI_TARGETS.join(', ')}`);
47
49
  }
48
50
 
49
51
  async function main() {
@@ -63,11 +65,20 @@ async function main() {
63
65
 
64
66
  if (command === 'list') {
65
67
  if (args.includes('--extensions')) {
66
- const result = await listExtensions({ cwd: projectRoot });
68
+ const isJson = args.includes('--json');
69
+ const result = await listExtensionsDetailed({ cwd: projectRoot });
70
+ if (isJson) {
71
+ console.log(JSON.stringify({ schemaVersion: 1, command: 'list', ok: true, data: result, warnings: [], errors: [] }, null, 2));
72
+ return;
73
+ }
67
74
  console.log('Packs:');
68
- for (const pack of result.packs) console.log(` ${pack.name}@${pack.version} ${pack.hash}`);
75
+ for (const pack of result.packs) console.log(` ${pack.name}@${pack.version} ${pack.status ?? 'healthy'} ${pack.hash}`);
69
76
  console.log('Custom workflows:');
70
77
  for (const workflow of result.customWorkflows) console.log(` ${workflow.id} [${workflow.source}] ${workflow.path}`);
78
+ if (result.profiles?.length) {
79
+ console.log('Pack profiles:');
80
+ for (const profile of result.profiles) console.log(` ${profile.name} [${profile.source}] members: ${(profile.members ?? []).join(', ')}`);
81
+ }
71
82
  console.log(`Project overrides: ${result.overrides.present ? result.overrides.status : 'absent'}`);
72
83
  return;
73
84
  }
@@ -140,6 +151,31 @@ async function main() {
140
151
  }
141
152
 
142
153
  if (command === 'status' || command === 'doctor') {
154
+ if (command === 'doctor' && args.includes('--extensions')) {
155
+ const isJson = args.includes('--json');
156
+ const result = await doctor({ cwd: projectRoot });
157
+ if (isJson) {
158
+ console.log(JSON.stringify({
159
+ schemaVersion: 1,
160
+ command: 'doctor',
161
+ ok: true,
162
+ data: { ...result, checkpointCompatibility: 'not-assessed' },
163
+ warnings: result.warnings ?? [],
164
+ errors: [],
165
+ }, null, 2));
166
+ return;
167
+ }
168
+ console.log(`Extension diagnostics\nHealth: ${result.healthy ? 'OK' : 'BROKEN'}`);
169
+ for (const pack of result.packs) console.log(` ${pack.name}@${pack.version} ${pack.drift}`);
170
+ for (const wf of result.customWorkflows) console.log(` workflow ${wf.id}: ${wf.valid ? 'valid' : 'invalid'}`);
171
+ for (const issue of result.issues) console.log(`- ${issue}`);
172
+ for (const warning of result.warnings ?? []) console.log(`warning: ${warning}`);
173
+ if (!result.healthy) {
174
+ console.log(`Checkpoint compatibility: not-assessed (supply a checkpoint via inspect-pack --checkpoint)`);
175
+ if (result.customWorkflows.length) console.log(`Note: checkpoints referencing changed workflow definitions will be revalidated on resume.`);
176
+ }
177
+ return;
178
+ }
143
179
  const result = scope === 'global' ? await inspectGlobal() : await inspectProject(projectRoot);
144
180
  if (!result.installed) {
145
181
  console.log(`Showdar Skills is not installed in the ${scope} scope.`);
@@ -213,8 +249,31 @@ async function main() {
213
249
 
214
250
  if (command === 'inspect-pack') {
215
251
  const packPath = args[1];
216
- if (!packPath) throw new Error('Pack path is required. Usage: showdar inspect-pack <local-path> [--json]');
252
+ if (!packPath) throw new Error('Pack path is required. Usage: showdar inspect-pack <local-path> [--json] [--checkpoint <file>]');
217
253
  const isJson = args.includes('--json');
254
+ const checkpointIdx = args.indexOf('--checkpoint');
255
+ const checkpointFile = checkpointIdx === -1 ? null : args[checkpointIdx + 1];
256
+ if (checkpointIdx !== -1 && (!checkpointFile || checkpointFile.startsWith('--'))) {
257
+ throw new Error('--checkpoint requires a file path');
258
+ }
259
+ if (checkpointFile) {
260
+ const { readFile } = await import('node:fs/promises');
261
+ const checkpoint = await readFile(path.resolve(projectRoot, checkpointFile), 'utf8');
262
+ const assessment = await assessCheckpointAgainstCandidate({ cwd: projectRoot, candidatePath: path.resolve(projectRoot, packPath), checkpoint });
263
+ if (isJson) {
264
+ console.log(JSON.stringify({ schemaVersion: 1, command: 'inspect-pack', ok: true, data: { checkpoint: assessment }, warnings: [], errors: [] }, null, 2));
265
+ return;
266
+ }
267
+ if (assessment.compatible) {
268
+ console.log(`Checkpoint compatibility: compatible\nReplan required: no`);
269
+ return;
270
+ }
271
+ console.log(`Checkpoint compatibility: ${assessment.category === 'schema-invalid' ? 'malformed' : 'workflow-incompatible'}\nReplan required: ${assessment.replanRequired ? 'yes' : 'no'}\nCategory: ${assessment.category}\nReason: ${assessment.reason}\nDetail: ${assessment.detail}`);
272
+ if (assessment.affectedWorkflow) console.log(`Affected workflow: ${assessment.affectedWorkflow}`);
273
+ if (assessment.affectedStage) console.log(`Affected stage: ${assessment.affectedStage}`);
274
+ console.log(`\nRun \`showdar update-pack <path> --dry-run\` to preview update.`);
275
+ return;
276
+ }
218
277
  const result = await inspectPack({ cwd: projectRoot, source: packPath });
219
278
  if (isJson) {
220
279
  console.log(JSON.stringify(result, null, 2));
@@ -246,9 +305,38 @@ async function main() {
246
305
 
247
306
  if (command === 'update-pack') {
248
307
  const packSource = args[1];
249
- if (!packSource) throw new Error('Pack source is required. Usage: showdar update-pack <local-path>');
250
- const result = await updatePack({ cwd: projectRoot, source: packSource });
251
- console.log(`Showdar pack ${result.status}.\nPack: ${result.pack}\nVersion: ${result.version}${result.oldHash ? `\nOld hash: ${result.oldHash}\nNew hash: ${result.newHash}` : ''}\nFiles: ${result.files}`);
308
+ if (!packSource) throw new Error('Pack source is required. Usage: showdar update-pack <local-path> [--dry-run] [--json]');
309
+ const dryRun = args.includes('--dry-run');
310
+ const isJson = args.includes('--json');
311
+ if (dryRun) {
312
+ const { planPackUpdate } = await import('../src/pack-plan.js');
313
+ const plan = await planPackUpdate({ cwd: projectRoot, source: packSource });
314
+ if (isJson) {
315
+ console.log(JSON.stringify(projectPackUpdatePreview(plan), null, 2));
316
+ if (!plan.ok || !plan.executable) process.exitCode = 1;
317
+ return;
318
+ }
319
+ console.log(formatPlanPreviewHuman(plan));
320
+ if (!plan.ok || !plan.executable) process.exitCode = 1;
321
+ return;
322
+ }
323
+ if (isJson) {
324
+ try {
325
+ const result = await updatePack({ cwd: projectRoot, source: packSource });
326
+ console.log(JSON.stringify({ schemaVersion: 1, command: 'update-pack', ok: true, data: result, warnings: result.plan?.warnings ?? [], errors: [] }, null, 2));
327
+ } catch (error) {
328
+ console.log(JSON.stringify({ schemaVersion: 1, command: 'update-pack', ok: false, data: null, warnings: [], errors: [{ category: 'drift-detected', code: 'DRIFT_DETECTED', message: error.message }] }, null, 2));
329
+ process.exitCode = 1;
330
+ }
331
+ return;
332
+ }
333
+ try {
334
+ const result = await updatePack({ cwd: projectRoot, source: packSource });
335
+ console.log(`Showdar pack ${result.status}.\nPack: ${result.pack}\nVersion: ${result.version}${result.oldHash ? `\nOld hash: ${result.oldHash}\nNew hash: ${result.newHash}` : ''}\nFiles: ${result.files}`);
336
+ } catch (error) {
337
+ console.error(`showdar: ${error.message}`);
338
+ process.exitCode = 1;
339
+ }
252
340
  return;
253
341
  }
254
342
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "showdar-skills",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Production-grade software engineering lifecycle skills for coding agents.",
5
5
  "type": "module",
6
6
  "bin": { "showdar": "./bin/showdar.js" },
@@ -1 +1 @@
1
- {"skills":["showdar-understand","showdar-plan","showdar-design","showdar-build","showdar-debug","showdar-test","showdar-review","showdar-upgrade","showdar-ship","showdar-recover","showdar-git","showdar-requirements","showdar-quality","showdar-security","showdar-ops"]}
1
+ {"skills":["showdar-understand","showdar-plan","showdar-design","showdar-build","showdar-debug","showdar-test","showdar-review","showdar-upgrade","showdar-ship","showdar-recover","showdar-git","showdar-requirements","showdar-quality","showdar-security","showdar-ops","showdar-insurance-domain","showdar-insurance-workflows","showdar-insurance-review"]}
@@ -0,0 +1 @@
1
+ {"skills":["showdar-insurance-domain","showdar-insurance-workflows","showdar-insurance-review"]}
@@ -48,3 +48,11 @@ overlap_matrix:
48
48
  boundary: quality plans scenario coverage and confidence; ship decides whether release or handoff evidence is sufficient
49
49
  - pair: showdar-upgrade vs showdar-build
50
50
  boundary: upgrade changes dependency or platform compatibility; build changes application behavior within the supported stack
51
+ - pair: showdar-insurance-domain vs showdar-insurance-workflows
52
+ boundary: insurance-domain resolves terminology and concept mappings; insurance-workflows analyzes scoped business transitions and rules
53
+ - pair: showdar-insurance-workflows vs showdar-insurance-review
54
+ boundary: insurance-workflows derives sourced flows and rules; insurance-review checks concrete UI, model, API, and QA mappings against that evidence
55
+ - pair: showdar-insurance-workflows vs showdar-requirements
56
+ boundary: insurance-workflows applies insurance concepts to a scoped flow; showdar-requirements owns cross-domain requirement readiness and unresolved stakeholder decisions
57
+ - pair: showdar-insurance-review vs showdar-review
58
+ boundary: insurance-review checks business terminology and data mappings; showdar-review checks implementation correctness and maintainability
@@ -52,3 +52,12 @@ routes:
52
52
  ops:
53
53
  triggers: ["CI/CD", "GitHub Actions", "Docker", "container", "deployment", "deploy", "observability", "rollback", "runtime operations", "staging"]
54
54
  skill: showdar-ops
55
+ insurance-domain:
56
+ triggers: ["insurance terminology", "insurance glossary", "bảo hiểm", "thuật ngữ bảo hiểm", "taxonomy bảo hiểm", "line of business", "coverage term", "sum insured meaning"]
57
+ skill: showdar-insurance-domain
58
+ insurance-workflows:
59
+ triggers: ["insurance business flow", "underwriting", "insurance pricing", "premium rating", "policy issuance", "insurance claim flow", "endorsement flow", "renewal flow", "bồi thường", "thẩm định bảo hiểm", "flow thu phí"]
60
+ skill: showdar-insurance-workflows
61
+ insurance-review:
62
+ triggers: ["insurer API mapping", "insurance UI terminology", "review insurance schema", "insurance QA scenarios", "sub-limit mapping", "coverage validation", "mapping UI API bảo hiểm"]
63
+ skill: showdar-insurance-review
@@ -25,6 +25,10 @@ rules:
25
25
  - local Git commit, staging, branch, merge, rebase, conflict, cleanup, and explicit push intent routes to showdar-git
26
26
  - explicit rebase, cherry-pick, merge, or Git conflict operations route to showdar-git; interrupted implementation recovery routes to showdar-recover
27
27
  - product or business input, missing requirements, business rules, user stories, use cases, acceptance criteria, and requirement readiness route to showdar-requirements
28
+ - glossary, taxonomy, aliases, and VI/EN insurance concepts route to showdar-insurance-domain
29
+ - product configuration, underwriting, rating, quote, issuance, collection, endorsement, renewal, cancellation, and claims flows route to showdar-insurance-workflows
30
+ - concrete insurer UI/domain/API mapping, terminology review, and insurance QA cases route to showdar-insurance-review
31
+ - generic requirements and QA requests retain their existing routes unless insurance-specific evidence mapping is the task
28
32
  - QA scenarios, risk-based coverage, regression scope, compatibility matrices, exploratory checks, and bug-report quality route to showdar-quality
29
33
  - explicit security, authz, secrets, exposure, attack-surface, threat, or exploitability intent routes to showdar-security before general review
30
34
  - operational CI/CD, container, environment, deployment, observability, rollback, or runtime intent routes to showdar-ops; release readiness remains showdar-ship and Git-only work remains showdar-git
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: showdar-insurance-domain
3
+ description: Use when Vietnamese insurer work involves insurance terminology, product taxonomy, coverage concepts, VI/EN glossary, or insurer/product-specific vocabulary.
4
+ ---
5
+
6
+
7
+ # Insurance domain
8
+
9
+ ## Purpose
10
+
11
+ Reason in insurance business language and preserve exact
12
+ mappings to implementation identifiers. This is a multi-line
13
+ insurer domain: motor, health, accident, travel, property,
14
+ cargo, engineering, liability, personal insurance and other
15
+ supported products. HDInsurance/HDI or motor examples never
16
+ establish the whole system's scope. Do not assume modules
17
+ already exist.
18
+
19
+ ## Sources and scope
20
+
21
+ Read [source protocol](references/source-protocol.md) for every
22
+ domain task. Read [glossary](references/glossary.md) for
23
+ terminology and [concepts](references/concepts.md) for
24
+ relationships/taxonomy. Load only relevant sections.
25
+
26
+ For each term, keep five layers separate: industry meaning,
27
+ insurer alias, product/version meaning, UI label, exact
28
+ technical/API identifier. A likely translation is a candidate,
29
+ not an approved insurer term. `planCode` alone does not
30
+ establish whether its meaning is a gói, chương trình, phương án
31
+ or technical grouping.
32
+
33
+ Keep VI accents; prefer language used by insurer operations.
34
+ Preserve an insurer's approved wording within its scope and
35
+ record aliases instead of overwriting a shared term. Do not
36
+ translate JSON keys, enums or identifiers. Avoid literal
37
+ translations such as policy → “chính sách” or premium → “cao
38
+ cấp”. Do not equate application, quote, contract and
39
+ certificate.
40
+
41
+ ## Workflow
42
+
43
+ 1. Identify the requested module and known market, insurer, product, product version and API version. Unknown scope stays explicit; ask only for missing context that changes the answer.
44
+ 2. Extract exact terms and source locations from supplied glossary, wording, BA/spec, SOP, API/schema, screenshots and sample data.
45
+ 3. Match by meaning, not spelling. Explain distinctions and relationships before suggesting labels or mappings. Label observed code behavior separately from business requirements.
46
+ 4. Record conflicts and ask for verification of the affected interpretation. Continue independent analysis; do not choose the newer document, more convenient term or API name as business authority.
47
+
48
+ ## Term resolution
49
+
50
+ - Use the legal Vietnamese term for statutory roles and concepts when the applicable
51
+ legal source defines it. Label its EN rendering as a working
52
+ translation unless a bilingual authority confirms the English
53
+ term.
54
+ - Use wording, schedule and endorsements to interpret product coverage and exclusions.
55
+ Keep the exact product/version and effective scope with each
56
+ term.
57
+ - Use the insurer glossary and SOP for approved operator vocabulary. Preserve a
58
+ differing local alias alongside the normalized domain concept.
59
+ - Use API contracts for wire spelling, enum values, types and null behavior. Do not
60
+ silently promote technical names to product names or visible UI
61
+ labels.
62
+ - Use observed screens and implementation to report what exists. Keep observations
63
+ distinct from approved or requested behavior.
64
+ - When one displayed label maps to several API values, or an API value has several
65
+ product-specific meanings, show the conditional mapping instead
66
+ of flattening it.
67
+ - When sources conflict, preserve both meanings, source versions and the affected
68
+ decision. Ask which source governs that scope.
69
+
70
+ ## Output contract
71
+
72
+ Produce only the requested scope. A glossary/mapping uses:
73
+
74
+ | VI term | EN term | Meaning/distinction | Insurer/product alias | UI label | API path/type/enum | Scope | Source/location | Evidence status |
75
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
76
+
77
+ Use `unknown` for missing API mappings and `candidate` for
78
+ unapproved labels. Add relationships and unresolved conflicts
79
+ when relevant. Do not generate invented identifiers to fill the
80
+ table.
81
+
82
+ ## Example
83
+
84
+ Example: a sample `planCode: "A"` proves only that the sample
85
+ contains that field/value. Report its business meaning and UI
86
+ label as unresolved until a glossary, contract or BA definition
87
+ establishes them.
88
+
89
+ ## When to use
90
+ Analyze insurer terminology, taxonomy, business concepts or
91
+ glossary mappings across any supported line of business.
92
+ ## When not to use
93
+ For state transitions or rule derivation use
94
+ `showdar-insurance-workflows`; for implementation/UI QA use
95
+ `showdar-insurance-review`.
96
+ ## Inputs and assumptions
97
+ Use supplied glossary, BA/spec, wording, SOP, API/schema and
98
+ scoped samples. No insurer-specific source is bundled.
99
+ ## Non-negotiable rules
100
+ Keep source, scope and evidence status attached to each mapping.
101
+ A seed translation is not an approved UI label.
102
+ ## Decision points
103
+ Exact approved mapping available: preserve it. Meaning
104
+ uncertain: keep mapping unknown. Conflicting definitions: report
105
+ both.
106
+ ## Stack detection
107
+ Identify actual models and API versions only when mapping to
108
+ implementation. Framework choice cannot define insurance
109
+ meaning.
110
+ ## Failure modes
111
+ Same word can refer to different concepts across products.
112
+ Apparent synonyms can hide different monetary or legal effects.
113
+ ## Stop conditions
114
+ Do not finalize a mapping that would change money, coverage,
115
+ party role or contractual meaning without evidence.
116
+ ## Escalation conditions
117
+ Ask for the applicable glossary or business-owner verification
118
+ when context cannot distinguish competing meanings.
119
+ ## Verification
120
+ Check that each mapping distinguishes legal taxonomy from
121
+ catalog grouping. Check that health, personal insurance and
122
+ non-life are not collapsed by analogy. Verify an alias is
123
+ recorded with its insurer and applicable product/version. Keep
124
+ source-backed wording separate from proposed operator-facing
125
+ wording. Check every asserted API identifier against the
126
+ contract; every insurer alias against its scoped source. Check
127
+ translations preserve the distinctions in the relevant concepts
128
+ reference.
129
+ ## Anti-patterns
130
+ Guessing a gói from planCode, rewriting API enums into
131
+ Vietnamese, or treating an insurer sample as an industry
132
+ standard.
@@ -0,0 +1,23 @@
1
+ # Relationships and taxonomy
2
+
3
+ This is a conceptual checklist, not a prescribed database schema or cardinality.
4
+
5
+ ## Product structure
6
+
7
+ Keep statutory insurance type, insurer LOB/sub-LOB, product, product version, plan/package, coverage/benefit and risk object separate. An insurer catalog may group health, accident or travel differently from legal categories. “Con người” is a broad business grouping, not proof of a single statutory type. Motor, health, accident, travel, property, cargo, engineering and liability are examples, not a closed enum or mandated hierarchy.
8
+
9
+ Resolve membership, cardinality and identifiers from supplied taxonomy. One product can combine risks/benefits; a plan can select or configure coverage; each relation is a hypothesis until established by product/schema sources. Product publication does not establish that a particular risk is eligible.
10
+
11
+ ## Contract structure
12
+
13
+ Distinguish buyer, insured, beneficiary, payer, intermediary and insurer. They can coincide in particular cases but must not be merged by default. Identify insured objects, coverage selections, limits, exclusions, deductible mechanisms, effective period, territory and conditions. Keep quote, application/proposal, underwriting decision, contract, issued documents and payments conceptually separate even if the implementation combines them.
14
+
15
+ ## Money and risk
16
+
17
+ Eligibility answers whether participation criteria are met; underwriting assesses acceptance and terms. Sum insured, insured value, liability/benefit limit and sub-limit are different concepts. A monetary limit needs currency, unit, insured subject, coverage, event/claim/period basis and aggregation/reset rules where applicable. Deductible may have fixed/percentage/minimum and per-event bases; do not invent their combination. Benefit products need not use an actual-loss indemnity calculation.
18
+
19
+ ## Version and status
20
+
21
+ Separate product availability/publication, rate-table validity, quote status, application status, underwriting status, policy lifecycle, payment status, document generation and claim status. Preserve actual enum mappings. Never equate `ISSUED` with paid, in force or document delivered without source.
22
+
23
+ Use product/rate/wording/API versions and applicable dates when tracing historical contracts. Determine whether a transaction snapshots terms or resolves them dynamically; neither is prescribed here. Renewal and endorsement may select different versions only under documented rules. Concurrent configuration changes require an explicit interpretation and test oracle.