docs require Emacs MCP workflow

Keep enhancement tracking in Org mode through the Emacs MCP server. Record completion timestamps with Org configuration and keep user requests unchanged.

Commit
80eef8bcbf61205a4afaf95000c07122f8290dad
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
.kiro/skills/stream-of-thought/SKILL.md
index 9eaebbc9..cc630726 100644..100644
@@ -1,59 +1,225 @@
1 1 ---
2 2 name: stream-of-thought
3 Removed: description: Capture an improvement idea in ENHANCEMENTS.org as an Org TODO, file it under the right section, and keep its status current. Captures and tracks only; never implements.
3 Added: description: Capture and track enhancement requests in ENHANCEMENTS.org through Emacs MCP. Never implement requests.
4 4 ---
5 5
6 6 # Stream of thought
7 7
8 Removed: Record an improvement idea and track its status. This skill only captures,
9 Removed: files, and tracks; it does not build, test, commit, or dispatch an agent.
8 Added: Use this skill when the user requests a stream-of-thought enhancement session,
9 Added: asks to capture an enhancement idea, or asks to track an improvement in
10 Added: `ENHANCEMENTS.org`.
10 11
11 Removed: The idea:
12 Added: Record and track one enhancement request. Do not build, test, commit, or start
13 Added: an agent.
12 14
15 Added: The enhancement request:
16 Added:
13 17 $ARGUMENTS
14 18
15 Removed: If the idea is empty, ask for one line describing the enhancement, then stop.
19 Added: If the request is empty, ask for one line that describes the enhancement. Then
20 Added: stop.
16 21
22 Added: ## Use the Emacs MCP server
23 Added:
24 Added: Use the Emacs Model Context Protocol (MCP) server for all Org mode operations.
25 Added: Do not edit `ENHANCEMENTS.org` as raw text. Do not use shell or file tools to
26 Added: capture, refile, change status, or verify an entry.
27 Added:
28 Added: Use these Emacs MCP tools:
29 Added:
30 Added: - Use `org-get-node` or `org-search` to inspect headings, keywords, and content.
31 Added: - Use `org-list-templates` and `org-capture` to inspect templates and create
32 Added: the `Dispatch` heading when needed.
33 Added: - Use the Emacs MCP `eval-elisp` tool to run the required code snippets below.
34 Added: - Use `org-get-node` after each change to verify the result.
35 Added:
36 Added: Use the Org identifier (ID) when the entry has one. If it has no ID, use the
37 Added: file and outline path that the Emacs MCP server returns. If an Emacs MCP
38 Added: operation cannot perform the action, stop and report the problem. Do not
39 Added: replace the operation with a raw file edit.
40 Added:
41 Added: ## Required Emacs code
42 Added:
43 Added: Run each snippet in this section with the Emacs MCP `eval-elisp` tool. Replace
44 Added: `ID`, `TITLE`, `BODY`, and `TARGET` with values that you observed through the
45 Added: Emacs MCP server. Run the inspection snippet before you change the file. Run
46 Added: the capture, status, completion, and refile snippets for the relevant steps.
47 Added: Run the verification expression after each mutation.
48 Added:
49 Added: Inspect the file and its TODO sequence with this expression:
50 Added:
51 Added: ```elisp
52 Added: (let ((file (expand-file-name "ENHANCEMENTS.org" default-directory)))
53 Added: (with-current-buffer (find-file-noselect file)
54 Added: (org-mode)
55 Added: (org-with-wide-buffer
56 Added: (list :todo-keywords org-todo-keywords-1
57 Added: :dispatch (org-find-exact-headline-in-buffer "Dispatch")))))
58 Added: ```
59 Added:
60 Added: Run this expression to capture an entry under `Dispatch`. Create `Dispatch`
61 Added: with the Emacs MCP `org-capture` tool first if it does not exist.
62 Added:
63 Added: ```elisp
64 Added: (let* ((file (expand-file-name "ENHANCEMENTS.org" default-directory))
65 Added: (title "TITLE")
66 Added: (body "BODY")
67 Added: (captured-at (format-time-string "[%Y-%m-%d %a %H:%M]"))
68 Added: (org-capture-templates
69 Added: `(("e" "Enhancement" entry
70 Added: (file+headline ,file "Dispatch")
71 Added: "%i"))))
72 Added: (org-capture-string
73 Added: (format "** TODO %s\nSCHEDULED: %s\n%s\n" title captured-at body)
74 Added: "e")
75 Added: (org-capture-finalize))
76 Added: ```
77 Added:
78 Added: Run this expression to change an open entry's keyword. Replace `STATE` with
79 Added: one keyword from the observed `#+TODO:` sequence.
80 Added:
81 Added: ```elisp
82 Added: (let ((file (expand-file-name "ENHANCEMENTS.org" default-directory))
83 Added: (id "ID")
84 Added: (state "STATE"))
85 Added: (with-current-buffer (find-file-noselect file)
86 Added: (org-mode)
87 Added: (let ((marker (org-id-find id 'marker)))
88 Added: (unless marker
89 Added: (user-error "Org ID not found: %s" id))
90 Added: (goto-char marker))
91 Added: (org-todo state)
92 Added: (save-buffer)))
93 Added: ```
94 Added:
95 Added: Run this expression to set `DONE` and verify the completion timestamp. Do not
96 Added: insert a `CLOSED` line yourself. The normal Org TODO transition must insert it.
97 Added:
98 Added: ```elisp
99 Added: (let ((file (expand-file-name "ENHANCEMENTS.org" default-directory))
100 Added: (id "ID"))
101 Added: (with-current-buffer (find-file-noselect file)
102 Added: (org-mode)
103 Added: (hack-local-variables)
104 Added: (unless (eq org-log-done 'time)
105 Added: (user-error "org-log-done is not set to time"))
106 Added: (let ((marker (org-id-find id 'marker)))
107 Added: (unless marker
108 Added: (user-error "Org ID not found: %s" id))
109 Added: (goto-char marker))
110 Added: (org-todo "DONE")
111 Added: (save-buffer)
112 Added: (unless (org-entry-get nil "CLOSED")
113 Added: (user-error "Org did not record a CLOSED timestamp"))
114 Added: (org-entry-get nil "CLOSED")))
115 Added: ```
116 Added:
117 Added: Run this expression to refile the completed entry under a top-level section.
118 Added: Replace `TARGET` with the observed top-level heading name.
119 Added:
120 Added: ```elisp
121 Added: (let ((file (expand-file-name "ENHANCEMENTS.org" default-directory))
122 Added: (id "ID")
123 Added: (target "TARGET"))
124 Added: (with-current-buffer (find-file-noselect file)
125 Added: (org-mode)
126 Added: (let ((marker (org-id-find id 'marker)))
127 Added: (unless marker
128 Added: (user-error "Org ID not found: %s" id))
129 Added: (goto-char marker))
130 Added: (let ((source-position (point))
131 Added: (target-position
132 Added: (with-current-buffer (find-file-noselect file)
133 Added: (org-mode)
134 Added: (goto-char (point-min))
135 Added: (let ((target-marker
136 Added: (org-find-exact-headline-in-buffer target)))
137 Added: (unless target-marker
138 Added: (user-error "Org target not found: %s" target))
139 Added: (marker-position target-marker)))))
140 Added: (goto-char source-position)
141 Added: (org-refile nil nil (list target file nil target-position))
142 Added: (save-buffer))))
143 Added: ```
144 Added:
145 Added: Run this expression to verify the entry after a mutation:
146 Added:
147 Added: ```elisp
148 Added: (let ((file (expand-file-name "ENHANCEMENTS.org" default-directory))
149 Added: (id "ID"))
150 Added: (with-current-buffer (find-file-noselect file)
151 Added: (org-mode)
152 Added: (let ((marker (org-id-find id 'marker)))
153 Added: (unless marker
154 Added: (user-error "Org ID not found: %s" id))
155 Added: (goto-char marker))
156 Added: (list (org-get-heading t t t t)
157 Added: (org-get-todo-state)
158 Added: (org-entry-get nil "CLOSED")
159 Added: (org-get-outline-path))))
160 Added: ```
161 Added:
17 162 ## Step 1 — Capture under Dispatch
18 163
19 Removed: Add the idea to `ENHANCEMENTS.org` as a level-2 heading under the top-level
20 Removed: `* Dispatch` section, the holding area for every new request. Create
21 Removed: `* Dispatch` once, at the top of the file, if it does not exist.
164 Added: Inspect `ENHANCEMENTS.org` with `org-search` or `org-get-node` before writing.
165 Added: Find the top-level `* Dispatch` heading. If it does not exist, create it at
166 Added: the top of the file.
22 167
168 Added: Add the request as a level-2 heading under `* Dispatch`. Run
169 Added: `org-list-templates` first. Select a matching `org-capture` template. If no
170 Added: template matches, use `org-capture` direct mode with the file, title, outline
171 Added: path, and body. Then run the capture snippet.
172 Added:
173 Added: Create this entry:
174 Added:
23 175 ```
24 176 ** TODO <imperative title under 60 chars>
25 Removed: [YYYY-MM-DD Day HH:MM]
26 Removed: <the full idea text, verbatim>
177 Added: SCHEDULED: [YYYY-MM-DD Day HH:MM]
178 Added: <the full idea text, formatted as a list if text contains separate ideas>
27 179 ```
28 180
29 Removed: The inactive timestamp records when the request was captured. Match the terse,
30 Removed: imperative style of the existing entries and keep the file well-formed. Report
31 Removed: the outline path of the new heading.
181 Added: The inactive timestamp records when you captured the request. Use a short,
182 Added: imperative title. Keep the full request text unchanged. Do not rewrite it.
183 Added: Keep the file well-formed. Verify the new heading with `org-get-node`. Report
184 Added: its outline path.
32 185
33 186 ## Step 2 — Refile on completion
34 187
35 Removed: A request stays under `* Dispatch` while it is open, `BLOCKED`, or `CANCELLED`.
36 Removed: Only when it reaches `DONE` (Step 3), move the whole heading out of `* Dispatch`
37 Removed: and under the top-level section that fits its subject.
188 Added: Keep the request under `* Dispatch` while its status is open, `BLOCKED`, or
189 Added: `CANCELLED`. When its status becomes `DONE`, move the entire heading out of
190 Added: `* Dispatch`.
38 191
39 Removed: Read the existing top-level (`*`) headings and choose the one that best matches
40 Removed: the request's nature. Create a new top-level section only when none fits; keep
41 Removed: the name short and consistent with the others. Report the new outline path.
192 Added: Inspect the top-level (`*`) headings with `org-search` or `org-get-node`. Select
193 Added: the section that best matches the request. If no section matches, create a
194 Added: short, consistent top-level section with `org-capture` through the Emacs MCP
195 Added: server.
42 196
197 Added: Run the refile snippet. The snippet calls `org-refile`. Verify the new location
198 Added: with `org-get-node`. Report the new outline path.
199 Added:
43 200 ## Step 3 — Track the status
44 201
45 Removed: Cycle the heading's keyword through the sequence defined in the file's `#+TODO:`
46 Removed: header as the request progresses. In order:
202 Added: Read the file's `#+TODO:` header and the current heading with `org-get-node`
203 Added: before changing a keyword. Use the keyword sequence in the header. Run the
204 Added: status snippet for every status change. The snippet calls `org-todo`. Do not
205 Added: make another status change after the snippet.
47 206
48 Removed: - `TODO` — captured, not started.
49 Removed: - `IN-PROGRESS` — work has started.
50 Removed: - `TESTING` — tests running, not yet green.
51 Removed: - `TESTED` — tests pass, not yet committed.
52 Removed: - `DONE` — build clean, tests pass, formatted, committed. Refile it now (Step 2).
53 Removed: - `BLOCKED` — stalled and cannot continue.
54 Removed: - `CANCELLED` — abandoned on purpose.
207 Added: - `TODO` — Capture the request. Do not start work.
208 Added: - `IN-PROGRESS` — Start work.
209 Added: - `TESTING` — Run tests. The tests do not pass.
210 Added: - `TESTED` — Tests pass. No commit exists.
211 Added: - `DONE` — The build passes. Tests pass. The files have the required format. A
212 Added: commit exists. Run the completion snippet. The snippet sets `DONE`, uses the
213 Added: configured `org-log-done` behavior, and verifies the completion timestamp. Do
214 Added: not add or edit the timestamp manually. Refile the heading under Step 2.
215 Added: - `BLOCKED` — Work cannot continue. Mention the cause of the block.
216 Added: - `CANCELLED` — Stop work intentionally.
55 217
56 Removed: Set the keyword only from a state you observed; never claim `DONE` without an
57 Removed: observed commit and passing tests. Change the keyword in place; add no other
58 Removed: field. Log every request, even one that cannot be carried out — a record that
59 Removed: refuses to state what was asked is worse than one recording a failure.
218 Added: Change the keyword only after you observe the current status. Do not set `DONE`
219 Added: unless you observe a commit and passing tests. After each status snippet, use
220 Added: `org-get-node` to verify the keyword. When the keyword becomes `DONE`, verify
221 Added: the completion timestamp before you refile the heading. Let Org's configured
222 Added: completion logging add the timestamp. Add no other field.
223 Added:
224 Added: Record every request. If you cannot complete a request, record the request and
225 Added: the failure.