@pingvinen/donna-assistant 0.5.0 → 0.7.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.
- package/README.md +23 -5
- package/migrations/003-tool-type-backfill.cjs +36 -0
- package/package.json +1 -1
- package/src/changelog.cjs +70 -0
- package/src/installer.cjs +3 -1
- package/src/output.cjs +6 -1
- package/stubs/claude-code/donna/adjust-tool.md +17 -0
- package/stubs/claude-code/donna/contribute-idea.md +16 -0
- package/stubs/claude-code/donna/help.md +16 -0
- package/workflows/add-tool.md +240 -4
- package/workflows/adjust-tool.md +250 -0
- package/workflows/begin-the-day.md +84 -3
- package/workflows/contribute-idea.md +128 -0
- package/workflows/help.md +155 -0
- package/workflows/relearn-tools.md +122 -14
- package/workflows/run-tools.md +77 -2
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Donna Adjust-Tool Workflow
|
|
2
|
+
|
|
3
|
+
<objective>
|
|
4
|
+
Edit an existing registered tool's configuration — scope, capabilities, auth/secrets, command, or type.
|
|
5
|
+
</objective>
|
|
6
|
+
|
|
7
|
+
<step name="read-config">
|
|
8
|
+
Read `~/.config/donna/config.md`.
|
|
9
|
+
|
|
10
|
+
If the file does not exist, print:
|
|
11
|
+
```
|
|
12
|
+
✗ Donna is not configured. Run /donna:setup first.
|
|
13
|
+
```
|
|
14
|
+
Stop.
|
|
15
|
+
|
|
16
|
+
Extract the `storage_repo`, `daily_folder` (default: `daily`), and `auto_push` (default: false) fields from the YAML frontmatter.
|
|
17
|
+
|
|
18
|
+
**Obsidian sync:** Check if `<storage_repo>/.obsidian/daily-notes.json` exists.
|
|
19
|
+
- If it exists and has a `folder` field that differs from `<daily_folder>`: update `<daily_folder>` to match Obsidian's value, and update `~/.config/donna/config.md` with the new `daily_folder`. Print `✓ Synced daily folder with Obsidian: <daily_folder>`.
|
|
20
|
+
- If `<storage_repo>/.obsidian/` exists but `daily-notes.json` does not exist or has no `folder` field: write `<storage_repo>/.obsidian/daily-notes.json` with `{"folder":"<daily_folder>"}`. Print `✓ Configured Obsidian daily notes to use <daily_folder>/`.
|
|
21
|
+
- Otherwise: do nothing.
|
|
22
|
+
</step>
|
|
23
|
+
|
|
24
|
+
<step name="check-pending-migrations">
|
|
25
|
+
Read `~/.donna/state.md` with the Read tool. If the file does not exist or has no `pending_migrations` field in its YAML frontmatter, skip this step.
|
|
26
|
+
|
|
27
|
+
For each entry in `pending_migrations`:
|
|
28
|
+
|
|
29
|
+
**`move-standing-files`:** Move standing files from storage repo root to donna/ subfolder.
|
|
30
|
+
|
|
31
|
+
Run via Bash:
|
|
32
|
+
```bash
|
|
33
|
+
STORAGE_REPO="<storage_repo>"
|
|
34
|
+
DONNA_DIR="$STORAGE_REPO/donna"
|
|
35
|
+
MOVED=0
|
|
36
|
+
|
|
37
|
+
mkdir -p "$DONNA_DIR"
|
|
38
|
+
for FILE in role.md recurring.md role-research.md; do
|
|
39
|
+
if [ -f "$STORAGE_REPO/$FILE" ] && [ ! -f "$DONNA_DIR/$FILE" ]; then
|
|
40
|
+
mv "$STORAGE_REPO/$FILE" "$DONNA_DIR/$FILE"
|
|
41
|
+
echo "Moved $FILE to donna/$FILE"
|
|
42
|
+
MOVED=$((MOVED + 1))
|
|
43
|
+
fi
|
|
44
|
+
done
|
|
45
|
+
|
|
46
|
+
echo "MOVED=$MOVED"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If MOVED > 0, commit the move:
|
|
50
|
+
```bash
|
|
51
|
+
git -C <storage_repo> add -A
|
|
52
|
+
git -C <storage_repo> diff --cached --quiet || git -C <storage_repo> commit -m "donna(migrate): move standing files to donna/ subfolder"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If `auto_push` is true in config, also push.
|
|
56
|
+
|
|
57
|
+
**`backfill-tool-type`:** Backfill `type` on existing tool sections in tools.md using heuristic detection.
|
|
58
|
+
|
|
59
|
+
Read `<storage_repo>/donna/tools.md` with the Read tool. If the file does not exist or has no tool sections, skip this handler.
|
|
60
|
+
|
|
61
|
+
For each tool section (starting with `## <tool_name>`), check if a `- type:` line already exists. If the `- type:` line is missing, detect the correct type:
|
|
62
|
+
|
|
63
|
+
1. If the tool section contains a `- command:` line where the value starts with `mcp:` (e.g., `- command: mcp:linear`), insert `- type: mcp` immediately after the `- command:` line.
|
|
64
|
+
2. Else, if the tool section contains a `- base_url:` line:
|
|
65
|
+
- If the capabilities section contains entries that look like GraphQL queries (contain `query {` or `mutation {`), insert `- type: graphql` immediately after `## <tool_name>` (REST/GraphQL tools have no `- command:` line).
|
|
66
|
+
- Otherwise, insert `- type: rest` immediately after `## <tool_name>`.
|
|
67
|
+
3. Else (no `mcp:` prefix, no `base_url` field), insert `- type: cli` immediately after the `- command:` line.
|
|
68
|
+
|
|
69
|
+
Write the updated file back with the Write tool. If any changes were made, commit:
|
|
70
|
+
```bash
|
|
71
|
+
git -C <storage_repo> add -A
|
|
72
|
+
git -C <storage_repo> diff --cached --quiet || git -C <storage_repo> commit -m "donna(migrate): backfill tool types on existing tools"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If `auto_push` is true in config, also push.
|
|
76
|
+
|
|
77
|
+
After processing all pending migrations, update `~/.donna/state.md` with the Write tool: remove the completed entries from `pending_migrations`. If no entries remain, write:
|
|
78
|
+
```markdown
|
|
79
|
+
---
|
|
80
|
+
pending_migrations: []
|
|
81
|
+
---
|
|
82
|
+
```
|
|
83
|
+
</step>
|
|
84
|
+
|
|
85
|
+
<step name="read-tools-md">
|
|
86
|
+
Read `<storage_repo>/donna/tools.md` with the Read tool. If the file does not exist or has no tool sections, print:
|
|
87
|
+
```
|
|
88
|
+
! No tools registered. Run /donna:add-tool first.
|
|
89
|
+
```
|
|
90
|
+
Stop.
|
|
91
|
+
|
|
92
|
+
Parse each tool section (starting with `## <tool_name>`). For each tool, extract the `type` field (if absent, treat as "cli"), `command`, `version`, `learned`, `auth_test`, `scope`, and capabilities list under `### Capabilities`.
|
|
93
|
+
|
|
94
|
+
Store as `<registered_tools>`.
|
|
95
|
+
</step>
|
|
96
|
+
|
|
97
|
+
<step name="select-tool">
|
|
98
|
+
If a tool name was provided as argument (e.g., `/donna:adjust-tool gh`), look it up in `<registered_tools>`. If not found, print `! Tool "<name>" not found in tools.md` and stop.
|
|
99
|
+
|
|
100
|
+
If no argument was provided, list all registered tools via AskUserQuestion:
|
|
101
|
+
```
|
|
102
|
+
Which tool would you like to adjust?
|
|
103
|
+
|
|
104
|
+
<numbered list of tool names from registered_tools>
|
|
105
|
+
```
|
|
106
|
+
Store the selected tool as `<selected_tool>`.
|
|
107
|
+
</step>
|
|
108
|
+
|
|
109
|
+
<step name="show-current-config">
|
|
110
|
+
Display the current configuration of `<selected_tool>`:
|
|
111
|
+
```
|
|
112
|
+
Current configuration for <tool_name>:
|
|
113
|
+
|
|
114
|
+
command: <command>
|
|
115
|
+
type: <type>
|
|
116
|
+
version: <version>
|
|
117
|
+
learned: <learned>
|
|
118
|
+
auth_test: <auth_test>
|
|
119
|
+
scope: <scope>
|
|
120
|
+
|
|
121
|
+
Capabilities:
|
|
122
|
+
- <name>: <invocation>
|
|
123
|
+
- ...
|
|
124
|
+
```
|
|
125
|
+
</step>
|
|
126
|
+
|
|
127
|
+
<step name="ask-what-to-change">
|
|
128
|
+
Use AskUserQuestion:
|
|
129
|
+
```
|
|
130
|
+
What would you like to change?
|
|
131
|
+
|
|
132
|
+
1. scope — filtering context (orgs, repos, projects, namespaces)
|
|
133
|
+
2. capabilities — add, remove, or modify capability commands
|
|
134
|
+
3. command — the CLI command or base URL
|
|
135
|
+
4. auth — auth test command or API secrets
|
|
136
|
+
5. type — tool type (cli, rest, graphql, mcp)
|
|
137
|
+
```
|
|
138
|
+
Store as `<change_choice>`.
|
|
139
|
+
</step>
|
|
140
|
+
|
|
141
|
+
<step name="apply-change">
|
|
142
|
+
Based on `<change_choice>`:
|
|
143
|
+
|
|
144
|
+
**1. scope:**
|
|
145
|
+
Show current scope. Use AskUserQuestion: `New scope for <tool_name>? (current: <scope>)`. Store new value.
|
|
146
|
+
Then ask via AskUserQuestion: `Scope changed. Re-learn capabilities with new scope? (yes/no)`.
|
|
147
|
+
If yes, run the same learn-capabilities logic as add-tool.md (well-known baselines for gh/jira/kubectl, `--help` parse for unknown tools), incorporating the new scope into CLI invocations.
|
|
148
|
+
|
|
149
|
+
**2. capabilities:**
|
|
150
|
+
Show current capabilities numbered. Use AskUserQuestion:
|
|
151
|
+
```
|
|
152
|
+
Current capabilities:
|
|
153
|
+
1. <name>: <invocation>
|
|
154
|
+
2. ...
|
|
155
|
+
|
|
156
|
+
Type "remove <number>" to remove, "add <name>: <command>" to add, or "edit <number> <new_command>" to modify.
|
|
157
|
+
```
|
|
158
|
+
Apply the change. Allow multiple edits — keep asking until user says "done".
|
|
159
|
+
|
|
160
|
+
**3. command:**
|
|
161
|
+
Use AskUserQuestion: `New command for <tool_name>? (current: <command>)`. Store new value.
|
|
162
|
+
Verify installation: `which <new_command>` via Bash. Print result.
|
|
163
|
+
|
|
164
|
+
**4. auth:**
|
|
165
|
+
For type=cli: Use AskUserQuestion to update auth_test command.
|
|
166
|
+
For type=rest|graphql: Print `Edit your secrets in <storage_repo>/donna/secrets.md directly. The auth_secret field references the key name in that file.` Use AskUserQuestion to update `auth_secret` field name if needed.
|
|
167
|
+
For type=mcp: Print `MCP server auth is managed in Claude Code settings, not in Donna.`
|
|
168
|
+
|
|
169
|
+
**5. type:**
|
|
170
|
+
Use AskUserQuestion:
|
|
171
|
+
```
|
|
172
|
+
What is the correct type for <tool_name>? (cli, rest, graphql, mcp) Current: <type>
|
|
173
|
+
```
|
|
174
|
+
Store new value as `<new_type>`.
|
|
175
|
+
|
|
176
|
+
If `<new_type>` differs from `<type>`, check for capability format mismatches:
|
|
177
|
+
|
|
178
|
+
**Detect format mismatches:**
|
|
179
|
+
For each capability line (`- <name>: <invocation>`), check if the invocation matches the expected format for `<new_type>`:
|
|
180
|
+
- `cli`: invocation should be a shell command (no `mcp:` prefix, no `GET /` or `POST /` pattern, no `query {` pattern)
|
|
181
|
+
- `rest`: invocation should match `<METHOD> /path` pattern (e.g., `GET /repos/...`)
|
|
182
|
+
- `graphql`: invocation should contain `query {` or `mutation {`
|
|
183
|
+
- `mcp`: invocation should match `mcp:<server>/<tool>` pattern
|
|
184
|
+
|
|
185
|
+
If ANY capability does not match the expected format for `<new_type>`, print:
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
⚠ Capability format mismatch detected. Current capabilities are in <type> format but type is changing to <new_type>.
|
|
189
|
+
|
|
190
|
+
Mismatched capabilities:
|
|
191
|
+
<list each mismatched capability with its current invocation>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Use AskUserQuestion:
|
|
195
|
+
```
|
|
196
|
+
How would you like to fix the capabilities?
|
|
197
|
+
```
|
|
198
|
+
Suggest these options:
|
|
199
|
+
1. Re-enter capabilities manually (interactive editor)
|
|
200
|
+
2. Clear all capabilities (start fresh with adjust-tool later)
|
|
201
|
+
3. Keep as-is (may cause runtime errors)
|
|
202
|
+
|
|
203
|
+
If option 1: Present the same interactive capabilities editing loop (show numbered list, accept "remove N", "add name: invocation", "edit N new_invocation", "done"). Pre-populate with existing capability NAMES but empty invocations so the user only needs to type the new format.
|
|
204
|
+
|
|
205
|
+
If option 2: Clear the capabilities section entirely. Print `✓ Capabilities cleared. Run /donna:adjust-tool <tool_name> to add new capabilities.`
|
|
206
|
+
|
|
207
|
+
If option 3: Print `⚠ Keeping mismatched capabilities — runtime errors may occur.`
|
|
208
|
+
|
|
209
|
+
**Update structural fields when type changes:**
|
|
210
|
+
- Changing TO rest/graphql: ensure `base_url`, `auth_header`, `auth_secret` fields exist. If missing, prompt for them (same prompts as add-tool).
|
|
211
|
+
- Changing TO mcp: remove `command`, `version`, `base_url`, `auth_header`, `auth_secret` fields if present.
|
|
212
|
+
- Changing TO cli: ensure `command`, `version` fields exist. If missing, prompt for command and run version check.
|
|
213
|
+
- Changing FROM rest/graphql: remove `base_url`, `auth_header`, `auth_secret` fields.
|
|
214
|
+
</step>
|
|
215
|
+
|
|
216
|
+
<step name="write-tools-md">
|
|
217
|
+
Read `<storage_repo>/donna/tools.md`. Update only the `<selected_tool>` section with the changed fields. Preserve all other tool sections unchanged. Write the full file back with the Write tool.
|
|
218
|
+
</step>
|
|
219
|
+
|
|
220
|
+
<step name="git-commit">
|
|
221
|
+
Run via Bash:
|
|
222
|
+
```bash
|
|
223
|
+
git -C <storage_repo> add -A
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Check whether there is anything to commit:
|
|
227
|
+
```bash
|
|
228
|
+
git -C <storage_repo> status --porcelain
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
If the output is empty, skip the commit and continue.
|
|
232
|
+
|
|
233
|
+
Otherwise, run:
|
|
234
|
+
```bash
|
|
235
|
+
git -C <storage_repo> commit -m "donna(adjust-tool): updated <tool_name> (<change_description>)"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
If `auto_push` is true in config, also run:
|
|
239
|
+
```bash
|
|
240
|
+
git -C <storage_repo> push
|
|
241
|
+
```
|
|
242
|
+
</step>
|
|
243
|
+
|
|
244
|
+
<step name="confirm">
|
|
245
|
+
Print:
|
|
246
|
+
```
|
|
247
|
+
! Updated <tool_name>:
|
|
248
|
+
<field>: <old_value> -> <new_value>
|
|
249
|
+
```
|
|
250
|
+
</step>
|
|
@@ -54,6 +54,26 @@ git -C <storage_repo> diff --cached --quiet || git -C <storage_repo> commit -m "
|
|
|
54
54
|
|
|
55
55
|
If `auto_push` is true in config, also push.
|
|
56
56
|
|
|
57
|
+
**`backfill-tool-type`:** Backfill `type` on existing tool sections in tools.md using heuristic detection.
|
|
58
|
+
|
|
59
|
+
Read `<storage_repo>/donna/tools.md` with the Read tool. If the file does not exist or has no tool sections, skip this handler.
|
|
60
|
+
|
|
61
|
+
For each tool section (starting with `## <tool_name>`), check if a `- type:` line already exists. If the `- type:` line is missing, detect the correct type:
|
|
62
|
+
|
|
63
|
+
1. If the tool section contains a `- command:` line where the value starts with `mcp:` (e.g., `- command: mcp:linear`), insert `- type: mcp` immediately after the `- command:` line.
|
|
64
|
+
2. Else, if the tool section contains a `- base_url:` line:
|
|
65
|
+
- If the capabilities section contains entries that look like GraphQL queries (contain `query {` or `mutation {`), insert `- type: graphql` immediately after `## <tool_name>` (REST/GraphQL tools have no `- command:` line).
|
|
66
|
+
- Otherwise, insert `- type: rest` immediately after `## <tool_name>`.
|
|
67
|
+
3. Else (no `mcp:` prefix, no `base_url` field), insert `- type: cli` immediately after the `- command:` line.
|
|
68
|
+
|
|
69
|
+
Write the updated file back with the Write tool. If any changes were made, commit:
|
|
70
|
+
```bash
|
|
71
|
+
git -C <storage_repo> add -A
|
|
72
|
+
git -C <storage_repo> diff --cached --quiet || git -C <storage_repo> commit -m "donna(migrate): backfill tool types on existing tools"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If `auto_push` is true in config, also push.
|
|
76
|
+
|
|
57
77
|
After processing all pending migrations, update `~/.donna/state.md` with the Write tool: remove the completed entries from `pending_migrations`. If no entries remain, write:
|
|
58
78
|
```markdown
|
|
59
79
|
---
|
|
@@ -132,9 +152,33 @@ Read `<storage_repo>/donna/tools.md` with the Read tool.
|
|
|
132
152
|
|
|
133
153
|
If the file does not exist or has no tool sections (no `## ` headers after the frontmatter), set `<tool_tasks>` to an empty list and `<tool_warnings>` to an empty list. Continue to the next step. Do NOT print any error — tools are optional.
|
|
134
154
|
|
|
135
|
-
|
|
155
|
+
Parse each tool section (starting with `## <tool_name>`). For each tool, extract the `type` field (if absent, treat as "cli"), the `command` field (or `base_url` for rest/graphql), and the capabilities list under `### Capabilities`.
|
|
156
|
+
|
|
157
|
+
Store the parsed tools and their capabilities as `<registered_tools>`.
|
|
158
|
+
|
|
159
|
+
**If only one tool is registered**, run it directly (no Task spawning needed) using the type-aware execution logic below.
|
|
160
|
+
|
|
161
|
+
**If multiple tools are registered**, spawn one Task agent per tool. Each agent receives:
|
|
162
|
+
|
|
163
|
+
- The tool name, type, and its capabilities list
|
|
164
|
+
- For REST/GraphQL tools: the base_url, auth_header, and auth_secret fields
|
|
165
|
+
- For MCP tools: the capability names with mcp: prefix
|
|
166
|
+
- Instructions to execute all capabilities and return results as a structured list
|
|
167
|
+
- Instructions to NEVER write to any file or run git commands
|
|
168
|
+
|
|
169
|
+
**CRITICAL constraints for Task agents:**
|
|
170
|
+
- Agents return raw task lists and warnings ONLY
|
|
171
|
+
- Agents must NOT write to any file (no Write tool calls to daily file)
|
|
172
|
+
- Agents must NOT run git commands (SSH signing constraint from CLAUDE.md)
|
|
173
|
+
- All file writing happens in the main workflow after agents return
|
|
174
|
+
|
|
175
|
+
**Global timeout:** Wait for all Task agents to complete, up to 2 minutes total. After 2 minutes, collect whatever results have been returned and treat non-responding tools as failed with warning: `! <tool_name>: timed out (2-minute batch limit)`.
|
|
136
176
|
|
|
137
|
-
|
|
177
|
+
**Type-aware execution within each agent (or direct execution for single tool):**
|
|
178
|
+
|
|
179
|
+
For `type: cli` capabilities (format: `<name>: <cli_invocation>`):
|
|
180
|
+
|
|
181
|
+
Run via Bash with a 10-second timeout:
|
|
138
182
|
```bash
|
|
139
183
|
timeout 10 <cli_invocation> 2>&1
|
|
140
184
|
```
|
|
@@ -161,7 +205,44 @@ Determine the failure type from the exit code and output:
|
|
|
161
205
|
- Exit 127 or "not found" in output: `! <tool_name>: command not found — install <command> first`
|
|
162
206
|
- Other: `! <tool_name>: <first line of stderr>`
|
|
163
207
|
|
|
164
|
-
Add the warning to `<tool_warnings>`. Continue to next capability/tool. Never retry.
|
|
208
|
+
Add the warning to `<tool_warnings>`. Continue to next capability/tool. Never retry.
|
|
209
|
+
|
|
210
|
+
For `type: rest` capabilities (format: `<name>: <METHOD> /path`):
|
|
211
|
+
1. Read `<storage_repo>/donna/secrets.md` with the Read tool. Parse key-value pairs from under the frontmatter.
|
|
212
|
+
2. Resolve the `auth_secret` key to get the actual secret value. If the key is not found in secrets.md or the value is `REPLACE_WITH_YOUR_SECRET`, add warning `! <tool_name>: missing secret <auth_secret> — edit donna/secrets.md` and skip this tool.
|
|
213
|
+
3. For each capability, run via Bash with a 10-second timeout:
|
|
214
|
+
```bash
|
|
215
|
+
timeout 10 curl -s -H "<auth_header>: <resolved_secret>" "<base_url><path>" 2>&1
|
|
216
|
+
```
|
|
217
|
+
4. Parse the JSON response using Claude's understanding to extract task-like items. Format:
|
|
218
|
+
`- [ ] (<tool_name>) <description> [<identifier>](<url>)`
|
|
219
|
+
|
|
220
|
+
**On any failure** (non-zero exit, timeout, missing secret):
|
|
221
|
+
Add a warning: `! <tool_name>: <error_description>`
|
|
222
|
+
Continue. Never retry.
|
|
223
|
+
|
|
224
|
+
For `type: graphql` capabilities (format: `<name>: <graphql_query>`):
|
|
225
|
+
1. Same secrets resolution as REST.
|
|
226
|
+
2. For each capability, run via Bash with a 10-second timeout:
|
|
227
|
+
```bash
|
|
228
|
+
timeout 10 curl -s -X POST -H "<auth_header>: <resolved_secret>" -H "Content-Type: application/json" -d '{"query":"<graphql_query>"}' "<base_url>" 2>&1
|
|
229
|
+
```
|
|
230
|
+
3. Parse the JSON response to extract task-like items. Same format as REST.
|
|
231
|
+
|
|
232
|
+
**On any failure** (non-zero exit, timeout, missing secret):
|
|
233
|
+
Add a warning: `! <tool_name>: <error_description>`
|
|
234
|
+
Continue. Never retry.
|
|
235
|
+
|
|
236
|
+
For `type: mcp` capabilities (format: `<name>: mcp:<server>/<tool>`):
|
|
237
|
+
1. Invoke the MCP tool directly using Claude's native MCP tool invocation (NOT via Bash).
|
|
238
|
+
2. Parse the MCP tool's response using Claude's understanding of the tool to extract task-like items. Format:
|
|
239
|
+
`- [ ] (<tool_name>) <description> [<identifier>](<url>)`
|
|
240
|
+
|
|
241
|
+
**On any failure:**
|
|
242
|
+
Add a warning: `! <tool_name>: <error_description>`
|
|
243
|
+
Continue. Never retry.
|
|
244
|
+
|
|
245
|
+
Tool failures must never block manual tasks, carry-forward, or recurring task processing.
|
|
165
246
|
|
|
166
247
|
Collect all task entries as `<tool_tasks>`.
|
|
167
248
|
Collect all warning messages as `<tool_warnings>`.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Donna Contribute Idea Workflow
|
|
2
|
+
|
|
3
|
+
<objective>
|
|
4
|
+
Help users submit feature ideas or bug reports by checking for duplicates against existing GitHub Issues and the project's pending todos, then creating a new issue if the idea is novel.
|
|
5
|
+
</objective>
|
|
6
|
+
|
|
7
|
+
<step name="banner">
|
|
8
|
+
Print the Donna banner:
|
|
9
|
+
```
|
|
10
|
+
━━━ Donna ▸ Contribute Idea ━━━
|
|
11
|
+
```
|
|
12
|
+
</step>
|
|
13
|
+
|
|
14
|
+
<step name="check-gh-auth">
|
|
15
|
+
Run via Bash:
|
|
16
|
+
```bash
|
|
17
|
+
gh auth status 2>&1
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
If the exit code is non-zero, print:
|
|
21
|
+
```
|
|
22
|
+
✗ The gh CLI is not authenticated. Run 'gh auth login' first, then re-run /donna:contribute-idea.
|
|
23
|
+
```
|
|
24
|
+
Stop.
|
|
25
|
+
</step>
|
|
26
|
+
|
|
27
|
+
<step name="ask-idea">
|
|
28
|
+
Use AskUserQuestion:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
What's your idea or bug report?
|
|
32
|
+
|
|
33
|
+
Describe it in a few sentences — I'll check if something similar already exists before creating an issue.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Store the response as `<user_idea>`.
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
<step name="check-duplicates">
|
|
40
|
+
Check two sources for potential duplicates.
|
|
41
|
+
|
|
42
|
+
**Source 1: GitHub Issues**
|
|
43
|
+
|
|
44
|
+
Run via Bash:
|
|
45
|
+
```bash
|
|
46
|
+
gh issue list --repo pingvinen/donna --state open --json number,title,url --limit 100
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Parse the JSON output. Compare each issue title against `<user_idea>` using semantic similarity — judge whether the idea meaningfully overlaps with an existing issue. Do not use brittle substring matching.
|
|
50
|
+
|
|
51
|
+
**Source 2: GSD pending todos from STATE.md on GitHub**
|
|
52
|
+
|
|
53
|
+
Run via Bash:
|
|
54
|
+
```bash
|
|
55
|
+
gh api repos/pingvinen/donna/contents/.planning/STATE.md --jq '.content | @base64d'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Parse the `### Pending Todos` section from the decoded content. Each bullet is a pending todo. Compare each todo against `<user_idea>` using semantic similarity.
|
|
59
|
+
|
|
60
|
+
**If either source has a potential match**, present the match(es) to the user:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
I found something similar:
|
|
64
|
+
|
|
65
|
+
[For GitHub Issue match:]
|
|
66
|
+
→ Issue #<number>: <title>
|
|
67
|
+
<url>
|
|
68
|
+
You can upvote or comment on this issue instead of creating a new one.
|
|
69
|
+
|
|
70
|
+
[For pending todo match:]
|
|
71
|
+
→ Pending todo: "<todo text>"
|
|
72
|
+
This is already tracked internally.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Then use AskUserQuestion:
|
|
76
|
+
```
|
|
77
|
+
Would you like to:
|
|
78
|
+
1. Create a new issue anyway (it's different enough)
|
|
79
|
+
2. Skip — the existing one covers my idea
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If the user chooses option 2, print:
|
|
83
|
+
```
|
|
84
|
+
✓ Thanks for checking! The existing item covers this.
|
|
85
|
+
```
|
|
86
|
+
Stop.
|
|
87
|
+
|
|
88
|
+
If no duplicates are found, proceed to the create-issue step.
|
|
89
|
+
</step>
|
|
90
|
+
|
|
91
|
+
<step name="create-issue">
|
|
92
|
+
Help the user create a well-formed GitHub Issue.
|
|
93
|
+
|
|
94
|
+
Draft a suggested title and body based on `<user_idea>`. Use AskUserQuestion:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Let me help you write up the issue. Here's what I've drafted based on your idea:
|
|
98
|
+
|
|
99
|
+
Title: <suggested title based on user_idea>
|
|
100
|
+
|
|
101
|
+
Body:
|
|
102
|
+
<suggested body with description, context, and expected behavior>
|
|
103
|
+
|
|
104
|
+
Would you like to:
|
|
105
|
+
1. Submit as-is
|
|
106
|
+
2. Edit the title or body first
|
|
107
|
+
3. Cancel
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Handle each option:
|
|
111
|
+
|
|
112
|
+
- **Option 1 (submit as-is):** Run via Bash:
|
|
113
|
+
```bash
|
|
114
|
+
gh issue create --repo pingvinen/donna --title "<title>" --body "<body>"
|
|
115
|
+
```
|
|
116
|
+
Print the resulting issue URL with a success message:
|
|
117
|
+
```
|
|
118
|
+
✓ Issue created: <url>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
- **Option 2 (edit):** Use AskUserQuestion to collect edits from the user. Re-present the updated draft and repeat until the user chooses to submit or cancel.
|
|
122
|
+
|
|
123
|
+
- **Option 3 (cancel):** Print:
|
|
124
|
+
```
|
|
125
|
+
Issue cancelled.
|
|
126
|
+
```
|
|
127
|
+
Stop.
|
|
128
|
+
</step>
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Donna Help Workflow
|
|
2
|
+
|
|
3
|
+
<objective>
|
|
4
|
+
Provide interactive troubleshooting by inspecting Donna's state and guiding the user through diagnosing and resolving issues.
|
|
5
|
+
</objective>
|
|
6
|
+
|
|
7
|
+
<step name="banner">
|
|
8
|
+
Print the Donna banner:
|
|
9
|
+
```
|
|
10
|
+
━━━ Donna ▸ Help ━━━
|
|
11
|
+
```
|
|
12
|
+
</step>
|
|
13
|
+
|
|
14
|
+
<step name="read-config">
|
|
15
|
+
Read `~/.config/donna/config.md`.
|
|
16
|
+
|
|
17
|
+
If the file does not exist, print:
|
|
18
|
+
```
|
|
19
|
+
✗ Donna is not configured. Run /donna:setup first.
|
|
20
|
+
```
|
|
21
|
+
Stop.
|
|
22
|
+
|
|
23
|
+
Extract the `storage_repo`, `daily_folder` (default: `daily`), and `auto_push` (default: false) fields from the YAML frontmatter.
|
|
24
|
+
</step>
|
|
25
|
+
|
|
26
|
+
<step name="ask-problem">
|
|
27
|
+
Use AskUserQuestion:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
What do you need help with?
|
|
31
|
+
|
|
32
|
+
Some things I can help diagnose:
|
|
33
|
+
- Configuration issues
|
|
34
|
+
- Storage repo problems
|
|
35
|
+
- Skills not working
|
|
36
|
+
- Tool integration issues
|
|
37
|
+
- General questions about how Donna works
|
|
38
|
+
|
|
39
|
+
Describe what's going on:
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Store the response as `<user_problem>`.
|
|
43
|
+
</step>
|
|
44
|
+
|
|
45
|
+
<step name="diagnose">
|
|
46
|
+
Based on `<user_problem>`, inspect relevant state using keyword matching to determine the category and run the appropriate checks.
|
|
47
|
+
|
|
48
|
+
**Config issues** (keywords: config, setup, configure, path):
|
|
49
|
+
|
|
50
|
+
Run via Bash:
|
|
51
|
+
```bash
|
|
52
|
+
test -d <storage_repo> && echo "EXISTS" || echo "MISSING"
|
|
53
|
+
```
|
|
54
|
+
```bash
|
|
55
|
+
git -C <storage_repo> status 2>&1 | head -1
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Display the contents of `~/.config/donna/config.md`. Report:
|
|
59
|
+
- Whether the storage_repo path exists
|
|
60
|
+
- Whether it is a valid git repository
|
|
61
|
+
|
|
62
|
+
**Storage issues** (keywords: storage, repo, git, daily, file, missing):
|
|
63
|
+
|
|
64
|
+
Run via Bash:
|
|
65
|
+
```bash
|
|
66
|
+
test -d <storage_repo> && echo "EXISTS" || echo "MISSING"
|
|
67
|
+
```
|
|
68
|
+
```bash
|
|
69
|
+
git -C <storage_repo> status 2>&1 | head -1
|
|
70
|
+
```
|
|
71
|
+
```bash
|
|
72
|
+
ls <storage_repo>/donna/ 2>/dev/null
|
|
73
|
+
```
|
|
74
|
+
```bash
|
|
75
|
+
ls <storage_repo>/<daily_folder>/ 2>/dev/null | tail -5
|
|
76
|
+
```
|
|
77
|
+
```bash
|
|
78
|
+
git -C <storage_repo> status --short 2>/dev/null
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Report whether the storage repo exists and is a git repo, whether the donna/ subfolder is present, the most recent daily files, and any uncommitted changes.
|
|
82
|
+
|
|
83
|
+
**Skill issues** (keywords: skill, command, slash, workflow, not working, error):
|
|
84
|
+
|
|
85
|
+
Run via Bash:
|
|
86
|
+
```bash
|
|
87
|
+
ls ~/.claude/commands/donna/ 2>/dev/null
|
|
88
|
+
```
|
|
89
|
+
```bash
|
|
90
|
+
ls ~/.donna/workflows/ 2>/dev/null
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Read `~/.donna/version.md` with the Read tool (if it exists).
|
|
94
|
+
|
|
95
|
+
Report the installed stubs and workflows, compare their counts, and print the Donna version.
|
|
96
|
+
|
|
97
|
+
**Tool issues** (keywords: tool, gh, jira, integration, pull, refresh):
|
|
98
|
+
|
|
99
|
+
Read `<storage_repo>/donna/tools.md` with the Read tool if it exists.
|
|
100
|
+
|
|
101
|
+
For each tool found in tools.md, run via Bash:
|
|
102
|
+
```bash
|
|
103
|
+
which <tool_name> 2>/dev/null
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
If `gh` is a configured tool, also run:
|
|
107
|
+
```bash
|
|
108
|
+
gh auth status 2>&1
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Report which tools are installed and authenticated.
|
|
112
|
+
|
|
113
|
+
**General / no clear category** (catch-all when no keyword matches):
|
|
114
|
+
|
|
115
|
+
Run all checks from the above categories and present a full health summary. Include:
|
|
116
|
+
- Donna version (from `~/.donna/version.md`)
|
|
117
|
+
- Config status (file exists, storage_repo path valid)
|
|
118
|
+
- Storage status (git repo exists, donna/ and daily/ present, uncommitted changes)
|
|
119
|
+
- Installed skills count (stubs in `~/.claude/commands/donna/`, workflows in `~/.donna/workflows/`)
|
|
120
|
+
- Configured tools (from `<storage_repo>/donna/tools.md`)
|
|
121
|
+
|
|
122
|
+
After running diagnostics, present findings clearly:
|
|
123
|
+
- Use `✓` for things that look good
|
|
124
|
+
- Use `✗` for things that look broken
|
|
125
|
+
- Provide specific fix suggestions for each `✗` item
|
|
126
|
+
</step>
|
|
127
|
+
|
|
128
|
+
<step name="follow-up">
|
|
129
|
+
Use AskUserQuestion:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Did that help? You can:
|
|
133
|
+
1. Ask about something else
|
|
134
|
+
2. Submit a bug report or feature idea (I'll point you to /donna:contribute-idea)
|
|
135
|
+
3. Done — I'm all set
|
|
136
|
+
|
|
137
|
+
What would you like to do?
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Handle each option:
|
|
141
|
+
|
|
142
|
+
- **Option 1:** Ask the user for a new description of their issue. Loop back to the diagnose step with the new question.
|
|
143
|
+
|
|
144
|
+
- **Option 2:** Print:
|
|
145
|
+
```
|
|
146
|
+
Tip: Run /donna:contribute-idea to submit ideas or bug reports via GitHub Issues.
|
|
147
|
+
```
|
|
148
|
+
Stop.
|
|
149
|
+
|
|
150
|
+
- **Option 3:** Print:
|
|
151
|
+
```
|
|
152
|
+
✓ Glad I could help!
|
|
153
|
+
```
|
|
154
|
+
Stop.
|
|
155
|
+
</step>
|