Skip to content

Commit 90fba15

Browse files
authored
Merge pull request #194 from julwrites/update-agent-harness-conventions-6785800100351272232
2 parents 146ab15 + 00fd63b commit 90fba15

39 files changed

Lines changed: 478 additions & 2515 deletions

.claude/hooks/session-start.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Wrapper for the Python SessionStart hook
3+
# $CLAUDE_PROJECT_DIR is provided by Claude, but we can fallback to PWD
4+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
5+
python3 "$PROJECT_DIR/scripts/hooks/session_start.py"

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"matcher": ".*",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(python3:*)"
5+
],
6+
"deny": [],
7+
"ask": []
8+
}
9+
}

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
secrets.yaml
21
__pycache__/
32
*.pyc
43
*.pyo
@@ -8,3 +7,9 @@ env/
87
venv/
98
.env
109
.DS_Store
10+
11+
.agents/registry/*.json
12+
.agents/messages/**/*.json
13+
!.agents/**/.keep
14+
logs/
15+
.agents/

AGENTS.md

Lines changed: 4 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,13 @@
11
# AI Agent Instructions
22

3-
You are an expert Software Engineer working on this project. Your primary responsibility is to implement features and fixes while strictly adhering to the **Task Documentation System**.
3+
You are an expert Software Engineer working on this project. Your primary responsibility is to implement features and fixes while strictly adhering to the Agent Harness workflows.
44

