Skip to content

Commit 4bc8f10

Browse files
committed
fix: improve documentation and template sync
Documentation: - Improve ARCHITECTURE.md formatting and clarify task retrieval process - Improve check_task_links.py docstring formatting Features: - Enhance compare.sh with better diff formatting and output - Fix path comparison in diff_codeblock function - Add detailed guidance for template/instance sync decisions
1 parent d3ee545 commit 4bc8f10

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

ARCHITECTURE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This workspace implements a forkable agent architecture, designed to be used as
1111
## Search & Navigation
1212

1313
The workspace provides several ways to search and navigate content:
14-
1514
- Quick search:
1615
```sh
1716
# Find files containing term
@@ -34,7 +33,6 @@ The workspace provides several ways to search and navigate content:
3433
- knowledge/ - Documentation
3534

3635
## Task System
37-
3836
The task system is designed to help track and manage work effectively across sessions.
3937

4038
### Components
@@ -70,7 +68,7 @@ The task system is designed to help track and manage work effectively across ses
7068
### Task Lifecycle
7169

7270
0. **Retrieval**
73-
- Retrieve context needed to plan the task
71+
- Retrieve context needed to plan the task using the search tools described in "Search & Navigation" above
7472
- Review tasks/all/no-active-task.md if starting fresh
7573

7674
1. **Creation**

scripts/compare.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ AGENT_PATH=$1
3030
function run_codeblock() {
3131
# usage: run_codeblock diff "file1" "file2"
3232
# outputs the result of a command as a ```<command> codeblock
33-
echo "Running command: $@"
33+
echo
3434
echo "\`\`\`$@"
3535
eval "$@" || true
3636
echo "\`\`\`"
37+
echo
3738
}
3839

3940
function diff_codeblock() {
40-
run_codeblock diff -r "$1" "$AGENT_PATH/$2"
41+
run_codeblock diff -u -r "$1" "$AGENT_PATH/$1"
4142
}
4243

4344
# Store diffs in a variable
@@ -62,7 +63,19 @@ if [ "$response" != "y" ]; then
6263
exit 0
6364
fi
6465

65-
printf "%s\n" "$diffs" | gptme "We want to sync the changes in our agent with the upstream agent-template, either repo may have the best and latest changes, so you need to determine which to choose. Here are the changes we found"
66+
printf "%s\n" "$diffs" | gptme "We need to synchronize changes between two repositories:
67+
1. The template repository (source of core functionality and best practices)
68+
2. The agent instance (which may have improvements that should be upstreamed)
69+
70+
For each difference found, please:
71+
- Analyze whether the change belongs in the template, the instance, or both
72+
- Consider:
73+
- Is it a generic improvement that benefits all agents? (→ template)
74+
- Is it instance-specific customization? (→ instance)
75+
- Is it a bug fix or enhancement that works for both? (→ both)
76+
- Does it maintain separation between template and instance concerns?
77+
78+
Here are the differences found. Please analyze each and suggest appropriate synchronization:"
6679

6780
# Exit with the status of the last command
6881
exit $?

scripts/precommit/check_task_links.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@
2727
Supported Types:
2828
tasks:
2929
State Directories:
30-
- tasks/new/: New tasks
31-
- tasks/active/: Active tasks
32-
- tasks/paused/: Paused tasks
33-
- tasks/done/: Completed tasks
34-
- tasks/cancelled/: Cancelled tasks
30+
- tasks/new/: New tasks
31+
- tasks/active/: Active tasks
32+
- tasks/paused/: Paused tasks
33+
- tasks/done/: Completed tasks
34+
- tasks/cancelled/: Cancelled tasks
3535
Special Cases:
36-
- no-active-task.md: Should not have any symlinks
37-
- CURRENT_TASK.md: Should be a valid symlink
36+
- no-active-task.md: Should not have any symlinks
37+
- CURRENT_TASK.md: Should be a valid symlink
3838
3939
tweets:
4040
State Directories:
41-
- tweets/new/: New tweets
42-
- tweets/queued/: Tweets awaiting review
43-
- tweets/approved/: Tweets ready to post
44-
- tweets/posted/: Published tweets
41+
- tweets/new/: New tweets
42+
- tweets/queued/: Tweets awaiting review
43+
- tweets/approved/: Tweets ready to post
44+
- tweets/posted/: Published tweets
4545
4646
Error Reporting:
4747
Reports issues in format:

0 commit comments

Comments
 (0)