From 4d20bfe6f28778700182664e28062fd9044ad144 Mon Sep 17 00:00:00 2001 From: Ravi Date: Thu, 28 May 2026 18:48:36 +0530 Subject: [PATCH 1/2] docs: add agent workflow guide and SDK diagram assetdocs: add agent workflow guide and SDK diagram asset --- AGENT.md | 92 ++++++++++++++ site/public/images/sdk-code-diagram.html | 151 +++++++++++++++++++++++ 2 files changed, 243 insertions(+) create mode 100644 AGENT.md create mode 100644 site/public/images/sdk-code-diagram.html diff --git a/AGENT.md b/AGENT.md new file mode 100644 index 0000000..2256712 --- /dev/null +++ b/AGENT.md @@ -0,0 +1,92 @@ +# Agent Instructions + +## Portal Requests + +When the incoming request includes either of these fields: + +- `fromportal` +- `source: "portal"` + +treat the task as a portal-originated workflow. + +## Website Change Rules + +This website is generated from source inputs. + +- Make durable website content changes in `content/site.yaml`. +- Make reusable layout, styling, or section capability changes in `template/`. +- Do not hand-edit `site/` for durable changes; it is generated output and can be overwritten. +- `oldwebsite/` is archived context and should not be treated as the active website. + +For non-portal local work, the normal website validation flow is: + +```bash +npm run validate +npm run dev +``` + +`npm run dev` already runs the generation step first, so a separate `npm run generate` is not required before local development. Use `npm run build` only when a production static build is specifically needed. + +For portal-originated workflows, do **not** manually run these website commands: + +```bash +npm run validate +npm run generate +npm run build +npm run dev +``` + +When the request comes from the portal, complete the file changes only. The website tester ActionBlock will handle install, validation/build/start, and browser verification manually through the portal workflow. + +## Required Workflow + +For portal-originated workflows: + +1. Complete the requested code or content change. +2. Call `test-web-site` to verify the change. +3. Summarize the completed work and test results. +4. As the final tool/action step, call `create-pr`. + +Do not call `create-pr` before implementation and `test-web-site` validation are complete. + +### How to call the test ActionBlock + +After completing all code changes, first use the `actionBlock_start` tool to run `test-web-site` with the current worktree path passed as `params.cwd`. + +Use the absolute path of the worktree where the changes were made. Do not use the base project path from `codebolt.project.getProjectPath()`. + +```json +{ + "actionBlockName": "test-web-site", + "params": { + "cwd": "/absolute/path/to/current/worktree" + }, + "explanation": "Running calculator app verification before PR creation." +} +``` + +If `test-web-site` fails, fix the issue and rerun it before calling `create-pr`. + +### How to call the PR ActionBlock + +After `test-web-site` has executed successfully, use the `actionBlock_start` tool with the current worktree path passed as `params.cwd`. + +```json +{ + "actionBlockName": "create-pr", + "params": { + "cwd": "/absolute/path/to/current/worktree" + }, + "explanation": "" +} +``` + +Do **not** attempt to call `attempt_completion` until both ActionBlocks have been executed in order and returned their results successfully. + +## Failure Handling + +If the requested work cannot be completed, or checks fail and cannot be fixed in the current run: + +- Report the blocker clearly. +- Do not claim the work is complete. +- If the request came from the portal, run `test-web-site` first when possible, then call `create-pr` as the final step, including the blocker or check failure details. diff --git a/site/public/images/sdk-code-diagram.html b/site/public/images/sdk-code-diagram.html new file mode 100644 index 0000000..df25f08 --- /dev/null +++ b/site/public/images/sdk-code-diagram.html @@ -0,0 +1,151 @@ + + + + + + + +
+ +
+ 1 + // Custom Agent — 10 lines, full power +
+ + +
+ 2 + import { codebolt } from 'codeboltjs'; +
+ + +
+ 3 + +
+ + +
+ 4 + codebolt.onMessage(async (msg) => { +
+ + +
+ 5 + const plan = await codebolt.llm.plan(msg); +
+ + +
+ 6 + const code = await codebolt.fs.read(plan.file); +
+ + +
+ 7 + const next = await codebolt.llm.edit(code, plan); +
+ + +
+ 8 + await codebolt.fs.write(plan.file, next); +
+ + +
+ 9 + await codebolt.git.commit(`agent: ${plan.summary}`); +
+ + +
+ 10 + }); +
+ + +
+ 11 + +
+ + +
+ 12 + // Custom Plugin — runs inside the engine +
+ + +
+ 13 + // 3 channels: WebSocket · Mux · HTTP +
+
+ + From 4d7cf288403aa51ccf930f840696de1337449252 Mon Sep 17 00:00:00 2001 From: Ravi Date: Thu, 28 May 2026 19:31:06 +0530 Subject: [PATCH 2/2] Create PR for agent changes --- content/site.yaml | 2 +- site/src/pages/index.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/site.yaml b/content/site.yaml index 3f5fb0b..3aad353 100644 --- a/content/site.yaml +++ b/content/site.yaml @@ -97,7 +97,7 @@ pages: - type: hero eyebrow: "AGENT-NATIVE SOFTWARE" - heading: "The self-evolving, swarm-scale AI agent engine" + heading: "The self-evolving, swarm-scale AI orchestration engine" headingAccent: - "self-evolving" - "swarm-scale" diff --git a/site/src/pages/index.astro b/site/src/pages/index.astro index bdb7dbd..54fa6dd 100644 --- a/site/src/pages/index.astro +++ b/site/src/pages/index.astro @@ -27,7 +27,7 @@ import CtaBlock from '../components/CtaBlock.astro';