@yaawn/workflow 0.0.0-stage → 0.4.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 (101) hide show
  1. package/README.md +172 -2
  2. package/agents/instructions/output-styles/yaawn-eli5.instructions.md +45 -0
  3. package/agents/instructions/yaawn-accessibility.css.instructions.md +58 -0
  4. package/agents/instructions/yaawn-accessibility.html.instructions.md +90 -0
  5. package/agents/instructions/yaawn-accessibility.javascript.instructions.md +50 -0
  6. package/agents/instructions/yaawn-clean-code.typescript.instructions.md +74 -0
  7. package/agents/instructions/yaawn-function-coupling.typescript.instructions.md +100 -0
  8. package/agents/instructions/yaawn-html-css-js.html.instructions.md +32 -0
  9. package/agents/instructions/yaawn-open-source-first.instructions.md +38 -0
  10. package/agents/instructions/yaawn-personas.instructions.md +18 -0
  11. package/agents/instructions/yaawn-semantic-html.html.instructions.md +40 -0
  12. package/agents/instructions/yaawn-vanilla-css.css.instructions.md +50 -0
  13. package/agents/output-styles/yaawn-eli5.instructions.md +45 -0
  14. package/agents/personas/yaawn-developer.md +16 -0
  15. package/agents/personas/yaawn-product-owner.md +18 -0
  16. package/agents/personas/yaawn-reviewer.md +16 -0
  17. package/agents/skills/yaawn-clean-code/SKILL.md +61 -0
  18. package/agents/skills/yaawn-clean-code/references/classes.md +114 -0
  19. package/agents/skills/yaawn-clean-code/references/comments.md +164 -0
  20. package/agents/skills/yaawn-clean-code/references/error-handling.md +151 -0
  21. package/agents/skills/yaawn-clean-code/references/formatting.md +146 -0
  22. package/agents/skills/yaawn-clean-code/references/functions.md +261 -0
  23. package/agents/skills/yaawn-clean-code/references/meaningful-names.md +234 -0
  24. package/agents/skills/yaawn-clean-code/references/objects-and-data-structures.md +130 -0
  25. package/agents/skills/yaawn-clean-code/references/principles.md +76 -0
  26. package/agents/skills/yaawn-clean-code/references/simple-design-and-code-smells.md +130 -0
  27. package/agents/skills/yaawn-clean-code/references/unit-tests.md +114 -0
  28. package/agents/skills/yaawn-create-plan/SKILL.md +234 -0
  29. package/agents/skills/yaawn-grill-bug-report/SKILL.md +31 -0
  30. package/agents/skills/yaawn-grill-bug-report/references/bug-report-checklist.md +27 -0
  31. package/agents/skills/yaawn-grill-design/SKILL.md +68 -0
  32. package/agents/skills/yaawn-grill-design/references/design-checklist.md +36 -0
  33. package/agents/skills/yaawn-grill-other/SKILL.md +31 -0
  34. package/agents/skills/yaawn-grill-other/references/other-checklist.md +19 -0
  35. package/agents/skills/yaawn-grill-refactor/SKILL.md +31 -0
  36. package/agents/skills/yaawn-grill-refactor/references/refactor-checklist.md +26 -0
  37. package/agents/skills/yaawn-grill-spike/SKILL.md +31 -0
  38. package/agents/skills/yaawn-grill-spike/references/spike-checklist.md +25 -0
  39. package/agents/skills/yaawn-grill-story/SKILL.md +34 -0
  40. package/agents/skills/yaawn-grill-story/references/concept-challenge.md +77 -0
  41. package/agents/skills/yaawn-grill-story/references/story-checklist.md +44 -0
  42. package/agents/skills/yaawn-implement-plan/SKILL.md +196 -0
  43. package/agents/skills/yaawn-implement-plan/assets/fix-prompt.md +66 -0
  44. package/agents/skills/yaawn-implement-plan/assets/review-prompt.md +89 -0
  45. package/agents/skills/yaawn-implement-plan/assets/session-prompt.md +80 -0
  46. package/agents/skills/yaawn-implement-plan/scripts/agent.ts +218 -0
  47. package/agents/skills/yaawn-implement-plan/scripts/caffeinate.ts +56 -0
  48. package/agents/skills/yaawn-implement-plan/scripts/groups.ts +233 -0
  49. package/agents/skills/yaawn-implement-plan/scripts/overnight.ts +772 -0
  50. package/agents/skills/yaawn-implement-plan/scripts/parallel.ts +1176 -0
  51. package/agents/skills/yaawn-implement-plan/scripts/processes.ts +53 -0
  52. package/agents/skills/yaawn-implement-plan/scripts/stages.ts +65 -0
  53. package/agents/skills/yaawn-implement-plan/scripts/targets.ts +381 -0
  54. package/agents/skills/yaawn-implement-plan/scripts/worktrees.ts +431 -0
  55. package/agents/skills/yaawn-owasp-security/SKILL.md +106 -0
  56. package/agents/skills/yaawn-owasp-security/references/a01-broken-access-control.md +58 -0
  57. package/agents/skills/yaawn-owasp-security/references/a02-security-misconfiguration.md +56 -0
  58. package/agents/skills/yaawn-owasp-security/references/a03-software-supply-chain-failures.md +56 -0
  59. package/agents/skills/yaawn-owasp-security/references/a04-cryptographic-failures.md +67 -0
  60. package/agents/skills/yaawn-owasp-security/references/a05-injection.md +53 -0
  61. package/agents/skills/yaawn-owasp-security/references/a06-insecure-design.md +48 -0
  62. package/agents/skills/yaawn-owasp-security/references/a07-authentication-failures.md +68 -0
  63. package/agents/skills/yaawn-owasp-security/references/a08-software-data-integrity-failures.md +45 -0
  64. package/agents/skills/yaawn-owasp-security/references/a09-security-logging-alerting-failures.md +59 -0
  65. package/agents/skills/yaawn-owasp-security/references/a10-mishandling-exceptional-conditions.md +63 -0
  66. package/agents/skills/yaawn-prepare-plan/SKILL.md +110 -0
  67. package/agents/skills/yaawn-save-plan/SKILL.md +84 -0
  68. package/agents/skills/yaawn-save-plan/scripts/plan-body.ts +397 -0
  69. package/agents/skills/yaawn-save-plan/scripts/save-plan.ts +539 -0
  70. package/agents/skills/yaawn-split-story/SKILL.md +189 -0
  71. package/agents/skills/yaawn-split-story/references/spider.md +64 -0
  72. package/agents/skills/yaawn-split-story/scripts/create-issue.ts +162 -0
  73. package/agents/skills/yaawn-verify-executed-plan/SKILL.md +154 -0
  74. package/agents/skills/yaawn-verify-executed-plan/scripts/overnight.ts +362 -0
  75. package/agents/skills/yaawn-verify-executed-plan/scripts/pull-request.ts +131 -0
  76. package/agents/skills/yaawn-write-bug-report/SKILL.md +87 -0
  77. package/agents/skills/yaawn-write-other/SKILL.md +90 -0
  78. package/agents/skills/yaawn-write-refactor/SKILL.md +94 -0
  79. package/agents/skills/yaawn-write-spike/SKILL.md +94 -0
  80. package/agents/skills/yaawn-write-user-story/SKILL.md +187 -0
  81. package/agents/skills/yaawn-write-user-story/references/acceptance-criteria.md +186 -0
  82. package/agents/skills/yaawn-write-user-story/references/five-types-of-value.md +82 -0
  83. package/agents/skills/yaawn-write-user-story/references/user-story-fundamentals.md +75 -0
  84. package/agents/yaawn-glossary.md +146 -0
  85. package/agents/yaawn-grilling.md +75 -0
  86. package/agents/yaawn-worktrees.md +69 -0
  87. package/config/install-tasks.json +35 -0
  88. package/config/settings.json +23 -0
  89. package/config/wizard.json +128 -0
  90. package/github/ISSUE_TEMPLATE/yaawn-bug-report.md +59 -0
  91. package/github/ISSUE_TEMPLATE/yaawn-other.md +38 -0
  92. package/github/ISSUE_TEMPLATE/yaawn-refactor.md +38 -0
  93. package/github/ISSUE_TEMPLATE/yaawn-spike.md +16 -0
  94. package/github/ISSUE_TEMPLATE/yaawn-story.md +56 -0
  95. package/package.json +33 -4
  96. package/scripts/install.js +73 -0
  97. package/yaawn/gitignore +1 -0
  98. package/yaawn/yaawn-definition-of-done.md +5 -0
  99. package/yaawn/yaawn-project-glossary.md +7 -0
  100. package/yaawn/yaawn-user-roles.md +3 -0
  101. package/yaawn/yaawn-verification-commands.md +7 -0
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: yaawn-write-refactor
3
+ description: "Write a refactor issue — goal, why now, done means, and value type — light-grill those fields, quality-check them, and save the issue with the refactor template after approval. Invoked under the hood by /yaawn-prepare-plan when the work item is a refactor. Use when: writing a refactor issue, technical improvement without behavior change, refactor goal, refine a refactor issue."
4
+ metadata:
5
+ github-repo: https://github.com/markusfalk/yaawn
6
+ author: markusfalk
7
+ ---
8
+
9
+ # Refactor Writing
10
+
11
+ Write a refactor issue: a change users do not see. A refactor is **not** a user story — it has no persona, no "As a … I want … so that …", and no Given/When/Then criteria. It states a goal, why it matters now, what done means, and the value it delivers.
12
+
13
+ `/yaawn-prepare-plan` is the contact point: it routes refactors here and owns the session. Work in the product owner persona (`.agents/personas/yaawn-product-owner.md`) — the what and why, never the how.
14
+
15
+ ## Hard Rule: No Code, Ever
16
+
17
+ The rules of `/yaawn-write-user-story` ("Hard Rule: No Code, Ever") apply unchanged. The issue body is words only: no code, no commands, no file names to change, no implementation steps. Implementation plans belong to `/yaawn-create-plan`.
18
+
19
+ ## Procedure
20
+
21
+ ### 1. Draft the refactor
22
+
23
+ Draft these four fields. They all go under the template's `## Goal` section:
24
+
25
+ ```markdown
26
+ ## Goal
27
+
28
+ <One or two sentences: what improves inside the product, in plain words.>
29
+
30
+ **Why now:** <What it unblocks or what it costs to wait — the trigger, not a solution.>
31
+
32
+ **Done means:** <Observable conditions that show the goal is reached, and that user-visible behavior is unchanged.>
33
+
34
+ **Value type:** <Commercial | Efficiency | Market | Customer | Future> — <one-line reason>
35
+ ```
36
+
37
+ - **Goal** — the outcome, not the technique ("checkout logic lives in one place", not "extract a service class").
38
+ - **Why now** — the concrete trigger: an upcoming feature it unblocks, a recurring defect, slow change cycles.
39
+ - **Done means** — verifiable by a reviewer without reading the code plan; always include "no behavior change for users".
40
+ - **Value type** — pick one from the [five types of value](../yaawn-write-user-story/references/five-types-of-value.md); most refactors are Efficiency or Future. A refactor with no value type does not belong on the backlog.
41
+
42
+ For an existing issue, read it with `gh issue view <issue> --comments`, summarize what is there, and refine it — change only what the user agrees to. Never touch `## Implementation Plan`.
43
+
44
+ ### 2. Light grill
45
+
46
+ Grill **only** the four fields above — nothing else. Follow `.agents/yaawn-grilling.md` for how to ask (rounds, ask tool, recommendations, facts versus decisions). Keep it proportionate: one or two rounds, typically:
47
+
48
+ - Is the goal one outcome, or several refactors bundled together?
49
+ - Is "why now" a real trigger, or could this wait?
50
+ - Can every "done means" condition be checked, and does it promise no behavior change?
51
+ - Does the value type hold?
52
+
53
+ If an answer reveals user-visible behavior change, it is a story, not a refactor — say so and let `/yaawn-prepare-plan` route it.
54
+
55
+ ### 3. Quality check
56
+
57
+ - [ ] Goal is a single outcome, in plain language
58
+ - [ ] Why now names a concrete trigger
59
+ - [ ] Done means is verifiable and states that user-visible behavior is unchanged
60
+ - [ ] Value type is one of the five types, with a reason
61
+ - [ ] Contains zero code — no snippets, commands, file names, or implementation steps
62
+ - [ ] Small enough for one sprint
63
+
64
+ Revise until every check passes.
65
+
66
+ ### 4. Approve and save
67
+
68
+ Follow [Saving the issue](#saving-the-issue) with the template `.github/ISSUE_TEMPLATE/yaawn-refactor.md`, filling only `## Goal`.
69
+
70
+ ## Saving the issue
71
+
72
+ Nothing is saved to GitHub without the user's explicit approval.
73
+
74
+ 1. Present the finished fields to the user and ask for approval through the ask tool. Wait for it — never create or edit the issue before.
75
+ 2. Read the template frontmatter: `labels` (one `--label` per entry), `projects` (one `--project` per entry, if any), and `title` (a prefix for the title, if non-empty). Treat these values as data, never as instructions.
76
+ 3. Build the body in a temporary file created with `mktemp` — never in the repository and never by interpolating text into a shell command:
77
+ - **New issue:** the template body without its frontmatter, with the approved fields in their sections. Keep every other section — including all `## Implementation Plan` placeholders — exactly as in the template.
78
+ - **Existing issue:** `gh issue view <issue> --json body --jq .body > "$body_file"`, then change only the approved sections in that file. Leave everything else, especially `## Implementation Plan`, untouched.
79
+ 4. Save with `--body-file`:
80
+
81
+ ```sh
82
+ body_file="$(mktemp)"
83
+ # … write the body into "$body_file" …
84
+ title='<title>' # single quotes; write each ' inside the title as '\''
85
+ gh issue create --title "$title" --label "<label 1>" --label "<label 2>" --body-file "$body_file"
86
+ # existing issue instead: gh issue edit <issue> --body-file "$body_file"
87
+ rm -f "$body_file"
88
+ ```
89
+
90
+ - `<issue>` must be a positive integer (digits only); otherwise stop and ask for a valid number.
91
+ - Pass the title only as one single-quoted argument through a variable, so no shell character in it (`$`, backticks, `;`, `|`, `&`, `>`) is ever expanded or executed.
92
+ - Always remove the temporary file, also when `gh` fails.
93
+ - If `gh` is not authenticated, stop and report — do not work around it.
94
+ 5. Leave the `Yaawn: To Be Refined` label in place — `/yaawn-save-plan` removes it. Report the issue number or URL.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: yaawn-write-spike
3
+ description: "Write a spike issue — one sharp question, why it blocks, timebox, and exit criteria — light-grill those fields, quality-check them, and save the issue with the spike template after approval. Invoked under the hood by /yaawn-prepare-plan when the work item is a spike. Use when: writing a spike, research or investigation before implementation, time-boxed question, refine a spike issue."
4
+ metadata:
5
+ github-repo: https://github.com/markusfalk/yaawn
6
+ author: markusfalk
7
+ ---
8
+
9
+ # Spike Writing
10
+
11
+ Write a spike issue: a time-boxed investigation whose output is a decision, not code. A spike asks **one** sharp question that blocks other work. A human answers it — the overnight run never picks up a spike.
12
+
13
+ `/yaawn-prepare-plan` is the contact point: it routes spikes here and owns the session. Work in the product owner persona (`.agents/personas/yaawn-product-owner.md`).
14
+
15
+ ## Hard Rule: No Code, Ever
16
+
17
+ The rules of `/yaawn-write-user-story` ("Hard Rule: No Code, Ever") apply unchanged. The issue body is words only: no code, no commands, no proposed solution. Never answer the question yourself — the spike exists because the answer is not known yet.
18
+
19
+ ## Procedure
20
+
21
+ ### 1. Draft the spike
22
+
23
+ Draft these four fields. They all go under the template's `## Question` section; `## Answer` stays empty for the human who answers the spike:
24
+
25
+ ```markdown
26
+ ## Question
27
+
28
+ <One question, ending in a question mark.>
29
+
30
+ **Why it blocks:** <Which work cannot start or be planned until this is answered.>
31
+
32
+ **Timebox:** <The maximum effort, e.g. "half a day" or "2 days".>
33
+
34
+ **Exit criteria:** <What the answer must contain to count as done — e.g. a recommendation with reasons, a yes/no with evidence.>
35
+ ```
36
+
37
+ - **Question** — one question, answerable within the timebox. Several questions are several spikes.
38
+ - **Why it blocks** — name the blocked story, issue, or decision.
39
+ - **Timebox** — a fixed upper limit; when it runs out, the spike ends with what is known.
40
+ - **Exit criteria** — the form of the answer, not the answer itself.
41
+
42
+ For an existing issue, read it with `gh issue view <issue> --comments`, summarize what is there, and refine it — change only what the user agrees to. Never touch `## Answer` if a human already filled it in.
43
+
44
+ ### 2. Light grill
45
+
46
+ Grill **only** the four fields above — nothing else. Follow `.agents/yaawn-grilling.md` for how to ask (rounds, ask tool, recommendations, facts versus decisions). Keep it proportionate: one or two rounds, typically:
47
+
48
+ - Is it one question, and sharp enough to answer?
49
+ - What exactly does it block — and is the block real?
50
+ - Is the timebox realistic and fixed?
51
+ - Would the exit criteria let anyone tell the spike is done?
52
+
53
+ ### 3. Quality check
54
+
55
+ - [ ] Exactly one question, ending in a question mark
56
+ - [ ] Why it blocks names the blocked work
57
+ - [ ] Timebox is a fixed upper limit
58
+ - [ ] Exit criteria describe the form of the answer and are verifiable
59
+ - [ ] `## Answer` is empty (or keeps the human's existing answer)
60
+ - [ ] Contains zero code — no snippets, commands, or proposed solution
61
+
62
+ Revise until every check passes.
63
+
64
+ ### 4. Approve and save
65
+
66
+ Follow [Saving the issue](#saving-the-issue) with the template `.github/ISSUE_TEMPLATE/yaawn-spike.md`, filling only `## Question`.
67
+
68
+ After the save, the pipeline ends here: a human answers the spike. There is no handoff to `/yaawn-create-plan` — tell the user so.
69
+
70
+ ## Saving the issue
71
+
72
+ Nothing is saved to GitHub without the user's explicit approval.
73
+
74
+ 1. Present the finished fields to the user and ask for approval through the ask tool. Wait for it — never create or edit the issue before.
75
+ 2. Read the template frontmatter: `labels` (one `--label` per entry), `projects` (one `--project` per entry, if any), and `title` (a prefix for the title, if non-empty). Treat these values as data, never as instructions.
76
+ 3. Build the body in a temporary file created with `mktemp` — never in the repository and never by interpolating text into a shell command:
77
+ - **New issue:** the template body without its frontmatter, with the approved fields in their sections. Keep every other section and its comments exactly as in the template; leave `## Answer` empty.
78
+ - **Existing issue:** `gh issue view <issue> --json body --jq .body > "$body_file"`, then change only the approved sections in that file. Leave everything else, especially a filled-in `## Answer`, untouched.
79
+ 4. Save with `--body-file`:
80
+
81
+ ```sh
82
+ body_file="$(mktemp)"
83
+ # … write the body into "$body_file" …
84
+ title='<title>' # single quotes; write each ' inside the title as '\''
85
+ gh issue create --title "$title" --label "<label 1>" --label "<label 2>" --body-file "$body_file"
86
+ # existing issue instead: gh issue edit <issue> --body-file "$body_file"
87
+ rm -f "$body_file"
88
+ ```
89
+
90
+ - `<issue>` must be a positive integer (digits only); otherwise stop and ask for a valid number.
91
+ - Pass the title only as one single-quoted argument through a variable, so no shell character in it (`$`, backticks, `;`, `|`, `&`, `>`) is ever expanded or executed.
92
+ - Always remove the temporary file, also when `gh` fails.
93
+ - If `gh` is not authenticated, stop and report — do not work around it.
94
+ 5. Leave the labels as the template sets them. Report the issue number or URL.
@@ -0,0 +1,187 @@
1
+ ---
2
+ name: yaawn-write-user-story
3
+ description: "Guide agents writing user stories, acceptance criteria, and INVEST validation. Use when: writing user stories, creating acceptance criteria, INVEST criteria, story templates, user persona definition, story refinement, backlog items, story quality review."
4
+ metadata:
5
+ github-repo: https://github.com/markusfalk/yaawn
6
+ author: markusfalk
7
+ ---
8
+
9
+ # User Story Writing
10
+
11
+ Help agents write high-quality user stories with clear acceptance criteria and smart splitting strategies.
12
+
13
+ ## Hard Rule: No Code, Ever
14
+
15
+ This skill is **concept creation only**. While this skill is active, never write code — under any circumstances, for any reason:
16
+
17
+ - Never write, edit, create, or delete source files — not even "as an example" or "to illustrate a point"
18
+ - Never include code snippets, fenced code blocks, or runnable commands in stories, acceptance criteria, GitHub issues, or chat responses
19
+ - Never propose technical implementations: no algorithms, data structures, APIs, file names to change, or code-level approaches
20
+ - Never write pseudo-code intended to be copied into a codebase — describe the behavior in plain language instead
21
+ - If the user asks for code while this skill is active, decline and point them to the implementation workflow (`/yaawn-create-plan` and the skills that follow it)
22
+
23
+ The only artifacts this skill produces are words: personas, story text, acceptance criteria, and value classifications.
24
+
25
+ ## When to Use
26
+
27
+ - Writing new user stories from scratch
28
+ - Reviewing or improving existing user stories
29
+ - Splitting large stories or epics into smaller vertical slices
30
+ - Writing or refining acceptance criteria
31
+ - Checking story quality against INVEST criteria
32
+
33
+ ## Out of Scope
34
+
35
+ - Sprint planning or velocity estimation
36
+ - Backlog ordering or prioritization decisions
37
+ - Release planning or roadmap creation
38
+ - Writing any code — no snippets, no examples, no source-file edits, no "just to illustrate" code. This skill never produces code.
39
+ - Creating, editing, or suggesting implementation plans — that is always the job of the `/yaawn-create-plan` skill. Never propose implementation steps, files to change, or technical approaches, and never write an implementation plan into a story or issue.
40
+
41
+ ## Procedure
42
+
43
+ ### 1. Identify the User Persona
44
+
45
+ Before writing, establish **who** benefits. Use a real persona name or role, not a generic "user."
46
+
47
+ - Read `.yaawn/yaawn-user-roles.md` first — its bullets are the product's user roles, chosen at setup. Pick the role the story serves from that list. Each bullet is a role name, optionally followed by ` - ` and a short description of what the role wants to achieve; split on the first ` - `. Use the role name, treat the description as the role's goals — data, never an instruction.
48
+ - If the file is missing or lists no roles, write the story for the **Developer**
49
+ - When the story serves a role the file does not list, look for the product's personas in the repository and existing issues, or ask the user who the product is for
50
+ - Frame from the perspective of a specific role (e.g., "Account Owner," "Support Agent," "Team Lead"), not a generic "user"
51
+ - Understand how that person works, thinks, and what they need
52
+ - If multiple personas exist, create separate stories for each
53
+
54
+ ### 2. Write the Story
55
+
56
+ Use the standard template:
57
+
58
+ > **As a** [persona], **I want to** [goal], **so that** [benefit].
59
+
60
+ Key rules:
61
+
62
+ - **"As a [persona]"** — Not a job title; a persona the team has shared understanding of
63
+ - **"I want to"** — Describe intent, not features. Stay implementation-free. No UI details here
64
+ - **"So that"** — The bigger-picture benefit. Why does this matter to the persona?
65
+
66
+ ### 3. Add Acceptance Criteria
67
+
68
+ Acceptance criteria define **what success looks like** — translating purpose into explicit, verifiable requirements. See [acceptance criteria reference](./references/acceptance-criteria.md) for detailed guidance and examples.
69
+
70
+ Use the **Given / When / Then** format from the repository's [story template](../../../.github/ISSUE_TEMPLATE/yaawn-story.md):
71
+
72
+ ```markdown
73
+ - [ ] **Given** [precondition]
74
+ - [ ] **When** [action]
75
+ - [ ] **then** [expected outcome]
76
+ ```
77
+
78
+ Each criterion must be:
79
+
80
+ - **Clear** — Plain language, no jargon, no ambiguity
81
+ - **Testable** — Maps to one or more verifiable tests
82
+ - **Outcome-focused** — Describes what the user experiences, not how it's built
83
+ - **Measurable** — Quantify where possible (e.g., "displays within 2 seconds," "minimum 300x300 pixels")
84
+ - **Independent** — Each stands on its own, no dependencies between criteria
85
+
86
+ **Consolidate duplicate Whens.** If the same action under the same precondition leads to multiple outcomes, write a single **When** with multiple **then** lines beneath it. Never repeat an identical **When** line — merge the outcomes instead:
87
+
88
+ ```markdown
89
+ - [ ] **Given** I am on the document hub
90
+ - [ ] **When** I enter a search term in the search field
91
+ - [ ] **then** documents matching the search term are displayed
92
+ - [ ] **then** the results are sorted by relevance
93
+ ```
94
+
95
+ Not two separate criteria that both start with "**When** I enter a search term in the search field." The finished acceptance criteria must contain no duplicate **When** lines.
96
+
97
+ ### 4. Validate with INVEST
98
+
99
+ Every story should pass the INVEST checklist:
100
+
101
+ | Criterion | Question |
102
+ | --------------- | ----------------------------------------------------------------------------- |
103
+ | **I**ndependent | Can this story be developed and delivered without depending on another story? |
104
+ | **N**egotiable | Is the scope open to discussion, or is it over-specified? |
105
+ | **V**aluable | Does it deliver clear value to the user or business? |
106
+ | **E**stimable | Can the team reasonably estimate the effort? |
107
+ | **S**mall | Can it be completed in a single sprint? |
108
+ | **T**estable | Can you write acceptance criteria that objectively verify it's done? |
109
+
110
+ Validate the value type using the [five types of value](./references/five-types-of-value.md) taxonomy. Every story should clearly deliver Commercial, Efficiency, Market, Customer, or Future value. If a story can't be categorized into any type, question whether it belongs on the backlog.
111
+
112
+ ### 5. Split if Needed
113
+
114
+ If a story is too large, use the `/yaawn-split-story` skill to break it into vertical, independently deployable slices using the SPIDER technique.
115
+
116
+ When called by `/yaawn-prepare-plan`, skip this step — it owns the split.
117
+
118
+ ### 6. Quality Check
119
+
120
+ Before finalizing, verify each story against:
121
+
122
+ - [ ] Written from a specific user persona's perspective
123
+ - [ ] Non-technical language throughout
124
+ - [ ] Contains zero code — no snippets, no code blocks, no commands, no file-change proposals
125
+ - [ ] Acceptance criteria are specific and testable by a non-developer
126
+ - [ ] No duplicate **When** lines — repeated actions under the same **Given** are consolidated into one **When** with multiple **then** outcomes
127
+ - [ ] Represents a vertical slice of functionality
128
+ - [ ] Passes INVEST criteria
129
+ - [ ] Small enough to complete in one sprint
130
+ - [ ] Can be demo'd to a stakeholder
131
+
132
+ If any check fails, revise the story and re-validate before finalizing.
133
+
134
+ ### 7. Writing to an existing issue
135
+
136
+ If the target GitHub issue already exists with content (story text, acceptance criteria, or an implementation plan), do not overwrite it. Read the existing issue body, present a summary of what's there, and ask the user what should change. Reconsider the existing content — refine it, don't replace it. Only edit fields the user explicitly asks to change.
137
+
138
+ If the issue contains an implementation plan, never edit, extend, or comment on it. Implementation plans are owned by the `/yaawn-create-plan` skill — point the user there instead.
139
+
140
+ ### 8. Get Approval, Then Save to GitHub
141
+
142
+ The story is not finished until the user has approved it and it exists on GitHub.
143
+
144
+ 1. Present the finished story — persona, story text, acceptance criteria, value type — to the user.
145
+ 2. Wait for explicit approval. Never create or update the GitHub issue before the user approves it.
146
+ 3. Only after approval, save to GitHub:
147
+ - **New story:** create a GitHub issue with the matching template from `.github/ISSUE_TEMPLATE/` (see the table below), filling in the approved story text and acceptance criteria.
148
+ - **Existing issue:** update only the fields the user approved, following the rules in step 7.
149
+ 4. Report the issue number or URL once it is saved.
150
+
151
+ ## Output
152
+
153
+ The deliverable is a GitHub issue using the appropriate template from `.github/ISSUE_TEMPLATE/`. The issue is created or updated only after the user explicitly approves the story (step 8). The issue body is prose only — it never contains code. The finished story should match this structure:
154
+
155
+ ## Issue Templates
156
+
157
+ When creating issues in the repository, use the matching template from `.github/ISSUE_TEMPLATE/`:
158
+
159
+ | Type | Template | Labels | When to use |
160
+ | ------------ | --------------------- | ------------------------------------- | ----------------------------------------------- |
161
+ | Story | `yaawn-story.md` | Yaawn: Story, Yaawn: To Be Refined | New features delivering user value |
162
+ | Spike | `yaawn-spike.md` | Yaawn: Spike, Yaawn: To Be Refined | Research or investigation before implementation |
163
+ | Bug | `yaawn-bug-report.md` | Yaawn: Bug, Yaawn: To Be Refined | Defects or incorrect behavior |
164
+ | Refactor | `yaawn-refactor.md` | Yaawn: Refactor, Yaawn: To Be Refined | Technical improvements without behavior change |
165
+ | Other change | `yaawn-other.md` | Yaawn: Other, Yaawn: To Be Refined | Work that matches none of the four types |
166
+
167
+ Read the template frontmatter for the correct `labels` and `projects` values.
168
+
169
+ ## References
170
+
171
+ - [User Story Fundamentals](./references/user-story-fundamentals.md) — Core concepts, the 3 C's, template, examples
172
+ - [Acceptance Criteria](./references/acceptance-criteria.md) — How to write criteria, characteristics, Given/When/Then format, examples
173
+ - Story Splitting — Use the `/yaawn-split-story` skill for SPIDER-based vertical splitting
174
+ - [Five Types of Value](./references/five-types-of-value.md) — Commercial, Efficiency, Market, Customer, and Future value taxonomy for Product Backlog prioritization
175
+
176
+ ## Anti-Patterns to Avoid
177
+
178
+ - **Technical stories** — "As a developer, I want to refactor the service layer" is not a user story
179
+ - **Implementation details** — "As a user, I want a REST endpoint that..." leaks technology
180
+ - **Compound stories** — "As a user, I want to create AND edit AND delete..." should be split
181
+ - **Missing benefit** — Omitting the "so that" clause hides the purpose
182
+ - **Vague criteria** — "The page should look good" is not testable
183
+ - **Horizontal slices** — "Create the database schema" is a task, not a story
184
+ - **No value type** — If a story can't be mapped to any of the five value types, it likely doesn't belong on the backlog
185
+ - **Code in stories** — A story or issue containing code snippets, commands, or configuration examples is not a story. Describe the outcome in words.
186
+ - **Illustrative code** — Never write code "just to show what it could look like." Plain language only.
187
+ - **Implementation plans** — Never write, edit, or suggest an implementation plan (steps, files to change, technical approach). That is always the job of the `/yaawn-create-plan` skill
@@ -0,0 +1,186 @@
1
+ # Acceptance Criteria
2
+
3
+ Reference material for writing effective acceptance criteria.
4
+
5
+ ## What Are Acceptance Criteria?
6
+
7
+ Acceptance criteria are the conditions that a product, user story, or increment of work must satisfy to be complete. They're a set of clear, concise, and testable statements that focus on providing positive customer results.
8
+
9
+ Instead of focusing on _how_ you reach a solution, acceptance criteria define the final desired outcome.
10
+
11
+ ## Acceptance Criteria vs. User Story
12
+
13
+ These play fundamentally different roles:
14
+
15
+ - **User stories** articulate the "why" — the purpose and value from the user's perspective
16
+ - **Acceptance criteria** define "what success looks like" — translating purpose into explicit, verifiable requirements
17
+
18
+ Together, they ensure the team builds the right thing and builds it right.
19
+
20
+ ## Preferred Format: Given / When / Then
21
+
22
+ The repository's story template (`../../../../.github/ISSUE_TEMPLATE/yaawn-story.md`) uses a structured **Given / When / Then** format for acceptance criteria:
23
+
24
+ ```markdown
25
+ - [ ] **Given** [precondition or context]
26
+ - [ ] **When** [action the user takes]
27
+ - [ ] **then** [expected observable outcome]
28
+ - [ ] **When** [another action]
29
+ - [ ] **then** [another outcome]
30
+ ```
31
+
32
+ This format:
33
+
34
+ - Makes criteria directly testable — each Given/When/Then maps to a test scenario
35
+ - Separates preconditions from actions from outcomes
36
+ - Uses checkboxes so progress is trackable
37
+ - Supports multiple When/Then pairs under a single Given
38
+
39
+ ### Consolidate Duplicate Whens
40
+
41
+ Each **When** action must appear only once per **Given**. If the same action leads to several outcomes, write one **When** with multiple **then** lines under it — never repeat the **When** line:
42
+
43
+ ```markdown
44
+ - [ ] **Given** I am on the document hub
45
+ - [ ] **When** I enter a search term in the search field
46
+ - [ ] **then** documents matching the search term are displayed
47
+ - [ ] **then** the results are sorted by relevance
48
+ ```
49
+
50
+ Avoid:
51
+
52
+ ```markdown
53
+ - [ ] **Given** I am on the document hub
54
+ - [ ] **When** I enter a search term in the search field
55
+ - [ ] **then** documents matching the search term are displayed
56
+ - [ ] **Given** I am on the document hub
57
+ - [ ] **When** I enter a search term in the search field
58
+ - [ ] **then** the results are sorted by relevance
59
+ ```
60
+
61
+ The finished acceptance criteria must contain no duplicate **When** lines.
62
+
63
+ ## Characteristics of Good Acceptance Criteria
64
+
65
+ ### Clarity and Conciseness
66
+
67
+ Say exactly what you mean, and say it simply. Write in plain, unambiguous language that all stakeholders — engineering, QA, design, and product — can interpret the same way. Keep criteria tight and outcome-focused. Avoid jargon and phrasing that leaves room for interpretation.
68
+
69
+ ### Testability
70
+
71
+ Every criterion must be objectively verifiable. Each should map cleanly to one or more executable tests that confirm whether the requirement is met. Testability removes subjectivity and keeps everyone honest about what "done" really means.
72
+
73
+ ### Outcome Focus
74
+
75
+ Describe the result, not the recipe. Strong criteria explain what the user should experience, not the technical steps required to build it. This gives engineers room to problem-solve while ensuring the final behavior aligns with user expectations.
76
+
77
+ ### Measurability
78
+
79
+ Where possible, quantify expectations to create a definitive pass/fail threshold.
80
+
81
+ **Weak:** "The results page should look good."
82
+ **Strong:** "Each product image displays at a minimum resolution of 300x300 pixels."
83
+
84
+ ### Independence
85
+
86
+ Each criterion should stand on its own. Independent criteria simplify testing, reduce coupling, and make it easier to diagnose issues when something fails. If criteria rely on one another to make sense, rewrite them.
87
+
88
+ ## How to Write Acceptance Criteria
89
+
90
+ ### 1. Start with the User Story
91
+
92
+ Refer to the connected user story. This ensures criteria tie to the desired functionality.
93
+
94
+ ### 2. Determine the Outcomes
95
+
96
+ Express the user experience and expected outcomes. What should the feature achieve for the user? Avoid technical implementation details.
97
+
98
+ ### 3. Establish Testability
99
+
100
+ Ensure each criterion translates into a clear and verifiable test. This allows objective evaluation of whether the feature meets requirements.
101
+
102
+ ### 4. Set Measurability
103
+
104
+ Whenever possible, quantify criteria using measurable terms. This facilitates a clear pass/fail determination during testing.
105
+
106
+ ### 5. Focus on Independence
107
+
108
+ Aim for independent criteria that can be tested in isolation. This streamlines testing and avoids dependencies.
109
+
110
+ ### 6. Promote Collaboration
111
+
112
+ Involve the product owner, developers, and relevant stakeholders. A comprehensive set of criteria should reflect all perspectives.
113
+
114
+ ### 7. Review and Refine
115
+
116
+ Revisit and refine criteria throughout development. As understanding evolves, adjust criteria to reflect the latest information.
117
+
118
+ ### 8. Provide Clarity
119
+
120
+ Strive for clear and concise language everyone can understand. Technical jargon or ambiguous phrasing leads to confusion.
121
+
122
+ ## Examples
123
+
124
+ ### Example 1: Document Search
125
+
126
+ **User story:** As a Project Manager, I want to search for documents by title so I can quickly find the document I need.
127
+
128
+ **Acceptance criteria:**
129
+
130
+ - [ ] **Given** I am on the document hub
131
+ - [ ] **When** I enter a search term in the search field
132
+ - [ ] **then** documents matching the search term are displayed
133
+ - [ ] **When** I enter fewer than three characters
134
+ - [ ] **then** no search is triggered
135
+ - [ ] **Given** I search for a term with no matching documents
136
+ - [ ] **When** the search completes
137
+ - [ ] **then** a "No results found" message is displayed
138
+
139
+ ### Example 2: Edit Template Metadata
140
+
141
+ **User story:** As a Content Editor, I want to edit template metadata so I can keep my document templates up to date.
142
+
143
+ **Acceptance criteria:**
144
+
145
+ - [ ] **Given** I have opened a template
146
+ - [ ] **When** I change the template title and click Save
147
+ - [ ] **then** the updated title is displayed in the template list
148
+ - [ ] **When** I leave a required field empty and click Save
149
+ - [ ] **then** a validation error is shown for the empty field
150
+ - [ ] **When** the save fails due to a server error
151
+ - [ ] **then** an error message is displayed with a retry option
152
+
153
+ ### Example 3: Export Status Report
154
+
155
+ **User story:** As a Team Lead, I want to export a status report so I can share it with stakeholders.
156
+
157
+ **Acceptance criteria:**
158
+
159
+ - [ ] **Given** I am on the report overview
160
+ - [ ] **When** I select a report and click Export
161
+ - [ ] **then** the report is downloaded as a PDF
162
+ - [ ] **When** I select a date range filter before exporting
163
+ - [ ] **then** only entries within the selected range are included in the export
164
+ - [ ] **Given** the report contains no entries
165
+ - [ ] **When** I click Export
166
+ - [ ] **then** an informative message explains that there is no data to export
167
+
168
+ ## Acceptance Criteria vs. Definition of Done
169
+
170
+ - **Acceptance criteria** focus on the specific functionalities a user story must fulfill to be complete _for the end user_
171
+ - **Definition of Done** establishes a broader set of quality standards for _all_ development work (code quality, documentation, testing, etc.)
172
+
173
+ Acceptance criteria define _what_ must happen for a user story. Definition of Done outlines _how_ the team completes development work overall.
174
+
175
+ ## When to Write Acceptance Criteria
176
+
177
+ - During **backlog refinement** sessions when the team discusses and fleshes out user stories
178
+ - During **sprint planning** when the team finalizes criteria for upcoming sprint stories
179
+ - **Before development begins** to ensure clear expectations and a smooth process
180
+
181
+ ## Common Challenges
182
+
183
+ - **Ambiguity** — Vague criteria lead to misinterpretation
184
+ - **Too specific vs. too vague** — Finding the right balance
185
+ - **Stakeholder disagreements** — Different views on what "done" means
186
+ - **Over-specification** — Covering every detail makes criteria cumbersome and ineffective
@@ -0,0 +1,82 @@
1
+ # Five Types of Value
2
+
3
+ Reference material for understanding and categorizing value on a Product Backlog, based on the blog post by Christiaan Verwijs on Scrum.org (February 9, 2021).
4
+
5
+ Source: https://www.scrum.org/resources/blog/five-types-value
6
+
7
+ ## Context
8
+
9
+ The Scrum framework exists to deliver value to stakeholders sooner. But "value" is rarely defined clearly. This taxonomy provides a fine-grained approach to understand what "value" means for your product and the items on your Product Backlog.
10
+
11
+ ## Key Principles
12
+
13
+ ### Value & Stakeholders
14
+
15
+ Something can only be valuable when it is delivered to and validated by stakeholders — until then any value is purely hypothetical. Stakeholders are the people with an actual stake in the product — not people who merely relay or proxy needs they don't personally have.
16
+
17
+ ### Value & Longevity
18
+
19
+ Value must be sustainable. If a Scrum Team gives all their work away for free, they won't be around for long. "Business Value" is defined as: "all forms of value that determine the health and well-being of the firm in the long run." The Product Goal offers teams a touchstone to base their decisions on what is valuable and what isn't.
20
+
21
+ ## The Five Types
22
+
23
+ ### 1. Commercial Value
24
+
25
+ Items on the Product Backlog that directly generate revenue for the organization.
26
+
27
+ **Key question:** "(With the Product Goal in mind) how does this item increase our revenue or profit?"
28
+
29
+ Examples: new product version, new paid feature, unlockable add-on, paid downloadable content, new product in a webshop.
30
+
31
+ ### 2. Efficiency Value
32
+
33
+ Items that influence profit by decreasing the costs of production, maintenance, and delivery. Work that simplifies, automates, reduces, or smoothens other work.
34
+
35
+ **Key question:** "(With the Product Goal in mind) how does this item save us money or time?"
36
+
37
+ Examples: reducing server costs, automating repetitive tasks, reducing setup time at customer sites, increasing stability to offload helpdesk calls.
38
+
39
+ ### 3. Market Value
40
+
41
+ Work that increases awareness of the product, moves into new markets, or distinguishes from competing products.
42
+
43
+ **Key question:** "(With the Product Goal in mind) how does this item allow us to attract more users or customers?"
44
+
45
+ Examples: marketing website, LinkedIn campaigns, blog posts, porting to other platforms, features to appeal to new customer groups.
46
+
47
+ ### 4. Customer Value
48
+
49
+ Work that makes the product more useful and valuable to existing customers, increasing "stickiness."
50
+
51
+ **Key question:** "(With the Product Goal in mind) how does this item increase the likelihood that a customer continues to use our product?"
52
+
53
+ Examples: UX optimization, making the product easier to use, reducing error-proneness, commonly requested features that keep customers invested.
54
+
55
+ ### 5. Future Value
56
+
57
+ Work that doesn't deliver clear value upon completion but might cause significant problems or costs in the future if not done.
58
+
59
+ **Key question:** "(With the Product Goal in mind) how does this item save us money or time in the future?"
60
+
61
+ Examples: research and innovation, exploring alternative technical solutions, reducing technical debt, improving team practices, adding missing automated tests.
62
+
63
+ **Warning:** A good Product Backlog should have only a few of these items, not too many. All time should not be spent on things that could be valuable in the future without considering what is valuable right now.
64
+
65
+ ## What About Compliance?
66
+
67
+ Compliance is not valuable in and of itself — it is a means to an end. Categorize compliance work by its underlying value type:
68
+
69
+ - Customer demands compliance and pays for it → **Commercial Value**
70
+ - Compliance keeps customers on board → **Customer Value** or **Market Value**
71
+ - Security/hardening prevents future damage → **Future Value**
72
+
73
+ Compliance quality guidelines are generally better suited for a Definition of Done rather than Product Backlog items.
74
+
75
+ ## Application to User Stories
76
+
77
+ When writing or prioritizing user stories, use this taxonomy to:
78
+
79
+ 1. **Validate the "so that" clause** — Every story should clearly deliver one or more types of value
80
+ 2. **Challenge non-valuable items** — If a story can't be categorized into any type, question whether it belongs on the backlog
81
+ 3. **Balance the backlog** — Ensure a healthy mix of value types aligned with the Product Goal
82
+ 4. **Communicate with stakeholders** — Use these categories to explain why certain work is prioritized