Skip to content

Commit 388648d

Browse files
DougStateclaude
andcommitted
Add Long-Running Agent Harness commands and portfolio README
Publish 14 Claude Code slash commands (session lifecycle, multi-agent coordination, utilities) and 1 Cursor rule to showcase multi-session project management and agent workflow automation skills. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Made-with: Cursor
1 parent 059b410 commit 388648d

16 files changed

Lines changed: 1185 additions & 1 deletion

.claude/commands/add-agent.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
description: Add a new agent role to a multi-agent project
3+
argument-hint: <agent-name>
4+
---
5+
6+
Add a new agent role to an existing multi-agent project.
7+
8+
Arguments: $ARGUMENTS
9+
10+
## Prerequisites
11+
12+
- feature_list.json must exist
13+
- Project should already be in multi-agent mode (if not, suggest `/enable-multi-agent` instead)
14+
15+
## Steps:
16+
17+
1. **Read current feature_list.json**
18+
19+
If file doesn't exist, error: "No feature_list.json found. Run `/init-harness` first."
20+
21+
If `multi_agent_mode` is not true, error: "Project is not in multi-agent mode. Run `/enable-multi-agent agent1,agent2,...` first."
22+
23+
2. **Parse agent name from arguments**
24+
25+
Trim whitespace, lowercase.
26+
27+
If no agent provided, error: "Please specify an agent name. Example: `/add-agent testing`"
28+
29+
3. **Check for duplicates**
30+
31+
If agent already exists in the `agents` array, error: "Agent '[name]' already exists."
32+
33+
4. **Add agent to array**
34+
35+
Append the new agent to the `agents` array.
36+
37+
5. **Update feature_list.json**
38+
39+
- Add agent to `agents` array
40+
- Update `last_updated` to today's date
41+
42+
6. **Display confirmation**
43+
44+
```
45+
Agent added: [name]
46+
47+
Current agents: design, architect, api, [name]
48+
49+
To assign features to this agent:
50+
/add-feature [name]:category "Feature name" Description
51+
/reassign-feature FEAT-001 [name]
52+
```
53+
54+
## Example usage:
55+
56+
```
57+
/add-agent testing
58+
```
59+
60+
Output:
61+
```
62+
Agent added: testing
63+
64+
Current agents: design, architect, api, testing
65+
66+
To assign features to this agent:
67+
/add-feature testing:test "Integration tests" Add integration test suite
68+
/reassign-feature API-003 testing
69+
```

.claude/commands/add-feature.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
description: Add a new feature to feature_list.json for tracking
3+
argument-hint: [agent:]<category> <name> <description>
4+
---
5+
6+
Add a new feature to the feature_list.json tracking file.
7+
8+
Arguments: $ARGUMENTS
9+
10+
Parse the arguments to extract:
11+
- agent (optional): If first word contains a colon, split it as `agent:category`
12+
- category: First word (e.g., "core", "security", "ui", "api", "test"), or after the colon if agent prefix used
13+
- name: Second word or phrase in quotes
14+
- description: Remaining text
15+
16+
## Steps:
17+
18+
1. Read the current feature_list.json
19+
20+
2. Check for multi-agent mode:
21+
- If `multi_agent_mode: true` and no agent prefix was provided, check if there's a `.current-agent` file
22+
- If neither exists, warn: "This project uses multi-agent mode. Use `/add-feature agent:category ...` or run `/session-start` first to set your agent role."
23+
24+
3. Determine the next feature ID:
25+
- Look at existing features in the same category
26+
- Generate ID like CATEGORY-NNN (e.g., CORE-003, SEC-001)
27+
- Use uppercase category prefix
28+
29+
4. If the category doesn't exist in "categories", add it with:
30+
- priority: "medium" (can be adjusted)
31+
- description: Infer from category name
32+
33+
5. Add the new feature with:
34+
- id: Generated ID
35+
- category: Provided category
36+
- assigned_to: Agent name if provided or from `.current-agent`, otherwise `null`
37+
- blocked_by: [] (empty array)
38+
- name: Provided name
39+
- description: Provided description
40+
- status: "failing" (new features start as failing)
41+
- file: "" (to be filled when implementing)
42+
- test_criteria: "" (to be filled when implementing)
43+
44+
6. Update the summary:
45+
- Increment total
46+
- Increment failing
47+
- Update last_updated to today
48+
49+
7. Show the added feature and updated summary
50+
51+
## Example usage:
52+
53+
### Single-agent mode (or unassigned):
54+
```
55+
/add-feature security "Input validation" Validate all user inputs to prevent injection attacks
56+
/add-feature ui "Dark mode toggle" Add toggle switch to enable dark mode theme
57+
```
58+
59+
### Multi-agent mode (with agent assignment):
60+
```
61+
/add-feature api:security "Rate limiting" Implement rate limits for API endpoints
62+
/add-feature design:ui "Dashboard layout" Create responsive dashboard grid
63+
/add-feature architect:core "Database schema" Design and implement database models
64+
```
65+
66+
The part before the colon is the agent role, the part after is the category.

