Skip to content

API testing reads knowledge files with web/api scope#43

Open
DavertMik wants to merge 3 commits into
mainfrom
api-knowledge-scope
Open

API testing reads knowledge files with web/api scope#43
DavertMik wants to merge 3 commits into
mainfrom
api-knowledge-scope

Conversation

@DavertMik
Copy link
Copy Markdown
Contributor

Summary

explorbot api (API testing) did not read knowledge files — neither Chief (planner) nor Curler (executor) ever touched KnowledgeTracker, so endpoint:-frontmatter files written by api init / api know were never read back. This wires knowledge into both API agents and adds a scope model so web and API testing can isolate or share knowledge.

Changes

  • KnowledgeTracker is now reusable and scope-aware: constructor accepts { knowledgeDir, sharedDir, scope } (skips the web ConfigParser singleton when a dir is passed), matches on url || path || endpoint, and filters by effective scope (scope frontmatter, else directory default).
  • Chief injects a <knowledge> block into the planning prompt; Curler threads knowledge into test() / buildTestPrompt() and appends a <knowledge> block to the execution prompt.
  • api-tester loads knowledge/api/*.md (scope api) plus opt-in top-level files; api init / api know now write to knowledge/api/ with endpoint: + scope: api.

Scope model

Location Default scope Matches on
`knowledge/*.md` `web` `url`
`knowledge/api/*.md` `api` `endpoint`

`scope: web | api | all` overrides the directory default. Use `scope: all` on a top-level file for shared knowledge such as credentials.

Verification

  • `bun run format` / `bun run lint:fix` — clean
  • `bun test tests/integration/` — 62 pass, 0 fail (web path unaffected)
  • `docs/knowledge.md` and `CHANGELOG.md` updated

🤖 Generated with Claude Code

DavertMik and others added 3 commits May 12, 2026 23:49
Wire KnowledgeTracker into the api-tester so `explorbot api` planning
(Chief) and execution (Curler) prompts include endpoint-matching
knowledge. Add a `scope` frontmatter field (web | api | all) and a
`knowledge/api/` convention so web and API testing isolate or share
knowledge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant