@phamvuhoang/otto-core 0.15.0 → 0.16.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.
@@ -0,0 +1,95 @@
1
+ {{ RESUME }}
2
+
3
+ <commits>
4
+
5
+ !?`git log -n 15 --format="%H%n%ad%n%B---" --date=short|||No commits found`
6
+
7
+ </commits>
8
+
9
+ <learnings>
10
+
11
+ !?`cat ./.otto/LEARNINGS.md|||_No learnings recorded yet._`
12
+
13
+ </learnings>
14
+
15
+ <inputs>
16
+
17
+ {{ INPUTS }}
18
+
19
+ </inputs>
20
+
21
+ # PLAN (AUTHOR THE SPEC + PLAN — DO NOT IMPLEMENT)
22
+
23
+ You are PLANNING, not implementing. Turn the thin task in `<inputs>` into a
24
+ world-class, structured **spec** and a task-decomposed **plan**, persisted for
25
+ human review *before* any code is written. There is NO human available during
26
+ this run: act autonomously and **record your reasoning** instead of waiting for
27
+ approval ("record assumptions and proceed").
28
+
29
+ **Make NO source edits and NO implementation.** The only files you may write are
30
+ the spec and plan named below (plus checking off nothing yet). Do not touch
31
+ `packages/`, `apps/`, `src/`, or any product code.
32
+
33
+ ## 0. Resolve the task key and artifact paths
34
+
35
+ - GitHub issue run → task-key = `issue-<issue number>`.
36
+ - Plan/PRD run → task-key = a stable slug from the primary plan-file basename
37
+ (e.g. `docs/plans/foo.md` → `foo`); inline text → a short kebab-case of the
38
+ task title.
39
+
40
+ Per-task artifacts live together so everything Otto knows about a task is in one
41
+ place:
42
+
43
+ - Task dir: `.otto/tasks/<task-key>/`
44
+ - Spec path: `.otto/tasks/<task-key>/spec.md`
45
+ - Plan path: `.otto/tasks/<task-key>/plan.md`
46
+
47
+ ## 1. ALREADY PLANNED?
48
+
49
+ If `.otto/tasks/<task-key>/spec.md` AND `.otto/tasks/<task-key>/plan.md` already
50
+ exist and the plan covers the task, there is nothing to author — output
51
+ `<promise>NO MORE TASKS</promise>` and stop. Otherwise continue.
52
+
53
+ ## 2. AUTONOMOUS BRAINSTORM
54
+
55
+ Play both sides of a brainstorming session: list the clarifying questions a
56
+ brainstorm would ask (purpose, scope, constraints, success criteria, edge
57
+ cases), then answer each yourself with the most reasonable default given the
58
+ repo's existing patterns. Prefer the simplest viable option (YAGNI). `Read` the
59
+ relevant existing code first so the file map and decisions are grounded, not
60
+ guessed.
61
+
62
+ ## 3. WRITE THE SPEC — `.otto/tasks/<task-key>/spec.md`
63
+
64
+ Use the `Write` tool. The spec MUST contain these sections (this is the shape the
65
+ plan-quality rubric scores — a world-class plan has all of them):
66
+
67
+ - `## Problem` — who is blocked, what they cannot do, and why it matters.
68
+ - `## Decisions` (or `## Assumptions`) — each `question → chosen answer →
69
+ rationale`; record blockers and the safest assumption taken.
70
+ - `## Scope guard` — what is explicitly **out of scope** / the **non-goals**, so
71
+ the implementer does not sprawl.
72
+ - `## File map` — the component/file map: the specific files this work will
73
+ create or modify, as backticked paths (e.g. `packages/core/src/foo.ts`).
74
+ - `## Testing notes` — how it will be verified, and the **testable success
75
+ criteria** (done-when conditions).
76
+
77
+ ## 4. WRITE THE PLAN — `.otto/tasks/<task-key>/plan.md`
78
+
79
+ Use the `Write` tool. An ordered checklist of **bite-sized, testable tasks**, one
80
+ `- [ ]` per task (sized so each is one Otto run). Every task MUST state:
81
+
82
+ - a **failing-test-first** step (write the test that pins the behavior, watch it
83
+ fail, then implement), and
84
+ - an explicit **verify** command (e.g. `verify: \`pnpm -r typecheck && pnpm -r
85
+ test\``) — the exact command that proves the task is done.
86
+
87
+ Keep tasks ordered so each is gated on the prior; name the test file that pins
88
+ each task.
89
+
90
+ ## 5. COMMIT
91
+
92
+ Commit ONLY the spec + plan (and this is the whole run — no code). Use a
93
+ `docs(plan):` or `chore(plan):` commit. Then print a one-line summary of the
94
+ task-key and the number of plan tasks authored. Do not implement; the human
95
+ reviews the plan next.