Commit graph

59 commits

Author SHA1 Message Date
Claude
04ff8a6e85 fix: bug: architect pitch prompt guardrail is prose-only — model bypasses "NEVER call Forgejo API" via Bash tool; fix via permission scoping + PR-driven sub-issue filing (#764)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/pr/smoke-init Pipeline failed
Shift the guardrail from prose prompt constraints into Forgejo's permission
layer. architect-bot loses all write access on the project repo (now read-only
for context gathering). Sub-issues are produced by a new filer-bot identity
that runs only after a human merges a sprint PR on the ops repo.

Changes:
- architect-run.sh: remove all project-repo writes (add_inprogress_label,
  close_vision_issue, check_and_close_completed_visions); add ## Sub-issues
  block to pitch format with filer:begin/end markers
- formulas/run-architect.toml: add Sub-issues schema to pitch format; strip
  issue-creation API refs; document read-only constraint on project repo
- lib/formula-session.sh: remove Create issue curl template from
  build_prompt_footer (architect cannot create issues)
- lib/sprint-filer.sh (new): parser + idempotent filer using FORGE_FILER_TOKEN;
  parses filer:begin/end blocks, creates issues with decomposed-from markers,
  adds in-progress label, handles vision lifecycle closure
- .woodpecker/ops-filer.yml (new): CI pipeline on ops repo main-branch push
  that invokes sprint-filer.sh after sprint PR merge
- lib/env.sh, .env.example, docker-compose.yml: add FORGE_FILER_TOKEN for
  filer-bot identity; add filer-bot to FORGE_BOT_USERNAMES
- AGENTS.md: add Filer agent entry; update in-progress label docs
- .woodpecker/agent-smoke.sh: register sprint-filer.sh for smoke test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 07:41:16 +00:00
Claude
aff9f0fcef fix: bug: architect FORGE_TOKEN override nullified when env.sh re-sources .env — agent actions authored as dev-bot (#762)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
Use FORGE_TOKEN_OVERRIDE (set before sourcing env.sh) instead of
post-source FORGE_TOKEN reassignment in all five agent run scripts.
The override mechanism in lib/env.sh:98-100 survives re-sourcing from
nested shells and claude -p tool invocations.

Affected scripts: architect-run.sh, planner-run.sh, gardener-run.sh,
predictor-run.sh, supervisor-run.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 07:15:28 +00:00
Claude
0b4905af3d chore: gardener housekeeping 2026-04-15
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-15 04:08:04 +00:00
Claude
32420c619d chore: gardener housekeeping 2026-04-15
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-15 03:00:40 +00:00
Claude
5733a10858 chore: gardener housekeeping 2026-04-14
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-14 22:54:30 +00:00
Claude
05bc926906 chore: gardener housekeeping 2026-04-13
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
2026-04-13 11:36:50 +00:00
Claude
246ed9050d chore: gardener housekeeping 2026-04-12
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-12 06:28:02 +00:00
Claude
3f8c0321ed fix: tech-debt: close_vision_issue state=closed PATCH swallows errors — stuck-open vision issues after idempotency guard (#737)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 06:06:25 +00:00
Claude
0c4f00a86c chore: gardener housekeeping 2026-04-12
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-12 05:19:57 +00:00
Claude
e275c35fa8 fix: bug: architect close-vision lifecycle matches unrelated sub-issues — spams false completion comments (#735)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 04:41:12 +00:00
Claude
aeda17a601 chore: gardener housekeeping 2026-04-12
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-12 04:08:10 +00:00
Claude
0bc027a25a chore: gardener housekeeping 2026-04-12
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-12 02:43:22 +00:00
Claude
a8bf40d100 chore: gardener housekeeping 2026-04-12
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-12 01:16:08 +00:00
Claude
1e3862d24b fix: bug: architect-run.sh has_responses_to_process only checks comments, ignores formal APPROVED reviews (#718)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 00:37:49 +00:00
Claude
627496b6f2 fix: bug: architect-run.sh existing-PR check builds malformed URL — ${FORGE_API}/repos/… duplicates the repos segment (#717)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
Introduce FORGE_API_BASE (bare API root without repo path) in lib/env.sh
and lib/load-project.sh. Replace all cross-repo curl calls in
architect-run.sh that incorrectly used ${FORGE_API}/repos/${FORGE_OPS_REPO}
(which expanded to .../repos/owner/repo/repos/owner/ops-repo) with
${FORGE_API_BASE}/repos/${FORGE_OPS_REPO}.

Also fix a same-repo label URL that duplicated the repos segment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 00:21:55 +00:00
2f75478aab Merge pull request 'fix: bug: architect-run.sh empty pitch — pitch_output=$(agent_run …) captures stdout but new agent_run writes to side-channels (#716)' (#720) from fix/issue-716 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2026-04-12 00:16:05 +00:00
Claude
cb9381f1e4 fix: bug: architect-run.sh empty pitch — pitch_output=$(agent_run …) captures stdout but new agent_run writes to side-channels (#716)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Three fixes:

1. architect-run.sh:722 — extract `.result` not `.content` from claude JSON
   output. All other callers (dev-agent, formula-session) use `.result`;
   this was the direct cause of every pitch being empty.

2. lib/agent-sdk.sh — reset `_AGENT_LAST_OUTPUT=""` at the top of each
   `agent_run` call so stale data from a prior invocation can't bleed
   into the next caller when claude crashes or returns empty.

3. lib/agent-sdk.sh — scope the diagnostics file by `$LOG_AGENT` instead
   of hardcoding `dev/`. Concurrent agents (architect, gardener, planner,
   predictor) no longer clobber each other's diag output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 00:04:42 +00:00
Claude
0cd20e8eea chore: gardener housekeeping 2026-04-11
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-11 23:43:09 +00:00
Claude
9acd0a2bc4 chore: gardener housekeeping 2026-04-11
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-11 22:28:49 +00:00
31399e193f Merge pull request 'fix: bug: architect-run.sh uses old agent_run() signature, all pitches fail with "Input must be provided" (#690)' (#696) from fix/issue-690 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2026-04-11 22:10:44 +00:00
Claude
474b6a71d0 fix: remove state filter from Method 1 sub-issue discovery
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
- Removed state=closed filter so all issues with "Decomposed from #N" are found
- Per-issue state check in all_subissues_closed() correctly handles open/closed
2026-04-11 22:04:09 +00:00
Claude
e4dbe68317 fix: read pitch output from $_AGENT_LAST_OUTPUT, not stdout (#690)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
agent_run() stores its output in $_AGENT_LAST_OUTPUT but never emits
it to stdout. The old subshell capture always yielded an empty string,
so pitches silently failed even after the signature fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 21:59:36 +00:00
Claude
ef89b64f5f fix: bug: architect-run.sh uses old agent_run() signature, all pitches fail with "Input must be provided" (#690)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
agent_run() now adds -p, --output-format, --max-turns, --dangerously-skip-permissions,
and --model internally. The old call site passed these flags explicitly, causing the
prompt to be parsed as "-p" and claude to error with "Input must be provided".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 21:52:38 +00:00
Claude
1c3e3cd660 fix: correct newline formatting and sub-issue discovery in architect
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
- Use $'\n' instead of literal \n in summary comment builder
- Query closed issues in Method 1 to find sub-issues regardless of state
- Document automated vision issue closure lifecycle in AGENTS.md
2026-04-11 21:52:06 +00:00
Claude
f037ae1892 fix: architect closes parent vision issue when all sprint sub-issues complete (#689)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-11 21:38:53 +00:00
Claude
f9461ceea8 fix: fix: architect should close parent vision issue when all sprint sub-issues complete (#689)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
2026-04-11 21:30:18 +00:00
Claude
eb3327d2c9 chore: gardener housekeeping 2026-04-11
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-11 20:45:04 +00:00
Claude
c7168b58e5 fix: bug: architect-run.sh exits silently — runs git from baked /home/agent/disinto which is not a git repo (#569)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-10 12:36:51 +00:00
Claude
99d430a0c2 fix: bug: architect has no path for approved PRs awaiting initial design questions (#570)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Implementation:
- Added detect_approved_pending_questions() function to identify approved PRs
  that have no ## Design forks section and no Q1:, Q2: comments yet.
- Modified response processing block to handle three session modes:
  1. questions_phase: Resume session for processing Q&A answers
  2. start_questions: Fresh session to post initial design questions
  3. pitch: Original behavior for new pitch generation
- Added build_architect_prompt_for_mode() function to generate appropriate
  prompts for each session mode.
- When an approved PR is detected, the agent posts initial design questions
  (Q1:, Q2:, etc.) and adds the ## Design forks section, transitioning the
  PR into the existing questions phase.

This fixes the issue where approved architect PRs would sit indefinitely
because the agent had no path to start the design conversation.
2026-04-10 11:30:46 +00:00
Claude
f0c3c773ff fix: tech-debt: sweep cron-isms from code comments, helpers, lib, and public site copy (#548)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
- Rename acquire_cron_lock → acquire_run_lock in lib/formula-session.sh
  and all five *-run.sh call sites
- Update all *-run.sh file headers: "Cron wrapper" → "Polling-loop wrapper"
- Rewrite docs/updating-factory.md: replace crontab check with pgrep,
  replace "Crontab empty after restart" section with polling-loop equivalent
- Update docs/EVAL-MCP-SERVER.md to reflect polling-loop reality
- Update lib/guard.sh, lib/AGENTS.md, lib/ci-setup.sh comments
- Update formulas/*.toml comments (cron → polling loop)
- Update dev/dev-poll.sh usage comment
- Update tests/smoke-init.sh to handle compose vs bare-metal scheduling
- Update .woodpecker/agent-smoke.sh comments
- Update site HTML: architecture.html, quickstart.html, index.html
- Clarify _install_cron_impl is bare-metal only (compose uses polling loop)
- Keep site/collect-engagement.sh and site/collect-metrics.sh cron refs
  (genuinely cron-driven on the website host, separate from factory loop)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:54:11 +00:00
Claude
6a6d2d0774 fix: docs: per-agent AGENTS.md files still describe cron triggers (#547)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-10 08:35:19 +00:00
Agent
ac1b49767d fix: architect: jq integer/string type mismatch in has_open_subissues self-exclusion filter (#499)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 15:11:50 +00:00
Agent
a72ab8b121 fix: architect: has_responses_to_process not set when open_arch_prs < 3 (#498)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 14:57:24 +00:00
Claude
6971371e27 chore: gardener housekeeping 2026-04-09
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 14:24:52 +00:00
Agent
8eaad3a998 fix: address AI review feedback - JSON injection, exit on failure, branch collisions (#490)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 11:04:30 +00:00
Agent
b11c4cca15 fix: refactor: architect pitching should be bash-driven with stateless model calls (#490) 2026-04-09 10:49:35 +00:00
Claude
03a119d16c fix: review feedback — use global vars for multiline guidance, update PR body for answer detection
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
- fetch_pr_review_decision now sets REVIEW_DECISION/REVIEW_GUIDANCE globals
  instead of printf to stdout (multiline guidance broke cut-based parsing)
- ACCEPT handler instructs model to update PR body with Design forks section
  so fetch_pr_answers can detect the answers phase on subsequent runs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:27:53 +00:00
Claude
e31a2d5c88 fix: refactor: architect design phase should be bash-driven with stateful session resumption (#491)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:15:17 +00:00
Agent
1426b1710f fix: fix: architect creates duplicate sprint pitch for vision issues that already have sub-issues (#486)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 08:59:43 +00:00
Agent
03962dd1d2 fix: fix: architect-run.sh should check preconditions in bash before invoking the model (#472)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Add bash precondition checks to skip model invocation when:
- No vision issues exist AND no open architect PRs to handle
- Already at max 3 open architect PRs AND no ACCEPT/REJECT responses to process

This avoids $0.28+ empty runs where the model reads context and concludes 'no work'.
The model is only invoked when there's actual work: new pitches or response processing.
2026-04-09 06:26:08 +00:00
Claude
7c688bc196 chore: gardener housekeeping 2026-04-09
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 06:02:34 +00:00
Claude
faaaeb0a1f chore: gardener housekeeping 2026-04-09
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-09 00:05:31 +00:00
Claude
63bfed949e fix: feat: architect should pitch up to 3 sprints per run when multiple vision issues exist (#451)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:21:00 +00:00
Agent
25433eaf67 fix: fix: architect should resume session when processing answers on an accepted sprint PR (#436)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
When the architect processes human answers to design questions (answer_parsing step),
it now resumes the session from the research/questions run instead of starting fresh.
This preserves Claude's deep codebase understanding from the research phase, ensuring
sub-issues include specific file references and implementation details.

Changes:
- architect-run.sh: Added detect_questions_phase() to check if PR is in questions phase
  (has `## Design forks` section and question comments). If so, resume the session
  from SID_FILE to preserve context.
- formulas/run-architect.toml: Documented session resumption behavior in answer_parsing step.

Session is only preserved when PR is in questions-awaiting-answers phase. Fresh sessions
are started for new pitches (no stale context from old sprints).
2026-04-08 19:37:36 +00:00
Claude
887bc7bbea chore: gardener housekeeping 2026-04-08
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
2026-04-08 18:02:36 +00:00
Claude
fe1ef3d5ef chore: gardener housekeeping 2026-04-08 2026-04-08 12:22:13 +00:00
Agent
d653680d64 fix: fix: standardize logging across all agents — capture errors, log exit codes, consistent format (#367)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
2026-04-07 21:15:36 +00:00
Claude
514de48f58 chore: gardener housekeeping 2026-04-07
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-07 18:05:41 +00:00
Claude
6d0eaf2687 chore: gardener housekeeping 2026-04-07
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-07 12:04:45 +00:00
Claude
4aa824c203 chore: gardener housekeeping 2026-04-07
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-07 06:01:36 +00:00