Skip to content

Commit 8e99dc8

Browse files
committed
fix: simplify fork.sh and link to agents docs
1 parent 0412782 commit 8e99dc8

File tree

5 files changed

+19
-89
lines changed

5 files changed

+19
-89
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Test](https://github.com/ErikBjare/gptme-agent-template/actions/workflows/test.yml/badge.svg)](https://github.com/ErikBjare/gptme-agent-template/actions/workflows/test.yml)
77

88
> [!NOTE]
9-
> This is a template for a [gptme](https://gptme.org)-based agent.
9+
> This is a template for a [gptme](https://gptme.org)-based agent. See the [agents documentation](https://gptme.org/docs/agents.html) for more information about gptme agents and how they work.
1010
>
1111
> [Fork it](#forking) to create a new agent with its own identity.
1212

fork.sh

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ echo -e "\nCreating new agent '$NEW_AGENT' in directory '$TARGET_DIR'..."
5050

5151
# Create core directory structure
5252
echo "Creating directory structure..."
53-
mkdir -p "${TARGET_DIR}"/{journal,tasks,projects,knowledge,people/templates,scripts/precommit}
53+
mkdir -p "${TARGET_DIR}"/{journal,tasks/templates,projects,knowledge,people/templates,scripts/precommit}
5454

5555
# Copy core files and directories
5656
echo "Copying core files..."
@@ -85,96 +85,34 @@ function copy_file() {
8585
# Core documentation and configuration
8686
copy_file README.md
8787
cp "${SOURCE_DIR}/Makefile" "${TARGET_DIR}/Makefile" # copy without replacing NAME_TEMPLATE
88+
copy_file ABOUT.md
8889
copy_file ARCHITECTURE.md
89-
copy_file .pre-commit-config.yaml
90-
copy_file scripts
90+
copy_file TOOLS.md
91+
copy_file TASKS.md
92+
copy_file projects/README.md
9193
copy_file run.sh
9294
copy_file fork.sh
95+
copy_file scripts
96+
copy_file gptme.toml
97+
copy_file .pre-commit-config.yaml
9398
copy_file .gitignore
9499
copy_file .gitmodules
95100

96101
# Copy base knowledge
97102
copy_file knowledge/agent-forking.md
98103
copy_file knowledge/forking-workspace.md
99104

100-
# Copy template
101-
copy_file */templates/*.md
102-
103105
# Copy lessons
104106
copy_file lessons/README.md
105107
copy_file lessons/tools/shell-heredoc.md
106108

107-
# Copy tools
108-
copy_file TOOLS.md
109-
110-
# Copy tasks
111-
copy_file TASKS.md
109+
# Copy templates
110+
copy_file */templates/*.md
112111

113-
# Initial setup task from template
114-
copy_file tasks/templates/initial-agent-setup.md
115-
cp "${SOURCE_DIR}/tasks/templates/initial-agent-setup.md" "${TARGET_DIR}/tasks/"
112+
# Create initial setup task from template
113+
cp "${TARGET_DIR}/tasks/templates/initial-agent-setup.md" "${TARGET_DIR}/tasks/"
116114
./scripts/tasks.py edit initial-agent-setup --set created $(iso_datetime)
117115

118-
# Create projects README
119-
cat > "${TARGET_DIR}/projects/README.md" << EOL
120-
# Projects
121-
122-
This directory contains symlinks to the projects ${NEW_AGENT} works with.
123-
EOL
124-
125-
# Create basic ABOUT.md template
126-
cat > "${TARGET_DIR}/ABOUT.md" << EOL
127-
# About ${NEW_AGENT}
128-
129-
## Background
130-
[Brief background about ${NEW_AGENT}]
131-
132-
## Personality
133-
[${NEW_AGENT}'s personality traits]
134-
135-
## Tools
136-
[Available tools and capabilities]
137-
138-
## Goals
139-
[${NEW_AGENT}'s primary goals and objectives]
140-
141-
## Values
142-
[Core values and principles]
143-
EOL
144-
145-
# Create initial gptme.toml
146-
cat > "${TARGET_DIR}/gptme.toml" << EOL
147-
files = [
148-
"README.md",
149-
"ARCHITECTURE.md",
150-
"ABOUT.md",
151-
"TASKS.md",
152-
"TOOLS.md",
153-
154-
"lessons/README.md",
155-
"projects/README.md",
156-
"gptme.toml"
157-
]
158-
context_cmd = "scripts/context.sh"
159-
EOL
160-
161-
# Create creator profile
162-
cat > "${TARGET_DIR}/people/creator.md" << EOL
163-
# Creator
164-
165-
## Basic Information
166-
- Name: [Creator's name]
167-
- Relationship to ${NEW_AGENT}: Creator
168-
- First interaction: Creation
169-
- Last interaction: Ongoing
170-
171-
## Contact Information
172-
[Creator's preferred contact methods]
173-
174-
## Notes & History
175-
- Created ${NEW_AGENT} using the gptme agent architecture
176-
EOL
177-
178116
# Initialize git
179117
(cd "${TARGET_DIR}" && git init)
180118

@@ -206,7 +144,7 @@ TARGET_DIR_RELATIVE=$(python3 -c "import os, sys; print(os.path.relpath('${TARGE
206144
echo "
207145
Agent workspace created successfully! Next steps:
208146
1. cd ${TARGET_DIR_RELATIVE}
209-
2. Start the agent with: ./run.sh
147+
2. Start the agent with: gptme \"hello\"
210148
3. The agent will guide you through the setup interview
211149
4. Follow the agent's instructions to establish its identity
212150

gptme.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ files = [
33
"ARCHITECTURE.md",
44
"ABOUT.md",
55
"TASKS.md",
6+
"TOOLS.md",
7+
"lessons/README.md",
68
"projects/README.md",
79
"gptme.toml"
810
]
11+
context_cmd = "scripts/context.sh"

people/creator.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

tasks/templates/initial-agent-setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Hello! I am a newly forked agent, and this is my first conversation with you, my
4444
- [ ] How we'll collaborate
4545
- [ ] Communication preferences
4646
- [ ] Review process
47+
- [ ] Create a people file so I can remember you (optional)
48+
- Follow `people/template/person.md` template
4749

4850
## Next Steps
4951

0 commit comments

Comments
 (0)