<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claudomator.git/internal/api/elaborate_test.go, branch story/task-project-fk</title>
<subtitle>claudomator — task automation server
</subtitle>
<id>https://git.terst.org/claudomator.git/atom?h=story%2Ftask-project-fk</id>
<link rel='self' href='https://git.terst.org/claudomator.git/atom?h=story%2Ftask-project-fk'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/'/>
<updated>2026-03-26T04:10:35+00:00</updated>
<entry>
<title>fix: story tasks get Project field; elaborate reads worklog; deploy chmod scripts</title>
<updated>2026-03-26T04:10:35+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-26T04:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=b6e420a62a3e7e81a6f5d2819f12cca11b82e572'/>
<id>urn:sha1:b6e420a62a3e7e81a6f5d2819f12cca11b82e572</id>
<content type='text'>
- handleApproveStory: set Project = input.ProjectID on tasks and subtasks so
  the executor can resolve RepositoryURL from the project registry (was causing
  "task has no repository_url" on every story task)
- elaborate.go: read .agent/worklog.md instead of SESSION_STATE.md for project
  context injected into elaboration prompts
- deploy: explicitly chmod +x all scripts before restart (same root cause as
  the binary execute-bit loss — chown -R was stripping it)

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: repair test regressions and add pre-commit/pre-push verification gates</title>
<updated>2026-03-16T19:46:44+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-16T19:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=17a36cc83980d278a8cab5132bf14de731b352ca'/>
<id>urn:sha1:17a36cc83980d278a8cab5132bf14de731b352ca</id>
<content type='text'>
Fix four pre-existing bugs exposed after resolving a build failure:
- sandboxCloneSource: accept any URL scheme for origin remote (was filtering out https://)
- setupSandbox callers: fix := shadow variable so sandboxDir is set on BlockedError
- parseGeminiStream: parse result lines to return execution errors and cost
- TestElaborateTask_InvalidJSONFromClaude: stub Gemini fallback so test is hermetic

Add verification infrastructure:
- scripts/verify: runs go build + go test -race, used by hooks and deploy
- scripts/hooks/pre-commit: blocks commits that don't compile
- scripts/hooks/pre-push: blocks pushes where tests fail
- scripts/install-hooks: symlinks version-controlled hooks into .git/hooks/
- scripts/deploy: runs scripts/verify before building the binary

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: only write RAW_NARRATIVE.md when user explicitly provides project_dir</title>
<updated>2026-03-13T05:27:58+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-13T05:27:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=c602ddd799d94bf3bbd35a57b98ad09e28df8ee9'/>
<id>urn:sha1:c602ddd799d94bf3bbd35a57b98ad09e28df8ee9</id>
<content type='text'>
Previously appendRawNarrative was called with the server's default workDir
(os.Getwd()) when no project_dir was in the request, causing test runs and
any elaboration without a project to pollute the repo's own RAW_NARRATIVE.md.

The narrative is per-project human input — only write it when the caller
explicitly specifies which project they're working in.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: post-elaboration sanity check for tools, acceptance criteria, and dev practices</title>
<updated>2026-03-13T03:14:53+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-13T03:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=b9aba3d242482fa9cd42f2a49b2767a73d4d2213'/>
<id>urn:sha1:b9aba3d242482fa9cd42f2a49b2767a73d4d2213</id>
<content type='text'>
Add sanitizeElaboratedTask() called after every elaboration response:
- Infers missing allowed_tools from instruction keywords (Write/Edit/Read/Bash/Grep/Glob)
- Auto-adds Read when Edit is present
- Appends Acceptance Criteria section if none present
- Appends TDD reminder for coding tasks without test mention

Also tighten buildElaboratePrompt to require acceptance criteria and
list concrete tool examples, reducing how often the model omits tools.

Fixes class of failures where agents couldn't create files because
the elaborator omitted Write from allowed_tools.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: append verbatim user input to docs/RAW_NARRATIVE.md</title>
<updated>2026-03-10T09:33:55+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-10T09:33:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=e392f99727aa2f399033896f2cda5b22e3277700'/>
<id>urn:sha1:e392f99727aa2f399033896f2cda5b22e3277700</id>
<content type='text'>
The elaborator now logs every user prompt to docs/RAW_NARRATIVE.md within the project directory. This is done in a background goroutine to ensure it doesn't delay the response.
</content>
</entry>
<entry>
<title>feat: include project context in elaborator prompt</title>
<updated>2026-03-10T09:29:02+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-10T09:09:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=63ccc3380df10cab066e08b40ea41ee1b51bb651'/>
<id>urn:sha1:63ccc3380df10cab066e08b40ea41ee1b51bb651</id>
<content type='text'>
The elaborator now reads CLAUDE.md and SESSION_STATE.md from the project directory (if they exist) and prepends their content to the user prompt. This allows the AI to generate tasks that are more context-aware.
</content>
</entry>
<entry>
<title>merge: pull latest from master and resolve conflicts</title>
<updated>2026-03-08T21:03:50+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-08T21:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=632ea5a44731af94b6238f330a3b5440906c8ae7'/>
<id>urn:sha1:632ea5a44731af94b6238f330a3b5440906c8ae7</id>
<content type='text'>
- Resolve conflicts in API server, CLI, and executor.
- Maintain Gemini classification and assignment logic.
- Update UI to use generic agent config and project_dir.
- Fix ProjectDir/WorkingDir inconsistencies in Gemini runner.
- All tests passing after merge.
</content>
</entry>
<entry>
<title>feat: rename working_dir→project_dir; git sandbox execution</title>
<updated>2026-03-08T20:16:00+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-08T20:16:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=1f36e2312d316969db65a601ac7d9793fbc3bc4c'/>
<id>urn:sha1:1f36e2312d316969db65a601ac7d9793fbc3bc4c</id>
<content type='text'>
- ClaudeConfig.WorkingDir → ProjectDir (json: project_dir)
- UnmarshalJSON fallback reads legacy working_dir from DB records
- New executions with project_dir clone into a temp sandbox via git clone --local
- Non-git project_dirs get git init + initial commit before clone
- After success: verify clean working tree, merge --ff-only back to project_dir, remove sandbox
- On failure/BLOCKED: sandbox preserved, path included in error message
- Resume executions run directly in project_dir (no re-clone)

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>test(api): update elaborate and validate tests to use AgentConfig</title>
<updated>2026-03-08T06:27:34+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-07T23:54:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=c6ce11e17af9a4b62bbbc082e5f13bb3a3b656a6'/>
<id>urn:sha1:c6ce11e17af9a4b62bbbc082e5f13bb3a3b656a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix working_dir failures: validate path early, remove hardcoded /root</title>
<updated>2026-03-03T21:22:30+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-03-03T21:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/claudomator.git/commit/?id=3962597950421e422b6e1ce57764550f5600ded6'/>
<id>urn:sha1:3962597950421e422b6e1ce57764550f5600ded6</id>
<content type='text'>
executor/claude.go: stat working_dir before cmd.Start() so a missing
or inaccessible directory surfaces as a clear error
("working_dir \"/bad/path\": no such file or directory") rather than
an opaque chdir failure wrapped in "starting claude".

api/elaborate.go: replace the hardcoded /root/workspace/claudomator
path with buildElaboratePrompt(workDir) which injects the server's
actual working directory (from os.Getwd() at startup). Empty workDir
tells the model to leave working_dir blank.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