5-
## Core Philosophy
6-
**"If it's not documented in `docs/tasks/`, it didn't happen."**
7-
8-
## Workflow
9-
1. **Pick a Task**: Run `python3 scripts/tasks.py next` to find the best task, `context` to see active tasks, or `list` to see pending ones.
10-
2. **Plan & Document**:
11-
* **Memory Check**: Run `python3 scripts/memory.py list` (or use the Memory Skill) to recall relevant long-term information.
12-
* **Security Check**: Ask the user about specific security considerations for this task.
13-
* If starting a new task, use `scripts/tasks.py create` (or `python3 scripts/tasks.py create`) to generate a new task file.
14-
* Update the task status: `python3 scripts/tasks.py update [TASK_ID] in_progress`.
15-
3. **Implement**: Write code, run tests.
16-
4. **Update Documentation Loop**:
17-
* As you complete sub-tasks, check them off in the task document.
18-
* If you hit a blocker, update status to `wip_blocked` and describe the issue in the file.
19-
* Record key architectural decisions in the task document.
20-
* **Memory Update**: If you learn something valuable for the long term, use `scripts/memory.py create` to record it.
21-
5. **Review & Verify**:
22-
* Once implementation is complete, update status to `review_requested`: `python3 scripts/tasks.py update [TASK_ID] review_requested`.
23-
* Ask a human or another agent to review the code.
24-
* Once approved and tested, update status to `verified`.
25-
6. **Finalize**:
26-
* Update status to `completed`: `python3 scripts/tasks.py update [TASK_ID] completed`.
27-
* Record actual effort in the file.
28-
* Ensure all acceptance criteria are met.
29-
30-
## Tools
31-
* **Wrapper**: `./scripts/tasks` (Checks for Python, recommended).
32-
* **Next**: `./scripts/tasks next` (Finds the best task to work on).
33-
* **Create**: `./scripts/tasks create [category] "Title"`
34-
* **List**: `./scripts/tasks list [--status pending]`
35-
* **Context**: `./scripts/tasks context`
36-
* **Update**: `./scripts/tasks update [ID] [status]`
37-
* **Migrate**: `./scripts/tasks migrate` (Migrate legacy tasks to new format)
38-
* **Link**: `./scripts/tasks link [ID] [DEP_ID]` (Add dependency).
39-
* **Unlink**: `./scripts/tasks unlink [ID] [DEP_ID]` (Remove dependency).
40-
* **Index**: `./scripts/tasks index` (Generate INDEX.yaml).
41-
* **Graph**: `./scripts/tasks graph` (Visualize dependencies).
42-
* **Validate**: `./scripts/tasks validate` (Check task files).
43-
* **Memory**: `./scripts/memory.py [create|list|read]`
44-
* **JSON Output**: Add `--format json` to any command for machine parsing.
45-
46-
## Documentation Reference
47-
* **Guide**: Read `docs/tasks/GUIDE.md` for strict formatting and process rules.
48-
* **Architecture**: Refer to `docs/architecture/` for system design.
49-
* **Features**: Refer to `docs/features/` for feature specifications.
50-
* **Security**: Refer to `docs/security/` for risk assessments and mitigations.
51-
* **Memories**: Refer to `docs/memories/` for long-term project context.
52-
53-
## Code Style & Standards
54-
* Follow the existing patterns in the codebase.
55-
* Ensure all new code is covered by tests (if testing infrastructure exists).
56-
57-
## PR Review Methodology
58-
When performing a PR review, follow this "Human-in-the-loop" process to ensure depth and efficiency.
59-
60-
### 1. Preparation
61-
1. **Create Task**: `python3 scripts/tasks.py create review "Review PR #<N>: <Title>"`
62-
2. **Fetch Details**: Use `gh` to get the PR context.
63-
* `gh pr view <N>`
64-
* `gh pr diff <N>`
65-
66-
### 2. Analysis & Planning (The "Review Plan")
67-
**Do not review line-by-line yet.** Instead, analyze the changes and document a **Review Plan** in the task file (or present it for approval).
68-
69-
Your plan must include:
70-
* **High-Level Summary**: Purpose, new APIs, breaking changes.
71-
* **Dependency Check**: New libraries, maintenance status, security.
72-
* **Impact Assessment**: Effect on existing code/docs.
73-
* **Focus Areas**: Prioritized list of files/modules to check.
74-
* **Suggested Comments**: Draft comments for specific lines.
75-
* Format: `File: <path> | Line: <N> | Comment: <suggestion>`
76-
* Tone: Friendly, suggestion-based ("Consider...", "Nit: ...").
77-
78-
### 3. Execution
79-
Once the human approves the plan and comments:
80-
1. **Pending Review**: Create a pending review using `gh`.
81-
* `COMMIT_SHA=$(gh pr view <N> --json headRefOid -q .headRefOid)`
82-
* `gh api repos/{owner}/{repo}/pulls/{N}/reviews -f commit_id="$COMMIT_SHA"`
83-
2. **Batch Comments**: Add comments to the pending review.
84-
* `gh api repos/{owner}/{repo}/pulls/{N}/comments -f body="..." -f path="..." -f commit_id="$COMMIT_SHA" -F line=<L> -f side="RIGHT"`
85-
3. **Submit**:
86-
* `gh pr review <N> --approve --body "Summary..."` (or `--request-changes`).
87-
88-
### 4. Close Task
89-
* Update task status to `completed`.
90-
91-
## Project Specific Instructions
92-
93-
### Core Directives
5+
## Core Directives
946
- **API First**: The Bible AI API is the primary source for data. Scraping (`pkg/app/passage.go` fallback) is deprecated and should be avoided for new features.
957
- **Secrets**: Do not commit secrets. Use `pkg/secrets` to retrieve them from Environment or Google Secret Manager.
968
- **Testing**: Run tests from the root using `go test ./pkg/...`.
979

98-
### Code Guidelines
10+
## Code Guidelines
9911
- **Go Version**: 1.24+
10012
- **Naming**:
10113
- Variables: `camelCase`
@@ -106,12 +18,7 @@ Once the human approves the plan and comments:
10618
- `pkg/bot`: Platform integration.
10719
- `pkg/utils`: Shared utilities.
10820

109-
### Local Development
21+
## Local Development
11022
- **Setup**: Create a `.env` file with `TELEGRAM_ID` and `TELEGRAM_ADMIN_ID`.
11123
- **Run**: `go run main.go`
11224
- **Testing**: Use `ngrok` to tunnel webhooks or send mock HTTP requests.
113-
114-
## Agent Interoperability
115-
- **Task Manager Skill**: `.claude/skills/task_manager/`
116-
- **Memory Skill**: `.claude/skills/memory/`
117-
- **Tool Definitions**: `docs/interop/tool_definitions.json`

AGENTS.md.bak

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

CLAUDE.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)