@pingvinen/donna-assistant 0.5.0 → 0.6.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 CHANGED
@@ -123,6 +123,8 @@ Most commands are safe to run again. Want to update your role? Run `/donna:set-r
123
123
  | `/donna:add-tool` | Register an external CLI tool |
124
124
  | `/donna:run-tools` | Refresh tool data mid-day |
125
125
  | `/donna:relearn-tools` | Update tool knowledge after upgrades |
126
+ | `/donna:help` | Conversational troubleshooting for config, storage, or skill issues |
127
+ | `/donna:contribute-idea` | Submit a feature idea or bug report via GitHub Issues |
126
128
 
127
129
  ## License
128
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingvinen/donna-assistant",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Donna - your AI powered personal assistant",
5
5
  "bin": {
6
6
  "donna-assistant": "./bin/donna-assistant"
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ const output = require("./output.cjs");
4
+
5
+ /**
6
+ * Changelog data keyed by version string.
7
+ * Each entry has categories as keys and arrays of change descriptions as values.
8
+ */
9
+ const CHANGELOG = {
10
+ "0.5.0": {
11
+ "New skills": [
12
+ "donna:help — conversational troubleshooting and diagnostics",
13
+ "donna:contribute-idea — submit feature ideas via GitHub Issues",
14
+ ],
15
+ Improvements: [
16
+ "CONTRIBUTING.md developer guide added",
17
+ "Upgrade changelog shown during version bumps",
18
+ ],
19
+ },
20
+ };
21
+
22
+ /**
23
+ * Compare two semver strings. Returns true if a > b.
24
+ *
25
+ * @param {string} a - First version string
26
+ * @param {string} b - Second version string
27
+ * @returns {boolean}
28
+ */
29
+ function semverGt(a, b) {
30
+ const pa = a.split(".").map(Number);
31
+ const pb = b.split(".").map(Number);
32
+ for (let i = 0; i < 3; i++) {
33
+ if (pa[i] > pb[i]) return true;
34
+ if (pa[i] < pb[i]) return false;
35
+ }
36
+ return false;
37
+ }
38
+
39
+ /**
40
+ * Display changelog entries for versions between fromVersion (exclusive)
41
+ * and toVersion (inclusive).
42
+ *
43
+ * @param {string} fromVersion - Previous version (exclusive)
44
+ * @param {string} toVersion - New version (inclusive)
45
+ */
46
+ function displayChangelog(fromVersion, toVersion) {
47
+ const versionsToShow = Object.keys(CHANGELOG)
48
+ .filter((v) => semverGt(v, fromVersion) && !semverGt(v, toVersion))
49
+ .sort((a, b) => (semverGt(a, b) ? 1 : -1));
50
+
51
+ if (versionsToShow.length === 0) return;
52
+
53
+ console.log("");
54
+ output.info("What's new:");
55
+
56
+ for (const ver of versionsToShow) {
57
+ const entry = CHANGELOG[ver];
58
+ for (const [category, items] of Object.entries(entry)) {
59
+ output.info(` ${category}:`);
60
+ for (const item of items) {
61
+ const prefix = category.toLowerCase().includes("new") ? "+" : "\u00b7";
62
+ output.info(` ${prefix} ${item}`);
63
+ }
64
+ }
65
+ }
66
+
67
+ console.log("");
68
+ }
69
+
70
+ module.exports = { CHANGELOG, displayChangelog, semverGt };
package/src/installer.cjs CHANGED
@@ -8,6 +8,7 @@ const output = require("./output.cjs");
8
8
  const version = require("./version.cjs");
9
9
  const migrator = require("./migrator.cjs");
10
10
  const providers = require("./providers/index.cjs");
11
+ const changelog = require("./changelog.cjs");
11
12
 
12
13
  /**
13
14
  * Main installer orchestration.
@@ -50,6 +51,7 @@ async function run(options = {}) {
50
51
  // If upgrading (current version exists but differs)
51
52
  if (currentVersion && currentVersion !== packageVersion) {
52
53
  output.upgradeHeader(currentVersion, packageVersion);
54
+ changelog.displayChangelog(currentVersion, packageVersion);
53
55
  }
54
56
 
55
57
  // Run migrations
@@ -77,7 +79,7 @@ async function run(options = {}) {
77
79
  for (const provider of detected) {
78
80
  fs.cpSync(provider.stubSource, provider.stubTarget, { recursive: true });
79
81
  output.success(
80
- `Copied donna skills (setup, add-task, done, set-role, begin-the-day, add-tool, relearn-tools, run-tools) to ${provider.stubTarget}`,
82
+ `Copied donna skills (setup, add-task, done, set-role, begin-the-day, add-tool, relearn-tools, run-tools, help, contribute-idea) to ${provider.stubTarget}`,
81
83
  );
82
84
  }
83
85
  } else {
package/src/output.cjs CHANGED
@@ -26,4 +26,9 @@ function migrationLine(desc) {
26
26
  console.log(` \u2713 ${desc}`);
27
27
  }
28
28
 
29
- module.exports = { banner, success, fail, info, upgradeHeader, migrationLine };
29
+ function changelogHeader() {
30
+ console.log("");
31
+ console.log(" What's new:");
32
+ }
33
+
34
+ module.exports = { banner, success, fail, info, upgradeHeader, migrationLine, changelogHeader };
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: donna:contribute-idea
3
+ description: Submit a feature idea or bug report — checks for duplicates, then creates a GitHub Issue
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - AskUserQuestion
8
+ ---
9
+
10
+ <objective>
11
+ Run the Donna contribute-idea workflow. This command helps 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.
12
+ </objective>
13
+
14
+ <execution_context>
15
+ @~/.donna/workflows/contribute-idea.md
16
+ </execution_context>
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: donna:help
3
+ description: Conversational troubleshooting — diagnose issues with Donna's config, storage, skills, or tools
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - AskUserQuestion
8
+ ---
9
+
10
+ <objective>
11
+ Run the Donna help workflow. This command provides interactive troubleshooting by inspecting Donna's state and guiding the user through diagnosing and resolving issues.
12
+ </objective>
13
+
14
+ <execution_context>
15
+ @~/.donna/workflows/help.md
16
+ </execution_context>
@@ -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>