@neikyun/ciel 6.11.0 → 6.11.2

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 (39) hide show
  1. package/assets/.claude/hooks/memory-engine.py +29 -4
  2. package/assets/.claude/settings.json +8 -8
  3. package/assets/commands/ciel-create-skill.md +2 -2
  4. package/assets/commands/ciel-status.md +1 -1
  5. package/assets/platforms/opencode/.opencode/agents/ciel-improver.md +2 -2
  6. package/assets/platforms/opencode/.opencode/commands/ciel-create-skill.md +2 -2
  7. package/assets/platforms/opencode/.opencode/commands/ciel-memory-bootstrap.md +195 -0
  8. package/assets/skills/workflow/adr-auto/SKILL.md +88 -0
  9. package/assets/skills/workflow/ai-failure-modes-detector/SKILL.md +180 -0
  10. package/assets/skills/workflow/ask-window/SKILL.md +119 -0
  11. package/assets/skills/workflow/avec-quoi-versioner/SKILL.md +111 -0
  12. package/assets/skills/workflow/ci-watcher/SKILL.md +194 -0
  13. package/assets/skills/workflow/critiquer-auditor/SKILL.md +135 -0
  14. package/assets/skills/workflow/critiquer-auditor/reference.md +134 -0
  15. package/assets/skills/workflow/debug-reasoning-rca/SKILL.md +174 -0
  16. package/assets/skills/workflow/depth-classifier/SKILL.md +118 -0
  17. package/assets/skills/workflow/diverge/SKILL.md +91 -0
  18. package/assets/skills/workflow/doc-validator-official/SKILL.md +196 -0
  19. package/assets/skills/workflow/evaluer-sizer/SKILL.md +112 -0
  20. package/assets/skills/workflow/faire-gatekeeper/SKILL.md +99 -0
  21. package/assets/skills/workflow/flux-narrator/SKILL.md +93 -0
  22. package/assets/skills/workflow/memoire/SKILL.md +198 -0
  23. package/assets/skills/workflow/memoire-consolidator/SKILL.md +91 -0
  24. package/assets/skills/workflow/meta-critiquer/SKILL.md +112 -0
  25. package/assets/skills/workflow/modern-patterns-checker/SKILL.md +166 -0
  26. package/assets/skills/workflow/pattern-fitness-check/SKILL.md +108 -0
  27. package/assets/skills/workflow/playwright-visual-critic/SKILL.md +98 -0
  28. package/assets/skills/workflow/pr-review-responder/SKILL.md +214 -0
  29. package/assets/skills/workflow/prouver-verifier/SKILL.md +184 -0
  30. package/assets/skills/workflow/prouver-verifier/reference.md +152 -0
  31. package/assets/skills/workflow/quoi-framer/SKILL.md +91 -0
  32. package/assets/skills/workflow/relire-critic/SKILL.md +99 -0
  33. package/assets/skills/workflow/security-regression-check/SKILL.md +86 -0
  34. package/assets/skills/workflow/self-consistency-verifier/SKILL.md +85 -0
  35. package/assets/skills/workflow/spike-mode/SKILL.md +101 -0
  36. package/assets/skills/workflow/stride-analyzer/SKILL.md +96 -0
  37. package/assets/skills/workflow/stride-analyzer/reference.md +144 -0
  38. package/assets/skills/workflow/test-strategy-vitest-playwright/SKILL.md +119 -0
  39. package/package.json +1 -1
