Skip to content

Step 8: learn-form-schema + execute-form-batch#13

Merged
rockfordlhotka merged 1 commit intomainfrom
step-8-form-schema
Apr 23, 2026
Merged

Step 8: learn-form-schema + execute-form-batch#13
rockfordlhotka merged 1 commit intomainfrom
step-8-form-schema

Conversation

@rockfordlhotka
Copy link
Copy Markdown
Member

Summary

  • Ships learn-form-schema + execute-form-batch — the phase-1 / phase-3 pair from spec §5.5 (§9.1 step 8). Learn does deterministic DOM scan + one-turn LLM enrichment (dependsOn + notes only; structure stays DOM-authoritative) and persists a FormSchema as a SkillResourceType.JsonSchema resource at sites/{host}/forms/{slug}. Execute resolves schemas by ref via ISkillStore.GetResourceAsync("schema.json") or inline, submits each row, streams per-row progress via AgentTaskContext.PublishStatus, and defaults to abort-on-first with caller opt-in "continue".
  • Resolves spec open-question Step 4: credentials + post-to-site (Bluesky) #6 (typed JSON alongside markdown skills) by adopting RockBot 0.9's multi-file skill API — no parallel Foragent-local store. Resolves open-question Adopt spec v0.2: agentic generalist direction #8 (batch semantics) as abort-on-first default.
  • Bumps RockBot packages 0.8.* → 0.9.* and the rockylhotka/rockbot-agent docker image to 0.9.11 (brings PR #291 structured-data invoke_agent so RockBot can consume FormSchema JSON natively rather than as prose).
  • Adopts version scheme {spec-major}.{spec-minor}.0-alpha.{step} — now at 0.2.0-alpha.8; documented in CLAUDE.md Conventions.
  • File uploads and multi-step wizards are explicitly out of scope for this step.

Test plan

  • dotnet build --configuration Release — 0 warnings, 0 errors
  • dotnet test — 80 passed, 4 skipped (existing LLM-gated), 0 failed
  • 14 unit tests under tests/Foragent.Agent.Tests/Forms/ — input validation, abort-on-first vs continue, schema round-trip through SkillResource, required-field validation, successIndicator path, missing-resource error
  • Integration test FormCapabilitiesIntegrationTests — real Chromium drives real Kestrel-hosted form end-to-end (learn → persist → execute → two rows verified in POST handler); not LLM-gated since the enricher short-circuits on forms without select/radio
  • Existing step-6 benchmark tests still compile and pass (still skipped without FORAGENT_LLM_*)
  • Manual: docker compose up --build against the 0.9.11 rockbot-agent image, curl learn-form-schema + execute-form-batch end-to-end via the gateway

🤖 Generated with Claude Code

Ships the phase-1 / phase-3 form capability pair from spec §5.5 and
bumps the RockBot framework to 0.9.* for the multi-file skill API.

- FormSchema / FormField wire types with stable JSON serializer options.
- IBrowserPage.ScanFormAsync: single-JS-pass deterministic form read
  (labels, validation attrs, select/radio options). Adds
  SelectOptionAsync + SetCheckedAsync for the batch submit path.
- LearnFormSchemaCapability: navigate → deterministic scan →
  FormSchemaEnricher (one LLM turn, can only add dependsOn + notes;
  structural fields are DOM-authoritative) → persist as Skill with a
  SkillResourceType.JsonSchema "schema.json" resource at
  sites/{host}/forms/{slug}.
- ExecuteFormBatchCapability: resolves schema by skillRef via
  ISkillStore.GetResourceAsync or inline; streams per-row progress via
  AgentTaskContext.PublishStatus; default mode "abort-on-first"
  (spec open-question #8 resolution), caller opts into "continue".
  Success signal: optional successIndicator selector, URL-change
  fallback.
- Package bump 0.8.* → 0.9.* (adds RockBot.Llm.Abstractions). Docker
  image rockylhotka/rockbot-agent 0.8.5 → 0.9.11 so the peer side
  gets PR #291 structured-data invoke_agent.
- Version scheme adopted: 0.2.0-alpha.8 in Directory.Build.props,
  documented in CLAUDE.md Conventions.
- 14 unit tests + 1 Kestrel+Chromium end-to-end integration test.

Resolves spec open-questions #6 (typed artifacts — uses RockBot 0.9
resource files, no parallel Foragent store) and #8 (batch semantics —
abort-on-first default).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rockfordlhotka rockfordlhotka merged commit 9e2023f into main Apr 23, 2026
1 check passed
@rockfordlhotka rockfordlhotka deleted the step-8-form-schema branch April 23, 2026 04:32
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