This repo is a minimal Agent Town landing page.
- Minimal UI (no clutter) — keep it single-purpose.
- Human + agent co-op — the unlock flow requires both participants.
- Session-token identity — do not add external identity providers.
- Deterministic testability — every milestone must be verifiable with Playwright.
- Wallet-first identity — each user is represented by their connected wallet; wallet continuity drives session continuity.
- Do not add point systems, token farming, or engagement hacks.
- Do not add heavy frameworks unless absolutely necessary.
- Do not introduce real API keys. The Team Code is the only token.
Install:
npm installDev server:
npm run devE2E tests:
npm testRun a single test file:
npx playwright test e2e/02_match_unlock.spec.jspublic/— HTML/CSS/JSserver/— Express API + session logice2e/— Playwright tests (acceptance criteria)specs/— product + API specifications
- All Playwright tests pass (
npm test). - UX remains minimal.
- API contract stays documented in
specs/02_api_contract.md. - Skill remains correct and readable at
/skill.md.
To keep future skill and worker work safe, preserve this convention:
public/skill.mdis the source of truth for the external-agent playbook.e2e/55_phase3_skill_contract_line.spec.jsis the baseline contract line for skill compatibility.docs/internal-skill-testline.mdtracks capability-to-test mapping and planned expansions.
When changing skill behavior:
- Update
public/skill.md. - Update or extend
e2e/55_phase3_skill_contract_line.spec.js(or adde2e/56+tests). - Update
docs/internal-skill-testline.mdwith the new capability row and coverage.
When changing worker behavior required by skill files (skill.md / SKILL.md):
- Add deterministic Playwright coverage first (test-first).
- Keep tests API-first and behavior-focused so UI reshuffles do not break contract validation.
- Do not merge worker-skill changes unless the full suite passes (
npm test).
- The in-browser OpenClaw Lite worker/runtime is authoritative for agent behavior.
- The server is an API/state backend only; do not move agent decision logic into backend handlers.
- Do not fake co-op outcomes in server routes (for example: force match/open/share completion server-side).
- If behavior is missing, add/extend a worker tool and route the skill through tools + LLM, not backend hacks.
- Human and agent must operate against the same shared state machine.
- Worker should poll state with delay/backoff (not tight loops) and decide next action from that shared state.
- Co-op actions that require both participants (e.g. lock/open, share creation) must remain two-party flows.
public/skill.mdis the product playbook source; worker-importedworkspace/.../SKILL.mdis execution input.- Do not bypass skill execution by manually injecting “next step” behavior into server responses.
- Preserve most-specific-skill selection behavior and single upfront skill-read constraint.
- Keep agent debugging transparent in the agent panel:
Worker Toolstab: current callable worker tool surface.Skill Contexttab: imported skill state + extracted<available_skills>.Worker Traffictab: outbound/inbound worker/gateway traffic trace (debug visibility).Session Contexttab: runtime snapshot + transcript/system prompt preview.
- When adding new capability, ensure it is visible through worker tools and traceable in debug tabs.
- For worker/runtime changes under
vendors/openclaw-lite-main/src/openclaw-lite/*, rebuild artifacts with:npm run build:openclaw-lite
- Keep
public/openclaw-lite/*in sync with vendor source changes. - Add deterministic Playwright coverage for each new worker capability and regression risk.
- The user identity is the connected wallet (or wallets), not a transient browser credential.
- Team Code is a session token/routing token and should stay hidden from cluttered UX surfaces.
- Team/session identity should be stable across polling/refresh for a live session; avoid regressions that rotate it unexpectedly.
- OpenAI Codex authentication must use the PKCE flow (
/api/agent/lite/llm/oauth/openai-codex/start->status->exchange). - Do not treat OpenAI
id_tokencallback URLs as usable model credentials; only access tokens from OAuth exchange are valid. - Preserve state-based OAuth recovery:
exchangemust be able to resolve the correct attempt from callbackstatewhen a staleattemptIdis sent.- Do not regress to strict attemptId-only matching.
- Keep the right-side agent debug tabs stable and worker-observable:
Worker Tools,Skill Context,Worker Traffic,Brain,Session Context.
- Keep Worker Traffic behavior stable:
- card entries, newest-first ordering, filter buttons (
All,Incoming,Outgoing).
- card entries, newest-first ordering, filter buttons (
- If changing any of the above, update deterministic coverage in:
e2e/53_agent_panel_global_presence.spec.jse2e/57_phase3_onboarding_wallet_llm_persist.spec.js
- Keep experience surfaces (especially Atlas) modal-first from the town hub page.
- Do not implement full-page navigation for agent-driven UX steps when a modal/frame flow is possible.
- Reasoning:
- The worker runtime is page-scoped JavaScript (
new Worker(...)in the current document). - Full document navigation tears down that runtime and forces a worker restart.
- Session/transcript can be restored, but live continuity and in-flight state are interrupted.
- The worker runtime is page-scoped JavaScript (
- Atlas policy:
- Atlas must be opened through the main website modal flow.
- Direct standalone Atlas access (
/atlas,/atlas.html) should not render Atlas as a normal page. - Standalone hits should be redirected back to the town hub modal entry path.