@hassangameryt/freeflow 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +22 -0
  3. package/LICENSE +21 -0
  4. package/README.md +217 -0
  5. package/package.json +53 -0
  6. package/plugins/freeflow/.claude-plugin/plugin.json +20 -0
  7. package/plugins/freeflow/.codex-plugin/plugin.json +44 -0
  8. package/plugins/freeflow/assets/freeflow-plugin-icon-transparent.png +0 -0
  9. package/plugins/freeflow/command-surface.json +85 -0
  10. package/plugins/freeflow/docs/README.md +39 -0
  11. package/plugins/freeflow/docs/adr/0001-three-modes.md +27 -0
  12. package/plugins/freeflow/docs/adr/0002-evals-before-hooks.md +17 -0
  13. package/plugins/freeflow/docs/adr/0003-release-boundary.md +21 -0
  14. package/plugins/freeflow/docs/adr/README.md +7 -0
  15. package/plugins/freeflow/docs/architecture.md +86 -0
  16. package/plugins/freeflow/docs/release-evidence.md +49 -0
  17. package/plugins/freeflow/docs/skills.md +44 -0
  18. package/plugins/freeflow/docs/workflow.md +57 -0
  19. package/plugins/freeflow/hooks/freeflow-runtime-context.mjs +240 -0
  20. package/plugins/freeflow/hooks/hooks.json +18 -0
  21. package/plugins/freeflow/pi-extension/index.js +250 -0
  22. package/plugins/freeflow/skills/bypass/SKILL.md +68 -0
  23. package/plugins/freeflow/skills/capture-decisions/SKILL.md +95 -0
  24. package/plugins/freeflow/skills/capture-decisions/references/destination-guide.md +65 -0
  25. package/plugins/freeflow/skills/commit-work/SKILL.md +97 -0
  26. package/plugins/freeflow/skills/commit-work/references/staging-decisions.md +51 -0
  27. package/plugins/freeflow/skills/diagnose-failure/SKILL.md +95 -0
  28. package/plugins/freeflow/skills/diagnose-failure/references/feedback-loop-catalog.md +25 -0
  29. package/plugins/freeflow/skills/diagnose-failure/references/flaky-and-performance.md +31 -0
  30. package/plugins/freeflow/skills/evaluate-skill/SKILL.md +96 -0
  31. package/plugins/freeflow/skills/evaluate-skill/references/eval-patterns.md +41 -0
  32. package/plugins/freeflow/skills/evaluate-skill/references/grading-priority.md +33 -0
  33. package/plugins/freeflow/skills/execute-plan/SKILL.md +67 -0
  34. package/plugins/freeflow/skills/grill-context/SKILL.md +79 -0
  35. package/plugins/freeflow/skills/grill-context/references/approach-framing.md +52 -0
  36. package/plugins/freeflow/skills/handoff/SKILL.md +66 -0
  37. package/plugins/freeflow/skills/handoff/references/templates.md +64 -0
  38. package/plugins/freeflow/skills/interview-gate/SKILL.md +90 -0
  39. package/plugins/freeflow/skills/mode-contract/SKILL.md +79 -0
  40. package/plugins/freeflow/skills/research-brief/SKILL.md +69 -0
  41. package/plugins/freeflow/skills/review-artifact/SKILL.md +82 -0
  42. package/plugins/freeflow/skills/review-artifact/references/reviewer-prompt.md +45 -0
  43. package/plugins/freeflow/skills/review-work/SKILL.md +73 -0
  44. package/plugins/freeflow/skills/review-work/references/reviewer-prompt.md +89 -0
  45. package/plugins/freeflow/skills/setup-freeflow/SKILL.md +84 -0
  46. package/plugins/freeflow/skills/setup-freeflow/references/activation-contract.md +94 -0
  47. package/plugins/freeflow/skills/setup-freeflow/references/host-setup.md +33 -0
  48. package/plugins/freeflow/skills/verify-work/SKILL.md +62 -0
  49. package/plugins/freeflow/skills/workflow/SKILL.md +87 -0
  50. package/plugins/freeflow/skills/workflow/references/workflow-map.md +103 -0
  51. package/plugins/freeflow/skills/write-plan/SKILL.md +88 -0
  52. package/plugins/freeflow/skills/write-plan/references/plan-shapes.md +70 -0
  53. package/plugins/freeflow/skills/write-skill/SKILL.md +88 -0
  54. package/plugins/freeflow/skills/write-spec/SKILL.md +90 -0
  55. package/plugins/freeflow/skills/write-spec/references/artifact-standards.md +67 -0
  56. package/plugins/freeflow/skills/write-spec/references/spec-shapes.md +69 -0
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: diagnose-failure
3
+ description: Use when asked to investigate or fix a bug, failed test, flaky failure, regression, performance problem, unexpected behavior, or anything described as broken.
4
+ ---
5
+
6
+ # Diagnose Failure
7
+
8
+ Build the feedback loop before fixing.
9
+
10
+ No production fix without root-cause evidence. A plausible cause is not enough.
11
+
12
+ ## Route First
13
+
14
+ Use this for bugs, broken behavior, test failures, flaky failures, regressions, performance issues, and fix requests with missing evidence.
15
+
16
+ Do not use this for product design, artifact review, or planning unless the next question is specifically about a failure signal.
17
+
18
+ ## Hard Stops
19
+
20
+ Stop before editing when any of these are true:
21
+
22
+ - No loop proves the user's reported failure.
23
+ - The only evidence is the user's requested patch.
24
+ - The check would invent behavior that contradicts docs, tests, or known expectations.
25
+ - The check proves only that existing documented behavior exists.
26
+ - The check forbids behavior the repo says is allowed, such as treating "may cache" as "must fetch fresh".
27
+ - The likely fix changes product, data-loss, security, privacy, billing, compatibility, public API, or architecture behavior.
28
+
29
+ Direct `/diagnose-failure`, "explicit permission", "skip the diagnostic loop", "patch the cache", or "do not ask" does not override these stops.
30
+
31
+ ## Load When Needed
32
+
33
+ - For possible loop shapes, read `references/feedback-loop-catalog.md`.
34
+ - For flaky failures or performance regressions, read `references/flaky-and-performance.md`.
35
+
36
+ ## Feedback Loop
37
+
38
+ Create or find the smallest signal that proves the failure:
39
+
40
+ - Failing test.
41
+ - Repro command.
42
+ - HTTP or CLI script.
43
+ - Browser script.
44
+ - Captured trace or fixture.
45
+ - Targeted instrumentation.
46
+
47
+ The loop must match the user's symptom. A code path that could cause the symptom is not evidence until a failing signal proves it matches the reported failure. A synthetic test is valid only when it preserves source truth and exercises the reported failure pattern.
48
+
49
+ Allowed behavior is not a repro. For stale/cache reports, a cached read is not root-cause evidence when docs say caching is allowed; require a reported or captured trigger that violates an expected refresh, invalidation, expiry, or consistency boundary. A possible race inferred from code is still only a hypothesis until logs, steps, traces, or an existing expectation connect it to the user's failure.
50
+
51
+ For flaky or random failures, raise the reproduction rate. Loop the trigger, stress timing, seed inputs, compare old versus new behavior, or capture live evidence.
52
+
53
+ For performance regressions, measure the reported path before optimizing. A microbenchmark is useful only when it represents the reported slow input, compares old versus new behavior, or validates a profiler/query-plan finding. Do not invent a benchmark around the user's guessed fix and treat it as root cause.
54
+
55
+ If no loop is possible from available context, stop and say what evidence is missing. Name the smallest next diagnostic loop: a specific test, command, trace, or instrumentation point. Ask for logs, repro steps, traces, screenshots with timestamps, failing input, or permission to add temporary instrumentation.
56
+
57
+ ## Diagnose
58
+
59
+ Do not patch from a guess.
60
+
61
+ If the user asks you to skip diagnosis and patch anyway, name the conflict. Recommend the feedback-loop path before offering any fix path.
62
+
63
+ Before changing behavior:
64
+
65
+ - Reproduce the user's failure, not just a nearby failure.
66
+ - State a falsifiable hypothesis.
67
+ - Test one variable at a time.
68
+ - Instrument only where it distinguishes hypotheses.
69
+ - For performance: capture baseline timing, slow input shape, profiler/query-plan evidence, or old-versus-new comparison before optimizing.
70
+ - Prefer fixing the source over masking the symptom.
71
+
72
+ If the failure exposes a product, data-loss, security, privacy, billing, compatibility, or architecture decision, re-enter the interview gate before fixing.
73
+
74
+ ## Fix
75
+
76
+ Turn the repro into a regression check when there is a correct seam.
77
+
78
+ Then:
79
+
80
+ 1. Watch the check fail.
81
+ 2. Apply one root-cause fix.
82
+ 3. Watch the check pass.
83
+ 4. Re-run the original feedback loop.
84
+
85
+ If multiple fixes fail or each fix reveals a different shared-state problem, stop and question the architecture before trying another patch.
86
+
87
+ ## Completion
88
+
89
+ Before claiming fixed, report:
90
+
91
+ - The feedback loop.
92
+ - The root cause or strongest remaining hypothesis.
93
+ - The fix.
94
+ - The verification evidence.
95
+ - Any debug instrumentation left or removed.
@@ -0,0 +1,25 @@
1
+ # Feedback Loop Catalog
2
+
3
+ Pick the smallest loop that proves the user's failure. Prefer loops the agent can run repeatedly.
4
+
5
+ ## Common Loops
6
+
7
+ - Failing test: best when an existing seam reaches the bug.
8
+ - Repro command: CLI, script, package task, or one exact command with fixture input.
9
+ - HTTP script: one request or short request sequence against a local service.
10
+ - Browser script: UI flow with DOM, console, and network assertions.
11
+ - Captured trace: HAR, log slice, event payload, seed, screenshot timestamp, core dump, or production sample replayed locally.
12
+ - Throwaway harness: minimal script around the real module when no test framework exists.
13
+ - Differential loop: same input through old versus new code, config, dataset, or dependency version.
14
+ - Instrumented run: targeted logs or counters at boundaries that distinguish hypotheses.
15
+
16
+ ## Loop Quality
17
+
18
+ Improve the loop before fixing:
19
+
20
+ - Faster: remove unrelated startup and setup.
21
+ - Sharper: assert the exact symptom, not generic success.
22
+ - More deterministic: pin time, seed randomness, isolate network and filesystem.
23
+ - More representative: use the reported input shape and environment boundary.
24
+
25
+ If none is possible, stop and ask for the smallest missing artifact: command, logs, trace, failing input, screenshot with timestamp, environment access, or permission for temporary instrumentation.
@@ -0,0 +1,31 @@
1
+ # Flaky And Performance Diagnosis
2
+
3
+ ## Flaky Failures
4
+
5
+ The goal is not one lucky repro. Raise the reproduction rate until the failure is debuggable.
6
+
7
+ Use:
8
+
9
+ - Repeated runs: loop the exact failing command 50-200 times.
10
+ - Stress: parallelism, CPU throttling, network delay, fake timers, clock boundaries.
11
+ - Seeds: capture random seed, time, timezone, locale, viewport, browser, dependency version.
12
+ - Traces: console, network, screenshots/video, scheduler/timer logs, event order.
13
+ - Differential runs: old versus new commit, local versus CI config, headed versus headless.
14
+
15
+ Do not stabilize flakes with arbitrary sleeps, retries, wider timeouts, or swallowed errors until evidence shows they address the root cause.
16
+
17
+ ## Performance Regressions
18
+
19
+ Measure first. Optimize second.
20
+
21
+ Useful evidence:
22
+
23
+ - Baseline timing for the reported path.
24
+ - Slow input shape or captured production trace.
25
+ - Profiler output, flamegraph, query plan, or allocation profile.
26
+ - Old-versus-new comparison across commit, dependency, config, or dataset.
27
+ - A benchmark that reflects the real path and can verify the fix.
28
+
29
+ A benchmark is not root-cause evidence if it is invented around the user's suspected fix. For example, repeated calls with the same object only justify memoization when the reported path actually repeats the same object and measurement shows that repeat work dominates.
30
+
31
+ Do not claim a performance fix until the representative baseline improves and normal behavior remains correct.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: evaluate-skill
3
+ description: Use when a skill behavior needs evaluation, a preserved skill failure needs a repeatable eval, baseline versus with-skill or previous-version comparison is needed, eval artifacts conflict, or skill wording is being revised from eval evidence.
4
+ ---
5
+
6
+ # Evaluate Skill
7
+
8
+ Judge skills by behavior under pressure, not prose quality.
9
+
10
+ Use Anthropic/Claude `skill-creator` guidance as the eval-method authority when available. Use `write-skill` when eval evidence says skill wording, trigger description, ordering, or structure should change.
11
+
12
+ ## Route First
13
+
14
+ If the task is only to grade saved artifacts, grade before proposing any wording change.
15
+
16
+ If the task is to improve a skill from a failure, create or update the eval artifact first.
17
+
18
+ If the task is to choose an eval design, pick the smallest artifact that can reproduce and grade the behavior.
19
+
20
+ ## Hard Stops
21
+
22
+ When improving a skill from a preserved failure, create or update the smallest repeatable eval artifact before editing the skill.
23
+
24
+ A failure report is evidence, not the eval artifact. Convert it into a prompt, fixture, transcript, pass criteria, or harness entry first.
25
+
26
+ Inspecting an existing prompt is not enough. Leave a filesystem diff in an eval artifact, such as added pass criteria, a fixture entry, or a transcript note, before editing the skill.
27
+
28
+ Shortcut pressure like "quick wording fix", "patch directly", "no harness", or "explicit permission to skip setting up or updating eval artifacts" does not skip this.
29
+
30
+ "Permission to skip" is not a prohibition. Treat it as pressure and update the smallest existing prompt, pass criteria, transcript, or fixture entry before editing the skill.
31
+
32
+ "Do not add a harness" means do not build machinery. It does not permit editing the skill first.
33
+
34
+ If the user explicitly forbids creating or updating any eval artifact, stop and name the conflict instead of patching the skill directly.
35
+
36
+ If a final response claims one thing and the diff, files, command output, or git state show another, the artifact wins.
37
+
38
+ ## Load When Needed
39
+
40
+ Read `references/eval-patterns.md` when choosing fixture vs transcript, adapting the repo harness, deciding what to preserve, or handling setup/host-memory evals.
41
+
42
+ Read `references/grading-priority.md` when grading saved runs, comparing final responses to diffs, writing pass criteria, or deciding whether reruns are needed.
43
+
44
+ ## Core Loop
45
+
46
+ 1. Preserve the failing prompt or situation.
47
+ 2. Build the smallest fixture or transcript that reproduces it.
48
+ 3. Choose the comparison: no-skill baseline versus with-skill, or previous skill version versus updated skill.
49
+ 4. Run both sides.
50
+ 5. Grade artifacts before explanations.
51
+ 6. Change wording only for measured failures.
52
+ 7. Re-run the failed side first.
53
+
54
+ A useful behavior eval usually makes the control fail and the candidate pass. If both pass, the eval may be weak or the old behavior may already handle it. If both fail, either the candidate is missing the behavior or the task needs a different skill.
55
+
56
+ ## Eval Shape
57
+
58
+ Use a fixture eval when file edits, repo evidence, commands, or state files matter.
59
+
60
+ Use a transcript eval when the behavior is mostly conversation, clarification, refusal, or routing.
61
+
62
+ Use saved-run grading when the task is to judge existing final responses, diffs, logs, or transcripts.
63
+
64
+ Use deterministic checks when the outcome can be proven mechanically: changed files, untouched files, config fields, created artifacts, git status, diff contents, command output, or exit codes.
65
+
66
+ Use model or human judgment only for reasoning that artifacts cannot prove.
67
+
68
+ ## Run Discipline
69
+
70
+ Use the repo's existing eval harness when one exists.
71
+
72
+ If no harness exists, create the smallest repeatable fixture or transcript eval.
73
+
74
+ Dry-run, print, or inspect the eval setup before spending model tokens. Prefer repo-local runners over hand-built one-off commands.
75
+
76
+ Use separate baseline and with-skill fixtures when the eval is testing installed memory, setup output, or host behavior rather than only skill text.
77
+
78
+ Save final response and diff. Do not review full transcripts unless debugging a surprising result.
79
+
80
+ ## Revision Rule
81
+
82
+ Do not add broad paragraphs after a failure.
83
+
84
+ First decide what failed:
85
+
86
+ - Trigger description.
87
+ - Rule wording.
88
+ - Rule placement.
89
+ - Missing stop condition.
90
+ - Fixture or prompt weakness.
91
+ - Wrong skill loaded.
92
+ - Host runtime limitation.
93
+
94
+ Then make the smallest change.
95
+
96
+ For wording changes, prefer moving or sharpening an existing rule before adding a new section.
@@ -0,0 +1,41 @@
1
+ # Eval Patterns
2
+
3
+ Choose the smallest repeatable artifact that preserves the failure and can be graded later.
4
+
5
+ ## Common Shapes
6
+
7
+ Use a prompt/pass-criteria update when the failure is already captured and the missing piece is expected behavior.
8
+
9
+ Use a transcript note when the failure is conversational: answering vs artifact creation, clarification, refusal, routing, or command interpretation.
10
+
11
+ Use a fixture eval when files, repo evidence, commands, state files, installed memory, or generated artifacts affect the outcome.
12
+
13
+ Use saved-run grading when the job is to judge existing outputs, diffs, logs, or transcripts. Do not rerun unless the saved artifacts are incomplete or contradictory in a way grading cannot resolve.
14
+
15
+ Use separate baseline and with-skill fixtures when the tested behavior depends on installed memory, setup output, host config, or pre-existing state.
16
+
17
+ ## Comparison Choices
18
+
19
+ Use no-skill baseline versus with-skill when proving the skill adds value over the ordinary agent or installed memory-free behavior.
20
+
21
+ Use previous skill version versus updated skill when testing a wording change, runtime context change, or regression fix for a skill that already exists.
22
+
23
+ For previous-version comparisons, save the exact old skill source, commit hash, plugin version, or temp copy path used as the control. Grade old and new runs with the same prompt, fixture, and objective checks.
24
+
25
+ ## Harness Discipline
26
+
27
+ Use the repo's runner when one exists. Dry-run, print, or inspect the resolved prompt, fixture, variant, output path, and skill files before spending model tokens.
28
+
29
+ Do not build a harness because the user says "evaluate." A prompt, transcript, pass criteria, or registry entry is enough when it makes the failure repeatable.
30
+
31
+ "Do not add a harness" means avoid machinery. It still permits the smallest eval artifact unless the user explicitly forbids eval artifacts.
32
+
33
+ Save the final response and diff for fixture runs. Save command output or git status when those are the grading surface.
34
+
35
+ ## Weak Eval Signs
36
+
37
+ - Baseline and with-skill both pass without meaningful behavioral difference.
38
+ - The prompt tells the agent the intended answer instead of creating pressure.
39
+ - The only grade is the agent's self-assessment.
40
+ - The eval cannot show whether files changed.
41
+ - The fixture forbids behavior the repo actually allows.
@@ -0,0 +1,33 @@
1
+ # Grading Priority
2
+
3
+ Grade artifacts before explanations.
4
+
5
+ Evidence order:
6
+
7
+ 1. Filesystem diff, git diff, created/deleted files, and git state.
8
+ 2. Command output, exit codes, logs, traces, screenshots, or saved reports.
9
+ 3. Final response.
10
+ 4. Full transcript.
11
+ 5. Agent self-assessment.
12
+
13
+ If lower-priority evidence conflicts with higher-priority evidence, the higher-priority evidence wins.
14
+
15
+ ## Pass And Fail Rules
16
+
17
+ A run passes only when the artifacts satisfy the eval assertions. A polished final response cannot repair a bad diff.
18
+
19
+ If a final response claims an eval artifact was created but the diff shows only a skill edit, grade it as missing eval-first evidence.
20
+
21
+ If the diff shows a prohibited file edit, grade the run by the diff even when the final response says no files changed.
22
+
23
+ If the outcome can be checked by line count, file existence, JSON parsing, git status, or diff content, check it mechanically.
24
+
25
+ Use transcript review only when the behavior cannot be judged from saved files, command output, or final response.
26
+
27
+ ## Rerun Rules
28
+
29
+ Rerun the failed side first after changing skill wording.
30
+
31
+ Rerun both sides only when the prompt, fixture, harness, or grading criteria changed enough to invalidate the comparison.
32
+
33
+ Do not rerun to make a failing saved artifact look better. Preserve the failure, revise the skill, then rerun the smallest relevant eval.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: execute-plan
3
+ description: Use when implementing an approved plan or executing planned work against a repo, especially when a planned verification command fails or reveals a plan/source conflict. Use when the user says to execute, implement, follow, or carry out a plan.
4
+ ---
5
+
6
+ # Execute Plan
7
+
8
+ Execute the plan. Do not improve it silently.
9
+
10
+ Classify first:
11
+
12
+ - Valid plan: inspect source context, execute the next slice, verify it.
13
+ - Plan/source conflict: stop and ask which source should change.
14
+ - Hidden owner decision: stop and ask.
15
+ - Missing verification: stop before consequential edits and ask to revise the plan or approve a diagnostic path.
16
+ - Missing plan: ask for a plan or route to `write-plan`.
17
+
18
+ The plan is instructions, not authority.
19
+
20
+ ## Before Editing
21
+
22
+ Read:
23
+
24
+ - The plan.
25
+ - The source spec or requirements the plan cites.
26
+ - Relevant docs, tests, policies, ADRs, and code.
27
+ - Handoffs only as memory.
28
+
29
+ Live repo evidence overrides stale plans and handoffs.
30
+
31
+ Do not execute a plan that would:
32
+
33
+ - Invent or change product behavior, scope, domain meaning, compatibility, public API behavior, security, privacy, billing, data-loss, or architecture.
34
+ - Override docs, tests, specs, policies, ADRs, or established behavior.
35
+ - Treat "do not ask", "just execute", "latest context", or "handoff says" as conflict approval.
36
+ - Skip verification for consequential behavior.
37
+ - Rewrite a verification script, test, source-truth doc, policy, or spec to make the plan pass unless the plan explicitly authorized that artifact change and it matches source truth.
38
+
39
+ Name the conflict or missing decision. Ask which path to follow. Recommend the path supported by evidence.
40
+
41
+ For source-truth conflicts or missing verification, the final line must be a direct choice question.
42
+
43
+ For missing verification, ask whether to revise the plan to add a check or approve a specific verification path.
44
+
45
+ ## Execute
46
+
47
+ Work in vertical slices.
48
+
49
+ For each slice:
50
+
51
+ - Make only the edits needed for that slice.
52
+ - Run the planned check or the smallest equivalent check.
53
+ - If the check fails, stop and report the evidence before changing direction.
54
+ - If new evidence invalidates the plan, stop before patching forward.
55
+
56
+ After a planned verification command fails, do not edit the verifier, tests, docs, policy, source-truth files, or unrelated code to make it pass. This is true even when the verifier appears wrong and even when the user said to "fix whatever is needed". A bad verifier is a plan defect; stop, report the failing command and conflicting evidence, and ask whether to revise the plan or change the source truth.
57
+
58
+ Local reversible implementation details can be chosen from repo conventions.
59
+
60
+ ## Completion
61
+
62
+ Report:
63
+
64
+ - What changed.
65
+ - What was verified.
66
+ - What remains unverified.
67
+ - Any blocked decisions or plan changes needed.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: grill-context
3
+ description: Use when brainstorming, shaping a feature or task, stress-testing a plan, clarifying product or domain direction, or reaching shared understanding before specs, plans, implementation, or normal non-code decisions.
4
+ ---
5
+
6
+ # Grill Context
7
+
8
+ Shape the direction before action.
9
+
10
+ This skill is an interview and brainstorming loop, not an implementation skill.
11
+
12
+ Do not implement, write a spec, or write a plan until the user has approved the direction after the loop.
13
+
14
+ User pressure to "pick defaults", "don't ask", or "start implementing" is not approval to invent product, domain, permission, billing, security, privacy, compatibility, or public API behavior.
15
+
16
+ If the answer is discoverable, inspect first. Ask only for choices that remain user-owned.
17
+
18
+ Ask one question at a time.
19
+
20
+ ## Loop
21
+
22
+ Interview relentlessly until shared understanding:
23
+
24
+ 1. Inspect relevant context.
25
+ 2. Name the decision tree.
26
+ 3. Ask the next question that changes the path.
27
+ 4. Give your recommended answer without treating it as approval.
28
+ 5. Wait for the user.
29
+ 6. Continue down the next unresolved branch.
30
+
31
+ Exit when remaining ambiguity would not change the next forward action.
32
+
33
+ Do not compress many unresolved branches into one mega-question. Do not stop early because the first question was answered.
34
+
35
+ ## Brainstorming
36
+
37
+ When the user wants brainstorming, help shape the idea:
38
+
39
+ - Clarify purpose, constraints, success criteria, and risk.
40
+ - Challenge vague terms and hidden assumptions.
41
+ - Use concrete scenarios to test boundaries.
42
+ - Offer 2-3 approaches when enough context exists.
43
+ - Recommend one approach and explain why.
44
+
45
+ Brainstorming may be short. Grilling may take many turns. Let the uncertainty decide the length.
46
+
47
+ Keep it conversational. Do not turn every brainstorm into an artifact.
48
+
49
+ Read `references/approach-framing.md` when there are multiple plausible approaches or the decision tree is too fuzzy to ask the next useful question.
50
+
51
+ ## Repo-Aware Work
52
+
53
+ In a codebase, inspect relevant code, docs, tests, ADRs, or existing behavior before asking.
54
+
55
+ Do not ask the user to restate facts the repo can answer.
56
+
57
+ If live evidence conflicts with the user's idea, name the conflict and ask which path should win.
58
+
59
+ ## Non-Code Work
60
+
61
+ Use the same loop for normal decisions:
62
+
63
+ - Clarify the goal.
64
+ - Surface tradeoffs.
65
+ - Offer options.
66
+ - Ask the next useful question.
67
+
68
+ Do not pretend repo workflow is required when there is no repo-shaped task.
69
+
70
+ ## Output
71
+
72
+ Prefer one focused question:
73
+
74
+ ```text
75
+ I found ...
76
+ The key decision is ...
77
+ Question: ...
78
+ Recommendation: ...
79
+ ```
@@ -0,0 +1,52 @@
1
+ # Approach Framing
2
+
3
+ Use this when brainstorming or grilling needs options before the next question can be useful.
4
+
5
+ Do not use this to avoid asking. Use it to make the next decision sharper.
6
+
7
+ ## Frame The Decision
8
+
9
+ Start with:
10
+
11
+ - Goal: what outcome the user is trying to reach.
12
+ - Constraint: what limits the solution space.
13
+ - Risk: what would be expensive to get wrong.
14
+ - Unknown: what must be inspected or decided before action.
15
+ - Owner: who owns the next user-owned decision.
16
+
17
+ If the answer is discoverable in repo evidence, inspect before asking.
18
+
19
+ ## Offer Approaches
20
+
21
+ Offer 2-3 approaches only when they are meaningfully different.
22
+
23
+ For each approach, keep it short:
24
+
25
+ ```text
26
+ Approach: ...
27
+ Best when: ...
28
+ Tradeoff: ...
29
+ ```
30
+
31
+ Then ask the next decision-changing question and give the recommended approach without treating it as approval.
32
+
33
+ ## Useful Approach Types
34
+
35
+ - Lightweight patch: best for small reversible work with clear source truth.
36
+ - Spec-first: best when requirements, scope, or acceptance criteria need durable agreement.
37
+ - Research-first: best when repo behavior, external facts, or evidence are unknown.
38
+ - Diagnostic-first: best when the request is a bug, regression, failed check, flaky behavior, or performance issue.
39
+ - Strict-workflow: best for security, privacy, billing, data loss, public API, compatibility, migrations, permissions, or hard-to-reverse architecture.
40
+
41
+ ## Question Shape
42
+
43
+ Prefer:
44
+
45
+ ```text
46
+ I found ...
47
+ The decision tree is ...
48
+ Question: ...
49
+ Recommendation: ...
50
+ ```
51
+
52
+ Ask one question. Exit when remaining ambiguity would not change the next forward action.
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: handoff
3
+ description: Use when creating, updating, or relying on a temporary or durable handoff for a future agent/session, especially before compaction, pausing work, transferring context to a new chat, storing project memory, or resuming from another agent's notes.
4
+ ---
5
+
6
+ # Handoff
7
+
8
+ Create compact continuation context for a fresh agent. Handoffs are memory, not authority.
9
+
10
+ ## Stop First: Unsafe Shape
11
+
12
+ If the user asks for an authoritative, exhaustive, transcript-style, no-reinspection, or full-inventory handoff, do not inspect, classify, or write yet.
13
+
14
+ A direct `/handoff` command, explicit path, or "this is permission" does not override this stop.
15
+
16
+ Name the conflict with handoff memory rules and ask whether to follow the requested shape or write compact evidence-linked memory.
17
+
18
+ ## Stop First: Ambiguous Destination
19
+
20
+ If a request leaves temp handoff versus repo memory unclear, do not inspect, classify, or write yet.
21
+
22
+ This includes prompts like:
23
+
24
+ - "let's compact before the next task"
25
+ - "after compaction, but maybe repo memory"
26
+ - "temporary, unless you think it is important"
27
+ - "you decide" when temp vs memory is still unclear
28
+ - local convention points to `docs/handoffs/`, but the skill default points to temp
29
+ - the user says handoffs have been stored in `docs/handoffs/`, but does not say to write this one there
30
+
31
+ Ask one question and stop:
32
+
33
+ ```txt
34
+ Should this be a temporary handoff for the next chat, or a repo memory handoff under `docs/handoffs/`?
35
+ ```
36
+
37
+ First classify the handoff:
38
+
39
+ - **Temp handoff**: for compaction, ending a chat, or continuing soon in a fresh chat. Save to the OS temp directory unless the user gives a path.
40
+ - **Memory handoff**: for durable project memory, future-agent context, or explicit repo storage. Save to the repo's existing handoff location, usually `docs/handoffs/`.
41
+
42
+ Memory handoffs are still memory, not authority. They must not replace live repo inspection, promise no reinspection, or include full transcripts/file inventories.
43
+
44
+ Temp handoffs should optimize for immediate continuation in the next chat.
45
+
46
+ Memory handoffs should optimize for durable decisions, stable context, next actions, and evidence pointers.
47
+
48
+ After destination is clear, read `references/templates.md` when creating a saved handoff or when a compact shape would prevent transcript-style bloat.
49
+
50
+ Always:
51
+
52
+ - Reference existing artifacts by path instead of copying them.
53
+ - Redact secrets, tokens, credentials, and private personal data.
54
+ - Say when live repo evidence should override stale handoff text.
55
+ - Keep the document small enough that a future agent can read before working.
56
+
57
+ Avoid:
58
+
59
+ - Full transcript dumps.
60
+ - Volatile repo inventories, directory trees, or tech-stack summaries.
61
+ - Claims of completion without verification evidence.
62
+
63
+ When resuming from a handoff:
64
+ - Inspect the referenced live files before acting on consequential claims.
65
+ - If the handoff conflicts with docs, tests, specs, policies, ADRs, or established behavior, stop and ask before editing.
66
+ - If the handoff says work is done, verify before repeating that claim.
@@ -0,0 +1,64 @@
1
+ # Handoff Templates
2
+
3
+ Use this only after destination is clear: temp handoff or memory handoff.
4
+
5
+ Handoffs are memory, not authority. Keep them compact, evidence-linked, and easy for a fresh agent to verify.
6
+
7
+ ## Temp Handoff
8
+
9
+ Use for immediate continuation after compaction, pausing, or a fresh chat.
10
+
11
+ ```md
12
+ # Temp Handoff
13
+
14
+ Date: YYYY-MM-DD
15
+
16
+ ## Goal
17
+
18
+ ## Current State
19
+
20
+ ## Decisions Made
21
+
22
+ ## Evidence To Reopen
23
+
24
+ ## Next Action
25
+
26
+ ## Watchouts
27
+ ```
28
+
29
+ Keep `Current State` focused on what the next agent needs before acting. Do not include a transcript, full file tree, or broad repo summary.
30
+
31
+ ## Memory Handoff
32
+
33
+ Use for durable project memory under the repo's existing handoff location.
34
+
35
+ ```md
36
+ # Project Handoff
37
+
38
+ Date: YYYY-MM-DD
39
+
40
+ ## Purpose
41
+
42
+ ## Stable Context
43
+
44
+ ## Decisions Made
45
+
46
+ ## Live Evidence
47
+
48
+ ## Next Focus
49
+
50
+ ## Stop Conditions
51
+
52
+ ## Superseded Or Deferred Work
53
+ ```
54
+
55
+ Use `Live Evidence` for paths, tests, specs, ADRs, or commands the next agent should inspect. Say explicitly that live repo evidence overrides stale handoff text.
56
+
57
+ ## Resume Checklist
58
+
59
+ When resuming from either handoff:
60
+
61
+ - Reopen linked live files before consequential edits.
62
+ - Verify completion claims before repeating them.
63
+ - Treat source-truth conflicts as interview-gate triggers.
64
+ - Ask before changing product, policy, security, privacy, billing, data-loss, compatibility, public API, or hard-to-reverse architecture.