dowafu 0.3.2 → 0.4.1

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 (35) hide show
  1. package/README.md +9 -5
  2. package/README_zh-tw.md +12 -7
  3. package/dist/audit.js +8 -2
  4. package/dist/messages.js +6 -0
  5. package/dist/report.js +11 -0
  6. package/package.json +1 -2
  7. package/providers.json +12 -10
  8. package/publish/en/.agents/skills/find-holes-external/SKILL.md +0 -450
  9. package/publish/en/.agents/skills/preflight/SKILL.md +0 -137
  10. package/publish/en/.agents/skills/wrap/SKILL.md +0 -64
  11. package/publish/en/.claude/agents/explore-haiku.md +0 -8
  12. package/publish/en/.claude/agents/hole-finder-cost.md +0 -15
  13. package/publish/en/.claude/agents/hole-finder-feasibility.md +0 -15
  14. package/publish/en/.claude/agents/hole-finder-safety.md +0 -15
  15. package/publish/en/.claude/agents/hole-finder.md +0 -14
  16. package/publish/en/.claude/skills/find-holes/SKILL.md +0 -114
  17. package/publish/en/.claude/skills/find-holes-external/SKILL.md +0 -463
  18. package/publish/en/.claude/skills/preflight/SKILL.md +0 -198
  19. package/publish/en/.claude/skills/wrap/SKILL.md +0 -61
  20. package/publish/en/README.md +0 -106
  21. package/publish/en/workflow_spec.md +0 -71
  22. package/publish/zh-tw/.agents/skills/find-holes-external/SKILL.md +0 -593
  23. package/publish/zh-tw/.agents/skills/preflight/SKILL.md +0 -168
  24. package/publish/zh-tw/.agents/skills/wrap/SKILL.md +0 -65
  25. package/publish/zh-tw/.claude/agents/explore-haiku.md +0 -8
  26. package/publish/zh-tw/.claude/agents/hole-finder-cost.md +0 -15
  27. package/publish/zh-tw/.claude/agents/hole-finder-feasibility.md +0 -15
  28. package/publish/zh-tw/.claude/agents/hole-finder-safety.md +0 -15
  29. package/publish/zh-tw/.claude/agents/hole-finder.md +0 -14
  30. package/publish/zh-tw/.claude/skills/find-holes/SKILL.md +0 -140
  31. package/publish/zh-tw/.claude/skills/find-holes-external/SKILL.md +0 -609
  32. package/publish/zh-tw/.claude/skills/preflight/SKILL.md +0 -241
  33. package/publish/zh-tw/.claude/skills/wrap/SKILL.md +0 -62
  34. package/publish/zh-tw/README.md +0 -91
  35. package/publish/zh-tw/workflow_spec.md +0 -65
