Skip to content

feat(agentloop): Self-Reflection-Turn vor Completion (issue #152) - #229

Merged
Delqhi merged 1 commit into
mainfrom
feat/issue-152-self-reflect
Jun 16, 2026
Merged

feat(agentloop): Self-Reflection-Turn vor Completion (issue #152)#229
Delqhi merged 1 commit into
mainfrom
feat/issue-152-self-reflect

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Implements issue #152. Reflector hook runs once per completion proposal, before the stop-gate. Non-empty Issues inject a user message and continue (worker self-fixes).

Closes #152

What ships:
  - cmd/sin-code/internal/agentloop/loop.go:
    - New Reflection + Reflector types (per-proposal self-critique)
    - New Loop.Reflector field
    - State: reflectedThisProposal (resets when worker makes tool calls)
    - Logic: runs Reflector exactly once per completion proposal, BEFORE
      the stop-gate. If issues non-empty, injects them as a user message
      and continues (not a stop-gate reject — worker self-fixes).
  - cmd/sin-code/internal/ledger/store.go: new EntryType TypeReflection.
  - cmd/sin-code/internal/hooks/hooks.go: new event hooks.ReflectIssues.
  - cmd/sin-code/internal/agentloop/loop_reflect_test.go: 3 tests
    (disabled, forces-another-turn, no-issues-proceeds).

Acceptance criteria (from #152):
  - [x] Reflector runs once per proposal (not infinite self-doubt).
  - [x] Non-empty Issues force another turn via user message.
  - [x] Reflector=nil preserves legacy behavior.
  - [x] go test ./cmd/sin-code/internal/agentloop/... all green.

Hard mandates honored:
  - M2: no new deps.
  - M3: reflection is post-verify, pre-stop-gate; never short-circuits
    the verify-gate.
  - M7: 3/3 tests pass under go test -race -count=1.

Refs: #152
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sin-code Ready Ready Preview, Comment, Open in v0 Jun 16, 2026 8:39pm

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/sagamundis-1139s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/aragonheld-7756s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/ronaldokrause-9559s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/manheiler-8784s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/karstenblau45-2395s-projects?upgradeToPro=build-rate-limit

@Delqhi
Delqhi merged commit eb09fb0 into main Jun 16, 2026
10 of 11 checks passed
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/spriterfrau-5830s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/cristianoronalodbau-9053s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/mariobatrhs-9606s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/einskarst-2238s-projects?upgradeToPro=build-rate-limit

@Delqhi
Delqhi deleted the feat/issue-152-self-reflect branch June 16, 2026 20:39
@github-actions

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)
📊 Download SARIF (for Code Scanning)

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

@github-actions

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Medium findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)

Run ID: 27646671628 · Commit: ${github.sha}

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loop: Self-Reflection-Turn vor Completion

1 participant