@solaqua/ghosts 0.4.12 → 0.4.13

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.
package/README.md CHANGED
@@ -25,7 +25,7 @@ flowchart TD
25
25
  ```
26
26
 
27
27
  When I want to understand a change, I use `pr-tour` to follow the real diff or
28
- `explain-diff` for a visual lesson. `eli5` explains unfamiliar topics, and
28
+ `explain-diff` for public-interface changes and usage examples, optionally as a visual lesson. `eli5` explains unfamiliar topics, and
29
29
  `cram` turns study material into a quiz.
30
30
 
31
31
  ## Install
@@ -57,7 +57,7 @@ For installation selectors, use the source path, such as `--include skills/code-
57
57
  | [code-review](engineering/skills/code-review/SKILL.md) | Review correctness, downstream contracts, design, and complexity; verify material safety assumptions without editing the change. |
58
58
  | [test-review](engineering/skills/test-review/SKILL.md) | Find missing test protection and tests that cost more than they protect. |
59
59
  | [deep-module](engineering/skills/deep-module/SKILL.md) | Check whether a module hides complexity behind a simple interface. |
60
- | [create-verification-skill](engineering/skills/create-verification-skill/SKILL.md) | Create and exercise a project-local skill for real user journeys. |
60
+ | [verify-journeys](engineering/skills/verify-journeys/SKILL.md) | Verify real user journeys and report observable outcomes, evidence, and coverage gaps. |
61
61
  | [benchmark-checklist](engineering/skills/benchmark-checklist/SKILL.md) | Check performance claims for equivalent work, experimental control, and repeatability. |
62
62
  | [slop-shaking](engineering/skills/slop-shaking/SKILL.md) | Remove unnecessary code, content, structure, and UI elements. |
63
63
  | [grill-me](engineering/skills/grill-me/SKILL.md) | Stress-test a plan or idea through focused questions. |
@@ -67,7 +67,7 @@ For installation selectors, use the source path, such as `--include skills/code-
67
67
  | [github-issue](engineering/skills/github-issue/SKILL.md) | Create or update GitHub issues, sub-issues, and dependencies. |
68
68
  | [github-pr](engineering/skills/github-pr/SKILL.md) | Commit and push changes, then create or update their pull request. |
69
69
  | [stack-pr](engineering/skills/stack-pr/SKILL.md) | Implement GitHub issues in parallel and build stacked PRs in dependency order. |
70
- | [explain-diff](engineering/skills/explain-diff/SKILL.md) | Turn a complete code change into a visual HTML lesson with examples and a quiz. |
70
+ | [explain-diff](engineering/skills/explain-diff/SKILL.md) | Explain public-interface changes read-only with before/after usage examples, compatibility impact, and optional visual HTML lessons. |
71
71
  | [write-adr](engineering/skills/write-adr/SKILL.md) | Record an engineering decision, its context, and its rationale. |
72
72
  | [write-glossary](engineering/skills/write-glossary/SKILL.md) | Define project terms and establish a shared vocabulary in `GLOSSARY.md`. |
73
73
 
@@ -3,9 +3,11 @@ name: ghosts:code-review
3
3
  description: Use only when the user explicitly requests a code review or invokes this skill. Do not trigger for implementation, debugging, refactoring, or routine verification requests. Performs a broad, read-only code review using general agents and complete result synthesis.
4
4
  ---
5
5
 
6
- Review the change read-only. Use general agents; give each the change context and the prompt below, keeping only its assigned questions. Do not add roles, review commands, or extra prompts.
6
+ Review the change read-only. Use two general subagents by default. Give each the change context and the prompt below, keeping only its assigned questions. Do not add roles, review commands, or extra prompts.
7
7
 
8
- Consider every question below. Mark irrelevant questions `N/A — <reason>`. The main agent answers each applicable question. Assign applicable questions once across one, two, or three agents without overlap.
8
+ Before assigning questions, the main agent identifies the key assumptions the change depends on and the affected boundaries, then uses them to guide its own verification in proportion to risk.
9
+
10
+ Consider every question below. Mark irrelevant questions `N/A — <reason>`. The main agent answers each applicable question. Assign applicable questions once across the selected subagents without overlap.
9
11
 
10
12
  ```text