@@ -0,0 +1,214 @@
1
+ ---
2
+ name: pr-review-responder
3
+ description: Handles PR review comments — lists unresolved threads via GraphQL, classifies accept/reject/clarify, applies fixes, marks resolved, re-requests review. Invoke on CHANGES_REQUESTED, "respond to PR review", "address review feedback". Inline.
4
+ allowed-tools: Bash, Read, Edit
5
+ context: inline
6
+ ---
7
+
8
+ # pr-review-responder — Respond to PR feedback systematically
9
+
10
+ A PR in CHANGES_REQUESTED state is a dead PR until its comments are addressed. This skill closes the feedback loop: list, classify, respond, mark resolved, re-request.
11
+
12
+ ---
13
+
14
+ ## Inputs
15
+
16
+ ```
17
+ PR_NUMBER: [from current branch or explicit]
18
+ REVIEWER: [optional — filter by specific reviewer login]
19
+ MODE: [interactive | batch — default interactive; in batch, only respond to accept/reject, flag clarify for user]
20
+ ```
21
+
22
+ ### Auto-inference sources
23
+
24
+ - **PR_NUMBER** → `gh pr view --json number --jq .number`
25
+ - **REVIEWER** → latest reviewer from `gh pr view --json reviews --jq '.reviews[-1].author.login'`
26
+
27
+ ---
28
+
29
+ ## Preflight
30
+
31
+ ```bash
32
+ gh auth status 2>&1 | grep -q "Logged in" || exit 1
33
+ PR_NUMBER=${PR_NUMBER:-$(gh pr view --json number --jq .number)}
34
+ [ -z "$PR_NUMBER" ] && { echo "No PR for current branch"; exit 1; }
35
+
36
+ # Must be on the PR's head branch to push fixes
37
+ HEAD=$(gh pr view "$PR_NUMBER" --json headRefName --jq .headRefName)
38
+ CURRENT=$(git rev-parse --abbrev-ref HEAD)
39
+ [ "$HEAD" = "$CURRENT" ] || { echo "Checkout the PR branch first: gh pr checkout $PR_NUMBER"; exit 1; }
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Process
45
+
46
+ ### 1. Fetch unresolved review threads
47
+
48
+ GitHub's REST API doesn't expose thread-resolution state directly — use GraphQL:
49
+
50
+ ```bash
51
+ OWNER=$(gh repo view --json owner --jq .owner.login)
52
+ REPO=$(gh repo view --json name --jq .name)
53
+
54
+ gh api graphql -f query="
55
+ query {
56
+ repository(owner: \"$OWNER\", name: \"$REPO\") {
57
+ pullRequest(number: $PR_NUMBER) {
58
+ reviewThreads(first: 100) {
59
+ nodes {
60
+ id
61
+ isResolved
62
+ path
63
+ line
64
+ comments(first: 10) {
65
+ nodes { author { login } body createdAt }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ " --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'
73
+ ```
74
+
75
+ Extract: thread ID, file path, line, comment bodies, reviewer login.
76
+
77
+ ### 2. Classify each unresolved thread
78
+
79
+ For each thread, classify:
80
+
81
+ - **ACCEPT** — reviewer has a valid point, code change needed. Examples: bug, missed edge case, naming, obvious improvement.
82
+ - **REJECT** — reviewer misread / disagreement on non-blocking preference. Document the rebuttal.
83
+ - **CLARIFY** — ambiguous; ask reviewer a follow-up question. Examples: "Did you mean X or Y?", "This was intentional because Z — does that address your concern?"
84
+
85
+ Classification heuristic:
86
+ - Comment contains "bug", "broken", "wrong", "missing" → likely ACCEPT
87
+ - Comment contains "nit", "preference", "style" → likely REJECT (if inconsistent with codebase convention) or ACCEPT (if aligns)
88
+ - Comment is a question (contains "?") → likely CLARIFY
89
+
90
+ In `MODE=batch`, auto-handle ACCEPT + REJECT; defer CLARIFY to user.
91
+
92
+ ### 3. Apply code changes for ACCEPT threads
93
+
94
+ For each ACCEPT:
95
+
96
+ ```bash
97
+ # Read the file at the reviewer-pointed line
98
+ # Apply the suggested change (from comment body, or derived from review context)
99
+ # Example: reviewer suggests "use `?.` instead of `&&` chain"
100
+ ```
101
+
102
+ Use Edit tool for precise changes. Group changes by file. Commit each logical group separately:
103
+
104
+ ```bash
105
+ git add <file>
106
+ git commit -m "fix: address review feedback on <file>:<line>
107
+
108
+ Addresses comment from @<reviewer>:
109
+ > <first line of reviewer comment>
110
+
111
+ Refs #<PR_NUMBER>"
112
+ ```
113
+
114
+ ### 4. Reply + resolve threads
115
+
116
+ For each thread (ACCEPT or REJECT):
117
+
118
+ ```bash
119
+ # Post reply comment
120
+ gh api graphql -f query="
121
+ mutation {
122
+ addPullRequestReviewThreadReply(input: {
123
+ pullRequestReviewThreadId: \"<THREAD_ID>\"
124
+ body: \"<reply>\"
125
+ }) { comment { id } }
126
+ }
127
+ "
128
+
129
+ # Resolve thread
130
+ gh api graphql -f query="
131
+ mutation {
132
+ resolveReviewThread(input: { threadId: \"<THREAD_ID>\" }) {
133
+ thread { isResolved }
134
+ }
135
+ }
136
+ "
137
+ ```
138
+
139
+ Reply templates:
140
+ - ACCEPT applied: `"Good catch — fixed in <SHA>. Thanks!"`
141
+ - REJECT: `"Intentional — <rebuttal>. Happy to reconsider if you disagree."`
142
+ - CLARIFY (user-authored follow-up): `"<user question>"`
143
+
144
+ ### 5. Push + re-request review
145
+
146
+ ```bash
147
+ git push origin "$CURRENT"
148
+
149
+ # Collect reviewer logins (those who left the resolved threads)
150
+ REVIEWERS=$(gh pr view "$PR_NUMBER" --json reviews --jq '[.reviews[].author.login] | unique | join(",")')
151
+
152
+ # Re-request review from original reviewer(s)
153
+ for R in $(echo "$REVIEWERS" | tr ',' ' '); do
154
+ gh api \
155
+ --method POST \
156
+ "repos/$OWNER/$REPO/pulls/$PR_NUMBER/requested_reviewers" \
157
+ -f "reviewers[]=$R"
158
+ done
159
+ ```
160
+
161
+ ### 6. Emit output
162
+
163
+ ```
164
+ [REVIEW RESPONDED]
165
+ PR: #<P>
166
+ Unresolved threads: <N>
167
+ Accepted: <N> (fixes pushed in <count> commits)
168
+ Rejected: <N> (rebuttals posted)
169
+ Clarify (deferred to user): <N>
170
+ Reviewers re-requested: <@user1, @user2>
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Guardrails
176
+
177
+ - **Never force-resolve a thread without replying** — always post a reply before marking resolved; silent resolution is hostile.
178
+ - **Never accept a change that breaks tests** — run the test suite locally after each ACCEPT commit. If red, revert and reclassify to CLARIFY.
179
+ - **Never reject without rationale** — a REJECT reply must explain *why*, reference codebase convention or past decision.
180
+ - **CLARIFY blocks the merge** — a thread in CLARIFY state is NOT resolved. `pr-merger` must see 0 unresolved threads.
181
+ - **Batch mode is dangerous for CLARIFY** — in batch, always defer CLARIFY to user rather than auto-replying with a guess.
182
+ - **Don't touch unrelated code** — a review comment on `auth.ts:42` only authorizes edits to that file/area. Scope creep invalidates the review.
183
+ - **Re-request review only after push succeeds** — don't re-request on a broken push.
184
+
185
+ ---
186
+
187
+ ## When triggered
188
+
189
+ - `gh pr view` shows `reviewDecision: CHANGES_REQUESTED`
190
+ - User says: "respond to PR review", "address comments on PR #N", "handle review feedback"
191
+ - After `pr-opener` if reviewers are auto-added and they post comments within the same session
192
+
193
+ ---
194
+
195
+ ## Anti-pattern
196
+
197
+ ```
198
+ ❌ Reviewer comment → silent push → reviewer confused about what changed
199
+ ✅ Reviewer comment → reply acknowledging → push → resolve thread → re-request
200
+ ```
201
+
202
+ ```
203
+ ❌ Batch-auto-reply "Done" to all threads without applying changes
204
+ ✅ Apply change, reference SHA in reply, mark resolved
205
+ ```
206
+
207
+ ---
208
+
209
+ ## References
210
+
211
+ - GraphQL review threads — docs.github.com/en/graphql/reference/objects#pullrequestreviewthread
212
+ - Resolve thread mutation — docs.github.com/en/graphql/reference/mutations#resolvereviewthread
213
+ - Request reviewers API — docs.github.com/en/rest/pulls/review-requests
214
+ - Ciel pipeline: pr-opener → (reviewer comments) → pr-review-responder → pr-merger
@@ -0,0 +1,184 @@
1
+ ---
2
+ name: prouver-verifier
3
+ description: How to verify implementation with evidence — AVANT/APRÈS methodology, constraint synthesis, CI gate, PR body gate, issue comment gate, and closure gate. Proves code works with concrete evidence, not assumptions.
4
+ allowed-tools: Bash, WebFetch, Read
5
+ ---
6
+
7
+ # Implementation Verification — Evidence-Based Proof
8
+
9
+ ## What this covers
10
+
11
+ How to prove that code works with concrete evidence. Code written ≠ done. Verified with AVANT/APRÈS evidence = done.
12
+
13
+ ## Core principle
14
+
15
+ **"No error in logs" ≠ proof.** Trigger the scenario, see a POSITIVE signal.
16
+
17
+ ## AVANT/APRÈS methodology (bug fixes)
18
+
19
+ - **AVANT**: failing test (RED) OR log showing broken behavior — code diff ≠ proof
20
+ - **APRÈS**: staging log / curl output / HTTP status AFTER deploying AND triggering the scenario
21
+
22
+ ### Same-source rule
23
+
24
+ - Bug found in logs → verify fix in logs
25
+ - Bug in screenshot → verify by screenshot
26
+ - Curl result ≠ substitute for original observation source
27
+
28
+ ### Constraint synthesis (write BEFORE checking logs)
29
+
30
+ Force yourself to write expected signals BEFORE looking:
31
+
32
+ 1. Functional: `"POST /api/X returns 201 with body.data.id"`
33
+ 2. Behavioral: `"Log contains '[MESSAGE]' after triggering"`
34
+ 3. Negative: `"Old error '[ERROR]' no longer appears"`
35
+
36
+ Then check logs. Match or miss = clear signal.
37
+
38
+ ### Attacker perspective (security fixes)
39
+
40
+ "If I were an attacker, what test proves my fix blocks me?" Write THAT test. Can't write it → fix isn't proven.
41
+
42
+ ## Verification gates
43
+
44
+ ### CI gate
45
+
46
+ ```bash
47
+ gh run list --branch $BRANCH --limit 1
48
+ ```
49
+
50
+ Status must be `completed/success`. If failed → identify root cause, fix before PR.
51
+
52
+ "CI is running" ≠ done.
53
+
54
+ ### PR body gate
55
+
56
+ - `Closes #XXX` present for every linked issue?
57
+ - No WIP marker? (`WIP`, `[WIP]`, `wip`)
58
+ - Draft vs ready correct?
59
+
60
+ ### Issue comment gate
61
+
62
+ Add a comment on EVERY linked issue with:
63
+ - Staging PID (process/deploy ID)
64
+ - AVANT/APRÈS evidence
65
+
66
+ Do NOT wait for post-merge. Batch PRs → each issue gets its own comment.
67
+
68
+ ### Closure gate
69
+
70
+ ```bash
71
+ gh issue view <N> --comments
72
+ ```
73
+
74
+ Does a comment with staging PID + AVANT/APRÈS exist? No → add NOW before merge.
75
+
76
+ Post-merge closure includes:
77
+ 1. What was fixed (1 line)
78
+ 2. Concrete observed evidence (logs / curl / DOM — NOT code diffs)
79
+ 3. PR/SHA reference
80
+
81
+ Closure without evidence = not closed.
82
+
83
+ ## Quick verification (trivial tasks)
84
+
85
+ 1. Compile OK locally
86
+ 2. Push to branch
87
+ 3. Verify no regression (existing tests still green)
88
+
89
+ No CI gate mandatory, no staging mandatory.
90
+
91
+ ## Output format
92
+
93
+ ```
94
+ ## VERIFICATION
95
+
96
+ ### AVANT (before fix)
97
+ <log excerpt / curl output / screenshot>
98
+
99
+ ### APRÈS (after fix, on staging)
100
+ <log excerpt / curl output / screenshot>
101
+
102
+ ### Constraints (written before check)
103
+ 1. Functional: <expected signal>
104
+ 2. Behavioral: <expected signal>
105
+ 3. Negative: <expected absence>
106
+
107
+ ### CI gate
108
+ - Run: <URL>
109
+ - Status: <success | in_progress | failed>
110
+
111
+ ### PR body gate
112
+ - [✓/✗] Closes #XXX present
113
+ - [✓/✗] No WIP marker
114
+
115
+ ### Issue comments
116
+ - #<N>: comment added with PID + AVANT/APRÈS
117
+
118
+ ### VERDICT
119
+ <DONE | PENDING: remaining items>
120
+ ```
121
+
122
+ ## How to verify
123
+
124
+ - [ ] AVANT state captured (before fix)?
125
+ - [ ] APRÈS state captured (after fix, on staging)?
126
+ - [ ] Constraints written BEFORE checking logs?
127
+ - [ ] CI gate passed?
128
+ - [ ] PR body gate passed (AVANT/APRÈS evidence)?
129
+ - [ ] Issue comment gate passed (evidence posted)?
130
+ - [ ] VERDICT issued (DONE / NOT-YET)?
131
+
132
+ ## Staging evidence capture — three modes
133
+
134
+ **Never sleep-and-poll.** Use Monitor for streaming events, Bash background for one-shot waits.
135
+
136
+ ### Mode 1: Snapshot (last N lines)
137
+
138
+ When: you've already deployed and just need to read what happened.
139
+
140
+ ```bash
141
+ journalctl -u <service> -n 50 --no-pager
142
+ ```
143
+
144
+ Use **Bash** (not Monitor, not background).
145
+
146
+ ### Mode 2: Stream (watch for specific event)
147
+
148
+ When: you've just triggered a scenario and want to see the log line confirming it.
149
+
150
+ ```
151
+ Monitor(
152
+ description: "staging logs after trigger",
153
+ persistent: false,
154
+ timeout_ms: 60000,
155
+ command: "journalctl -u <service> -f --since now | grep --line-buffered 'KEYWORD'"
156
+ )
157
+ ```
158
+
159
+ Critical: `grep --line-buffered` — without it, pipe buffering delays events minutes.
160
+
161
+ ### Mode 3: One-shot wait (deploy done?)
162
+
163
+ When: long-running command that blocks until complete (deploy script, test run).
164
+
165
+ ```
166
+ Bash(command="deploy-staging.sh", run_in_background=true)
167
+ ```
168
+
169
+ → Returns PID immediately. You get notified when it completes.
170
+
171
+ ### Anti-patterns
172
+
173
+ - **`sleep N && tail`** — harness blocks it. Use Monitor or background instead.
174
+ - **Monitor for deploys** — Monitor doesn't wait synchronously. Use `run_in_background` for deploys.
175
+ - **No `grep --line-buffered`** — pipe buffering delays events by minutes
176
+ - **Indefinite Monitor** — always set `timeout_ms` (60s typical)
177
+ - **Too many Monitors** — auto-killed by harness. One event at a time.
178
+
179
+ ## Common mistakes
180
+
181
+ - **"No error in logs"**: not proof — trigger the scenario and look for positive signal
182
+ - **Code diff as proof**: showing what changed ≠ showing it works
183
+ - **Missing AVANT**: without before-state, can't prove improvement
184
+ - **Skipping issue comments**: auto-close won't add evidence — do it manually
@@ -0,0 +1,152 @@
1
+ # prouver-verifier — Reference
2
+
3
+ ## Log observation tools — three modes, use the right one
4
+
5
+ | Need | Tool | Example |
6
+ |------|------|---------|
7
+ | Snapshot (last N lines) | `Bash` | `journalctl -u neiyomi-staging -n 50 --no-pager` |
8
+ | Stream (watch for events) | `Monitor` | `journalctl -u neiyomi-staging -f \| grep --line-buffered "keyword"` |
9
+ | One-shot wait (deploy done?) | `Bash` with `run_in_background: true` | `deploy-staging.sh` |
10
+
11
+ **NEVER** use `sleep N && tail` or `sleep N && journalctl` — the harness blocks it. Use Monitor for streaming events, Bash `run_in_background` for one-shot waits.
12
+
13
+ ### Monitor example
14
+
15
+ ```
16
+ Monitor(
17
+ description: "staging logs after deploy",
18
+ persistent: false,
19
+ timeout_ms: 60000,
20
+ command: "journalctl -u neiyomi-staging -f --since now | grep --line-buffered 'keyword'"
21
+ )
22
+ ```
23
+
24
+ Always use `grep --line-buffered` in pipes — without it, pipe buffering delays events by minutes.
25
+
26
+ ### Monitor budget
27
+
28
+ Every Monitor stdout line becomes a conversation message. Always filter. Use `persistent: false` with tight `timeout_ms` for verification (60s typical). Reserve `persistent: true` for session-long watches (debugging live traffic).
29
+
30
+ ### Bash run_in_background
31
+
32
+ For deploys or long-running one-shot commands:
33
+
34
+ ```
35
+ Bash(command="deploy-staging.sh", run_in_background=true)
36
+ ```
37
+
38
+ Returns immediately with a PID. Use BashOutput tool later to retrieve output. You'll be notified when the command completes — don't poll.
39
+
40
+ ## CI commands — gh CLI
41
+
42
+ ```bash
43
+ # Check CI for current branch
44
+ gh run list --branch $(git branch --show-current) --limit 1
45
+
46
+ # View failing job details
47
+ gh run view --job=<ID> --log-failed
48
+
49
+ # Wait for CI to complete (polling — prefer notification pattern)
50
+ gh run watch <run-id>
51
+
52
+ # List PR status
53
+ gh pr list --state open --draft
54
+ gh pr view <N>
55
+ gh pr ready <N> # Convert draft to ready
56
+
57
+ # Issue comments
58
+ gh issue view <N> --comments
59
+ gh issue comment <N> --body "..."
60
+ ```
61
+
62
+ ## Staging evidence — what counts
63
+
64
+ **Good evidence** (trust-worthy):
65
+ - Log line with timestamp showing the expected behavior (`2026-04-17T14:23:15 [INFO] User 42 updated profile successfully`)
66
+ - Curl output with HTTP status + response body matching constraints
67
+ - Screenshot with URL bar showing staging domain + relevant UI state
68
+ - DOM snapshot (accessibility tree) showing expected elements
69
+
70
+ **Weak evidence** (insufficient on its own):
71
+ - "No errors in logs"
72
+ - "Tests pass"
73
+ - "I tested it locally"
74
+ - "The CI is green"
75
+ - Diff of the code (proves intent, not behavior)
76
+
77
+ ## Constraint synthesis — examples
78
+
79
+ Good constraints (specific, falsifiable):
80
+
81
+ ```
82
+ 1. Functional: `POST /api/users/42/profile` with name="Alice" returns HTTP 200 with body `{"id":42,"name":"Alice","updatedAt":<ISO 8601>}`
83
+ 2. Behavioral: Log contains `[UserService] Profile updated for user 42` within 5s of trigger
84
+ 3. Negative: Log does NOT contain `[UserService] Validation failed` after trigger
85
+ ```
86
+
87
+ Bad constraints (vague):
88
+
89
+ ```
90
+ 1. Endpoint works
91
+ 2. User is saved
92
+ 3. No errors
93
+ ```
94
+
95
+ ## PR body template
96
+
97
+ ```
98
+ ## Summary
99
+ <1-3 bullets describing what changed and why>
100
+
101
+ ## Test plan
102
+ - [ ] Unit tests for <component>
103
+ - [ ] Integration test for <boundary>
104
+ - [ ] Manual verification on staging: <URL>
105
+
106
+ ## Evidence
107
+ - AVANT: <log excerpt or URL>
108
+ - APRÈS: <log excerpt or URL>
109
+
110
+ Closes #<issue>
111
+ ```
112
+
113
+ Rules:
114
+ - Title ≤ 70 chars, no WIP marker
115
+ - `Closes #XXX` required for every linked issue
116
+ - Evidence section non-optional for bug fixes
117
+
118
+ ## Issue comment template
119
+
120
+ ```
121
+ Deployed to staging.
122
+
123
+ **PID**: <deploy-id>
124
+ **AVANT** (broken):
125
+ <log/curl/screenshot>
126
+
127
+ **APRÈS** (fixed):
128
+ <log/curl/screenshot>
129
+
130
+ Triggered by: <PR #N> / <commit SHA>
131
+ ```
132
+
133
+ ## Post-merge closure comment
134
+
135
+ ```
136
+ Fixed: <1 line description>
137
+
138
+ **Evidence** (from staging):
139
+ <concrete log/curl/DOM — NOT code diffs>
140
+
141
+ PR: #<N>
142
+ Commit: <SHA>
143
+ ```
144
+
145
+ ## Common failure modes
146
+
147
+ - Declaring "done" while CI is in_progress → wait for completion
148
+ - Declaring "done" with AVANT captured but no APRÈS on staging
149
+ - Evidence from same source as bug, but wrong time (read logs from before the deploy)
150
+ - PR opened with `[WIP]` title → PR never reviewed, rots as draft
151
+ - Batch PR closing 3 issues with one comment copy-pasted → not sufficient, each issue needs its own evidence
152
+ - Closure gate skipped because "CI will auto-close via PR merge" → closure via auto-close never adds evidence comment
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: quoi-framer
3
+ description: How to frame a task before starting — forces explicit goal, NOT-X constraint, intention partagee, and measurable definition of done. For Ciel v5 pipeline step 2 (QUOI). Use after DOCS phase, before ASK phase.
4
+ ---
5
+
6
+ # Task Framing — Define Before You Start (Ciel v5)
7
+
8
+ ## What this covers
9
+
10
+ How to define a task clearly before doing any work. This is the first step of the Ciel v5 pipeline (etape 2: QUOI). Applied after DOCS phase (etape 1) and before ASK (etape 3). Prevents scope drift, wasted research, and "I thought you meant..." conversations.
11
+
12
+ ## Core principle
13
+
14
+ **State the goal, the constraint, the intention, and the done criteria BEFORE researching or coding.** If you can't state these in 5 lines, you don't understand the task yet.
15
+
16
+ ## The 5 output gates (ALL required)
17
+
18
+ ### 1. Expected result
19
+
20
+ One sentence. Concrete and testable.
21
+
22
+ - BAD: "Improve the API"
23
+ - GOOD: "GET /api/users returns a paginated list with page+limit query params"
24
+
25
+ ### 2. NOT-X constraint
26
+
27
+ At least 1 concrete thing the solution MUST NOT do:
28
+ - "NOT-X: no N+1 queries"
29
+ - "NOT-X: no new dependencies added"
30
+ - "NOT-X: no breaking changes to existing callers"
31
+ - "NOT-X: no schema migration"
32
+
33
+ "no bad code" is not NOT-X. "No global state mutation" is.
34
+
35
+ ### 3. Intentions partagees (v5)
36
+
37
+ State what you are looking for, not what you expect to find. This guides exploration without biasing it:
38
+ - BAD: "Find where pdfmake is used for PDF export" (cherche une solution specifique)
39
+ - GOOD: "Understand how exports are handled in this project" (intention ouverte)
40
+
41
+ The intention is passed to @ciel-explorer to guide scent-following without creating confirmation bias.
42
+
43
+ ### 4. Definition of done
44
+
45
+ Measurable before research starts:
46
+ - "Done when: endpoint returns 200 with `{items, total, page}` shape, test passes on staging, no perf regression vs baseline"
47
+
48
+ "done when it works" is not acceptable. Specify the observable signal.
49
+
50
+ ### 5. DOCS gate (v5)
51
+
52
+ Before framing, verify that documentation has been read:
53
+ - README.md (project overview and conventions)
54
+ - ADRs if they exist (architecture decisions)
55
+ - Tickets/specs (requirements context)
56
+ - .ciel/map.json (existing project map)
57
+ - ciel-overlay.md (project overlay)
58
+
59
+ ## Output format
60
+
61
+ ```
62
+ ## QUOI
63
+
64
+ Expected result: <one sentence>
65
+ NOT-X: <concrete constraint>
66
+ Intentions: <what I'm looking for (open question)>
67
+ Done when: <measurable criteria>
68
+ Docs read: <yes — README, ADRs, map, tickets>
69
+ ```
70
+
71
+ ## Common rationalizations
72
+
73
+ | Rationalization | Reality |
74
+ |---|---|
75
+ | "This is simple, I don't need to frame it" | Simple tasks benefit from 2-line frames. The frame costs 10 seconds. Scope drift costs hours. |
76
+ | "I already know what to build" | Write it down anyway. Writing forces precision. "I know" is how ambiguity hides. |
77
+ | "NOT-X is obvious" | If it's obvious, writing it takes 2 seconds. If you can't write it, it wasn't obvious. |
78
+
79
+ ## How to verify
80
+
81
+ - [ ] QUOI statement: 1 sentence, describes WHAT not HOW?
82
+ - [ ] NOT-X constraint: >= 1 explicit exclusion?
83
+ - [ ] Intentions partagees: open question, not solution-biased?
84
+ - [ ] Definition of done: >= 1 measurable criterion?
85
+ - [ ] DOCS gate: documentation has been read?
86
+
87
+ ## When to re-frame
88
+
89
+ - Start of any task (before research, after DOCS)
90
+ - When scope drift is detected (3+ files touched without re-checking goal)
91
+ - When the user changes direction mid-task