-
Notifications
You must be signed in to change notification settings - Fork 10
Reuse Docbot application specs as Explorbot context #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3ad00af
Reuse Docbot application specs as Explorbot context
DenysKuchma 5c65ae1
Upd knowledge methods
DenysKuchma b6640be
Upd mock logic
DenysKuchma 7fc03e2
Fix finish tester bug
DenysKuchma b52f07a
Upd contract s doc
DenysKuchma 1b14700
Fix bun
DenysKuchma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Application Specs | ||
|
|
||
| An application spec is a versioned Markdown bundle that gives Explorbot previously collected information about an application. It can be produced by Docbot, another documentation tool, or by hand. | ||
|
|
||
| Live HTML, ARIA, and screenshots remain the source of truth. Explorbot uses matching spec pages as supporting context and does not load the whole bundle into every prompt. | ||
|
|
||
| ## Configure | ||
|
|
||
| Set the bundle directory in `explorbot.config.js`: | ||
|
|
||
| ```javascript | ||
| export default { | ||
| dirs: { | ||
| spec: 'spec', | ||
| }, | ||
| }; | ||
| ``` | ||
|
|
||
| Paths are resolved from the project directory. Use `--spec <path>` on a web command to override the configured bundle for one run. Both the bundle directory and its `index.md` path are accepted. | ||
|
|
||
| ## Bundle structure | ||
|
|
||
| ```text | ||
| spec/ | ||
| |-- index.md | ||
| `-- pages/ | ||
| |-- home.md | ||
| `-- users.md | ||
| ``` | ||
|
|
||
| `index.md` is required and serves as a human-readable entry point. Its contents are not injected into agents. Page files may be nested anywhere below `pages/` and must use the contract below. | ||
|
|
||
| ## Page contract | ||
|
|
||
| Every page is a Markdown file with YAML front matter: | ||
|
|
||
| ```markdown | ||
| --- | ||
| format: explorbot-application-spec | ||
| version: 1 | ||
| url: /users | ||
| --- | ||
|
|
||
| # Users | ||
|
|
||
| ## Purpose | ||
|
|
||
| Lists the application's users. | ||
|
|
||
| ## User Can | ||
|
|
||
| - user can search users by name | ||
| Proof: A search field is visible above the user list. | ||
|
|
||
| ## User Might | ||
|
|
||
| - user might export the user list | ||
| Signal: An unlabeled download control is present. | ||
| ``` | ||
|
|
||
| The front matter fields are mandatory: | ||
|
|
||
| - `format` must be `explorbot-application-spec`. | ||
| - `version` must be `1`. | ||
| - `url` is the URL pattern used to select the page for the current browser state. It supports the same patterns as [knowledge files](./knowledge.md#url-patterns). | ||
|
|
||
| The Markdown body is supplied to agents as written, so headings beyond those shown above are allowed. Use `User Can` only for observed capabilities and transitions. Put inferred or unverified capabilities under `User Might`; Explorbot will require confirmation from the live UI before relying on them. | ||
|
|
||
| Screenshots and other relative links may be included for readers, but Explorbot currently consumes the Markdown text only. | ||
|
|
||
| ## Validation | ||
|
|
||
| Explorbot rejects a bundle when `index.md` or `pages/` is missing, when it contains no page files, or when a page has an unsupported format, version, or missing URL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { z } from 'zod'; | ||
|
|
||
| export const APPLICATION_SPEC_FORMAT = 'explorbot-application-spec'; | ||
| export const APPLICATION_SPEC_VERSION = 1; | ||
|
|
||
| export const APPLICATION_SPEC_PAGE_SCHEMA = z.object({ | ||
| format: z.literal(APPLICATION_SPEC_FORMAT), | ||
| version: z.literal(APPLICATION_SPEC_VERSION), | ||
| url: z.string().trim().min(1), | ||
| }); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.