11
13
  Review the change read-only:
@@ -26,6 +28,7 @@ Report findings with locations, evidence, and the smallest useful fix. Say when
26
28
  After all agents respond and before synthesizing the final findings, triage every candidate point through this question: `Does this feedback identify a real, evidenced, material issue, or would addressing it add unnecessary complexity, flag a nonexistent or unsupported bug, or provide little value?` Judge the feedback itself, not only whether another agent made the same point. Do not omit any candidate point. Assign `P0`, `P1`, `P2`, or `P3` when it is actionable; assign `SKIP` only as a priority label when it is false, unsupported, duplicate, contradicted, out of scope, or not worth acting on. `SKIP` never means remove the item: every candidate must remain in `Findings` with its priority and the reason for that judgment. Do not leave skipped candidates only in `Reviewer Results`.
27
29
 
28
30
  - Write in the user's language.
31
+ - The main agent assesses finding validity and review coverage separately; close material coverage gaps before concluding, or state what remains unverified and why. Absence of findings is not evidence of sufficient coverage.
29
32
  - If a GitHub URL is supplied, use a bare, commit-pinned `blob` permalink with the smallest relevant line range in each `Location`.
30
33
  - Otherwise, use repository-relative paths.
31
34
  - `P0` is release-blocking, `P1` major, `P2` actionable, and `P3` low-priority.
@@ -45,6 +48,7 @@ After all agents respond and before synthesizing the final findings, triage ever
45
48
 
46
49
  - Agents used: `<n>`
47
50
  - Verdict: `no blocking findings|findings require attention|manual review still required`
51
+ - Coverage: <key assumptions and affected boundaries checked, evidence, and material gaps or limitations>
48
52
 
49
53
  ## Reviewer Results
50
54
 
@@ -1,24 +1,31 @@
1
1
  ---
2
2
  name: ghosts:explain-diff
3
- description: Explain a complete code change, diff, branch, or PR as a visual, novice-first HTML lesson with large diagrams, few words, concrete examples, and an interactive quiz.
3
+ description: Explain a PR, diff, branch, or code change read-only through public-interface behavior, before/after usage examples, and compatibility impact, in the style of release notes; optionally create a visual HTML lesson.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
- Make the explanation visual-first. Explain like I'm someone who knows nothing about this topic, using an HTML artifact with big pictures and few words. Create one self-contained lesson for the complete target change; prose should label, orient, or clarify the visuals, not replace them. Tell one small visual story instead of dumping code line by line. If the target is missing, ask before acting. Do not invent behavior; distinguish observed facts, inferences, and unknowns.
7
+ Explain the change like release notes for someone who uses the affected interfaces. Keep the target read-only: do not modify repository files, execute target code, or publish release notes, PR edits, or comments. Write in the user's language; default to Markdown, with a visual HTML lesson or quiz when requested.
8
8
 
9
- ## Scope and content
9
+ ## Scope
10
10
 
11
- - Inspect the complete diff, every commit in the target branch or PR, and enough surrounding code to explain the change.
12
- - Cover every changed file and symbol. Explain behavior changes; summarize the purpose of tests, configuration, documentation, and mechanical changes instead of omitting them.
13
- - Use a small set of large HTML/CSS diagrams, cards, arrows, timelines, or inline SVG. Never use ASCII. Each visual has one idea, example data, a short caption, and accessible text, and the set covers every meaningful changed path.
14
- - Assume zero domain knowledge. Use familiar words, define jargon only when needed, use one concrete example, and keep text blocks to one or two short sentences. Put optional technical depth in `details`.
15
- - Include these sections in order: **Takeaway**, **Before**, **After**, **How it works**, **Why it matters**, and **Quiz**. Make **How it works** cover every changed path and connect it to the relevant code without adding a separate inventory section. Make **Quiz** five medium-difficulty interactive multiple-choice questions with concise feedback; avoid trivia and gotchas.
16
- - Add one callout for the key definition, edge case, or tradeoff. Use progressive disclosure for low-impact or mechanical changes, but name their purpose so the whole change remains covered.
11
+ Use the supplied PR, diff, branch, or code target; otherwise use the current branch's diff against its base, including uncommitted changes. Ask only if the target or base cannot be established. Inspect the complete final diff and enough before/after definitions, callers, tests, and documentation to establish the observable contract. Treat PR descriptions and commit messages as context, not proof of behavior.
17
12
 
