@solaqua/ghosts 0.4.26 → 0.4.28

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
@@ -53,6 +53,7 @@ For installation selectors, use the source path, such as `--include skills/code-
53
53
  | Skill | What it helps with |
54
54
  | --- | --- |
55
55
  | [coding](engineering/skills/coding/SKILL.md) | Keep implementation simple and tests focused on meaningful behavior. |
56
+ | [yamato](engineering/skills/yamato/SKILL.md) | Implement, review and fix, then simplify the change in one workflow. |
56
57
  | [code-review](engineering/skills/code-review/SKILL.md) | Review correctness, downstream contracts, design, and complexity; verify material safety assumptions without editing the change. |
57
58
  | [test-review](engineering/skills/test-review/SKILL.md) | Find missing test protection and tests that cost more than they protect. |
58
59
  | [docstring-review](engineering/skills/docstring-review/SKILL.md) | Find function summaries that obscure their domain purpose with implementation details. |
@@ -3,12 +3,14 @@ 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 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.
6
+ Review the change read-only. Use two general subagents by default. Give each the change context, the common instructions below, and its assigned question blocks. Do not add roles, review commands, or extra prompts.
7
7
 
8
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
9
 
10
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.
11
11
 
12
+ Common instructions:
13
+
12
14
  ```text
13
15
  Review the change read-only:
14
16
 
@@ -16,16 +18,46 @@ Write findings and summaries using ISO 24495-1:2023 Plain Language principles.
16
18
 
17
19
  AI-generated changes can overcomplicate simple problems; question whether added code or tests are needed at all, and consider omission before adding another layer.
18
20
 