.claude/commands/commit-push.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Commit all changes to git and push to the remote repository. Follow these steps:
2+
3+
1. Run `git status` to see all untracked and modified files
4+
2. Run `git diff` to see both staged and unstaged changes
5+
3. Run `git log -5 --oneline` to see recent commit messages for style reference
6+
4. Analyze the changes and draft a commit message that:
7+
- Summarizes the nature of the changes (new feature, enhancement, bug fix, refactoring, etc.)
8+
- Focuses on the "why" rather than the "what"
9+
- Is concise (1-2 sentences)
10+
- Follows the style of recent commits in this repository
11+
5. Add all relevant files to staging with `git add .` (exclude files that shouldn't be committed like .env, credentials.json, etc.)
12+
6. Create the commit with the message ending with:
13+
14+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
15+
16+
Co-Authored-By: Claude <noreply@anthropic.com>
17+
18+
7. Push the changes to the remote repository with `git push`
19+
8. Run `git status` after the push to verify success
20+
21+
IMPORTANT:
22+
- Do not create a commit if there are no changes
23+
- Warn the user if attempting to commit files that likely contain secrets
24+
- Use a HEREDOC to pass the commit message for proper formatting
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
description: Enable multi-agent mode for an existing project
3+
argument-hint: <agent1,agent2,...>
4+
---
5+
6+
Enable multi-agent mode for an existing project by adding agent roles to feature_list.json.
7+
8+
Arguments: $ARGUMENTS
9+
10+
Parse the comma-separated list of agent roles (e.g., `design,architect,api`).
11+
12+
## Prerequisites
13+
14+
- feature_list.json must exist (run `/init-harness` first if not)
15+
- Project should not already be in multi-agent mode
16+
17+
## Steps:
18+
19+
1. **Read current feature_list.json**
20+
21+
If file doesn't exist, error: "No feature_list.json found. Run `/init-harness` first."
22+
23+
If `multi_agent_mode` is already true, warn: "Project is already in multi-agent mode with agents: [list]. Use `/add-agent` to add more agents or manually edit feature_list.json."
24+
25+
2. **Parse agent roles from arguments**
26+
27+
Split by comma, trim whitespace, lowercase all roles.
28+
29+
If no agents provided, error: "Please specify agent roles. Example: `/enable-multi-agent design,architect,api`"
30+
31+
3. **Update feature_list.json**
32+
33+
Add to the root object:
34+
```json
35+
{
36+
"multi_agent_mode": true,
37+
"agents": ["agent1", "agent2", "agent3"]
38+
}
39+
```
40+
41+
4. **Handle existing features**
42+
43+
If features already exist, ask the user:
44+
45+
"You have [N] existing features. Would you like to assign them to agents now?"
46+
47+
Options:
48+
- **Yes, assign now** - For each feature, prompt which agent (or "unassigned")
49+
- **No, leave unassigned** - Set all existing features' `assigned_to` to `null`
50+
- **Assign by category** - Auto-assign based on category-to-agent mapping (prompt for mapping)
51+
52+
5. **Ensure feature schema compatibility**
53+
54+
For each existing feature, add if missing:
55+
- `assigned_to`: null (or assigned agent)
56+
- `blocked_by`: []
57+
58+
6. **Update summary**
59+
60+
- Update `last_updated` to today's date
61+
62+
7. **Display confirmation**
63+
64+
```
65+
Multi-agent mode enabled!
66+
67+
Agents: design, architect, api
68+
69+
Features:
70+
Assigned: X
71+
Unassigned: Y
72+
73+
Next steps:
74+
- Use `/add-feature agent:category "name" description` to add agent-assigned features
75+
- Run `/session-start` to select your agent role
76+
- Use `/reassign-feature FEAT-001 agent` to reassign features
77+
```
78+
79+
## Example usage:
80+
81+
```
82+
/enable-multi-agent design,architect,api
83+
```
84+
85+
Output:
86+
```
87+
Multi-agent mode enabled!
88+
89+
Agents: design, architect, api
90+
91+
You have 5 existing features. Would you like to assign them to agents?
92+
> Assign by category
93+
94+
Category mapping:
95+
ui → design
96+
core → architect
97+
api → api
98+
security → api
99+
100+
Features assigned:
101+
UI-001 → design
102+
CORE-001 → architect
103+
API-001, API-002 → api
104+
SEC-001 → api
105+
```

.claude/commands/history.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
description: Browse and display files from the session history folder
3+
argument-hint: [filename]
4+
---
5+
6+
Read and display a file from the `docs/history/` directory.
7+
8+
File to view: $ARGUMENTS
9+
10+
## Steps
11+
12+
1. Locate the file at `docs/history/$ARGUMENTS`
13+
2. Display the content (renders images visually, shows markdown/text inline)
14+
15+
## Examples
16+
17+
```bash
18+
/history SESSION-2025-08-01-monthly-insights.md
19+
/history project-architecture-flowchart.svg
20+
/history napkin-insights-mockup.png
21+
```
22+
23+
## Notes
24+
25+
- Works with any file type (markdown, images, text files, SVGs, etc.)
26+
- Images are displayed visually in the interface
27+
- Markdown and text files show their content
28+
- Use this to review past session notes, decisions, and project documentation
29+
- File path is relative to the `docs/history/` directory

0 commit comments

Comments
 (0)