diff --git a/harnesses/contexts/best-practices/v1/harness.yaml b/harnesses/contexts/best-practices/v1/harness.yaml index 18e55b1..3bcde96 100644 --- a/harnesses/contexts/best-practices/v1/harness.yaml +++ b/harnesses/contexts/best-practices/v1/harness.yaml @@ -7,4 +7,4 @@ provides: [best-practices] context_files: - source: ./best-practices/ - target: /opt/harness/context/best-practices/ + target: /workspace/best-practices/ diff --git a/harnesses/contexts/code-methodology/v1/CLAUDE.md b/harnesses/contexts/code-methodology/v1/CLAUDE.md index 3dfe900..f145f6c 100644 --- a/harnesses/contexts/code-methodology/v1/CLAUDE.md +++ b/harnesses/contexts/code-methodology/v1/CLAUDE.md @@ -4,21 +4,21 @@ Before starting any task: -1. Check if `/best-practices/INDEX.md` exists +1. Check if `/workspace/best-practices/INDEX.md` exists 2. If it exists, read it to see available topics 3. Identify relevant topics for the current task: - Python task → read `test-driven-development.md`, `spec-driven-development.md` - Kubernetes task → read `kubernetes.md` - Shell scripts → read `scripting.md` -4. Read the relevant topic files from `/best-practices/` +4. Read the relevant topic files from `/workspace/best-practices/` 5. Apply those practices to your work -If `/best-practices/` doesn't exist, proceed without — it's not mandatory. +If `/workspace/best-practices/` doesn't exist, proceed without — it's not mandatory. ## Spec-Driven Development Workflow 1. **Read the spec** — Read relevant files in `spec/` before writing any code -2. **Write tests first** — Create test cases from spec requirements before implementing (see `best-practices/test-driven-development.md` and `best-practices/spec-driven-development.md` if available) +2. **Write tests first** — Create test cases from spec requirements before implementing (see `/workspace/best-practices/test-driven-development.md` and `/workspace/best-practices/spec-driven-development.md` if available) 3. **Implement iteratively** — Build implementation to satisfy tests and spec 4. **Write session log** — Document what was accomplished, decisions made, and gotchas discovered diff --git a/harnesses/contexts/planning/v1/CLAUDE.md b/harnesses/contexts/planning/v1/CLAUDE.md index 8dd026b..af737fe 100644 --- a/harnesses/contexts/planning/v1/CLAUDE.md +++ b/harnesses/contexts/planning/v1/CLAUDE.md @@ -4,7 +4,7 @@ You are a planning and specification agent. Your job is to produce high-quality ## Best Practices -Read these before starting any planning task. They are mounted at `/opt/harness/context/best-practices/`: +Read these before starting any planning task. They are mounted at `/workspace/best-practices/`: | File | When to read | |---|---| @@ -22,8 +22,8 @@ Read at minimum the four "Always" files. Read others based on the task domain. ## Output Conventions -- **If `/workspace/working/` exists** (agent-repo mode): write output files directly into the working directory (e.g., `/workspace/working/spec/auth.md`). Edit existing files in place. Your changes will be auto-committed and pushed by the finalize script. -- **If `/workspace/working/` does not exist**: write output to `/workspace/.agent-output/output.md` +- **If `/workspace/project/` exists** (agent-repo mode): write output files directly into the working directory (e.g., `/workspace/project/spec/auth.md`). Edit existing files in place. Your changes will be auto-committed and pushed by the finalize script. +- **If `/workspace/project/` does not exist**: write output to `/workspace/.agent-output/output.md` - Use structured markdown with clear section headings - Number all requirements with a prefix (e.g., `WF-1`, `AU-1`) — each must be independently testable - Every requirement needs a "Why:" rationale @@ -41,7 +41,7 @@ Read at minimum the four "Always" files. Read others based on the task domain. ## Session Logging -Write a brief session log to `/workspace/.agent-output/session-log.md` (or `/workspace/working/memory/log/` in agent-repo mode) with: +Write a brief session log to `/workspace/.agent-output/session-log.md` (or `/workspace/project/memory/log/` in agent-repo mode) with: - **Summary**: What was produced - **Key Decisions**: Design choices made and rationale - **Open Questions**: Anything that needs human input diff --git a/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md b/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md index b30a83c..c4b4462 100644 --- a/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md +++ b/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md @@ -41,13 +41,13 @@ If a directory or file does not exist where you expect it: do not debug the envi ## Best practices -This container has cross-project best practices mounted at `/opt/harness/context/best-practices/`. **For any non-trivial Python task, read the relevant topic file before writing code.** +This container has cross-project best practices mounted at `/workspace/best-practices/`. **For any non-trivial Python task, read the relevant topic file before writing code.** -- `/opt/harness/context/best-practices/python-patterns.md` — Pydantic v2 validators, `threading.Lock` vs `RLock`, `extra='ignore'` silent drops, subprocess mocking, `model_validator`, packaging -- `/opt/harness/context/best-practices/test-driven-development.md` — for tasks that involve writing tests -- `/opt/harness/context/best-practices/spec-driven-development.md` — when a `spec/` file is referenced -- `/opt/harness/context/best-practices/security-architecture.md` — for anything touching auth, credentials, or external boundaries -- `/opt/harness/context/best-practices/BESTPRACTICES.md` — index of all topics +- `/workspace/best-practices/python-patterns.md` — Pydantic v2 validators, `threading.Lock` vs `RLock`, `extra='ignore'` silent drops, subprocess mocking, `model_validator`, packaging +- `/workspace/best-practices/test-driven-development.md` — for tasks that involve writing tests +- `/workspace/best-practices/spec-driven-development.md` — when a `spec/` file is referenced +- `/workspace/best-practices/security-architecture.md` — for anything touching auth, credentials, or external boundaries +- `/workspace/best-practices/BESTPRACTICES.md` — index of all topics ## Python conventions (this codebase) diff --git a/harnesses/contexts/security-review/v1/CLAUDE.md b/harnesses/contexts/security-review/v1/CLAUDE.md index 8408ae0..0441b39 100644 --- a/harnesses/contexts/security-review/v1/CLAUDE.md +++ b/harnesses/contexts/security-review/v1/CLAUDE.md @@ -4,7 +4,7 @@ You are a security review agent. Your job is to audit code, specs, and infrastru ## Required Reading -Before starting any review, read these from `/opt/harness/context/best-practices/`: +Before starting any review, read these from `/workspace/best-practices/`: | File | Priority | |---|---| @@ -49,7 +49,7 @@ Write your review to the working directory as `security-review.md` with: ## Session Logging -Write a brief session log to `/workspace/.agent-output/session-log.md` (or `/workspace/working/memory/log/` in agent-repo mode) with: +Write a brief session log to `/workspace/.agent-output/session-log.md` (or `/workspace/project/memory/log/` in agent-repo mode) with: - **Summary**: What was reviewed, finding count by severity - **Key Findings**: Top 3 most important findings - **Open Questions**: Areas that need human judgment diff --git a/harnesses/contexts/spec-writing/v1/CLAUDE.md b/harnesses/contexts/spec-writing/v1/CLAUDE.md index 42ed78d..fa2a009 100644 --- a/harnesses/contexts/spec-writing/v1/CLAUDE.md +++ b/harnesses/contexts/spec-writing/v1/CLAUDE.md @@ -4,7 +4,7 @@ You are a specification writing agent. Your job is to produce detailed, testable ## Required Reading -Before starting any spec, read these from `/opt/harness/context/best-practices/`: +Before starting any spec, read these from `/workspace/best-practices/`: | File | Priority | |---|---| @@ -43,10 +43,10 @@ Every spec must follow this structure: ## Output Conventions -- **If `/workspace/working/` exists** (agent-repo mode): write spec files to `/workspace/working/spec/.md`. Edit existing specs in place. -- **If `/workspace/working/` does not exist**: write to `/workspace/.agent-output/output.md` +- **If `/workspace/project/` exists** (agent-repo mode): write spec files to `/workspace/project/spec/.md`. Edit existing specs in place. +- **If `/workspace/project/` does not exist**: write to `/workspace/.agent-output/output.md` - **NEVER write to `/workspace/spec/`** — that path is outside the git working tree and the file will not be committed. -- **NEVER write to `/workspace/.agent-output/` when `/workspace/working/` exists** — that directory is gitignored. +- **NEVER write to `/workspace/.agent-output/` when `/workspace/project/` exists** — that directory is gitignored. - Use the project's existing requirement prefix convention if one exists - Cross-reference other specs by filename when declaring dependencies @@ -54,9 +54,9 @@ Every spec must follow this structure: Before writing your session log and exiting, run these checks: -1. `ls /workspace/working/spec/.md` — confirm the file exists at the correct path -2. `cd /workspace/working && git status` — confirm the file appears as untracked or modified (not ignored) -3. If the file does NOT appear in `git status`, you wrote it to the wrong path — move it to `/workspace/working/spec/` before exiting +1. `ls /workspace/project/spec/.md` — confirm the file exists at the correct path +2. `cd /workspace/project && git status` — confirm the file appears as untracked or modified (not ignored) +3. If the file does NOT appear in `git status`, you wrote it to the wrong path — move it to `/workspace/project/spec/` before exiting ## What NOT to Do @@ -67,7 +67,7 @@ Before writing your session log and exiting, run these checks: ## Session Logging -Write a brief session log to `/workspace/working/memory/log/.