18
- ## Artifact requirements
13
+ ## Explanation
19
14
 
20
- - Write one responsive HTML file with a table of contents, semantic headings, inline CSS, and inline JavaScript. Do not load fonts, scripts, images, or data from the network.
21
- - Save it outside the repository as `/tmp/YYYY-MM-DD-explanation-<slug>.html`, using today’s date and a filesystem-safe slug. Return the absolute path.
22
- - Make visuals the dominant content and large enough to understand without zooming. Use high-contrast type, large visual targets, visible focus states, keyboard-accessible controls, and feedback that does not rely on color alone. Keep the page viewable by opening it directly.
23
- - Put code in `<pre><code>…</code></pre>` and preserve whitespace with `white-space: pre` or `white-space: pre-wrap`.
24
- - Verify links, quiz behavior, code blocks, full-scope coverage, accessibility, and final file existence before delivery.
15
+ - Lead with what changes for callers or users through the public interface: API, CLI, UI, configuration, file format, or protocol. Group by capability or contract rather than changed files or commit history. Include relevant defaults, errors, side effects, and compatibility changes.
16
+ - Use concise before/after code snippets or concrete usage examples showing inputs or actions and observable outcomes. Use real interface names and supported syntax from the relevant revision; label illustrative data, pseudocode, and unexecuted examples. Do not invent prior capabilities or imply examples were run.
17
+ - Explain who is affected, why the change matters, and any required caller changes. Include implementation details only to explain an observable guarantee, limitation, or tradeoff. For internal-only changes, state their purpose and whether observable behavior changes; do not invent user benefits or deployment status.
18
+ - Use a table or compact diagram only when clearer than prose or a usage example. Keep it understandable through public interfaces without knowledge of internal collaboration.
19
+ - Link substantive claims and snippets to code or test evidence with file/line references; use commit-pinned permalinks for GitHub targets. Separate established behavior from inference and unknowns; state material limits of the supplied diff or available evidence.
20
+
21
+ Cover every material contract change, including removals and breaking changes. Keep the explanation proportional to the change; omit empty sections and file inventories. This is an explanation, not a code review or a release announcement.
22
+
23
+ ## Visual lesson
24
+
25
+ After the Markdown explanation, ask whether the user wants a visual HTML version, unless visualization was already requested or declined.
26
+
27
+ When requested, explain for a reader unfamiliar with the domain using a self-contained visual story: takeaway, before/after usage, how it works, and why it matters. Use public-interface diagrams with concrete inputs and outcomes, brief captions, and optional technical depth in `details`. If a quiz is requested, include five medium-difficulty interactive multiple-choice questions with concise feedback about behavior and tradeoffs.
28
+
29
+ - Write one responsive HTML file outside the repository as `/tmp/YYYY-MM-DD-explanation-<slug>.html`; return its absolute path. Use semantic headings, a table of contents, inline CSS/JavaScript, and no network assets.
30
+ - Make visuals readable without zooming, with accessible text, sufficient contrast, keyboard controls, visible focus, and feedback beyond color. Preserve code whitespace in `<pre><code>` blocks.
31
+ - Verify links, code blocks, material-change coverage, accessibility, any quiz interactions, and artifact existence before delivery.
@@ -20,9 +20,10 @@ description: When the user asks to publish, sync, or manage GitHub work, commit
20
20
  - If the repository has a pull request template that GitHub recognizes, preserve its required structure. Otherwise, follow [templates/pull_request_template.md](templates/pull_request_template.md) and replace each placeholder or omit the section as it directs.
21
21
  - Use closing keywords for linked issues the PR fully resolves.
22
22
  - Write for a reviewer who may not know the repository or the work's prior context. Use direct language, preserve precise domain terms, and make essential premises explicit.
23
+ - Write the summary like release notes: explain what changes for callers or users through the public interface, with a concrete usage example or before/after when helpful; state breaking changes and required actions. For internal-only changes, state their purpose without inventing user-visible benefits.
23
24
  - Keep the body readable in one screen without scrolling. Include files or implementation details only when essential for review.
