You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3cb811b
Browse filesBrowse the repository at this point in the historyBrowse files
Vitor Castro
committed
Drive the agent from tool contracts instead of intent crutches.
Centralize OpenAI tool descriptions and a system tool contract, drop chat-phrase enrich/nudges, treat identical edits as already applied, and lift Qwen/Hermes XML tool markup into native tool_calls so OSS models stay on the tool path.
description: No intent crutches — agent works from tool contract, not chat/phrase triggers
3
+
alwaysApply: true
4
+
---
5
+
6
+
# No intent crutches
7
+
8
+
CodeForge’s agent must work from a stable **tool + system contract**, not from hardcoded intent detection.
9
+
10
+
## Forbidden
11
+
12
+
- Rewriting the user message with “Harness note” / apply / continue enrichers based on phrase matchers
13
+
- Regex (or similar) sniffers on user or assistant text to decide the model “meant apply / corrija / I’ll fix”
14
+
- Soft coaching nudges injected as fake `user` turns (“you narrated without tools”, “thin final”, “stuck — try edit”)
15
+
- Growing matchers for Portuguese/English synonyms instead of fixing tools or the system prompt
16
+
17
+
Portuguese/English regexes are allowed only as **matchers of user input** where the product must recognize locale (see `english-texts.mdc`), not to drive agent behavior.
18
+
19
+
## Allowed (structural)
20
+
21
+
- System prompt and tool schemas that state how to work (`edit` workflow, no prose-only patches)
22
+
- Tool-result feedback (`Already applied`, `old_string was not found`, failed-repeat refusal)
- Protocol events: length truncation, invalid tool JSON, step-budget / hard stuck wrap, oracle red
25
+
26
+
## When the model only describes a fix
27
+
28
+
Do **not** add a new trigger. Improve the contract (system/`edit` description) or the tool loop so calling tools is the natural path. Leave the failure visible rather than papering over it with matchers.
description: Do the real work. Do not ship stubs, fake PASS results, or placeholder UI.
3
+
alwaysApply: true
4
+
---
5
+
6
+
# No stubs
7
+
8
+
Implement the behavior the task asks for. A compiling placeholder is not done.
9
+
10
+
## Forbidden
11
+
12
+
- Stubs, `TODO`, `FIXME`, `NotImplementedException`, "Coming soon", "would run here", or SQL / filters that contain `TBD`.
13
+
- A `Pass` that only means the HTTP call returned. Validate the business rule (counts, thresholds, mismatches).
14
+
- Fake data that looks like a real check. Example: every LELY-237 rule must not be `select Id from workflow_task where Status = 'Error'`.
15
+
- A connector without credentials that returns a success sentence. Leave it disabled. Dependent checks stay blocked.
16
+
- Admin or report pages that are only a paragraph saying the feature is pending.
17
+
18
+
## When the source is missing
19
+
20
+
Return `NotRun` (or blocked-by-connector) with the reason. Leave the task incomplete. Do not invent a result.
21
+
22
+
## Allowed exceptions
23
+
24
+
- `ManualCheck` returns `PendingManual` with the runbook steps. That waits for a person.
25
+
- LLM evaluation and dashboard-snapshot evidence stay future. Do not stub them into the current path.
26
+
27
+
## Before you finish
28
+
29
+
Search the diff for `stub`, `TODO`, `TBD`, `Coming soon`, `NotImplemented`, and `placeholder`. Fix each hit or say the task is incomplete.
30
+
31
+
Add a test that fails if the new behavior is fake. Examples: Billing Preview must not pass without a comparison; a contracted check must call its API or end as `NotRun`.
| Compact erases what was already read | replace | done — `FILES ALREADY READ` ledger in mid/hard compact |
72
72
| Explore via many serial list/read steps | replace | done — packet retrieve + optional explore subagent (`exploreSubagent`) |
73
+
| Full tool surface thrash in Agent code turns | replace | done — stage machine at **execution** (explore/act/verify); schemas stay identical for prefix cache; refuse list/search/retrieve in act/verify |
74
+
| Brittle exact `edit` / truncated tool JSON | replace | done — tolerant `edit` (Unicode + LF view + strip read line nums); `apply_patch` only for gpt-* non-OSS |
75
+
| Soft edit-miss nudges | remove | done — hard `readThisTurn` gate before edit/overwrite |
76
+
| Identical failed `edit`/`write`/`apply_patch` retries burn step budget then prose wrap-up | replace | done — block same fingerprint after first fail (incl. duplicates in one step); clear `readThisTurn` on miss |
77
+
| Model retries `edit` whose `new_string` is already on disk (fake "missing brace") | replace | done — `applyEdit` returns `alreadyApplied` success so the 35B moves on |
78
+
| Intent/continue enrich, thin-final/stuck soft nudges, write-count continue | remove | done — model works from system+tool contract; harness keeps protocol (length/JSON/budget) + tool gates only |
79
+
| Stuck wrap used MAX_STEPS_PROMPT (wrong situation) / PT status labels | replace | done — `STUCK_WRAP_PROMPT` vs `MAX_STEPS_PROMPT`; status/activity strings English |
80
+
| Stale internal plan injection | replace | done — `internalPlans.ts` scoped to session/taskHash; archive on done/unrelated task |
81
+
| Mechanical mid-compact digest | replace | done — structured LLM checkpoint (Objective / Work State / Next Move) with mechanical fallback |
0 commit comments