rodo-spec 0.0.0-stage → 2.2.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 (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +221 -2
  3. package/dist/index.js +14857 -0
  4. package/dist/kit/.agents/skills/rodo/SKILL.md +168 -0
  5. package/dist/kit/.agents/skills/rodo/coder.md +82 -0
  6. package/dist/kit/.agents/skills/rodo/onboarding.md +28 -0
  7. package/dist/kit/.agents/skills/rodo/planner.md +95 -0
  8. package/dist/kit/.agents/skills/rodo/small-change.md +44 -0
  9. package/dist/kit/.agents/skills/rodo/templates/acceptance.feature +18 -0
  10. package/dist/kit/.agents/skills/rodo/templates/card.rodo.md +33 -0
  11. package/dist/kit/.agents/skills/rodo/templates/design.md +15 -0
  12. package/dist/kit/.agents/skills/rodo/templates/en/acceptance.feature +18 -0
  13. package/dist/kit/.agents/skills/rodo/templates/en/card.rodo.md +32 -0
  14. package/dist/kit/.agents/skills/rodo/templates/en/request.rodo.md +14 -0
  15. package/dist/kit/.agents/skills/rodo/templates/en/simple.md +21 -0
  16. package/dist/kit/.agents/skills/rodo/templates/request.rodo.md +14 -0
  17. package/dist/kit/.agents/skills/rodo/templates/simple.md +21 -0
  18. package/dist/kit/.agents/skills/rodo/templates/spec.md +55 -0
  19. package/dist/kit/.agents/skills/rodo/testing.md +45 -0
  20. package/dist/kit/.gitattributes +1 -0
  21. package/dist/kit/KIT_VERSION +1 -0
  22. package/dist/kit/MIGRATION.md +71 -0
  23. package/dist/kit/agents-block.md +6 -0
  24. package/dist/kit/kit-manifest.json +228 -0
  25. package/dist/kit/project-template/CHANGELOG.md +6 -0
  26. package/dist/kit/project-template/MAP.md +22 -0
  27. package/dist/kit/project-template/MEMORY.md +6 -0
  28. package/dist/kit/project-template/RULES.md +278 -0
  29. package/dist/kit/project-template/project/architecture.md +19 -0
  30. package/dist/kit/project-template/project/brief.md +17 -0
  31. package/dist/kit/project-template/project/glossary.md +7 -0
  32. package/dist/kit/project-template/project.json +11 -0
  33. package/dist/kit/project-template-en/CHANGELOG.md +6 -0
  34. package/dist/kit/project-template-en/MAP.md +24 -0
  35. package/dist/kit/project-template-en/MEMORY.md +6 -0
  36. package/dist/kit/project-template-en/RULES.md +69 -0
  37. package/dist/kit/project-template-en/project/architecture.md +19 -0
  38. package/dist/kit/project-template-en/project/brief.md +17 -0
  39. package/dist/kit/project-template-en/project/glossary.md +7 -0
  40. package/dist/kit/project-template-en/project.json +11 -0
  41. package/package.json +48 -4
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: rodo
3
+ description: RODO project method. Use whenever the repo has a rodo/ folder or *.rodo.md cards, or the user asks to plan a feature, code a card, fix a bug, onboard a project or make a small change. Tells you how to start and close a session (rodo sync, rodo resume), what to read, when a card is needed, and which playbook to follow.
4
+ ---
5
+
6
+ > یادداشت فارسی: این مهارت برای AI است. نسخهٔ انسانی همین قواعد در `rodo/<project>/RULES.md` است. RODO فقط «روش کار» است: هیچ ابزاری جلوی commit، تست یا کار را نمی‌گیرد.
7
+
8
+ # RODO method (kit 2.2.0)
9
+
10
+ RODO is a way of working, not a gate. Nothing blocks a commit, a test or a status. You follow it because it keeps the project understandable for the user, for teammates and for the next AI session.
11
+
12
+ ## Projects in this repo
13
+
14
+ Every folder `rodo/<project>/` with a `project.json` is one RODO project, bound to one board. Work in the project the user names; if there is only one, use it; if unsure, ask. Paths below are relative to `rodo/<project>/`.
15
+
16
+ ## Session start (every session, every change)
17
+
18
+ 1. If this folder is a git repository, look only (`git status -sb`, or how many commits `HEAD` is behind `@{upstream}`). Do **not** run `git pull`, `git fetch`, `git merge` or `git rebase`. Card files (`*.rodo.md`) arrive through `rodo sync`. MAP, MEMORY, `spec.md` and `simple.md` arrive through Git. If the branch is behind its remote, or you cannot tell, tell the user once and ask them to update the repo when they are ready. Then keep going with the files already on disk.
19
+ 2. Run `rodo sync` (all projects) or `rodo sync --project <slug>`. It pulls board changes into the card files. If it says OFFLINE or exits 4 (login needed), continue working and tell the user once.
20
+ 3. Run `rodo resume` (or `rodo resume <card>`) and read its output. Use `rodo resume --full` only for planning or deep debugging.
21
+ 4. If the tool is not installed, read `MAP.md`, `MEMORY.md` and the active card yourself.
22
+ 5. Read ONLY the files listed under the card's `## Refs` and the code they point to. Do not read the whole repository.
23
+ 6. If the card has an unticked `[approval]` step: stop, tell the user it waits for their approval on the web, and do nothing else on that card.
24
+ 7. If the card has an answered `## Decision:` (a `- Answer:` line): apply the answer, then set `status: in_progress` and remove `statusReason` and `blockerType` if the card was blocked only for that decision.
25
+
26
+ ## Session close (every session, before you stop)
27
+
28
+ 1. Update `## Progress notes`: `- Updated:`, `- Done:`, `- Remaining:` (free text). The reason for `blocked` / `cancelled` goes in the `statusReason` key, not in the notes.
29
+ 2. Report what you changed, in plain words.
30
+ 3. If the card has a test command, run `rodo test` (recommended, not required). Report the result honestly.
31
+ 4. Record new decisions (spec.md `## Decisions`; MEMORY.md when the card closes).
32
+ 5. Update any doc your change made wrong (same commit).
33
+ 6. Check scope (below).
34
+ 7. Run `rodo sync`. If it reports errors for a card you touched, fix them and run it again (at most twice), then tell the user what is left.
35
+ 8. If `rodo sync` reports `ARCHIVE_CONFIRM_REQUIRED` (more than 10 card files deleted): **stop and ask the user**. List the cards, and say why they are gone. Never add `--confirm-archive` yourself, never restore or delete files to make the warning go away, and never skip it silently. Only run `rodo sync --confirm-archive` after the user explicitly says yes in this session.
36
+
37
+ ## What you always do
38
+
39
+ 1. **A card for every new feature, change or improvement** (planner.md). A small change that does not change described behaviour gets one CHANGELOG line instead (small-change.md).
40
+ 2. **A raw request** from the user that is not planned yet becomes a `todo` card with `## Goal` and `## Why` in its description (template `templates/request.rodo.md`; no separate request document).
41
+ 3. **Keep the docs true.** Code and current documentation are one system: when code changes something a current document describes, the document changes in the same piece of work. Historical cycle documents are preserved as they were (see "Documents: current, active, historical").
42
+ 4. **Never delete files** without the user's OK.
43
+ 5. **No secrets** (passwords, API keys, tokens, private keys, connection strings) in any file under `rodo/`, in cards, in Progress notes, in commit messages or in your replies. Refer to them by name ("the payment API key") only.
44
+
45
+ ## Fields you must never write
46
+
47
+ `id`, `tempId`, `boardId`, `updatedAt`, `locked`, any `<!-- rodo:… -->` comment, the first-line `<!-- RODO_ERROR … -->`, and `- Answer:` lines under a decision. `rodo sync` writes them. If a file starts with `RODO_ERROR`, fix the cause; sync removes the line.
48
+
49
+ ## Statuses (exactly five)
50
+
51
+ | Status | Meaning | Who sets it |
52
+ |---|---|---|
53
+ | `todo` | planned, not started (also: a raw request) | planner |
54
+ | `in_progress` | being worked on | coder, when work starts |
55
+ | `blocked` | cannot go on. Needs `blockerType` and a plain reason in `statusReason:` | you, by yourself; tell the user |
56
+ | `cancelled` | the user decided not to do it; the card stays, with `statusReason: <reason>` | only with the user's OK |
57
+ | `done` | finished; if tests were run, they passed (tests stay optional, D6) | coder |
58
+
59
+ `blockerType`: `decision` (the user must choose) · `requirement` (the goal is unclear) · `technical` (you cannot solve it) · `test` (a test cannot run or keeps failing) · `environment` (tool, server, dependency) · `external` (waiting for someone/something outside) · `permission` (an access key or right is missing).
60
+
61
+ ## Stuck rule (failure signature)
62
+
63
+ `rodo test` prints a failure signature (12 hex characters) and writes `- Last failure: <sig> ×<n>`. When the **same signature** appears twice (`×2`, or `RODO_STUCK`), stop: set `status: blocked`, `blockerType: test` (or `technical`), write the problem in plain words in `statusReason:`, and ask the user: clarify, try a stronger model, or cancel. Different failures do not count: fix them and go on. Without `rodo test`, apply the same rule yourself: same error message at the same place twice = stuck. This is also the limit of the FIX → VERIFY loop.
64
+
65
+ ## Needs a decision
66
+
67
+ This is for choices that come up **during work**; questions before planning are Clarification (see "Ask only what matters"). When only the user can choose (behaviour, wording, priority, trade-off), do not guess. Add to the card, after `## Refs`:
68
+
69
+ ## Decision: <one short question in the simple language>
70
+
71
+ - A: <option>
72
+ - B: <option>
73
+
74
+ (2–6 options, keys A–F.) Set `status: blocked`, `blockerType: decision`, `statusReason: waiting for your decision: <question>`, run `rodo sync`, and tell the user to answer on the web. Never write the `- Answer:` line yourself.
75
+
76
+ ## Scope
77
+
78
+ A card may have `scope: {allowed: [...], forbidden: [...]}`. Stay inside `allowed`; never touch `forbidden`. When you find work outside the scope (or a new requirement): do not do it silently. Write `- Out of scope: <item> → new card` in Progress notes, tell the user, and (planner) create a new `todo` card for it. A small change of the same feature: update the card and its docs and tell the user.
79
+
80
+ ## Pick your role, then open one playbook
81
+
82
+ | Situation | Playbook |
83
+ |---|---|
84
+ | New feature, change, improvement; a request; a stuck card the user sent back | `planner.md` |
85
+ | You were given a card to implement or continue | `coder.md` |
86
+ | The repo has code but no `rodo/<project>/` yet | `onboarding.md` |
87
+ | Typo, style, refactor or a fix that does not change described behaviour | `small-change.md` |
88
+ | You write or fix tests (optional, recommended) | `testing.md` |
89
+
90
+ ## Workflow levels
91
+
92
+ Every request gets one level. The yes/no classification questions are in `planner.md` ("Classify"). Documents are recommendations; nothing is forced.
93
+
94
+ - **QUICK** — the small-change rule (`small-change.md`): no card, one `CHANGELOG.md` line, a one-line docs glance.
95
+ - **STANDARD** — a card, `spec.md` and a short `simple.md`; `acceptance.feature` optional.
96
+ - **MAJOR** — like STANDARD plus `design.md` and `acceptance.feature`; an independent review is recommended.
97
+
98
+ UNDERSTAND -> DOC IMPACT -> CLASSIFY (provisional)
99
+ QUICK: change + 1 CHANGELOG line + one-line docs glance -> DONE
100
+ STANDARD / MAJOR: CLARIFY (only important, <= 5)
101
+ -> RECLASSIFY if scope changed
102
+ -> DOCS/PLAN (spec; simple; design if MAJOR)
103
+ -> TASKS -> BUILD
104
+ -> VERIFY (fitting checks + doc consistency)
105
+ -> REVIEW (optional; recommended for MAJOR)
106
+ -> FIX <-> VERIFY ... same failure twice -> BLOCKED
107
+ -> DONE
108
+
109
+ ## Ask only what matters
110
+
111
+ **Ask only when** the answer changes expected behaviour, when there are several reasonable options, when a wrong choice would be costly to undo, or when there is no safe default. Otherwise choose a low-risk, reversible default, write it in `spec.md` `## Decisions` as `<decision> (default, not asked). Because <reason>.`, and go on. The goal is less rework, not more conversation.
112
+
113
+ **Clarification** happens **before planning**, in the conversation, about *what* to build. The card is `todo` (or does not exist yet). Answers go into `spec.md` `## Decisions`. The status does not change.
114
+
115
+ **Needs Decision** happens **during work** (`in_progress`), when only the user can choose and you cannot go on. Use a `## Decision:` section on the card, set `status: blocked` and `blockerType: decision`, and the user answers on the web ("Needs a decision" below, unchanged).
116
+
117
+ Do not turn ordinary clarification questions into `## Decision:` sections, and do not stop mid-work for trivial choices (use the ask rule).
118
+
119
+ ## Documents: current, active, historical
120
+
121
+ **Code and current documentation are one system.** When code changes something a current document describes, the document changes in the same piece of work. Historical cycle documents are preserved as they were, unless they are explicitly marked current.
122
+
123
+ | Kind | Files | Rule |
124
+ |---|---|---|
125
+ | **CURRENT** (canonical) | `rodo/<project>/project/*`, `MAP.md`, `MEMORY.md` | Must describe the code as it is now. Update them in the same work. `MEMORY.md` is append-only: add a new line that says which line it replaces; never rewrite old lines. |
126
+ | **ACTIVE CYCLE** | the docs of the card you are working on (`simple.md`, `spec.md`, `design.md`, `acceptance.feature`) | Must match the code when the card is done. |
127
+ | **HISTORICAL** | docs of `done` and `cancelled` cycles | Never rewritten. A later card refers to them; a new decision goes into the new card and `MEMORY.md`. |
128
+
129
+ Before planning, list the current docs this change will make wrong in `spec.md` `## Documentation Impact` (planner.md). In VERIFY, check that each of them was updated (coder.md "Verify and fix").
130
+
131
+ ## Verify and review
132
+
133
+ Run the checks that fit this change with the project's own tools; RODO runs nothing itself. Always include documentation consistency. Write `- Verified: <check> ✓/✗, …` in Progress notes. FIX → VERIFY until it passes or the stuck rule applies. An independent review is optional (recommended for MAJOR) and never replaces tests. The menu and the details are in `coder.md` "Verify and fix".
134
+
135
+ ## Project layout
136
+
137
+ AGENTS.md pointer to this skill
138
+ .agents/skills/rodo/ this skill (kit-owned; updated by rodo init)
139
+ rodo/
140
+ kit.json installed kit version
141
+ <project>/
142
+ project.json board binding and settings (no secrets)
143
+ MAP.md MEMORY.md RULES.md CHANGELOG.md
144
+ project/{brief,architecture,glossary}.md
145
+ cycles/NNN-slug/
146
+ card.rodo.md the card (synced with the board, not in git)
147
+ simple.md plain explanation (shown read-only on the web)
148
+ spec.md technical rules **R1**, **R2** …
149
+ design.md design for MAJOR changes (optional)
150
+ acceptance.feature scenarios tagged @R1 … (optional)
151
+ inbox/ cards created on the web (not in git)
152
+
153
+ Card format details: the comments in `templates/card.rodo.md` and `rodo validate`. Templates come in two languages: `templates/` (Persian) and `templates/en/` (English); use the one that matches `language.simple` in `project.json`. `rodo new "<title>"` creates `cycles/NNN-slug/` with the card, `simple.md` and `spec.md` from them.
154
+
155
+ ## Tools
156
+
157
+ | Command | Use |
158
+ |---|---|
159
+ | `rodo sync` | start and end of every session |
160
+ | `rodo resume [card] [--full]` | context for a new session |
161
+ | `rodo status` | board vs local, side by side |
162
+ | `rodo test [card]` | run the card's test command, record the failure signature |
163
+ | `rodo new "<title>"` | create the next cycle folder with `card.rodo.md`, `simple.md`, `spec.md` (`--major` adds `design.md` and `acceptance.feature`) |
164
+ | `rodo validate` | check card files (never blocks; `--strict` exits 1 on errors, for CI) |
165
+ | `rodo doctor` | find setup problems |
166
+ | `rodo init` | install/update the kit, bind a board. **Never create a board yourself**: if a board is needed, ask the user to run `rodo init` in their terminal. |
167
+
168
+ Optional, if available in the project: Graphify (code map, for Documentation Impact and finding affected code) and Context7 (current library docs). Never install them yourself; RODO works without them.
@@ -0,0 +1,82 @@
1
+ > یادداشت فارسی: دستورالعمل کدنویس. از روی کارت کار کن، فقط ارجاع‌ها را بخوان، قدم‌به‌قدم جلو برو، سندها را درست نگه دار، و آخر هر جلسه «Progress notes» را به‌روز کن. همهٔ مسیرها نسبت به `rodo/<project>/` هستند.
2
+
3
+ # Coder playbook
4
+
5
+ You implement one card. Any model may do this; the user chooses.
6
+
7
+ ## Before you start (every session)
8
+
9
+ Follow "Session start" in SKILL.md (git check without pulling → rodo sync → rodo resume → refs only → approval check → answered decisions). Then set `status: in_progress`.
10
+
11
+ ## Doing the steps
12
+
13
+ For each unticked step, in order:
14
+ 1. Do only what the step says.
15
+ 2. Check it (unit test, build, or the command the step names).
16
+ 3. Tick it `- [x]`; add `[hours: H:MM]` only if you know the real time.
17
+ 4. Commit with the card number in the message, e.g. `feat: discount code input [cycle 002]`, so people can find the work later.
18
+
19
+ If your change makes a project doc wrong (`project/*`, the card's `spec.md`), fix the doc in the same commit.
20
+
21
+ ## Tests (if the card has scenarios)
22
+
23
+ - Step definitions go in the folder from `project.json` `stepsDirs`. They must really drive the app (browser, API or CLI) and really assert. See `testing.md`.
24
+ - Run the card's tests with `rodo test` (it uses the card's `test.command`, or `testCommand` from `project.json`). Tick `تست پذیرش پاس شد` only after a real passing run.
25
+ - **Never weaken a scenario or test to make code pass:** no deleting scenarios, loosening assertions, `@skip`/`.only`/`test.fixme`, or changing an expected value to match buggy output. If a scenario looks wrong, explain why to the user; change it only if they agree.
26
+
27
+ ## Scope changes while coding
28
+
29
+ - Out of the card's `scope` or a new requirement: do not do it silently. Write `- Out of scope: <item> → new card` in Progress notes and tell the user.
30
+ - Small change in the same feature: update the scenario/spec/steps of this card, tell the user, continue (wait if there is an unticked approval item).
31
+ - Big new feature: do not add it. Write it under `- Remaining:` as "needs a new card" and tell the user.
32
+
33
+ ## Stuck
34
+
35
+ Use the stuck rule in SKILL.md: same failure signature twice → `status: blocked`, `blockerType: test` or `technical`, a plain `statusReason:`, ask the user. Waiting for an answer, a key or another card → `status: blocked` with the matching `blockerType` (`decision`, `permission`, `external`). If only the user can choose, write a `## Decision:` section (SKILL.md). When solved: `status: in_progress`, remove `statusReason` and `blockerType`. Never set `cancelled` yourself; only with the user's OK.
36
+
37
+ ## Verify and fix
38
+
39
+ **VERIFY** — pick the checks that fit this change and run them with the project's own tools (RODO runs nothing itself):
40
+ - build, typecheck, lint;
41
+ - unit, integration, e2e;
42
+ - architecture rules, security checks;
43
+ - acceptance (the card's `test` command via `rodo test`, or the acceptance criteria checked one by one);
44
+ - documentation consistency (below).
45
+
46
+ Write the result in Progress notes as `- Verified: <check> ✓/✗, …`.
47
+
48
+ **Documentation Consistency** (part of VERIFY):
49
+ - Check that every file listed under Documentation Impact was updated.
50
+ - Check that the CURRENT docs and the active cycle docs still describe the code.
51
+ - If something does not match: FIX, then VERIFY again.
52
+ - If a current doc contradicts a `MEMORY.md` decision, stop and ask the user (as small-change.md already says).
53
+
54
+ **REVIEW (optional; recommended for MAJOR)** — an independent AI session or model reads the change and checks:
55
+ - requirement coverage; acceptance criteria;
56
+ - regressions; architecture fit;
57
+ - missing tests; maintainability;
58
+ - unintended changes.
59
+
60
+ A review never replaces tests. Its findings go back to FIX.
61
+
62
+ **FIX loop** — FIX → VERIFY until everything passes (→ DONE) or the stuck rule applies: the **same failure twice** (same failure signature, or the same error at the same place) → `status: blocked` with `blockerType: test` or `technical` (SKILL.md "Stuck rule"). Different failures do not count.
63
+
64
+ ## End of every session
65
+
66
+ Follow "Session close" in SKILL.md. Always finish with `rodo sync`.
67
+
68
+ ## Close (all steps ticked)
69
+
70
+ The folder does not move.
71
+ 1. Card: `status: done`.
72
+ 2. `MAP.md`: add the cycle under `## انجام‌شده` (one line, link to simple.md or the card folder) and update "الان کجاییم".
73
+ 3. `MEMORY.md`: append each `## Decisions` line of spec.md as `- YYYY-MM-DD — <decision>. چون <reason>. (cycle NNN)`.
74
+ 4. Commit the MAP and MEMORY change. Later changes to this behaviour need a new card; changes that do not touch behaviour go to `small-change.md`.
75
+
76
+ ## Rules
77
+
78
+ - Never tick an approval item or change its text. Only a person can approve, in the web app. Never answer a `## Decision:` yourself.
79
+ - Never edit `id:` lines or `<!-- rodo:... -->` comments.
80
+ - Do not change `members`, `startAt`, `dueAt`, `priority` unless the user asks: the team owns them.
81
+ - Never delete files you did not create in this card without asking.
82
+ - Keep changes inside the steps. Unrelated fixes go to `small-change.md` or a new card.
@@ -0,0 +1,28 @@
1
+ > یادداشت فارسی: برای پوشه‌ای که از قبل کد دارد ولی هنوز `rodo/` ندارد. هیچ چیزی پاک نمی‌شود و جابه‌جایی‌ها اول پیشنهاد می‌شوند.
2
+
3
+ # Onboarding playbook (existing folder)
4
+
5
+ Goal: create `rodo/<project>/` so the project can follow the method, without changing any existing file.
6
+
7
+ ## Steps
8
+
9
+ 1. **Read, do not write.** Read README, existing docs, package files, folder structure, git log (last ~100 commits), and TODO/FIXME comments. Skim code by folder; do not read every file.
10
+ 2. **Create the skeleton**: run `rodo init --method-only --project <slug>` (if the CLI is installed), or copy `project-template/` into `rodo/<slug>/` yourself. It never overwrites an existing file. Set `language` in `project.json` if the user wants other languages.
11
+ 3. **brief.md and architecture.md**: describe what exists today. Mark guesses with `(حدس)` so the user can confirm.
12
+ 4. **MEMORY.md**: decisions visible in the code or docs (framework, database, auth method...). One line each with the reason if known, else `چون: نامعلوم`.
13
+ 5. **Finished work → done cycles.** For each finished feature a user can see, create `rodo/<project>/cycles/NNN-slug/` with:
14
+ - `simple.md` whose FIRST line is `<!-- rodo:onboarded -->`, then 3-6 simple lines;
15
+ - `card.rodo.md` with `status: done`, refs to `simple.md` and the main code files, and steps as ticked items if they are known. No approval item: past work is not re-approved.
16
+ List each one under "انجام‌شده" in `MAP.md`.
17
+ No `spec.md` or `acceptance.feature` is needed for onboarded done cycles.
18
+ 6. **Unfinished work → pending cycles.** For each TODO, half-done feature, or open issue, create `rodo/<project>/cycles/NNN-slug/` with the same two files and `status: todo`, listed under "بعدی" in `MAP.md`. Before anyone codes it, the planner completes it like any new card (`spec.md` with rules `**R1**`..., optional `acceptance.feature` and approval item) and removes the `rodo:onboarded` line.
19
+ 7. **MAP.md**: sections `## انجام‌شده`, `## لغوشده` (abandoned work, with the reason after `—`), `## بعدی`, plus "الان کجاییم" in a few lines. Onboarded done cycles need no `acceptance-result.json`.
20
+ 8. **Proposals, not actions.** Write `rodo/<project>/onboarding-report.md` with: docs that could move into `rodo/<project>/project/`, duplicated or outdated docs, and files that look unused. Each line: current path → proposed action → reason. Do NOT move or delete anything until the user approves each line.
21
+ 9. Add `*.rodo.md` and `.rodo/` to `.gitignore` only if the user agrees. If they decline, tell them cards may end up in git and continue.
22
+ 10. Show the user MAP.md and the report. If the RODO CLI is installed, `rodo validate` lists card-format warnings; fix what it reports.
23
+ 11. **Last step:** ask the user to run `rodo init` in their own terminal to connect the board (the AI never creates boards).
24
+
25
+ ## Never
26
+
27
+ - Never delete, rename, or rewrite existing files during onboarding.
28
+ - Never invent history. If you are unsure whether something is finished, make it a pending cycle and say so.
@@ -0,0 +1,95 @@
1
+ > یادداشت فارسی: دستورالعمل برنامه‌ریز. برای هر قابلیت، تغییر یا بهبود تازه یک کارت و سندهایش را می‌سازد. برای این نقش یک مدل قوی پیشنهاد می‌شود، ولی انتخاب با کاربر است. همهٔ مسیرها نسبت به `rodo/<project>/` هستند.
2
+
3
+ # Planner playbook
4
+
5
+ You turn a request into one card (with its docs) that any model can implement without asking questions.
6
+
7
+ ## Planner as router
8
+
9
+ understand → documentation impact → classify → clarify → reclassify (if the answers changed the scope) → create the documents for the level → task breakdown (the card checklist) → hand off.
10
+
11
+ ## Inputs you read
12
+
13
+ 1. Run `rodo sync`, then read `MAP.md`, `MEMORY.md`, `project.json` (languages), `project/*`.
14
+ 2. Only the code and earlier cycles the request touches. Search; do not read the whole repo.
15
+
16
+ ## Is a card needed?
17
+
18
+ Yes, for every new feature, change or improvement, and for every change to behaviour that a card, spec or scenario describes. No, only for small changes that do not change described behaviour (see `small-change.md`). If an existing open card covers the request, update that card instead of making a new one.
19
+
20
+ **Requests:** if the user only describes a need and does not want planning now, create a `todo` card in `inbox/` (or the next cycle folder) with `## Goal` and `## Why` (`templates/request.rodo.md`). Planning later turns it into a cycle: move the file into `cycles/NNN-slug/card.rodo.md`; its id stays.
21
+
22
+ ## Documentation Impact (after understand, before classify)
23
+
24
+ - List the current documents this change will make wrong or must extend.
25
+ - Use `MAP.md`, `MEMORY.md`, `project/*`, the active cycle, the card's refs, and a code search (Graphify or similar, if available in the project).
26
+ - Write the list in `spec.md` `## Documentation Impact` (`- <path> — <what changes>`, or `- none — <why>`).
27
+ - QUICK: do this in your head and fix any doc you made wrong (small-change.md).
28
+
29
+ ## Classify
30
+
31
+ **Step 1 — QUICK?** Ask the small-change question (`small-change.md`). "No" → **QUICK**: follow `small-change.md` (no card, one CHANGELOG line, a one-line docs glance). Not sure → not QUICK.
32
+
33
+ **Step 2 — MAJOR?** If **any** answer is yes, it is **MAJOR**:
34
+ 1. Does it add or change architecture: a new module, service, package, external integration or dependency, or how existing parts talk to each other?
35
+ 2. Does it need a coordinated design across several areas, beyond the usual "one screen + its API"?
36
+ 3. Does it change a public API or contract that other code or users rely on, or the data model in a way that needs existing data migrated?
37
+ 4. Does it touch security, authentication, money, or deleting data?
38
+ 5. Would a wrong approach be expensive to undo (roughly more than a day of rework)?
39
+ 6. Are there two or more reasonable technical approaches with real trade-offs?
40
+
41
+ **Otherwise STANDARD.** Not sure between STANDARD and MAJOR → STANDARD, and say so in one line. The level is provisional until Clarify is done. Write it on the card as `workflow: standard` or `workflow: major` (optional field, local only). The card size rule (one card ≈ 1–5 days; bigger → split) still applies; follow-up cards of a MAJOR change link to the same `design.md` in their `## Refs`.
42
+
43
+ ## Clarify (before planning)
44
+
45
+ - Ask only the important ambiguities (the ask rule in SKILL.md), **at most 5 questions per round**.
46
+ - Prefer multiple choice (`A`, `B`, `C` … plus "other: …"). For each question, say in one line why it matters and which default you will use if the user has no preference.
47
+ - Low-risk, reversible choices are not asked: choose the default and record it.
48
+ - Write the answers in `spec.md` `## Decisions` (and in `simple.md` when the user will see the difference).
49
+ - Questions still open go under `spec.md` `## Open Questions`. Do not start BUILD while an open question would change the expected behaviour.
50
+ - QUICK changes normally skip this step. If the answers change the size or risk of the change, classify again.
51
+
52
+ ## Documents per level
53
+
54
+ | Level | Documents (all recommended; nothing is forced) |
55
+ |---|---|
56
+ | QUICK | none; one `CHANGELOG.md` line |
57
+ | STANDARD | `spec.md` (with Acceptance criteria, Documentation Impact, Open Questions, Decisions); a short `simple.md` (it is the human brief shown on the web, and the validator warns `CYCLE_SIMPLE_MISSING`); `acceptance.feature` optional |
58
+ | MAJOR | `simple.md` + `design.md` + `spec.md` + `acceptance.feature`; architecture decisions in `design.md` `## Decisions` plus one `MEMORY.md` line |
59
+
60
+ `simple.md` is the **human brief**: what the user gets, why, what is not included, one example. **No implementation details.** Technical details go in `spec.md` and `design.md`. There is no ADR folder.
61
+
62
+ ## Steps
63
+
64
+ 1. **Understand and restate** the need in 2-3 simple sentences in the simple language. Then Documentation Impact, Classify, Clarify (above).
65
+ 2. **Size.** One card = one thing a user can see and test, about 1-5 days, 3-12 steps. Bigger: propose a split and ask which part comes first.
66
+ 3. **Number and folder.** Run `rodo new "<title>"` (it picks the next free `NNN` and an English slug and fills the templates), or do it by hand: next free `NNN` in `cycles/` (finished and cancelled folders keep their numbers), slug short English `a-z0-9-`, create `cycles/NNN-slug/`.
67
+ 4. **Write the docs from `templates/`** for the level:
68
+ - `simple.md` (simple language, max ~250 words, no technical words).
69
+ - `spec.md` (technical language): numbered bold rules `**R1**`, `**R2**` ..., data, API, screens, files to create or change, then `## Acceptance criteria`, `## Documentation Impact`, `## Open Questions`, `## Decisions` (one line each, with "because"). Write the acceptance criteria before BUILD.
70
+ - `design.md` for MAJOR only.
71
+ - `acceptance.feature` (optional, recommended): scenario text in the simple language, English keywords, tag `@cycle-NNN`, and tag each scenario or `Rule:` with the rule IDs it proves (`@R2`). Concrete values; one visible behaviour per scenario. Ask the user whether they want tests for this card if unsure.
72
+ - `card.rodo.md`: a short title (no number: the number comes from the folder), short description, `status: todo`, `workflow: standard` or `major`, `scope: {allowed, forbidden}` (3–8 short items each), `test: {adapter, command}` if the card has a runnable test (adapter `web`, `api`, `cli`, `mobile`, `iot` or `other`), `## Refs` to the docs above and any code the coder must read (paths start with `/rodo/<project>/`), `## Checklist: قدم‌ها` (English projects: `## Checklist: Steps`) with one item per step (small, checkable, says what "done" means). Add the optional approval item first if the user wants to approve (only a person ticks it on the web); add a step-definitions step and the last item `تست پذیرش پاس شد` (English: `Acceptance test passed`) only if the card has scenarios.
73
+ 5. **Glossary:** add new words the docs use.
74
+ 6. **Hand over:** tell the user which files to read (`simple.md`, and `design.md` or `acceptance.feature` if there are any) and, if the card has an approval item, that approval = ticking `تأیید کاربر` in the web app. Run `rodo sync`.
75
+
76
+ ## Changing scope
77
+
78
+ - **Before coding:** edit the same card and docs.
79
+ - **During coding, small change in the same feature:** update `simple.md`, `spec.md`, the scenario and the steps of the same card; tell the user what changed.
80
+ - **Big new feature:** a new card. Never stretch a running card.
81
+
82
+ ## When a card is stuck
83
+
84
+ The coder sets `status: blocked`, a `blockerType` and the reason in `statusReason:` (after the same failure twice, or while waiting for something). The user decides:
85
+ 1. **Clarify:** you fix `spec.md` (and scenarios if needed), write the decision in `## Decisions`, set `status: in_progress` and remove `statusReason` and `blockerType`.
86
+ 2. **Stronger model:** nothing to change; the user reruns the coder with another model.
87
+ 3. **Cancel:** with the user's OK, set `status: cancelled` and the reason in `statusReason:`, add the cycle under `## لغوشده` in MAP.md with the reason after `—`, add a MEMORY line, tag its scenarios `@cancelled`. Keep the card file and the folder.
88
+
89
+ ## Never
90
+
91
+ - Never write production code in this role, except tiny examples inside `spec.md`.
92
+ - Never tick an approval item or answer a decision.
93
+ - Never create a board. Never run `rodo init --create-board`.
94
+ - Never weaken a scenario to make the implementation easier.
95
+ - Never put details in the card description; they go in `spec.md`.
@@ -0,0 +1,44 @@
1
+ > یادداشت فارسی: تغییر کوچکی که رفتار توضیح‌داده‌شده در کارت‌ها، spec یا سناریوها را عوض نمی‌کند کارت نمی‌خواهد؛ فقط یک خط در `rodo/<project>/CHANGELOG.md` (تاریخ، چه، چرا، فایل‌ها).
2
+
3
+ # Small change playbook (no card)
4
+
5
+ This is the QUICK level.
6
+
7
+ ## The decision rule
8
+
9
+ Ask one question before you start:
10
+
11
+ > **After this change, would any sentence in a card, a `simple.md`, a `spec.md` rule or an `acceptance.feature` scenario become false, or would a user see or be able to do something different?**
12
+
13
+ - **No → small change.** No card. Make the change and add ONE line to `CHANGELOG.md`.
14
+ - **Yes → card.** If an open card (`todo`, `in_progress` or `blocked`) describes this behaviour, update that card and its docs. Otherwise create a new card (`planner.md`). Finished (`done`) and `cancelled` cards are not reopened; a new card refers to the old one.
15
+ - **Not sure → treat it as "Yes"**, or ask the user.
16
+
17
+ ## Examples
18
+
19
+ | Change | Card? | Why |
20
+ |---|---|---|
21
+ | Typo in a code comment or a doc | No | Behaviour is the same |
22
+ | Typo in a page text that no scenario or spec quotes | No | Nothing described becomes false |
23
+ | Rename variables, split a function, move a file (refactor); tests still pass | No | Same behaviour |
24
+ | Colour, spacing or font that no scenario or spec mentions | No | Style only |
25
+ | Dependency update with no visible change | No | Same behaviour |
26
+ | Bug: the code did not do what the spec/scenario already says, and the fix makes it do exactly that | No | The docs were already right |
27
+ | Button text that a scenario quotes (e.g. «اعمال» → «اعمال کد») | **Yes** | The scenario sentence becomes false |
28
+ | An error message that a spec rule lists word for word | **Yes** | The rule changes |
29
+ | Minimum order 200,000 → 150,000 toman | **Yes** | A rule's value changes |
30
+ | A new button, field, page or option | **Yes** | New behaviour = new card |
31
+ | A bug fix that changes what users see compared to the spec | **Yes** | Described behaviour changes |
32
+
33
+ ## Steps
34
+
35
+ 1. Read `MAP.md` and `MEMORY.md` (or run `rodo resume`).
36
+ 2. Apply the decision rule. If the answer is "Yes", stop here and go to `planner.md`.
37
+ 3. Make the change.
38
+ 4. **Docs glance (one line):** if the change makes a project doc wrong (`rodo/<project>/project/*`, `MAP.md`, a `spec.md` file path or name), fix that doc too. If it contradicts a line in `MEMORY.md`, stop and ask the user.
39
+ 5. Append ONE line to `CHANGELOG.md`, newest at the bottom:
40
+ `- YYYY-MM-DD | what changed | why | files`
41
+ Example: `- 2026-10-14 | رنگ دکمهٔ «افزودن به سبد» سبز شد | خواستهٔ مریم برای دیده شدن بهتر | src/catalog.css`
42
+ 6. Commit (code + CHANGELOG line together).
43
+
44
+ A small change needs no `rodo sync` unless a card changed.
@@ -0,0 +1,18 @@
1
+ # سناریوهای پذیرش (اختیاری، ولی پیشنهاد می‌شود). هیچ‌وقت سناریو را ضعیف نکنید تا کد پاس شود.
2
+ # کلیدواژه‌ها انگلیسی‌اند (برای ابزار)، متن به زبان ساده. هر سناریو با شمارهٔ قانون spec.md برچسب می‌خورد (@R1).
3
+ @cycle-{{NNN}}
4
+ Feature: {{عنوان چرخه}}
5
+
6
+ @R1
7
+ Rule: {{یک قانون از simple.md}}
8
+
9
+ Scenario: {{مسیر اصلی}}
10
+ Given {{وضعیت اولیه با عدد واقعی}}
11
+ When {{کاری که کاربر می‌کند}}
12
+ Then {{چیزی که کاربر می‌بیند}}
13
+
14
+ @R2
15
+ Scenario: {{حالت خطا}}
16
+ Given {{...}}
17
+ When {{...}}
18
+ Then {{پیام دقیقی که کاربر می‌بیند}}
@@ -0,0 +1,33 @@
1
+ ---
2
+ schemaVersion: 2
3
+ title: "{{عنوان کوتاه}}"
4
+ status: todo
5
+ # statusReason: ... # only when status is blocked or cancelled: the reason in plain words
6
+ priority: medium
7
+ # workflow: standard # optional: quick | standard | major; local only, never sent to the board
8
+ members: []
9
+ scope:
10
+ allowed: []
11
+ forbidden: []
12
+ ---
13
+
14
+ {{دو تا پنج خط ساده: کاربر چه چیزی می‌گیرد. جزئیات در spec.md است.}}
15
+
16
+ ## Progress notes
17
+
18
+ - Updated: {{YYYY-MM-DD}}
19
+ - Done: هنوز شروع نشده
20
+ - Remaining: همهٔ قدم‌ها
21
+
22
+ ## Refs
23
+
24
+ - [توضیح ساده](/rodo/{{project}}/cycles/{{NNN-slug}}/simple.md)
25
+ - [سند فنی](/rodo/{{project}}/cycles/{{NNN-slug}}/spec.md)
26
+ <!-- [سناریوهای پذیرش](/rodo/{{project}}/cycles/{{NNN-slug}}/acceptance.feature) — uncomment only after that file exists -->
27
+
28
+ ## Checklist: قدم‌ها
29
+
30
+ <!-- - [ ] تأیید کاربر: simple.md و سناریوها [approval] — add only when the user asked for a human approval (D5) -->
31
+ - [ ] {{قدم ۱: کار مشخص + نشانهٔ انجام شدن}}
32
+ - [ ] {{قدم ۲}}
33
+ - [ ] تست پذیرش پاس شد
@@ -0,0 +1,15 @@
1
+ # {{NNN}} — {{title}}: design
2
+
3
+ > Only for MAJOR changes. Written in the technical language. The coder reads it together with spec.md.
4
+
5
+ ## Problem
6
+ ## Proposed approach
7
+ ## Architecture impact
8
+ ## Components affected
9
+ ## Data / API impact
10
+ ## Trade-offs
11
+ ## Risks
12
+ ## Alternatives considered
13
+ ## Decisions
14
+
15
+ - {{decision}}. Because {{reason}}. (also one line in MEMORY.md)
@@ -0,0 +1,18 @@
1
+ # Acceptance scenarios (optional, recommended). Never weaken a scenario to make the code pass.
2
+ # Keywords are English (for the tools); tag each scenario with the spec.md rule it proves (@R1).
3
+ @cycle-{{NNN}}
4
+ Feature: {{cycle title}}
5
+
6
+ @R1
7
+ Rule: {{one rule from simple.md}}
8
+
9
+ Scenario: {{main path}}
10
+ Given {{starting state with real values}}
11
+ When {{what the user does}}
12
+ Then {{what the user sees}}
13
+
14
+ @R2
15
+ Scenario: {{error case}}
16
+ Given {{...}}
17
+ When {{...}}
18
+ Then {{the exact message the user sees}}
@@ -0,0 +1,32 @@
1
+ ---
2
+ schemaVersion: 2
3
+ title: "{{short title}}"
4
+ status: todo
5
+ # statusReason: ... # only when status is blocked or cancelled: the reason in plain words
6
+ priority: medium
7
+ # workflow: standard # optional: quick | standard | major; local only, never sent to the board
8
+ members: []
9
+ scope:
10
+ allowed: []
11
+ forbidden: []
12
+ ---
13
+
14
+ {{two to five plain lines: what the user gets. Details are in spec.md.}}
15
+
16
+ ## Progress notes
17
+
18
+ - Updated: {{YYYY-MM-DD}}
19
+ - Done: not started yet
20
+ - Remaining: all steps
21
+
22
+ ## Refs
23
+
24
+ - [Plain explanation](/rodo/{{project}}/cycles/{{NNN-slug}}/simple.md)
25
+ - [Technical spec](/rodo/{{project}}/cycles/{{NNN-slug}}/spec.md)
26
+ <!-- [Acceptance scenarios](/rodo/{{project}}/cycles/{{NNN-slug}}/acceptance.feature) — uncomment only after that file exists -->
27
+
28
+ ## Checklist: Steps
29
+
30
+ <!-- - [ ] User approval: simple.md and scenarios [approval] — add only when the user asked for a human approval -->
31
+ - [ ] {{step 1: a concrete task + how you know it is done}}
32
+ - [ ] {{step 2}}
@@ -0,0 +1,14 @@
1
+ ---
2
+ schemaVersion: 2
3
+ title: "{{request title}}"
4
+ status: todo
5
+ priority: medium
6
+ ---
7
+
8
+ ## Goal
9
+
10
+ {{what the user wants, in one or two sentences}}
11
+
12
+ ## Why
13
+
14
+ {{why it matters}}
@@ -0,0 +1,21 @@
1
+ # {{NNN}} — {{title}}
2
+
3
+ ## What you get
4
+
5
+ {{two to four plain sentences}}
6
+
7
+ ## Why
8
+
9
+ {{one or two sentences}}
10
+
11
+ ## Not in this cycle
12
+
13
+ - {{item}}
14
+
15
+ ## An example
16
+
17
+ {{a short story of use, with real numbers}}
18
+
19
+ ## If you want to approve (optional)
20
+
21
+ Read this file and `acceptance.feature`. If the card has a "User approval" step and everything is right, tick it **on the web**; only a person can tick it. If something is wrong, comment here or on the card.
@@ -0,0 +1,14 @@
1
+ ---
2
+ schemaVersion: 2
3
+ title: "{{عنوان درخواست}}"
4
+ status: todo
5
+ priority: medium
6
+ ---
7
+
8
+ ## Goal
9
+
10
+ {{کاربر چه چیزی می‌خواهد، در یک یا دو جمله}}
11
+
12
+ ## Why
13
+
14
+ {{چرا مهم است}}
@@ -0,0 +1,21 @@
1
+ # {{NNN}} — {{عنوان}}
2
+
3
+ ## چه چیزی می‌گیرید
4
+
5
+ {{دو تا چهار جملهٔ ساده}}
6
+
7
+ ## چرا
8
+
9
+ {{یک یا دو جمله}}
10
+
11
+ ## چه چیزی در این چرخه نیست
12
+
13
+ - {{مورد}}
14
+
15
+ ## یک مثال
16
+
17
+ {{یک داستان کوتاه از استفاده، با عددهای واقعی}}
18
+
19
+ ## اگر می‌خواهید تأیید کنید (اختیاری)
20
+
21
+ این فایل و `acceptance.feature` را بخوانید. اگر کارت قدم «تأیید کاربر» دارد و همه‌چیز درست است، آن را **در وب** تیک بزنید؛ فقط یک آدم می‌تواند این تیک را بزند. اگر چیزی درست نیست، همین‌جا یا روی کارت کامنت بگذارید. اگر برای این کار تأیید نمی‌خواهید، به AI بگویید آن قدم را نگذارد.