24
25
  - Always group related points under subheadings or nested lists instead of one flat list.
25
- - When the change alters a flow or relationship between components, summarize it with a compact diagram; when it compares behavior across several cases, use a table. Abstract either to the level needed to understand the overall change.
26
+ - Use a compact diagram for public-interface interactions or observable state transitions, or a table for behavior across cases, only when clearer than prose or a usage example; make it self-contained with concrete inputs/actions and observable outcomes, including internals only to explain relevant guarantees or tradeoffs.
26
27
  - Base the body on the final diff against the base branch. Recheck that diff before publishing, then remove intermediate iterations, reverted or removed work, review history, and abandoned approaches.
27
28
 
28
29
  ### Title and scope
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: ghosts:verify-journeys
3
+ description: Verify real user journeys through an app, CLI, or service and report observable outcomes, evidence, and coverage gaps.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Verify the user's target through real public interfaces. Ground commands, selectors, and prerequisites in the repository. Ask only for prerequisites the repository cannot establish.
8
+
9
+ Write scenarios and reports in the user's language; preserve Gherkin keywords, YAML keys, identifiers, and commands.
10
+
11
+ ## Scope
12
+
13
+ Map the requested journeys before execution; default to the primary 3–5 features, or all if fewer. Identify the primary runtime, existing harnesses, entry points, material sub-features, prerequisites, actions, expected outcomes, contractual side effects, isolation constraints, and auth, platform, or harness limitations. Name omitted surfaces; one entry point does not prove others. Keep unrelated product fixes out of scope.
14
+
15
+ ## Scenarios
16
+
17
+ Use Specification by Example with Gherkin Given/When/Then acceptance scenarios: reuse existing `.feature` files or create them in the repository's verification location. Derive observable expected outcomes from requirements; assign stable, unique scenario tags. Use Scenario Outlines with Examples for equivalent cases and record results per example. Keep commands, selectors, and setup recipes in the harness or execution notes. Cucumber and step definitions are optional; a written scenario is not verification.
18
+
19
+ ```gherkin
20
+ Feature: Language settings
21
+ @journey-language-change
22
+ Scenario: Language changes apply without restarting
23
+ Given the service is running with Korean selected
24
+ When the user changes the language to English through the settings API
25
+ Then the next response is in English without restarting the service
26
+ ```
27
+
28
+ ## Execution
29
+
30
+ - **Launch:** prefer documented commands; confirm the checkout builds and starts. Perform setup, migrations, seed data, auth, and startup from an empty scratch data directory; confirm usable readiness. Build short-lived CLIs once and drive each in an isolated session. State unsupported fresh-start conditions and precise blockers.
31
+ - **Doctor:** a read-only check of instance ownership, build identity, readiness, and auth. Run before driving and after unexpected behavior; reset or relaunch when process health cannot detect a broken UI state.
32
+ - **Drive:** outside-in journeys through public interfaces with real stable selectors or commands. Reuse existing harnesses before adding helpers. State isolation requirements for ports, profiles, and data; do not double-drive an instance that cannot be isolated.
33
+ - **Evidence:** name the oracle and artifact location. Capture actions and resulting state, including contractual side effects. Internal setters, test-only endpoints, and a final screenshot alone do not prove a journey. Mock only at existing external boundaries. Observe dry-run side effects before relying on it. Keep credentials out of files and artifacts.
34
+ - **Cleanup:** remove only owned instances, scratch state, and marked temporary scaffolding, including failed-attempt residue; never kill by process name. Retain evidence outside cleanup targets and confirm it survives cleanup.
35
+ - **Helpers:** add only helpers that improve reproducibility; make scripts executable and record their invocation.
36
+
37
+ Execute each mapped journey end to end. Missing prerequisites block the affected journey without weakening its oracle. Clean up failed attempts, correct verification setup errors, and rerun affected steps; report product failures without fixing unrelated code.
38
+
39
+ ## Results
40
+
41
+ Keep mapped, exercised, passed, failed, and blocked coverage distinct; report remaining gaps. One passing journey does not prove full coverage. For surrogate environments, record setup differences, target-only prerequisites, and untested behavior; a surrogate pass does not verify the target.
42
+
43
+ Write a separate YAML report per run outside cleanup targets. Include the environment, commands and actions performed, and one result per scoped scenario or example linked by tag and source file. Use `passed`, `failed`, `blocked`, or `not_run`; include reasons for failures, blockers, and omissions, and evidence locations for executed scenarios. For example:
44
+
45
+ ```yaml
46
+ environment: local checkout, isolated scratch data
47
+ execution: artifacts/run-001/actions.log
48
+ results:
49
+ - scenario: journey-language-change
50
+ source: features/settings.feature
51
+ status: passed
52
+ evidence:
53
+ - artifacts/run-001/language-change.log
54
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solaqua/ghosts",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Reusable agent skills and reviewers.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,31 +0,0 @@
1
- ---
2
- name: ghosts:create-verification-skill
3
- description: Create or repair a project-local skill for verifying real user journeys through an app, CLI, or service.
4
- disable-model-invocation: true
5
- ---
6
-
7
- Create a project-local verification skill for an agent reading it cold. Follow the repository's skill conventions; otherwise use `.agents/skills/verify-<app>/`. Ground commands, selectors, and prerequisites in the repository; leave no placeholders. Ask only for prerequisites the repository cannot establish.
8
-
9
- Identify user-facing surfaces, the primary runtime, existing harnesses, observable outcomes, and isolation constraints. Prefer documented startup commands. Establish that the checkout builds and starts; report blockers precisely rather than inventing a working recipe. Keep unrelated product fixes out of scope. Mark any temporary verification scaffolding and include its removal in cleanup.
10
-
11
- Write `SKILL.md` with YAML `name` and an activation `description` naming the app and surface. Include these executable sections:
12
-
13
- - **Launch:** exact setup, migrations, seed data, auth, startup, and usable readiness from an empty scratch data directory. Build short-lived CLIs once and drive each in an isolated session; state unsupported fresh-start conditions explicitly.
14
- - **Doctor:** a read-only check of instance ownership, build identity, readiness, and auth. Run before driving and after unexpected behavior; reset or relaunch when process health cannot detect a broken UI state.
15
- - **Drive:** outside-in journeys through public interfaces with real stable selectors or commands. Reuse existing harnesses before adding helpers. State isolation requirements for ports, profiles, and data; do not double-drive an instance that cannot be isolated.
16
- - **Evidence:** name the oracle and artifact location. Capture actions and resulting state, including contractual side effects. Internal setters, test-only endpoints, and a final screenshot alone do not prove a journey. Mock only at existing external boundaries. Observe dry-run side effects before relying on it. Keep credentials out of files and artifacts.
17
- - **Cleanup:** remove only owned instances and scratch state, including failed-attempt residue; never kill by process name. Retain evidence outside cleanup targets.
18
- - **Helpers:** ship only helpers that improve reproducibility; make scripts executable and document their invocation.
19
-
20
- Create `features/README.md` as an index and `features/<feature>.md` per mapped user-facing feature. Start with the primary 3–5 features, or all if fewer; name omitted surfaces in the index. Each feature file contains:
21
-
22
- - **Entry points:** sub-features, user-visible routes or commands, and prerequisites.
23
- - **Journeys:** exact harness actions for each distinct entry point and material sub-feature.
24
- - **Oracles:** observable outcomes, side effects, and evidence locations per journey.
25
- - **Gotchas:** auth, seed-data, platform, and harness limitations.
26
-
27
- Keep mapped, exercised, passed, failed, and blocked coverage distinct. A convenient entry point does not prove the others. Missing prerequisites block the affected journey; record the reason without weakening its oracle.
28
-
29
- Dogfood the generated instructions end to end: launch, doctor, one complete mapped journey, evidence capture, cleanup, and confirmation that evidence survives. One journey validates the recipe, not the whole feature map. Clean up each failed attempt, repair recipe defects, and rerun affected steps.
30
-
31
- For surrogate environments, record setup differences, target-only prerequisites, and untested behavior; a surrogate pass does not verify the target. Report the skill path, exact coverage and evidence, and remaining gaps. If the end-to-end run is blocked, label the skill a draft. Keep the feature map and harness aligned when routes, commands, or prerequisites change.