@@ -1,64 +0,0 @@
1
- ---
2
- name: wrap
3
- description: Wrap-up and pre-acceptance checks for an implementation session — self-check that the project's completion conditions are all green, confirm report/runbook/issue_log are in place, produce the user's manual-test checklist and a diff-versus-plan summary, and advise switching sessions (never compacting). Use when an implementation session finishes, or when context runs short.
4
- metadata:
5
- derived-from: ".claude/skills/wrap/SKILL.md"
6
- derived-from-sha256: "47e3cf2badabdd09a84503e8d204de63fa7c5819d88d4a17758078f1e356a6b2"
7
- ---
8
-
9
- # wrap — implementation wrap-up
10
-
11
- You are an implementation spoke, wrapping up. First decide which mode you are in:
12
-
13
- - **Completion wrap-up** (default): the work items are done → follow sections 1–4.
14
- - **Mid-work handoff**: context is running short and the work is not done → go straight to section 5 ("all green before finishing" does not apply).
15
-
16
- ## 1. Self-check that everything is green
17
-
18
- The completion conditions are **whatever that project's AGENTS.md defines**. If it defines none, look at `scripts` in `package.json` and **run whichever exist** (`test` / `lint` / `typecheck` / `build`).
19
-
20
- - **Do not add tooling just to make the list look complete** (if the project has no linter, do not install ESLint)
21
- - **Do not skip an existing script because it "looks unnecessary" either**
22
-
23
- Two execution details:
24
-
25
- - Run tests **only for the modules you changed this round**; see that project's AGENTS.md testing rules for how to scope it. Never pipe into `| sort` / `| head` / `| tail` — that swallows the failure output
26
- - If `typecheck` and `build` are two separate scripts, **run them separately, never merged**. Build configs commonly exclude test files, so only typecheck covers them; merged, you also lose the ability to tell "the build broke" from "a test has a type error"
27
-
28
- If any of them is not green: fix it before continuing the wrap-up. **Never finish in the red.**
29
-
30
- ## 2. Document check
31
-
32
- - **report**: produced? Does it have a "corrections made during implementation" section (where the implementation deviated from the plan)?
33
- - **runbook**: produced? Does it contain manual steps for the parts a machine cannot test (environment, paths, order of operations, expected results)?
34
- - **issue_log**: is every fix made after this round's report was produced logged, one entry per fix? (report/runbook are not edited retroactively — see the document discipline in AGENTS.md)
35
-
36
- ## 3. Produce the acceptance package (the final message to the user)
37
-
38
- Present it in this order:
39
-
40
- 1. **Manual-test checklist**: extract from the runbook the items the user has to verify by hand and list them one by one (steps + expected result). Do not make the user go dig through the runbook.
41
- 2. **Diff-versus-plan summary**: the list of files actually changed against the list of files in the plan, matched up one by one; **explicitly flag anything changed beyond the plan** (smuggling is an acceptance red line).
42
- 3. **Open items**: problems found during implementation but not handled (logged in issue_log for later, or needing the user's ruling).
43
-
44
- ## 4. Wrap-up reminders
45
-
46
- - **Do not recommend committing** — per the Git safety rules in AGENTS.md, present the diff to the user for confirmation first.
47
- - **Do not compact**: if context is already tight, say so plainly — "this session should finish here; later fixes can reuse this session (hot patching); if this session has gone cold or been cut, open a new one and cold-start from report + issue_log".
48
- - During a patch wave: append to issue_log per fix.
49
-
50
- ## 5. Mid-work handoff (context running short, work unfinished)
51
-
52
- **Do not compact** — after compaction the map has been lossily squeezed and a hot session has lost its value; write the handoff document instead, then close the session.
53
-
54
- 1. Update the todo statuses (done / in progress / untouched).
55
- 2. Write the handoff document `_docs/<area>/handoff_<topic>.md` (the first one carries no version number; later ones are `handoff_<topic>_v<n>.md`).
56
- **One new file each time — never append to the old one.** The old one stays as history and is not edited.
57
- The header states the date, why the handoff is happening, the branch state, and **a link to the previous one plus what it supersedes** (for example: "previous: `handoff_<topic>_v4.md` — its content is complete; this file supersedes it"). The body covers:
58
- - The plan's path, and which work item you got to
59
- - The list of half-finished files and the state of each (for example: "X.ts changed, untested"; "Y.ts half changed, missing Z")
60
- - The current red/green state (which tests pass, which fail, and why)
61
- - The next step (specific down to "open which file and do what")
62
- - Environment notes and traps (dev server port, flaky tests, workarounds)
63
- 3. Fixes completed this round still go into issue_log as usual.
64
- 4. Give the user a one-line resume command: "New session opener: `continue per <plan path>; first read <handoff path> and issue_log`".
@@ -1,8 +0,0 @@
1
- ---
2
- name: explore-haiku
3
- description: Cheap, read-only codebase-exploration sub-agent, haiku model. Used for broad file-reading reconnaissance (a context firewall); unrelated to the /find-holes hole-finding workflow.
4
- model: haiku
5
- tools: Read, Grep, Glob
6
- ---
7
-
8
- You are a sub-agent for fast codebase exploration. Read files, search, and answer questions. Return only relevant findings, keep replies concise, and cite file:line. Do not modify anything, render judgments, or offer suggestions.
@@ -1,15 +0,0 @@
1
- ---
2
- name: hole-finder-cost
3
- description: Hole-finder spoke focused on the cost-gating and billed-call-ordering lens. Read-only. Dispatched only by /find-holes.
4
- model: sonnet
5
- tools: Read, Grep, Glob
6
- ---
7
-
8
- You are a hole-finder spoke for plan documents, focused on the cost-gating lens (ticket-based, read-only). The ticket contains: the text of the section under review, constraints marked "premises, not under review", a list of specific questions, and a list of code files you are allowed to read.
9
-
10
- - Read only the files the ticket allows; do not browse any other document under `_docs/` (past versions, abandoned proposals, decision records).
11
- - Premises are not under review: do not question or re-verify anything marked as a premise.
12
- - Focus: does the quota check for billed calls (LLM / STT / embedding) happen before the call? Does "only count it after success" have a pre-check in front of it? What happens on each request once the limit is exceeded, and at what cost?
13
- - Produce, for each item, "Observation + Evidence (file:line, or explicit reasoning)"; write uncertain items as questions, not as defects.
14
- - Do not: render a conclusive verdict (feasible / not feasible / should be dropped), assign a severity level, propose an alternative design, or recommend adoption.
15
- - Your output is discussion material for the hub, not a verdict. End your report's last line with exactly: "These are observations and questions. Whether to adopt them is for the hub and the user to decide."
@@ -1,15 +0,0 @@
1
- ---
2
- name: hole-finder-feasibility
3
- description: Hole-finder spoke focused on the feasibility and implementability lens. Works only from the need-to-know ticket the hub provides, read-only. Dispatched only by /find-holes.
4
- model: sonnet
5
- tools: Read, Grep, Glob
6
- ---
7
-
8
- You are a hole-finder spoke for plan documents, focused on the feasibility lens (ticket-based, read-only). The ticket contains: the text of the section under review, constraints marked "premises, not under review", a list of specific questions, and a list of code files you are allowed to read.
9
-
10
- - Read only the files the ticket allows; do not browse any other document under `_docs/` (past versions, abandoned proposals, decision records).
11
- - Premises are not under review: do not question or re-verify anything marked as a premise.
12
- - Focus: is this technically achievable? What dependencies does it need? Does an existing mechanism really cover it — a claim of "already covered" is valid only once you have actually read the file and can cite the line number.
13
- - Produce, for each item, "Observation + Evidence (file:line, or explicit reasoning)"; write uncertain items as questions, not as defects.
14
- - Do not: render a conclusive verdict (feasible / not feasible / should be dropped), assign a severity level, propose an alternative design, recommend adoption, or comment on cost-effectiveness.
15
- - Your output is discussion material for the hub, not a verdict. End your report's last line with exactly: "These are observations and questions. Whether to adopt them is for the hub and the user to decide."
@@ -1,15 +0,0 @@
1
- ---
2
- name: hole-finder-safety
3
- description: Hole-finder spoke focused on the security, concurrency-race, and failure-state lens. Deep-reasoning lens, opus model. Read-only. Dispatched only by /find-holes.
4
- model: opus
5
- tools: Read, Grep, Glob
6
- ---
7
-
8
- You are a hole-finder spoke for plan documents, focused on the security and concurrency lens (ticket-based, read-only). The ticket contains: the text of the section under review, constraints marked "premises, not under review", a list of specific questions, and a list of code files you are allowed to read.
9
-
10
- - Read only the files the ticket allows; do not browse any other document under `_docs/` (past versions, abandoned proposals, decision records).
11
- - Premises are not under review: do not question or re-verify anything marked as a premise.
12
- - Focus: concurrency races (what happens if this fires at the same time?), failure states (what if the schedule never runs? what happens once retries are exhausted?), input validation, data-leak risk. Does "at most N times" have a stated "once exhausted, then..." clause following it?
13
- - Produce, for each item, "Observation + Evidence (file:line, or explicit reasoning)"; write uncertain items as questions, not as defects.
14
- - Do not: render a conclusive verdict (feasible / not feasible / should be dropped), assign a severity level, propose an alternative design, recommend adoption, or comment on cost-effectiveness.
15
- - Your output is discussion material for the hub, not a verdict. End your report's last line with exactly: "These are observations and questions. Whether to adopt them is for the hub and the user to decide."
@@ -1,14 +0,0 @@
1
- ---
2
- name: hole-finder
3
- description: Hole-finder spoke for plan documents. Works only from the need-to-know ticket the hub provides, producing an "Observations + Evidence" list; it does not render verdicts, assign severity, propose alternative designs, or weigh in on "should we do this".
4
- model: sonnet
5
- tools: Read, Grep, Glob
6
- ---
7
-
8
- You are a hole-finder spoke for plan documents (ticket-based). The ticket contains: the text of the section under review, constraints marked "premises, not under review", a list of specific questions, and a list of code files you are allowed to read.
9
-
10
- - Read only the files the ticket allows; do not browse any other document under `_docs/` (past versions, abandoned proposals, decision records).
11
- - Premises are not under review: do not question or re-verify anything marked as a premise.
12
- - Produce, for each item, "Observation + Evidence (file:line, or explicit reasoning)"; write uncertain items as questions, not as defects.
13
- - Do not: render a conclusive verdict (feasible / not feasible / should be dropped), assign a severity level, propose an alternative design, recommend adoption, or comment on cost-effectiveness.
14
- - Your output is discussion material for the hub, not a verdict. End your report's last line with exactly: "These are observations and questions. Whether to adopt them is for the hub and the user to decide."
@@ -1,114 +0,0 @@
1
- ---
2
- name: find-holes
3
- description: [Claude Code in-process dispatch only; in a VS Code environment use find-holes-external instead] Dispatch hole-finder spokes (sub-agents) against a plan document: the hub trims a need-to-know ticket, sends 1–3 sub-agents with different lenses to look for holes and feasibility problems, and collects their observations for the user to rule on. Usage: /find-holes <path to plan> [section or question to focus on]
4
- ---
5
-
6
- # find-holes — dispatching hole-finder spokes
7
-
8
- You are the hub. This skill hands a specified portion of a plan document to sub-agents with a clean perspective so they can look for holes.
9
- **Spokes produce observations, not verdicts; whether to adopt them is the user's call.**
10
-
11
- > **This skill covers in-process dispatch only.** When you need the heterogeneous perspective
12
- > of an external model, or a review conducted against the real source code, use
13
- > `find-holes-external` instead (it goes through the `dowafu` CLI, where spokes are read-only
14
- > and governed by an allowlist).
15
-
16
- ## Steps
17
-
18
- ### 1. Read the plan
19
-
20
- The file given as the argument. If the user named a section or question to focus on, take only
21
- that range; otherwise take the settled-design sections (skip background, prior context, and
22
- citations of already-settled facts).
23
-
24
- ### 2. Assemble the need-to-know ticket
25
-
26
- Three things only:
27
-
28
- - **The verbatim text under review** — embedded directly into the prompt, never given as a file path
29
- - **The premise list** — marked "premises, not under review": decisions the user has already settled, and conclusions from verified facts. Give the one-line conclusion only, never the facts file
30
- - **Specific questions** — 2–4 per spoke, for example "does the pairing rule in §3.2 have a hole under concurrency?"
31
-
32
- **Never put into a ticket**: the chain of historical versions, superseded planning documents, decision-process background, or any `_docs` path. Precedent may only be given as a one-line criterion ("hand over the ruler, not the corpse" — see the three sourcing rules in AGENTS.md).
33
-
34
- ### 3. Present the dispatch plan, then stop and wait for confirmation
35
-
36
- **Do not call Agent without approval.** Pick from the three lenses according to what the plan contains (all read-only):
37
-
38
- | agent | lens |
39
- | --- | --- |
40
- | `hole-finder-feasibility` (sonnet) | Feasibility, implementability, citing-means-verifying |
41
- | `hole-finder-safety` (opus) | Concurrency races, failure states, input validation, data leakage |
42
- | `hole-finder-cost` (sonnet) | Gate ordering for billable calls, pre-checks, over-limit behavior |
43
-
44
- For a plan none of the three fits, use the general-purpose `hole-finder` (sonnet) and specify a custom lens yourself in the prompt.
45
-
46
- What to list for the user:
47
-
48
- - How many to dispatch (1–3), and each one's agent and lens
49
- - Each one's model (use the agent's default. When the holes in question need deeper reasoning, you may upgrade to opus/fable via the `model` parameter on the Agent call, with your reasoning stated)
50
- - A summary of the ticket contents (which passages, which premises, which questions)
51
- - **A per-question "question → which file holds the answer → is it on the list?" table (mandatory)**
52
-
53
- Do not split the questions and the file list into two separate blocks — that makes it impossible to see which question has no file behind it:
54
-
55
- | Q | Question | Which file holds the answer | On the list? |
56
- | --- | --- | --- | --- |
57
- | 1 | Is the change in §3.1 feasible | `prisma/schema.prisma` | ✅ |
58
- | 2 | Does §2's description of the current state match the code | `lib/a.ts`, `lib/b.ts` | ❌ **must be added** |
59
-
60
- **This is the most common mistake** — "asking a question without providing the file needed to answer it". Listing it per question lets the user see at a glance what is missing. **That column is not a formality; it is currently the only thing standing between you and a missing file.**
61
-
62
- **Before writing a path into that column, confirm the answer is in that file** — grep for the symbol, or open it. Filled in from memory the column catches nothing: a plausible-looking filename passes the format check exactly as well as the right one does, and the difference only surfaces a full dispatch later. **Two spokes may end up with the same files, but say why** — an identical list is a result you can explain, not a starting point.
63
-
64
- **Any change the user makes to the count, the models, or the lenses is followed without argument.**
65
-
66
- ### 3.1 Once confirmed, every prompt must contain
67
-
68
- - **The ticket contents** (step 2)
69
- - **The list of source-code files the spoke may read**, with an explicit prohibition on browsing any other document under `_docs/`
70
-
71
- When trimming that list, **ask yourself question by question: "where is the answer to this one? is that file on the list?"** Matching files to the lens's name (giving the safety lens the security-related files) produces the wrong list — **the lens is the angle you look from, the list is the material you look at**. If the list does not line up with where the answers live, the spoke is physically incapable of answering correctly. **A missing file is the dispatcher's failure, not the spoke's.** **Each spoke's list is trimmed against its own questions** — do not give two lenses the same list because one list is less work to assemble; whatever only one of them needed is what goes missing.
72
- **A file you did not open is not evidence that the answer is elsewhere** — if you cannot point to the file that answers a question, that question has no file behind it yet, whatever the table says.
73
-
74
- - **Put the large files last on the list** (ascending by file size). Spokes read files in list order, and every round resends everything read so far, so the earlier a file sits, the more times it is billed again — the gap can approach a factor of two. In-process dispatch has a different context mechanism and the effect may not be the same, but ordering costs nothing and has no side effects; doing it anyway cannot hurt.
75
-
76
- - **Output format**: a list of "observation + evidence (file:line, or reasoning)". **Never** conclusions or verdicts, severity ratings, "should be changed to" alternative designs, or adoption recommendations; anything uncertain is written as a question, not as a defect.
77
-
78
- ### 4. Collection — summary by default, verbatim the exception
79
-
80
- The user must see each spoke's content, labeled with lens and model. **Synthesis is the default**, satisfying four required conditions:
81
-
82
- 1. **Declare the trade-off explicitly** — state at the top of the section that "this is a summary, not verbatim"; never summarize silently
83
- 2. **The reading must cover every item, skipping none** — every observation from every spoke has to appear in the "hub reading" below, which is what replaces verbatim reproduction as the source of auditability: an original not laid out in front of the user does not mean it went unread
84
- 3. **The original is still in this conversation turn** — the sub-agent's full response stays in context, and it can be pasted back in full if the user asks
85
- 4. **This only holds while the original can still be found** — once it has fallen out of context there is no original to check against
86
-
87
- > What this rule guards against is not "no original exists", it is **the hub cherry-picking what suits it**. Satisfy those four and a summary guards against it just as well; what has to be preserved is the purpose, not the "verbatim" mechanism itself.
88
-
89
- **Reproduce it verbatim in two situations**: the original has fallen out of context (there is no original left to check, so a summary cannot satisfy condition 4), or a single report is short enough that summarizing would be overkill. Everything else defaults to a summary.
90
-
91
- **If you cannot meet condition 2, dispatch fewer spokes rather than falling back to verbatim** — the problem is dispatch scale, not presentation; do not treat "not confident" as a reason to revert to full reproduction.
92
-
93
- Then **open a separate "hub assessment" section**: deduplicate, and annotate each item with your preliminary judgment (holds / does not hold + why / needs the user's ruling).
94
-
95
- ### 5. After the user rules
96
-
97
- You revise the plan for the items that were adopted (a new version writes only the differences). **A spoke's output never becomes a document version directly.**
98
-
99
- ## Three things you must verify when assessing a spoke's report
100
-
101
- **One: any claim about safety or correctness — open the file and verify it yourself before passing it on.** Do not report a spoke's claim to the user as a conclusion.
102
-
103
- **Two: a comment is not evidence.** "The spoke says a comment backs this conclusion" is not enough — you also have to verify **whether what the comment says still holds**. Comments drift away from the code, and a drifted comment reads exactly like a correct one.
104
-
105
- **Three: line numbers must be re-verified.** A spoke's citations can be off by anywhere from a few to dozens of lines while **the description of the content is usually right**: usable at the fact level, unusable at the location level.
106
-
107
- > **A wrong location is not a hallucination.** A hallucination is "that passage does not exist in that file at all", and the remedy is a rerun or a different model; a wrong location only needs you to locate it again. Mistaking the former for the latter throws away an entire usable output.
108
-
109
- **A spoke reporting "I could not read X" is a correct report, not a false alarm.** It names a file you did not put on its list, which makes it your gap and not its mistake — filing it under "false alarm", or quietly resolving it yourself and moving on, hides the one signal that tells you the list was wrong. Resolve it if you can, and still say plainly that the list was short.
110
-
111
- ## Red lines
112
-
113
- - A spoke's observations **must never touch "whether to do it"**. If one produces a terminate/block style conclusion, discard that conclusion, keep only the factual part of it, and note this in your report.
114
- - **Never change a plan's status field on your own because of a spoke's observations.**