@pingvinen/donna-assistant 0.3.2 → 0.5.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 +129 -2
- package/bin/donna-assistant +3 -1
- package/migrations/002-standing-files-subfolder.cjs +23 -0
- package/package.json +1 -1
- package/src/installer.cjs +7 -2
- package/src/output.cjs +2 -2
- package/stubs/claude-code/donna/add-task.md +17 -0
- package/stubs/claude-code/donna/add-tool.md +17 -0
- package/stubs/claude-code/donna/begin-the-day.md +16 -0
- package/stubs/claude-code/donna/done.md +17 -0
- package/stubs/claude-code/donna/relearn-tools.md +16 -0
- package/stubs/claude-code/donna/run-tools.md +16 -0
- package/stubs/claude-code/donna/set-role.md +18 -0
- package/stubs/claude-code/donna/setup.md +4 -2
- package/workflows/add-task.md +138 -0
- package/workflows/add-tool.md +261 -0
- package/workflows/begin-the-day.md +308 -0
- package/workflows/done.md +169 -0
- package/workflows/relearn-tools.md +180 -0
- package/workflows/run-tools.md +214 -0
- package/workflows/set-role.md +288 -0
- package/workflows/setup.md +161 -18
package/README.md
CHANGED
|
@@ -1,2 +1,129 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# Donna
|
|
2
|
+
|
|
3
|
+
Your personal, digital version of Harvey Specter's amazing secretary.
|
|
4
|
+
|
|
5
|
+
Donna is an AI-powered personal assistant that manages the work that falls through the cracks — the 1:1 follow-ups, recurring process tasks, stakeholder requests, and self-initiated work that never makes it into Jira or Linear.
|
|
6
|
+
|
|
7
|
+
She lives inside your terminal. She knows your role, surfaces what needs attention each day, pulls data from your CLI tools, and captures tasks in seconds — all backed by plain markdown and git.
|
|
8
|
+
|
|
9
|
+
Donna is designed to be AI-agnostic, but currently only tested with [Claude Code](https://docs.anthropic.com/en/docs/claude-code). She works from any session, in any project — your tasks follow you wherever you work.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @pingvinen/donna-assistant
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The installer copies skill files into `~/.claude/commands/donna/` and shared runtime into `~/.donna/`. Run it again to upgrade.
|
|
18
|
+
|
|
19
|
+
**Requirements:** Node.js 18+, an AI coding assistant (tested with Claude Code)
|
|
20
|
+
|
|
21
|
+
## Setup
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
/donna:setup
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Donna will ask you for a **storage repo** — a git repository (local or remote) where all your tasks and daily files live. Everything is plain markdown, committed to git automatically. If you use [Obsidian](https://obsidian.md), you can open this repo as a vault for a free UI.
|
|
28
|
+
|
|
29
|
+
Then define your role so Donna can suggest recurring tasks relevant to your job:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/donna:set-role
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Daily workflow
|
|
36
|
+
|
|
37
|
+
### Start the day
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
/donna:begin-the-day
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This is your morning ritual. Donna will:
|
|
44
|
+
|
|
45
|
+
- **Carry forward** open tasks from your last working day (handles weekends)
|
|
46
|
+
- **Surface recurring tasks** that are due today based on your role
|
|
47
|
+
- **Pull fresh data** from configured tools (GitHub PRs, Jira tickets, etc.)
|
|
48
|
+
- **Deduplicate** across all sources and give you a brief
|
|
49
|
+
|
|
50
|
+
### Capture tasks throughout the day
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
/donna:add-task Review Sarah's design doc before Thursday
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
One command, zero prompts, committed to git in seconds. Can also be called without arguments for a more conversational capture.
|
|
57
|
+
|
|
58
|
+
### Mark tasks done
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/donna:done design doc
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Fuzzy-matches by name. Run without arguments to pick from a list.
|
|
65
|
+
|
|
66
|
+
### Refresh tool data mid-day
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/donna:run-tools
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Re-pulls data from all configured tools. New items appear, resolved items get closed automatically. Your manually-marked tasks always win.
|
|
73
|
+
|
|
74
|
+
## External tools
|
|
75
|
+
|
|
76
|
+
Donna can pull tasks and status from CLI tools you already have installed. Register them with:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
/donna:add-tool gh
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Or call it without arguments — Donna will check your role and suggest tools typically associated with your job.
|
|
83
|
+
|
|
84
|
+
Donna verifies the tool is installed and authenticated, learns its capabilities, and asks what scope to query (which repos, projects, namespaces). Any CLI tool can be added — Donna uses the AI model's knowledge of well-known tools and parses `--help` output for everything else.
|
|
85
|
+
|
|
86
|
+
If a tool version is newer than what the AI model knows, Donna will inspect it to learn its current capabilities. You can also re-learn tools at any time:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
/donna:relearn-tools
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## How state is stored
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
<your-storage-repo>/
|
|
96
|
+
donna/
|
|
97
|
+
role.md # your job role definition
|
|
98
|
+
recurring.md # recurring task schedule
|
|
99
|
+
tools.md # registered tool configurations
|
|
100
|
+
daily/
|
|
101
|
+
2026-03-16.md # today's tasks, tool data, notes
|
|
102
|
+
2026-03-15.md
|
|
103
|
+
...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Every change is committed to git. Files are plain markdown with YAML frontmatter — human-readable, hand-editable, and version-controlled.
|
|
107
|
+
|
|
108
|
+
The storage repo is yours. Donna only writes to the `donna/` and `daily/` directories, so you're free to keep any other notes, files, or folder structures alongside it — great if you're already using the repo as an Obsidian vault or similar.
|
|
109
|
+
|
|
110
|
+
## Idempotent by design
|
|
111
|
+
|
|
112
|
+
Most commands are safe to run again. Want to update your role? Run `/donna:set-role` again. Added a new tool mid-day? Run `/donna:begin-the-day` again to pull its data in. Re-running a command updates state rather than duplicating it.
|
|
113
|
+
|
|
114
|
+
## All commands
|
|
115
|
+
|
|
116
|
+
| Command | What it does |
|
|
117
|
+
|---------|-------------|
|
|
118
|
+
| `/donna:setup` | First-time configuration (storage repo, directories) |
|
|
119
|
+
| `/donna:set-role` | Define your job role, get recurring task suggestions |
|
|
120
|
+
| `/donna:begin-the-day` | Morning brief with carry-forward, recurring tasks, tool data |
|
|
121
|
+
| `/donna:add-task` | Capture a task instantly |
|
|
122
|
+
| `/donna:done` | Mark a task complete |
|
|
123
|
+
| `/donna:add-tool` | Register an external CLI tool |
|
|
124
|
+
| `/donna:run-tools` | Refresh tool data mid-day |
|
|
125
|
+
| `/donna:relearn-tools` | Update tool knowledge after upgrades |
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
MIT
|
package/bin/donna-assistant
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
version: "0.4.0",
|
|
5
|
+
description: "Queue standing file move to donna/ subfolder (runs on next skill use)",
|
|
6
|
+
up(ctx) {
|
|
7
|
+
// Standing files live in the user's storage repo, which is not accessible
|
|
8
|
+
// from the migration context. We write a pending flag to state.md so that
|
|
9
|
+
// workflows can detect and execute the move on next skill run.
|
|
10
|
+
const statePath = ctx.path.join(ctx.donnaDir, "state.md");
|
|
11
|
+
|
|
12
|
+
if (ctx.fs.existsSync(statePath)) {
|
|
13
|
+
const content = ctx.fs.readFileSync(statePath, "utf8");
|
|
14
|
+
if (content.includes("move-standing-files")) {
|
|
15
|
+
// Already queued — idempotent, nothing to do
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const pendingFlag = "---\npending_migrations:\n - move-standing-files\n---\n";
|
|
21
|
+
ctx.fs.writeFileSync(statePath, pendingFlag, "utf8");
|
|
22
|
+
},
|
|
23
|
+
};
|
package/package.json
CHANGED
package/src/installer.cjs
CHANGED
|
@@ -14,10 +14,12 @@ const providers = require("./providers/index.cjs");
|
|
|
14
14
|
*
|
|
15
15
|
* @param {object} [options]
|
|
16
16
|
* @param {string} [options.homeDir] - Override home directory (for testing)
|
|
17
|
+
* @param {boolean} [options.force] - Force re-install even if version matches
|
|
17
18
|
* @returns {Promise<void>}
|
|
18
19
|
*/
|
|
19
20
|
async function run(options = {}) {
|
|
20
21
|
const homeDir = options.homeDir || os.homedir();
|
|
22
|
+
const force = options.force || false;
|
|
21
23
|
const donnaDir = path.join(homeDir, ".donna");
|
|
22
24
|
const migrationsDir = path.join(__dirname, "..", "migrations");
|
|
23
25
|
const workflowsSource = path.join(__dirname, "..", "workflows");
|
|
@@ -36,7 +38,7 @@ async function run(options = {}) {
|
|
|
36
38
|
const lastMigration = current?.lastMigration || 0;
|
|
37
39
|
|
|
38
40
|
// Check if already up to date
|
|
39
|
-
if (currentVersion === packageVersion) {
|
|
41
|
+
if (currentVersion === packageVersion && !force) {
|
|
40
42
|
// Check for pending migrations too
|
|
41
43
|
const pendingResults = migrator.runMigrations(migrationsDir, donnaDir, lastMigration);
|
|
42
44
|
if (pendingResults.length === 0) {
|
|
@@ -74,7 +76,9 @@ async function run(options = {}) {
|
|
|
74
76
|
if (detected.length > 0) {
|
|
75
77
|
for (const provider of detected) {
|
|
76
78
|
fs.cpSync(provider.stubSource, provider.stubTarget, { recursive: true });
|
|
77
|
-
output.success(
|
|
79
|
+
output.success(
|
|
80
|
+
`Copied donna skills (setup, add-task, done, set-role, begin-the-day, add-tool, relearn-tools, run-tools) to ${provider.stubTarget}`,
|
|
81
|
+
);
|
|
78
82
|
}
|
|
79
83
|
} else {
|
|
80
84
|
output.info("No supported AI providers detected");
|
|
@@ -92,6 +96,7 @@ async function run(options = {}) {
|
|
|
92
96
|
output.success(`Version ${packageVersion} installed`);
|
|
93
97
|
|
|
94
98
|
// Final message
|
|
99
|
+
console.log("");
|
|
95
100
|
output.info("Run /donna:setup in Claude Code to get started.");
|
|
96
101
|
}
|
|
97
102
|
|
package/src/output.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
function banner() {
|
|
4
4
|
console.log("");
|
|
5
|
-
console.log("━━━
|
|
5
|
+
console.log("━━━ Donna ━━━");
|
|
6
6
|
console.log("");
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@ function upgradeHeader(from, to) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function migrationLine(desc) {
|
|
26
|
-
console.log(`
|
|
26
|
+
console.log(` \u2713 ${desc}`);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
module.exports = { banner, success, fail, info, upgradeHeader, migrationLine };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:add-task
|
|
3
|
+
description: Capture a task to today's daily journal
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Run the Donna add-task workflow.
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<execution_context>
|
|
16
|
+
@~/.donna/workflows/add-task.md
|
|
17
|
+
</execution_context>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:add-tool
|
|
3
|
+
description: Declare an external CLI tool and teach Donna its capabilities
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Run the Donna add-tool workflow. This command declares external CLI tools (like gh, jira, kubectl) and teaches Donna their capabilities so they can be surfaced in the daily brief.
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<execution_context>
|
|
16
|
+
@~/.donna/workflows/add-tool.md
|
|
17
|
+
</execution_context>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:begin-the-day
|
|
3
|
+
description: Start your day — carry forward open tasks, surface recurring tasks due today, get your daily brief
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Run the Donna begin-the-day workflow.
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<execution_context>
|
|
15
|
+
@~/.donna/workflows/begin-the-day.md
|
|
16
|
+
</execution_context>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:done
|
|
3
|
+
description: Mark tasks as complete in today's daily journal
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Run the Donna done workflow.
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<execution_context>
|
|
16
|
+
@~/.donna/workflows/done.md
|
|
17
|
+
</execution_context>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:relearn-tools
|
|
3
|
+
description: Re-learn capabilities for tools whose installed version has changed
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Run the Donna relearn-tools workflow. This command checks each registered tool's installed version against its stored version and re-learns capabilities for tools that have been updated.
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<execution_context>
|
|
15
|
+
@~/.donna/workflows/relearn-tools.md
|
|
16
|
+
</execution_context>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:run-tools
|
|
3
|
+
description: Run external tools and pull fresh data into today's daily file
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Run the Donna run-tools workflow. This command executes all configured external tool commands, pulls fresh data, and smart-merges results into today's daily file, without running the full begin-the-day carry-forward and recurring task logic.
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<execution_context>
|
|
15
|
+
@~/.donna/workflows/run-tools.md
|
|
16
|
+
</execution_context>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donna:set-role
|
|
3
|
+
description: Define your job role, research recurring tasks, and build your daily rhythm
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
- WebSearch
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Run the Donna set-role workflow. This command guides the user through defining their job role: collecting role details, researching recurring tasks and tools, presenting findings for approval, and persisting everything to the storage repo.
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<execution_context>
|
|
17
|
+
@~/.donna/workflows/set-role.md
|
|
18
|
+
</execution_context>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: donna:setup
|
|
3
|
-
description: Set up Donna
|
|
3
|
+
description: Set up Donna — configure storage repo, initialize file structure, create bootstrap config
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
|
+
- Write
|
|
6
7
|
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
<objective>
|
|
10
|
-
Run the Donna setup workflow. This command
|
|
12
|
+
Run the Donna setup workflow. This command guides the user through configuring Donna: setting the storage repo path, initializing the file structure, and writing the bootstrap config at ~/.config/donna/config.md.
|
|
11
13
|
</objective>
|
|
12
14
|
|
|
13
15
|
<execution_context>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Donna Add-Task Workflow
|
|
2
|
+
|
|
3
|
+
<objective>
|
|
4
|
+
Capture a new task to today's daily journal file in the storage repo and commit it to git.
|
|
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
|
+
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
|
+
```markdown
|
|
59
|
+
---
|
|
60
|
+
pending_migrations: []
|
|
61
|
+
---
|
|
62
|
+
```
|
|
63
|
+
</step>
|
|
64
|
+
|
|
65
|
+
<step name="get-description">
|
|
66
|
+
The task description is provided as the argument to this command (e.g., `/donna:add-task buy milk`).
|
|
67
|
+
|
|
68
|
+
If no argument was provided, use AskUserQuestion to ask:
|
|
69
|
+
```
|
|
70
|
+
What task would you like to add?
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Store the response as `<description>`.
|
|
74
|
+
</step>
|
|
75
|
+
|
|
76
|
+
<step name="ensure-daily-file">
|
|
77
|
+
Run via Bash to get today's date:
|
|
78
|
+
```bash
|
|
79
|
+
date +%Y-%m-%d
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Store the result as `<date>`. Construct the daily file path: `<storage_repo>/<daily_folder>/<date>.md`.
|
|
83
|
+
|
|
84
|
+
Run via Bash to ensure the daily folder exists:
|
|
85
|
+
```bash
|
|
86
|
+
mkdir -p <storage_repo>/<daily_folder>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If the daily file does not exist, create it with the Write tool using this content (substituting the actual date):
|
|
90
|
+
```markdown
|
|
91
|
+
---
|
|
92
|
+
date: <date>
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Tasks
|
|
96
|
+
```
|
|
97
|
+
</step>
|
|
98
|
+
|
|
99
|
+
<step name="append-task">
|
|
100
|
+
Read the daily file with the Read tool.
|
|
101
|
+
|
|
102
|
+
Append `- [ ] <description>` on a new line at the end of the file.
|
|
103
|
+
|
|
104
|
+
Write the updated file with the Write tool.
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
<step name="git-commit">
|
|
108
|
+
Run via Bash:
|
|
109
|
+
```bash
|
|
110
|
+
git -C <storage_repo> add -A
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Check whether there is anything to commit:
|
|
114
|
+
```bash
|
|
115
|
+
git -C <storage_repo> status --porcelain
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
If the output is empty, skip the commit and continue.
|
|
119
|
+
|
|
120
|
+
Otherwise, run:
|
|
121
|
+
```bash
|
|
122
|
+
git -C <storage_repo> commit -m "donna(add-task): <description>"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If `auto_push` is true in config, also run:
|
|
126
|
+
```bash
|
|
127
|
+
git -C <storage_repo> push
|
|
128
|
+
```
|
|
129
|
+
</step>
|
|
130
|
+
|
|
131
|
+
<step name="confirm">
|
|
132
|
+
Print:
|
|
133
|
+
```
|
|
134
|
+
✓ Added: <description>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Also print the path to the daily file: `<storage_repo>/<daily_folder>/<date>.md`
|
|
138
|
+
</step>
|