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
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -767,12 +767,6 @@ test-progress-ledger: | $(BUILDDIR)
$(FPC) $(FPCFLAGS) src/tests/progress_ledger_tests.pas -o$(BUILDDIR)/progress_ledger_tests
@$(BUILDDIR)/progress_ledger_tests

# Deterministic ## Project prompt section (stack/build/test/git from file reads).
test-project-facts: | $(BUILDDIR)
@mkdir -p $(BUILDDIR)/lib
$(FPC) $(FPCFLAGS) src/tests/project_facts_tests.pas -o$(BUILDDIR)/project_facts_tests
@$(BUILDDIR)/project_facts_tests

# Deterministic agent-loop harness bench (bench/agentloop) -- pure FPC, no
# external runtime. Spawns the built binary, plays the scripted model over
# the relay, asserts on what the loop did. Not part of `make test` (binds a
Expand Down Expand Up @@ -852,4 +846,4 @@ test-fs-grep-tier5-6: | $(BUILDDIR)
$(FPC) $(FPCFLAGS) src/tests/fs_grep_tier5_6_tests.pas -o$(BUILDDIR)/fs_grep_tier5_6_tests
@$(BUILDDIR)/fs_grep_tier5_6_tests

test: smoke test-hashline test-toolview test-anthropic-server-tools test-openai-server-tools test-tool-choice test-responses-tool-choice test-println-helper test-utf8-codepage-tag test-gemini-schema-strip test-markdown-render test-json-utf8-roundtrip test-model-discovery test-cron-tool test-provider-catalog test-output-cache test-working-state test-ansi-width test-shell-filters test-learn test-export test-execute-code test-session-stats test-auto-router test-gateway-stats-buckets test-session-list-filter test-session-endpoints test-config-secret-merge test-skills-install test-self-improving-skills test-loop-shaping-defaults test-max-iter-notice test-max-iter-notice test-plan-build-mode test-config-profile test-tool-rpc test-session-search test-subagent-bg test-subagent-default test-stream-reliability test-mcp-server test-mcp-hub-projection test-checkpoints test-condense-json test-goals-runner test-kb-index test-kb-pdf test-agents-md test-checkpoints-zpaq test-orient-preamble test-component-config test-autoroute-apply test-fallback-models test-memory-distill test-memory-facts test-memory-autodistill test-checkpoints-redo test-build-roundtrip test-promptware test-orient test-condense-reversible test-heartbeat test-shell-backend test-env-inject test-run-timeout test-shell-output-decode test-fs-grep-tier1-4 test-fs-grep-tier5-6 test-fs-tool-naming test-workspace-paths test-progress-ledger test-project-facts test-otel test-logger-level-quiet test-gateway-token test-fs-secret-gate test-config-env-subst test-delphi-build
test: smoke test-hashline test-toolview test-anthropic-server-tools test-openai-server-tools test-tool-choice test-responses-tool-choice test-println-helper test-utf8-codepage-tag test-gemini-schema-strip test-markdown-render test-json-utf8-roundtrip test-model-discovery test-cron-tool test-provider-catalog test-output-cache test-working-state test-ansi-width test-shell-filters test-learn test-export test-execute-code test-session-stats test-auto-router test-gateway-stats-buckets test-session-list-filter test-session-endpoints test-config-secret-merge test-skills-install test-self-improving-skills test-loop-shaping-defaults test-max-iter-notice test-max-iter-notice test-plan-build-mode test-config-profile test-tool-rpc test-session-search test-subagent-bg test-subagent-default test-stream-reliability test-mcp-server test-mcp-hub-projection test-checkpoints test-condense-json test-goals-runner test-kb-index test-kb-pdf test-agents-md test-checkpoints-zpaq test-orient-preamble test-component-config test-autoroute-apply test-fallback-models test-memory-distill test-memory-facts test-memory-autodistill test-checkpoints-redo test-build-roundtrip test-promptware test-orient test-condense-reversible test-heartbeat test-shell-backend test-env-inject test-run-timeout test-shell-output-decode test-fs-grep-tier1-4 test-fs-grep-tier5-6 test-fs-tool-naming test-workspace-paths test-progress-ledger test-otel test-logger-level-quiet test-gateway-token test-fs-secret-gate test-config-env-subst test-delphi-build
22 changes: 0 additions & 22 deletions bench/agentloop/agentloop_bench.pas
Original file line number Diff line number Diff line change
Expand Up @@ -463,28 +463,9 @@ function H_BuildSite(N: Integer; const EnvJSON: string): string;
procedure ScenarioBuildSite;
var
Answer, SP1, SP2: string;
S: TStringList;
begin
WriteLn;
WriteLn('== scenario: build-site (goal anchor + ledger fold + deliverable) ==');
{ B1 fixture: a recognisable project in the workspace -- the ## Project
facts (stack, make test, git branch) must reach iteration 1's system
prompt with zero exploration calls spent discovering them. }
S := TStringList.Create;
try
S.Text := 'all: build'#10#9'echo hi'#10'build:'#10#9'echo b'#10'test: build'#10#9'echo t'#10;
S.SaveToFile(GHomeDir + '/workspace/Makefile');
finally
S.Free;
end;
ForceDirectories(GHomeDir + '/workspace/.git');
S := TStringList.Create;
try
S.Text := 'ref: refs/heads/bench-main'#10;
S.SaveToFile(GHomeDir + '/workspace/.git/HEAD');
finally
S.Free;
end;
ResetScenario(H_BuildSite);
Answer := Chat('[' + MsgObjJSON('user',
'build a small landing page named bench-demo.html for the demo project') + ']',
Expand All @@ -494,9 +475,6 @@ procedure ScenarioBuildSite;
SP1 := EnvSystemPrompt(EnvAt(0));
Check(not Has(SP1, '[progress ledger'),
'iteration 1 system prompt is pristine (prefix-cache preserved)');
Check(Has(SP1, '## Project'), 'project facts reach iteration 1');
Check(Has(SP1, 'Test: make test'), 'facts name the verify command (make test)');
Check(Has(SP1, 'Git branch: bench-main'), 'facts carry the git branch');
SP2 := EnvSystemPrompt(EnvAt(1));
Check(Has(SP2, '[progress ledger'), 'iteration 2 carries the progress ledger');
Check(Has(SP2, 'bench-demo.html'), 'ledger lists the written file');
Expand Down
272 changes: 0 additions & 272 deletions src/pkg/agent/PasClaw.Agent.ProjectFacts.pas

This file was deleted.

22 changes: 0 additions & 22 deletions src/pkg/agent/PasClaw.Agent.Prompt.pas
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ implementation
PasClaw.Agent.Orient, { task-aware MEMORY slicing (Cfg.OrientTaskAware) }
PasClaw.Memory.Facts, { distilled-fact injection (Cfg.MemoryDistillEnabled) }
PasClaw.Tools.Sandbox, { CurrentWorkspace -- the working dir the prompt advertises }
PasClaw.Agent.ProjectFacts, { deterministic ## Project section (stack/build/test/git) }
PasClaw.MCP.Disclosure; { deferred-tools section (Cfg.MCPProgressiveDisclosure) }

const
Expand Down Expand Up @@ -239,14 +238,6 @@ function BuildIdentitySection: string;
RuntimeString;
end;

function PromptWorkDir: string;
{ The directory relative tool paths resolve to -- the same value the
Workspace section advertises (configured workspace, or launch dir). }
begin
Result := CurrentWorkspace;
if Trim(Result) = '' then Result := GetCurrentDir;
end;

function BuildWorkspaceSection: string;
var
Home, WorkDir: string;
Expand Down Expand Up @@ -855,19 +846,6 @@ function BuildSystemPrompt(Cfg: TConfig; const UserSys: string;
Result := AppendSection(Result, BuildPlanModeSection);
Result := AppendSection(Result, BuildIdentitySection);
Result := AppendSection(Result, BuildWorkspaceSection);
{ Deterministic project facts (stack / build / test commands / git
branch) detected from the working directory by pure file reads --
saves the model its usual "what kind of repo is this" exploration
prefix and gives Rule 3's verify-your-changes a concrete command.
Skipped when the project carries an AGENTS.md: the operator-authored
doc (emitted below as Project Rules) states this better; facts are
the zero-config floor. }
{ The AGENTS.md check must walk the SAME tree the facts are read from
(the workspace) -- with '' it walked the launch cwd, so a workspace
AGENTS.md failed to suppress the facts and an unrelated launch-dir
AGENTS.md could suppress useful workspace facts. }
if FindProjectAgentsMd(PromptWorkDir) = '' then
Result := AppendSection(Result, BuildProjectFactsSection(PromptWorkDir));
Result := AppendSection(Result,
BuildMemorySection((Cfg <> nil) and Cfg.OrientTaskAware, TaskHint));
{ Distilled facts (Cfg.MemoryDistillEnabled). Wholesale, after the .md
Expand Down
Loading