@solaqua/ghosts 0.1.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 (37) hide show
  1. package/README.md +41 -0
  2. package/common/AGENTS.md +19 -0
  3. package/engineering/skills/code-review/SKILL.md +46 -0
  4. package/engineering/skills/deep-module/SKILL.md +9 -0
  5. package/engineering/skills/explain-diff/SKILL.md +24 -0
  6. package/engineering/skills/github-pr/SKILL.md +36 -0
  7. package/engineering/skills/loop-coding/SKILL.md +46 -0
  8. package/engineering/skills/loop-plan/SKILL.md +229 -0
  9. package/engineering/skills/socratic-interview/SKILL.md +22 -0
  10. package/engineering/skills/task-handoff/SKILL.md +37 -0
  11. package/engineering/skills/work-breakdown/SKILL.md +26 -0
  12. package/manifest.json +3 -0
  13. package/package.json +22 -0
  14. package/registry/skul.refs.json +55 -0
  15. package/research/skills/decision-research/SKILL.md +56 -0
  16. package/research/skills/loop-research/SKILL.md +120 -0
  17. package/tools/skills/vibe-notion/SKILL.md +138 -0
  18. package/tools/skills/vibe-notion/UPSTREAM.md +15 -0
  19. package/tools/skills/vibe-notion/references/batch-operations.md +100 -0
  20. package/tools/skills/vibe-notion/references/block-types.md +73 -0
  21. package/tools/skills/vibe-notion/references/common-patterns.md +165 -0
  22. package/tools/skills/vibe-notion/references/output-format.md +126 -0
  23. package/tools/skills/vibe-notion/templates/create-page.sh +32 -0
  24. package/tools/skills/vibe-notion/templates/query-database.sh +12 -0
  25. package/tools/skills/vibe-notion/templates/read-page.sh +16 -0
  26. package/tools/skills/vibe-notion/templates/workspace-overview.sh +19 -0
  27. package/writing/skills/cold-reader/README.md +7 -0
  28. package/writing/skills/cold-reader/SKILL.md +48 -0
  29. package/writing/skills/eli5/SKILL.md +7 -0
  30. package/writing/skills/humanize-korean/SKILL.md +94 -0
  31. package/writing/skills/humanize-korean/references/ai-tell-taxonomy.md +149 -0
  32. package/writing/skills/humanize-korean/references/metrics.py +809 -0
  33. package/writing/skills/humanize-korean/references/quick-rules.md +107 -0
  34. package/writing/skills/humanize-korean/references/rewriting-playbook.md +122 -0
  35. package/writing/skills/humanize-korean/tests/test_metrics.py +176 -0
  36. package/writing/skills/loop-skills/SKILL.md +101 -0
  37. package/writing/skills/rewrite/SKILL.md +50 -0
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # ghosts
2
+
3
+ Reusable agent skills and reviewers.
4
+
5
+ Default bias: delete needless layers, reuse what exists, and keep the smallest
6
+ safe instruction that preserves the behavior.
7
+
8
+ ## Install
9
+
10
+ Install all skills globally for your agent:
11
+
12
+ ```sh
13
+ npx @solaqua/skul@latest add --global --agent codex sjquant/ghosts --all
14
+ ```
15
+
16
+ Replace `codex` with the name of the agent you use, if different.
17
+
18
+ ## Bundles
19
+
20
+ - `engineering/`: implementation, planning, review, and collaboration skills
21
+ with their reviewers.
22
+ - `research/`: bounded, evidence-grounded research and explanation skills.
23
+ - `writing/`: writing, rewriting, and change-explanation skills.
24
+ - `tools/skills/`: directly maintained tool-integration skills, including
25
+ `vibe-notion`.
26
+ - `registry/`: external skill references that are not maintained in this
27
+ repository.
28
+
29
+ ## Upstream sources
30
+
31
+ | Local component | Upstream | Pinned revision | License |
32
+ | --- | --- | --- | --- |
33
+ | `writing/skills/humanize-korean/references` | [`epoko77-ai/im-not-ai`](https://github.com/epoko77-ai/im-not-ai), `skills/humanize-korean/references` | [`9747f03`](https://github.com/epoko77-ai/im-not-ai/tree/9747f036cdc28a1a8aea4dc71fef1f7846eb96f7) | MIT |
34
+ | `tools/skills/vibe-notion` | [`devxoul/vibe-notion`](https://github.com/devxoul/vibe-notion), `skills/vibe-notion` | [`89c6643`](https://github.com/devxoul/vibe-notion/tree/89c6643cebb4e4c56bbde826b6557da77f9d9d2f) | MIT, declared in the upstream README |
35
+
36
+ The vendored Vibe Notion skill includes an `UPSTREAM.md` file with its source
37
+ path and maintenance notes.
38
+
39
+ The standalone `humanize-korean` skill selectively syncs applicable rules from
40
+ the upstream revision above. Upstream orchestrator, plugin, and agent-runtime
41
+ paths are intentionally excluded.
@@ -0,0 +1,19 @@
1
+ ## Coding
2
+
3
+ - Order functions so each callee appears below its caller.
4
+ - 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 use `Given` / `When` / `Then` sections in the body.
5
+ - 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.
6
+ - Avoid low-value, brittle, implementation-coupled, or over-mocked tests—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.
7
+ - Treat test-suite growth as a cost: avoid redundant or low-signal tests whose behavior is already meaningfully covered elsewhere, unless they add independent behavioral confidence or protect a distinct regression risk.
8
+ - Do not expose private members solely for testing.
9
+ - 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.
10
+ - Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations.
11
+
12
+ ## Agent Browser CLI
13
+
14
+ - Standardize the startup routine to `agent-browser close` → `agent-browser --profile <abs-path>`.
15
+ - Restrict profile paths to `~/.agent-browser/profiles/sjquant`; if login is required, relaunch headed and ask the user to authenticate before proceeding.
16
+
17
+ ## Obsidian CLI
18
+
19
+ - If the obsidian CLI is unavailable, start the Obsidian desktop app first and retry.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: code-review
3
+ description: Broad, read-only code review using general agents and complete result synthesis.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Review the change read-only. Use general agents; give them the change context and questions only—no roles, review commands, or extra prompts.
8
+
9
+ 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.
10
+
11
+ - `Any correctness or operational risks, including bugs, edge cases, race conditions, resource leaks, performance bottlenecks, scalability concerns, or security issues?`
12
+ - `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?`
13
+ - `Any opportunities to simplify or clarify the code through better naming, standard libraries, utilities, or existing abstractions?`
14
+ - `Any test smells or test-suite bloat—such as brittle or implementation-coupled tests, over-mocking, 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?`
15
+
16
+ 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`.
17
+
18
+ - Write in the user's language.
19
+ - If a GitHub URL is supplied, use a bare, commit-pinned `blob` permalink with the smallest relevant line range in each `Location`.
20
+ - Otherwise, use repository-relative paths.
21
+ - `P0` is release-blocking, `P1` major, `P2` actionable, and `P3` low-priority.
22
+
23
+ ```markdown
24
+ ## Findings
25
+
26
+ ### <P0|P1|P2|P3|SKIP> - <title>
27
+
28
+ - Location: [path/to/file.ext](path/to/file.ext:Lx)
29
+ - Kind: bug|performance|security|design|test|simplification|other
30
+ - Triage: <priority> — <why this feedback received this priority, including why it is low-value or unsupported when priority is `SKIP`>
31
+ - Evidence: <why this matters>
32
+ - Impact / fix: <impact and smallest useful action>
33
+
34
+ ## Review Summary
35
+
36
+ - Agents used: `<n>`
37
+ - Verdict: `no blocking findings|findings require attention|manual review still required`
38
+
39
+ ## Reviewer Results
40
+
41
+ - `<agent>`: <every response and the corresponding Findings item>
42
+ ```
43
+
44
+ For GitHub-linked reviews, make `Location` a bare GitHub permalink, for example: `- Location: https://github.com/acme/project/blob/0123abc/src/parser.ts#L42-L48`.
45
+
46
+ If there are no actionable findings, say so while retaining every candidate in `Findings` with `SKIP` priority and its reason.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: deep-module
3
+ description: Assess whether a module hides implementation details behind a simple interface for its callers.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Any excessive implementation details that callers must know from a deep-module perspective?
8
+
9
+ Assess the module from the intended caller's perspective. Check whether it concentrates complexity behind a simple, stable interface, and identify implementation details, state, lifecycle, ordering, error/retry, or concurrency obligations that callers must know or coordinate themselves, plus any internal collaboration methods exposed as public API. Cite the relevant APIs and call sites, explain the material impact, and distinguish genuine abstraction leaks from legitimate domain requirements. If there is no material issue, say so.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: 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.
4
+ disable-model-invocation: true
5
+ ---
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.
8
+
9
+ ## Scope and content
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.
17
+
18
+ ## Artifact requirements
19
+
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.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: github-pr
3
+ description: When the user asks to publish, sync, or manage GitHub work, commit and push each change and create or update its pull request.
4
+ ---
5
+ ## Git workflow
6
+
7
+ - If the project's commit message style is unknown, run `git log --oneline -n 2` to identify the existing pattern and language.
8
+ - After this skill is triggered, commit and push every change. If there is no PR yet, create it first.
9
+ - Use the `gh` CLI for GitHub-related work.
10
+
11
+ ## Pull request
12
+
13
+ ### Before updating
14
+
15
+ - Before updating a pull request, check its current title and body.
16
+
17
+ ### Body
18
+
19
+ - Use `gh pr edit --body-file - <<'EOF'` as the default PR body path.
20
+ - If `.github/pull_request_template.md` exists, preserve its required structure. Otherwise, structure the body with problem and changes sections as bullet lists.
21
+ - Explain the problem and its impact in 1–2 sentences.
22
+ - Summarize the chosen solution direction and key behavioral changes.
23
+ - 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.
24
+ - Treat length as a cost. Group related points with headings or lists, and include files or implementation details only when essential for review. For complex flows or relationships, use a compact diagram or table abstracted to the level needed to understand the overall change.
25
+ - 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.
26
+
27
+ ### Title and scope
28
+
29
+ - Follow the commit message convention for PR titles.
30
+ - Do not include internal planning IDs in the PR title or body, including Waypoint IDs, Task IDs, or roadmap labels such as `W1-A3`.
31
+
32
+ ### Gotchas
33
+
34
+ - Use the same language as the commits being published for the PR title, body, and headings you add; do not default to English.
35
+ - Upload screenshots with the relevant `gh` CLI command and `--attach <file>#<alt text>`. If `--attach` is unavailable, upgrade `gh` first. Put the uploaded images in Markdown tables with at most 4 columns.
36
+
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: loop-coding
3
+ description: Approval-gated loop for building, changing, fixing, or refactoring code.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Loop Coding
8
+
9
+ Use this skill when the user asks for an implementation change. Do not use it for read-only review, explanation, specification, or design-only work.
10
+
11
+ ## Runtime loop
12
+
13
+ Before acting, create `/tmp/loop-coding-<safe-task-slug>.md` with a unique short slug or timestamp. Add `Current state: Pass 1 / Next: Understand`, a task-specific checklist, and an empty append-only `Repair log:`. Process the checklist top to bottom: finish the current item before moving on, record a short outcome, update `Current state`, mark `[x]` only after completion, and use `[-]` only with a reason. Never erase or uncheck historical rows. After a repair, append a numbered `[ ]` recheck row for the earliest affected item, update `Current state`, and log the trigger, change, rechecked items, and result. Finish only after final validation.
14
+
15
+ Answer every `Any ...?` row Yes or No in its outcome. On Yes, use the earliest affected state and append a row such as `- [ ] Recheck P2: Run relevant checks` before continuing.
16
+
17
+ Use this checklist, adding only task-specific items that materially affect the
18
+ work:
19
+
20
+ ```text
21
+ - [ ] Understand the request and inspect the relevant code
22
+ - [ ] Draft the plan: behavior, scope, affected files, validation, and any materially better alternative
23
+ - [ ] Any unresolved ambiguity or material design choice? (Ask before implementation when Yes.)
24
+ - [ ] Present the chosen plan and receive explicit approval, unless the user already approved that specific plan
25
+ - [ ] Implement the approved plan
26
+ - [ ] Run relevant checks
27
+ - [ ] Any correctness or operational risk: bugs, edge cases, races, leaks, performance, scalability, or security?
28
+ - [ ] Any design or API issue from outside-in, deep-module, or dependency-direction perspectives?
29
+ - [ ] Any opportunity to simplify or clarify through naming, standard libraries, utilities, or existing abstractions?
30
+ - [ ] Any test smell: brittleness, implementation coupling, over-mocking, unclear intent, missing negative paths, or surviving mutants?
31
+ - [ ] Any excessive implementation details that callers must know from a deep-module perspective?
32
+ - [ ] Final validation
33
+ ```
34
+
35
+ For the plan, state the chosen direction, relevant alternative and tradeoff, affected files, and validation. Present it as a structured, execution-oriented implementation plan in Markdown format. Wait for explicit approval such as `go` or `approve`; a bare request is not approval unless it already specifies the plan. If requirements or a material scope/design choice remain unresolved, stop and ask the user rather than guessing.
36
+
37
+ After implementation and checks, answer each review question in order. For a Yes, make the smallest useful repair, rerun relevant checks, append the required recheck row and repair-log entry, then resume from the earliest affected state. A material scope or design change requires a revised plan and approval. Stop when every answer is No, checks pass, and the diff stays within the approved scope.
38
+
39
+ ```text
40
+ [Start] → [Understand] → [Plan + approval] → [Implement] → [Checks] → [Review] → Any issue?
41
+ ├─ No → [Final validation] → [Done]
42
+ ├─ scope/design → [Re-plan + approval] → [Implement]
43
+ └─ code/tests/checks → [Repair] → [Checks] → [Review]
44
+ ```
45
+
46
+ Final response: summarize what changed, the checks run, and any remaining uncertainty.
@@ -0,0 +1,229 @@
1
+ ---
2
+ name: loop-plan
3
+ description: Planning-only loop for complex development and design problems, adaptable to other domains; uses evidence, alternatives, counterarguments, and premortems to resolve material uncertainty or costly tradeoffs. Skip routine implementation planning.
4
+ disable-model-invocation: true
5
+ ---
6
+ # Loop Plan
7
+
8
+ Create a plan another person or agent can execute without rediscovering key
9
+ decisions. Inspect context and write planning artifacts only; stop before
10
+ implementation or invoking an execution skill. Scale depth to uncertainty and
11
+ the cost of a wrong decision, not the number of tasks or document length. For
12
+ other domains, replace files, interfaces, and tests with the relevant
13
+ deliverables, dependencies, and verification; omit software-only checks.
14
+
15
+ ## Runtime loop
16
+
17
+ Before acting, create `/tmp/loop-plan-<safe-task-slug>.md` with a unique slug
18
+ or timestamp, `Current state: Pass 1 / Next: Understand`, the checklist below,
19
+ and an empty append-only `Repair log:`. Process items in order, finish each
20
+ before moving on, record a short outcome, and update `Current state`. Mark
21
+ `[x]` only after completion and `[-]` only with a reason; never erase or
22
+ uncheck historical rows. After a repair, append a numbered `[ ] Recheck P2: ...`
23
+ row for the earliest affected item and record the trigger, change, rechecked
24
+ items, and result in the repair log. Finish only after final validation.
25
+
26
+ ```text
27
+ - [ ] Understand the outcome, constraints, and relevant evidence
28
+ - [ ] Resolve research and user-decision dependencies before framing
29
+ - [ ] Frame success, scope, principles, and decision drivers
30
+ - [ ] Set the review budget from uncertainty, impact, and reversibility
31
+ - [ ] Compare viable approaches and choose a provisional direction
32
+ - [ ] Draft ordered work packages and validation
33
+ - [ ] Challenge the design and run a premortem
34
+ - [ ] Any unsupported assumption, unresolved decision, or stronger alternative that changes the plan?
35
+ - [ ] Any unaddressed failure, dependency, or unverifiable completion criterion?
36
+ - [ ] Any unnecessary scope, complexity, or detail?
37
+ - [ ] Final validation and delivery of the plan
38
+ ```
39
+
40
+ Answer every `Any ...?` row Yes or No. On Yes, repair the smallest material
41
+ issue and return to the earliest affected step before repeating the review. If
42
+ progress depends on missing evidence or a user decision, identify the exact
43
+ blocker instead of repeating the review or claiming readiness.
44
+
45
+ ## Adaptive review
46
+
47
+ Do not make the user choose a mode. After framing, keep a decision ledger with
48
+ each material decision's impact, uncertainty, reversibility, and needed
49
+ evidence. Use qualitative `low`, `medium`, or `high` values and states such as
50
+ `open`, `investigating`, `supported`, `disputed`, `gated`, and `closed`.
51
+ Require at least one independent targeted review for a decision with high
52
+ impact and high uncertainty, low reversibility, or cross-component effects. A
53
+ request for `ralplan` or subagents raises the review budget without imposing a
54
+ fixed ceremony.
55
+
56
+ ```text
57
+ [Understand] → [Route unknowns]
58
+ ├─ evidence → [$loop-research] ┐
59
+ ├─ user decision → [$socratic-interview] ├→ [Frame + ledger] → [Draft]
60
+ └─ known →─────────────────────┘ ↓
61
+ [Any high-impact uncertainty?]
62
+ ├─ No → [Self challenge]
63
+ └─ Yes → [Targeted subagent questions]
64
+ → [Synthesize] → [Revise] ↺
65
+ → [Premortem] → [Any material issue?]
66
+ → [Validate + deliver]
67
+ ```
68
+
69
+ For each unresolved ledger item, record a question ID, covered decision IDs,
70
+ capability, required inputs, `depends_on` question IDs, decision criterion,
71
+ and required evidence. Dispatch only ready questions; run independent ones in
72
+ parallel and refresh the snapshot after upstream results.
73
+
74
+ Choose a narrow capability rather than a permanent role:
75
+
76
+ - **Investigation:** establish a missing fact, constraint, dependency, or
77
+ feasibility signal.
78
+ - **Design challenge:** test boundaries, responsibilities, dependency
79
+ direction, and the strongest case against the chosen approach.
80
+ - **Execution challenge:** test prerequisites, rollout, recovery,
81
+ observability, and demonstrable completion.
82
+ - **Adversarial challenge:** identify a credible failure or attack path when
83
+ relevant.
84
+
85
+ Give each subagent the exact question, context snapshot, candidate options,
86
+ decision criterion, and required evidence. Keep it read-only and request
87
+ `finding`, `evidence`, `consequence`, and `recommendation`. Record each call as
88
+ `complete`, `failed`, `timed_out`, or `invalid`. Retry or reassign once when
89
+ useful, counting that attempt against the single follow-up budget; then use
90
+ self-review only when the risk permits. An unresolved high-impact item stays
91
+ `conditional` or `blocked`.
92
+
93
+ When two independent reviews are warranted, give them the same snapshot without
94
+ either review's findings, then record disagreements and their resolution. The
95
+ primary agent alone synthesizes the findings, records which decision changed
96
+ and why, and revises the draft.
97
+
98
+ When a finding changes a material decision, scope, or acceptance criterion,
99
+ send the revised delta to the relevant completed reviewer for one confirmation
100
+ pass. Ask whether the original concern is resolved, what new consequence the
101
+ revision creates, and whether a material objection remains. Record the response
102
+ and any objection in the question record and Review manifest. Skip the pass
103
+ when no material change occurred; when used, it counts against the single
104
+ follow-up budget and is review evidence, not user approval.
105
+ Preserve blind independence for reviews that have not run. If confirmation is
106
+ unavailable or a material objection remains, keep the item `conditional` or
107
+ `blocked`.
108
+
109
+ Set a bounded budget at delegation: one initial question per high-impact item,
110
+ one follow-up per item for conflicting, insufficient, or materially changed
111
+ evidence or drafts (including retry, reassignment, or confirmation), and at
112
+ most five synthesis passes. Repeat only while a material item lacks support or
113
+ a credible objection remains. Stop when high-impact decisions have evidence or
114
+ explicit gates, no unresolved objection changes the recommendation, and
115
+ acceptance and verification criteria are concrete. If the budget is exhausted
116
+ or the same material objection survives two revisions, deliver `conditional`
117
+ or `blocked` with the exact reason. If delegation is unavailable, perform the
118
+ same questions as self-review and state that no independent review occurred.
119
+ Subagent findings are review evidence, never user approval or authorization to
120
+ implement.
121
+
122
+ For high-risk work, deepen relevant challenges with three premortem scenarios
123
+ and the verification levels the problem needs. Do not add irrelevant test
124
+ layers to a design-only problem.
125
+
126
+ ## Understand and frame
127
+
128
+ Inspect relevant code, documents, existing plans, and constraints before asking
129
+ questions that inspection can answer. Distinguish observed facts, inferences,
130
+ and assumptions; cite supporting files or sources. Identify the observable
131
+ outcome, non-goals, affected users or systems, and material constraints.
132
+
133
+ Route unresolved inputs before making design decisions. Use `$loop-research` for
134
+ repository or document investigation, current or contested evidence,
135
+ comparisons, feasibility checks, or source citations; it returns verified
136
+ claims, provenance, uncertainty, and leads that could change the plan. Use
137
+ `$socratic-interview` for choices only the user can make, such as outcome,
138
+ scope, priority, risk tolerance, or external action; it asks one focused
139
+ question at a time and returns an execution brief, but does not plan or edit.
140
+ Do not ask the user for facts inspection or research can establish, and do not
141
+ replace a user decision with an inferred preference. Carry both outputs into
142
+ the decision ledger.
143
+
144
+ Ask the smallest question when an unknown could change scope, success, or a
145
+ costly decision; continue independent inspection while waiting. State ordinary
146
+ assumptions and proceed. If feasibility remains unestablished, put the cheapest
147
+ useful investigation first with a decision criterion and keep dependent work
148
+ conditional rather than inventing certainty. State task-specific principles,
149
+ rank decision drivers, resolve conflicts explicitly, and define observable
150
+ success before choosing.
151
+
152
+ ## Compare and draft
153
+
154
+ Compare at least two genuinely viable approaches against the same principles
155
+ and drivers, including a smaller change or no change when viable. Give each its
156
+ strongest case, cost, and downside. If only one survives the constraints,
157
+ explain why the alternatives fail. Recommend a direction, name the accepted
158
+ tradeoff, and state what evidence would reverse it.
159
+
160
+ Break the direction into dependency-ordered, independently verifiable work
161
+ packages. For each, name the outcome, affected components or files, important
162
+ interfaces, prerequisites, and completion evidence. Prefer end-to-end slices;
163
+ mark proposed paths as new and verify existing references. Specify correctness
164
+ contracts and ordering without prescribing incidental implementation details.
165
+ Do not invent precise estimates or parallelism without a basis.
166
+
167
+ Map success criteria to concrete checks, including material failure paths and
168
+ relevant existing tests. Add tests only for meaningful behavior. Include
169
+ rollout, observability, recovery, or stop conditions when operational
170
+ consequences require them.
171
+
172
+ ## Challenge and repair
173
+
174
+ Review a fixed draft in two separate self-review passes before revising:
175
+
176
+ 1. **Design challenge:** make the strongest case against the recommendation;
177
+ check principle violations, responsibility boundaries, dependency direction,
178
+ and whether a simpler alternative achieves the outcome. Resolve a real
179
+ tension through evidence or an explicit tradeoff.
180
+ 2. **Execution challenge:** walk through representative work packages as an
181
+ implementer, including a failure path; check prerequisites, missing
182
+ decisions, feasibility, and demonstrable completion.
183
+
184
+ These are not independent agent consensus. If the user requests separate
185
+ reviewers, give them the same draft and source context without the other
186
+ review's conclusions, combine findings only after both finish, and do not claim
187
+ independent review unless it occurred.
188
+
189
+ Run a premortem: assume failure at a meaningful milestone and trace the most
190
+ consequential plausible failures to plan details. For each, capture the causal
191
+ sequence, enabling assumption, likelihood and impact separately, earliest
192
+ warning, check time, mitigation, and revision or stop trigger. Label unverified
193
+ scenarios as hypotheses and thresholds as provisional; do not invent numerical
194
+ probabilities or promise to eliminate every risk. Include an adversary's
195
+ response only when adversarial behavior is relevant to the actual problem.
196
+
197
+ Use findings to change the plan and give a short reason for each material
198
+ revision. Put cheap checks of critical assumptions before expensive dependent
199
+ work. Resolve material objections or expose them as blockers; do not bury them
200
+ in a risk list. Recheck affected decisions and packages after each repair.
201
+
202
+ ## Deliver
203
+
204
+ Save the plan to the user-specified path if one is given; otherwise use
205
+ `/tmp/loop-plan-<safe-task-slug>-result.md` (append a timestamp when a collision
206
+ is possible). Keep the runtime log separate. Make the plan understandable
207
+ without the preceding conversation and include only what the task needs:
208
+
209
+ - Outcome, success criteria, scope, constraints, and evidence or assumptions.
210
+ - Decision principles, ranked drivers, alternatives, chosen direction, and
211
+ accepted consequences or conditions that would change the decision.
212
+ - Decision ledger with material uncertainties, review evidence, revisions, and
213
+ explicit gates.
214
+ - Review manifest mapping each material decision to question or call IDs,
215
+ initial and follow-up evidence, confirmation status, affected plan section,
216
+ verification criterion, and unresolved disagreement.
217
+ - Ordered work packages, dependencies, affected files or interfaces, and
218
+ completion checks.
219
+ - Premortem findings, mitigations, early signals, and revision or stop criteria.
220
+ - Unresolved questions or prerequisite investigations, material review changes,
221
+ and readiness: `ready for approval`, `conditional`, or `blocked`, with reasons.
222
+
223
+ Before delivery, verify references are accurate, critical assumptions are
224
+ validated or explicitly gated, acceptance checks cover intended behavior, and
225
+ another implementer can proceed without hidden design decisions.
226
+ Readiness describes the plan; it is not user approval or evidence that planned
227
+ checks passed. If handing the document to `loop-coding`, preserve explicit
228
+ approval of that plan and let its implementation workflow own execution. End
229
+ with the plan path, chosen direction, and remaining decisions.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: socratic-interview
3
+ description: Conduct a Socratic interview to resolve only material uncertainty, then provide a concise execution brief.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Conduct a Socratic interview only when missing information could materially change the outcome, scope, behavior, safety, cost, or external action. Inspect context first and make normal in-scope assumptions when sufficient.
8
+
9
+ Ask the smallest useful question, one at a time. Do not collect background that will not change the work. Stop when remaining uncertainty is immaterial; state assumptions and proceed unless doing so could cause an unwanted or costly result.
10
+
11
+ Do not plan, implement, create tasks, write specs, or edit files during the interview.
12
+
13
+ When sufficient, summarize only the decisions needed to execute:
14
+
15
+ ```md
16
+ # Execution Brief
17
+
18
+ - Outcome:
19
+ - Decisions:
20
+ - Scope and constraints:
21
+ - Assumptions:
22
+ ```
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: task-handoff
3
+ description: Generate concise task handoffs for independent implementation workstreams.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Generate up to two concise English handoffs for independent implementation tasks by default. If the invocation specifies a positive maximum N, generate up to N handoffs; treat N as a cap. Output each handoff in a code block; do not create a handoff document.
8
+
9
+ Use the configured project-notes and task-tracker system. If the source is unclear, ask which one to use before making updates.
10
+
11
+ Before writing:
12
+
13
+ 1. Read relevant project notes and task entries.
14
+ 2. Sync the base branch with the latest remote state.
15
+ 3. Mark implementation tasks with merged PRs `DONE`; keep implemented but unmerged tasks `REVIEW`.
16
+ 4. Select implementation tasks not marked `[DOING]` and mark selected tasks `[DOING]`.
17
+ 5. If all tracked tasks are complete, report that instead of creating handoffs.
18
+
19
+ ## Handoff Content
20
+
21
+ Include only:
22
+
23
+ - task
24
+ - problem
25
+ - solution direction
26
+ - completed work
27
+ - next task and starting point
28
+ - done criteria
29
+ - required project-notes and repository startup commands, including base-branch sync
30
+
31
+ Keep the problem and solution direction concise. Do not repeat commands already required by `AGENTS.md` or `CLAUDE.md`.
32
+
33
+ ## Constraints
34
+
35
+ - Include only tasks that can proceed fully in parallel; do not combine tasks with ordering or dependency relationships.
36
+ - When generating multiple handoffs, choose the eligible set of up to N tasks that minimizes overlap in files or modules they are likely to modify. Use the task scopes and file/module references in project notes and task entries to estimate overlap.
37
+ - Do not mention branch or worktree details.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: work-breakdown
3
+ description: Design-only recursive work breakdown of a destination into independently reviewable work packages with interfaces, dependencies, and execution order.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Given a destination, recursively decompose it into independently reviewable work packages. Do not implement; the only deliverable is the confirmed work breakdown.
8
+
9
+ - Keep each leaf within the review budget, normally `<= 1000 LOC`.
10
+ - Define the upper-layer interface before decomposing its children.
11
+ - Prefer end-to-end slices that can be tested and merged independently.
12
+ - Stop when every leaf is reviewable, testable, and mergeable.
13
+ - Use Socratic questioning only for material design or decomposition trade-offs.
14
+
15
+ For each package, capture its scope, rough LOC estimate, dependencies, and status:
16
+
17
+ - `TODO`: not started
18
+ - `DOING`: in progress
19
+ - `REVIEW`: pull request open
20
+ - `DONE`: pull request merged into the base branch
21
+
22
+ After confirmation, output:
23
+
24
+ 1. The hierarchical work-breakdown tree.
25
+ 2. The dependency and parallel-execution graph.
26
+ 3. The dependency-ordered execution list.
package/manifest.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "root_instruction_mode": "replace"
3
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@solaqua/ghosts",
3
+ "version": "0.1.0",
4
+ "description": "Reusable agent skills and reviewers.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/sjquant/ghosts.git"
9
+ },
10
+ "files": [
11
+ "common",
12
+ "engineering",
13
+ "registry",
14
+ "research",
15
+ "tools",
16
+ "writing",
17
+ "manifest.json"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ }
22
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "refs": [
3
+ {
4
+ "target": "skills",
5
+ "name": "insane-search",
6
+ "source": "fivetaku/insane-search",
7
+ "ref": "c020292fedcf1213d815acceacf600402fe72332"
8
+ },
9
+ {
10
+ "target": "skills",
11
+ "name": "obsidian-cli",
12
+ "source": "kepano/obsidian-skills",
13
+ "ref": "8ccef29ae8624eccc734e77ced4a6e54baf5d83a"
14
+ },
15
+ {
16
+ "target": "skills",
17
+ "name": "context7-cli",
18
+ "source": "upstash/context7",
19
+ "ref": "6f42b66f3b6dee20ba870dd6f70f1b565eb62e6e"
20
+ },
21
+ {
22
+ "target": "skills",
23
+ "name": "agent-browser",
24
+ "source": "vercel-labs/agent-browser",
25
+ "ref": "8c15ff9f71ae60c7e99e66afe1e2d4b9bf414fe2"
26
+ },
27
+ {
28
+ "target": "skills",
29
+ "name": "sentry-cli",
30
+ "source": "getsentry/cli",
31
+ "bundle": "sentry-cli",
32
+ "ref": "0b43edad47386844ece1f9f288310e2683afce49"
33
+ },
34
+ {
35
+ "target": "skills",
36
+ "name": "orca-cli",
37
+ "source": "stablyai/orca",
38
+ "ref": "fe4237cd41e4d48793fd135640939ef8aa5418e0"
39
+ },
40
+ {
41
+ "target": "skills",
42
+ "name": "cram",
43
+ "source": "sjquant/cram",
44
+ "ref": "f79db070a29e9e719b55fc9084f4a29580c6f1d4",
45
+ "disable-model-invocation": true
46
+ },
47
+ {
48
+ "target": "skills",
49
+ "name": "pr-tour",
50
+ "source": "YunSinLee/pr-tour",
51
+ "ref": "baf67b724298a874be88e8124141aa4b9950988c",
52
+ "disable-model-invocation": true
53
+ }
54
+ ]
55
+ }