Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

## After completing any code change

1. Show me the full `git diff` for review
2. Wait for my explicit approval before proceeding
3. Once approved:
- Rebase from `main` before committing (`git fetch origin && git rebase origin/main`)
- **If the current branch has an open PR**, push to that branch to update the existing PR.
- **If the current branch's PR is already merged** (or there is no PR), pull the latest `main` (`git checkout main && git pull origin main`), then create a fresh branch from `main` and open a new PR.
- Never reuse a branch whose PR has been merged. Each merged PR keeps its own branch.
1. Rebase from `main` before committing (`git fetch origin && git rebase origin/main`)
2. **If the current branch has an open PR**, push to that branch to update the existing PR.
3. **If the current branch's PR is already merged** (or there is no PR), pull the latest `main` (`git checkout main && git pull origin main`), then create a fresh branch from `main` and open a new PR.
4. Never reuse a branch whose PR has been merged. Each merged PR keeps its own branch.
4 changes: 4 additions & 0 deletions claude_code/wrapper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ func cmdBuild(args []string) {
cmd = append(cmd, "--dangerously-skip-permissions")
}

// Stream-json output format: emits JSONL to stdout, including a final
// "result" message with token usage data for cost tracking.
cmd = append(cmd, "--output-format", "stream-json")

// Disallow Claude Code's native scheduling tools — StrawPot manages
// scheduling through its own orchestrator (denden).
cmd = append(cmd, "--disallowedTools", "CronCreate,CronDelete,CronList")
Expand Down
19 changes: 19 additions & 0 deletions claude_code/wrapper/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,25 @@ func TestCmdBuild_DangerouslySkipPermissions_Disabled(t *testing.T) {
}
}

func TestCmdBuild_StreamJsonOutputFormat(t *testing.T) {
tmpDir := t.TempDir()
wsDir := filepath.Join(tmpDir, "workspace")

args := []string{
"--agent-workspace-dir", wsDir,
}

output := captureBuildOutput(t, args)

var result map[string]interface{}
if err := json.Unmarshal(output, &result); err != nil {
t.Fatalf("Failed to parse JSON output: %v", err)
}

cmd := result["cmd"].([]interface{})
assertSequence(t, cmd, "--output-format", "stream-json")
}

func TestCmdBuild_DisallowedSchedulingTools(t *testing.T) {
tmpDir := t.TempDir()
wsDir := filepath.Join(tmpDir, "workspace")
Expand Down
Loading