19
- - Any correctness or operational risks, including bugs, edge cases, race conditions, resource leaks, performance bottlenecks, scalability concerns, or security issues?
20
- - Any downstream contract breaks beyond the diff: callers, persisted data, wire formats, cross-language consumers, feature flags, or lifecycle ordering? Trace concrete failure paths, including transitive dependencies; check pinned dependency versions and local patches where behavior depends on them.
21
- - Any design or API issues when viewed from the intended caller's perspective and from outside-in, deep-module, and dependency-direction perspectives, including whether the module hides state, lifecycle, and ordering details, or exposes internal collaboration methods as public API; also consider hidden obligations, awkward call sites, leaky abstractions, or circular dependencies?
22
- - Any unnecessary variables, intermediate state, interfaces, or abstractions that can be omitted? Could standard features, existing code reuse, a different design, or clearer naming solve the problem more simply?
23
- - Any test smells or test-suite bloat—such as brittle or implementation-coupled tests, tautological tests that repeat the implementation or assert only mock setup, tests that only recheck documented dependency guarantees, over-mocking, conditional tests that bypass required assertions or choose expectations from actual results, unclear intent, missing negative-path coverage, surviving mutants, or redundant, overlapping, or low-signal tests whose maintenance, execution, and review costs outweigh the independent behavioral confidence they add? Any one-off checks retained as permanent regression tests, or hypothetical concurrency/timing tests without a credible execution path or meaningful failure impact? Could removal or consolidation preserve meaningful behavior, edge-case, and risk coverage? Any behavior already protected by existing tests beyond the diff, including through public entrypoints, judged by comparing scenarios and assertions rather than names alone? Could an existing case or suite be extended instead of adding a separate test, while preserving distinct behavior or regression coverage?
24
- Flag every `if` statement or conditional expression in test code, including setup, helpers, and assertions. Require separate cases or parameterization with inputs and expected outcomes defined before execution instead of branching.
25
- Do not request or retain tests that only recheck declared configuration or documented dependency behavior (for example, FastAPI/Pydantic's default 422 for an invalid field). Require a credible application-specific regression and an observable outcome.
26
21
  Report findings with locations, evidence, and the smallest useful fix. Say when no actionable issue is found.
27
22
  ```
28
23
 
24
+ Question blocks:
25
+
26
+ ```text
27
+ - Any correctness risks, including bugs or unhandled edge cases?
28
+ - Any race conditions, resource leaks, or lifecycle ordering risks?
29
+ - Any performance bottlenecks or scalability concerns?
30
+ - Any security issues?
31
+ ```
32
+
33
+ ```text
34
+ - Any downstream contract breaks affecting callers, persisted data, wire formats, cross-language consumers, or feature flags?
35
+ - Trace concrete failure paths beyond the diff, including transitive dependencies.
36
+ - Check pinned dependency versions and local patches where behavior depends on them.
37
+ ```
38
+
39
+ ```text
40
+ - Any design or API issues from the intended caller’s perspective, using outside-in and deep-module perspectives?
41
+ - Does the module expose internal collaboration methods or make callers manage state, lifecycle, ordering, or other hidden obligations?
42
+ - Any awkward call sites, leaky abstractions, circular dependencies, or dependency-direction issues?
43
+ - Any unjustified departures from patterns used by nearby code or code serving similar purposes, including naming, structure, error handling, or abstraction level? Prefer established conventions unless the task provides a concrete reason to differ.
44
+ ```
45
+
46
+ ```text
47
+ - Any unnecessary variables or intermediate state?
48
+ - Any unnecessary interfaces or abstractions?
49
+ - Could omission, standard features, existing code reuse, a different design, or clearer naming solve the problem more simply?
50
+ ```
51
+
52
+ ```text
53
+ - Any brittle or implementation-coupled tests, over-mocking, unclear intent, or tautological assertions that repeat the implementation or only verify mock setup?
54
+ - Any missing negative-path coverage or surviving mutants that reveal meaningful gaps?
55
+ - Any `if` statements or conditional expressions in tests, including setup, helpers, and assertions? Flag each; require separate cases or parameterization with inputs and expected outcomes defined before execution.
56
+ - Any tests that only recheck declared configuration or documented dependency behavior? Do not request or retain them; require a credible application-specific regression and an observable outcome.
57
+ - Any one-off checks kept as permanent tests, or concurrency or timing tests without a credible execution path and meaningful failure impact?
58
+ - Any redundant or low-signal tests whose costs outweigh their added confidence? Compare scenarios and assertions with existing tests beyond the diff, including public entrypoints. Prefer removal, consolidation, or extending an existing case when meaningful behavior, edge-case, and risk coverage is preserved.
59
+ ```
60
+
29
61
  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`.
30
62
 
31
63
  - Write in the user's language.
@@ -3,18 +3,22 @@ name: ghosts:coding
3
3
  description: Use when writing, modifying, or refactoring code, including tests. Apply these coding standards during implementation.
4
4
  ---
5
5
 
6
- AI-generated code can overcomplicate simple problems. First consider omission, existing code reuse, and language or standard-library features; question whether added variables, interfaces, abstractions, or tests are needed at all.
6
+ Use the checklist below during implementation. Before writing, identify the applicable items and inspect existing code with a similar role to guide the implementation.
7
7
 
8
- Design outside-in from caller usage and domain invariants. Repeated workarounds or type escape hatches are evidence to revisit the abstraction. If successive fixes fail under the same premise, challenge that premise before patching again. Prefer a rerunnable tool when it reduces execution or verification cost.
8
+ After implementation, verify every applicable item against the final diff, relevant surrounding code, and checks where needed. Fix unmet items and recheck them; rerun affected checks after changes. Mark an item complete only when supported by what you inspected or ran, and mark irrelevant items `N/A` with a reason.
9
9
 
10
- - Before writing, briefly inspect existing code with a similar role in the repository and follow its conventions where applicable.
11
- - Order functions so each callee appears below its caller.
12
- - Write function and method docstring and TSDoc summaries as concise statements of purpose in domain terms. Describe what the function accomplishes without narrating internal steps or enumerating permissions, side effects, and error handling. Prefer summaries that remain accurate as fields or conditions are added, provided the function's purpose stays the same. Add contract details separately only when callers need them to use the function correctly. Prefer one sentence; expand only when necessary.
13
- - Write tests as behavioral specifications: each test docstring or doc comment must stand alone, describe the scenario and observable outcome, and avoid relying on surrounding context, implementation details, or comparative wording. Keep names concise and behavior-based (JS/TS `it(...)` / `test(...)` descriptions suffice), and structure the body with Gherkin keywords (`Given`, `When`, `Then`, `And`) as appropriate.
14
- - Never use `if` statements or conditional expressions in test code, including setup, helpers, and assertions. Define each case's inputs and expected outcomes before execution; use separate cases or parameterization instead of branching.
15
- - When complex setup, concurrency, timing, or multi-step control flow makes a test hard to follow, add concise comments at key transitions to explain the scenario and synchronization; do not narrate obvious code.
16
- - Avoid low-value, brittle, implementation-coupled, over-mocked tests, or conditional tests that bypass required assertions or choose expectations from actual results—including tests that merely restate literals, constants, or configuration wiring; prefer outside-in integration tests through public interfaces, and add tests only when they specify meaningful externally observable behavior or guard against a substantive regression.
17
- - Treat test-suite growth as a cost: search relevant existing tests before adding coverage, and extend an existing case or suite when it can cover the behavior clearly. Avoid redundant or low-signal tests whose behavior is already meaningfully covered elsewhere, including tests that only recheck documented dependency guarantees, unless they add independent behavioral confidence or protect a distinct regression risk.
18
- - Do not expose private members solely for testing.
19
- - Keep tests focused on current, externally observable behavior: do not add temporary tests solely for intermediate layers when a planned integration test better specifies the behavior, or regression tests for intentionally removed code paths; add tests only when omitting them leaves an immediate regression or safety gap, and update or remove obsolete tests instead.
20
- - Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations.
10
+ - [ ] Prefer omission, existing code reuse, and language or standard-library features over unnecessary variables, interfaces, abstractions, or tests.
11
+ - [ ] Design outside-in from caller usage and domain invariants.
12
+ - [ ] Hide internal state, lifecycle, ordering, and retry details that callers need not manage.
13
+ - [ ] Revisit abstractions that require repeated workarounds or type escape hatches. If successive fixes fail under the same premise, challenge that premise before patching again.
14
+ - [ ] Prefer a rerunnable tool when it reduces execution or verification cost.
15
+ - [ ] Follow naming, structure, error-handling, and abstraction conventions from nearby code or code with a similar role, unless there is a concrete reason to differ.
16
+ - [ ] Order functions so each callee appears below its caller.
17
+ - [ ] Write function and method docstring and TSDoc summaries as concise statements of purpose in domain terms. Describe what the function accomplishes without narrating internal steps or enumerating permissions, side effects, and error handling. Prefer summaries that remain accurate as fields or conditions are added, provided the function's purpose stays the same. Add contract details separately only when callers need them to use the function correctly. Prefer one sentence; expand only when necessary.
18
+ - [ ] Write tests as behavioral specifications: each test docstring or doc comment must stand alone, describe the scenario and observable outcome, and avoid relying on surrounding context, implementation details, or comparative wording. Keep names concise and behavior-based (JS/TS `it(...)` / `test(...)` descriptions suffice), and structure the body with Gherkin keywords (`Given`, `When`, `Then`, `And`) as appropriate.
19
+ - [ ] Never use `if` statements or conditional expressions in test code, including setup, helpers, and assertions. Define each case's inputs and expected outcomes before execution; use separate cases or parameterization instead of branching.
20
+ - [ ] When complex setup, concurrency, timing, or multi-step control flow makes a test hard to follow, add concise comments at key transitions to explain the scenario and synchronization; do not narrate obvious code.
21
+ - [ ] Add tests only for meaningful current, externally observable behavior or substantive regression risks; prefer outside-in integration tests through public interfaces. Avoid brittle, implementation-coupled, over-mocked tests and assertions that merely restate literals, constants, configuration wiring, or documented dependency guarantees. Do not add temporary tests for intermediate layers better covered by a planned integration test unless omission leaves an immediate regression or safety gap.
22
+ - [ ] Search existing tests beyond the diff and compare scenarios and assertions before adding coverage. Extend an existing case or suite when it clearly covers the behavior; add separate tests only for independent behavioral confidence or a distinct regression risk. Update or remove obsolete tests, including tests for intentionally removed paths.
23
+ - [ ] Do not expose private members solely for testing.
24
+ - [ ] Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations.
@@ -7,7 +7,7 @@ Default to Orca for new delegations unless the user specifies another tool. When
7
7
 
8
8
  For Orca, follow the applicable `orca-cli` or `orchestration` skill. For Paseo, Claude Code, Codex, or another tool, use the session controls available in the current environment. Read the applicable skill or tool instructions; consult official documentation or CLI help when needed to determine how to launch an agent, inspect its result, and send follow-up instructions.
9
9
 
10
- Keep the recipient's agent or session identifier and reuse it to continue the same conversation for each stage.
10
+ Keep the recipient's agent or session identifier and reuse it for follow-ups.
11
11
 
12
12
  Before continuing an existing thread, read the user's added instructions.
13
13
 
@@ -15,16 +15,20 @@ Prefer Markdown with bullets for the brief. Follow ISO 24495-1:2023 Plain Langua
15
15
 
16
16
  - References to issues, PRs, or existing threads.
17
17
  - Goals, completion criteria, confirmed decisions, constraints, and excluded scope missing from those references.
18
- - Skills the user requested for the current stage.
18
+ - Skills the user requested and when to apply them.
19
19
 
20
20
  Do not restate referenced content, reminders to read root instructions, general development or testing guidance, or skill-internal procedures and report formats. Do not omit important decisions or constraints for brevity.
21
21
 
22
- Supervise delegated implementation by default unless the user explicitly requests a handoff without supervision. Send implementation first, then wait for and inspect each stage's result before instructing the same agent to continue. Code review, fixes for applicable findings, and slop-shaking are part of supervised implementation unless the user explicitly excludes them:
22
+ For delegated implementation, send the task and the complete workflow in one prompt. Unless the user excludes a stage, include these instructions for the recipient:
23
23
 
24
- 1. Inspect the implementation result, then request code review.
25
- 2. Inspect the review findings, then request fixes for applicable findings.
26
- 3. Inspect the completed review or fixes, then request slop-shaking in a separate message.
24
+ ```text
25
+ 1. Implement the task.
26
+ 2. After implementation, invoke $ghosts:code-review. When the read-only review is complete, fix applicable findings. Skip fixes if there are none.
27
+ 3. After review and any fixes, invoke $ghosts:slop-shaking and apply useful cleanups.
27
28
 
28
- Skip fixes when there are no applicable findings. Continue supervising until all included stages finish or a blocker requires user input. Base each instruction on the preceding result. Do not combine code review or review fixes with slop-shaking, or bundle later stages into the initial prompt, unless the user explicitly requests it.
29
+ Apply each skill at its stage. Complete the workflow and report results, or explain what blocks completion.
30
+ ```
29
31
 
30
- For a full handoff without supervision, deliver the current stage and leave later instructions to the user.
32
+ Supervise through completion by default: wait for and inspect the recipient's final result, then follow up on incomplete work or blockers. The recipient owns transitions between stages; do not send separate stage-triggering messages unless the user requests stage-by-stage supervision.
33
+
34
+ For a full handoff without supervision, send the complete requested workflow and leave execution with the recipient.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: ghosts:yamato
3
+ description: Implement a task, review and fix the change, then remove unnecessary complexity.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Run these stages in order in the current session. Read and follow each skill when its stage begins:
8
+
9
+ 1. Apply $ghosts:coding to implement the task and verify its checklist.
10
+ 2. Run $ghosts:code-review. After the read-only review, fix applicable findings and verify the fixes. Skip fixes if there are none.
11
+ 3. Run $ghosts:slop-shaking and apply useful cleanups.
12
+
13
+ Continue through all stages unless a blocker requires user input.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solaqua/ghosts",
3
- "version": "0.4.26",
3
+ "version": "0.4.28",
4
4
  "description": "Reusable agent skills and reviewers.",
5
5
  "license": "MIT",
6
6
  "repository": {