Skip to content

Feat/aiclaw prompt mode#1252

Open
ThanhDang-Vn wants to merge 14 commits into
nextlevelbuilder:devfrom
trwng-thdat:feat/aiclaw-prompt-mode
Open

Feat/aiclaw prompt mode#1252
ThanhDang-Vn wants to merge 14 commits into
nextlevelbuilder:devfrom
trwng-thdat:feat/aiclaw-prompt-mode

Conversation

@ThanhDang-Vn

Copy link
Copy Markdown

Summary

Type

  • Feature
  • Bug fix
  • Hotfix (targeting main)
  • Refactor
  • Docs
  • CI/CD

Target Branch

Checklist

  • go build ./... passes
  • go build -tags sqliteonly ./... passes (if Go changes)
  • go vet ./... passes
  • Tests pass: go test -race ./...
  • Web UI builds: cd ui/web && pnpm build (if UI changes)
  • No hardcoded secrets or credentials
  • SQL queries use parameterized $1, $2 (no string concat)
  • New user-facing strings added to all 3 locales (en/vi/zh)
  • Migration version bumped in internal/upgrade/version.go (if new migration)

Test Plan

trwng-thdat and others added 14 commits May 31, 2026 19:26
Cut AGENTS.md, AGENTS_TASK.md, SOUL.md and TOOLS.md down to their
essentials and lower mcpToolInlineMaxCount from 40 to 20 so excess MCP
tool schemas defer to mcp_tool_search instead of being inlined on every
request. Both reduce the per-request system-prompt token cost.
Introduce a fifth prompt mode "aiclaw" for ai-claw company assistants:
task-tier system-prompt sections plus an MCP-first focused tool surface.

- systemprompt: add PromptAiClaw mode (task-tier rank, shared section
  gating) and skip the persona recency reminder for Anthropic open agents.
- tools: modeAiClawToolAllowlist for built-in tools; the PromptAiClaw
  filter also keeps any tool in the "mcp" group so MCP tools activated via
  mcp_tool_search are not stripped after discovery.
- bootstrap: AGENTS_AICLAW.md doctrine template wired into ModeAllowlist
  and seed lists; mark it as a stable context file for prompt caching.
- store/http: accept and preview the aiclaw mode.
- web + desktop UI: surface the aiclaw mode (card, badge, schema, i18n).
@ThanhDang-Vn ThanhDang-Vn force-pushed the feat/aiclaw-prompt-mode branch from cd686fe to 1274314 Compare June 21, 2026 13:24
@mrgoonie mrgoonie added agent:github-maintain Processed by github-maintain automation maintain:triaged Triaged by maintain workflow status:blocked Blocked by external dependency or decision labels Jun 21, 2026

@mrgoonie mrgoonie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: This PR is not mergeable upstream as-is. It mixes an ai-claw prompt-mode feature with fork-specific README/Docker changes and a security-sensitive outbound MCP auth change, but does not include the product/security contract or tests needed for those surfaces.

Risk level: High

Mandatory gates:

  • Duplicate/prior implementation: no exact duplicate found for aiclaw prompt mode.
  • Project standards: issue found — upstream docs and default Docker Compose are changed to fork-specific ai-claw/trwng-thdat values, and the MCP auth behavior is untested.
  • Strategic necessity: questionable as packaged. A dedicated ai-claw prompt mode may be useful, but this PR currently bundles unrelated fork branding/deployment edits and a bearer-token injection path.
  • CI/checks: missing/no checks reported; mergeState is UNSTABLE.

Findings:

  • Critical: README.md rewrites upstream installation guidance to clone github.com/trwng-thdat/goclaw, labels this repo as a customized fork, and includes a local file:///C:/HCMUS/Jarvis/ai-claw link. That cannot ship in nextlevelbuilder/goclaw; remove fork/product branding from upstream docs or move it to fork-only docs outside this PR.
  • Important: docker-compose.yml adds a plaintext Postgres DSN and a default postgres service/host port mapping (5434:5432). This changes upstream runtime topology and secret handling for every Docker user without a migration/design note. Keep deployment-specific compose overrides out of the default compose file.
  • Important: internal/mcp/auth.go introduces MCP_RUNTIME_ACCESS_TOKEN and injects it into outbound MCP requests. That is a security-sensitive trust-boundary change and needs explicit scoping docs plus tests proving the token is only sent to intended MCP endpoints, does not override per-server configured headers unexpectedly, and behaves safely when empty.
  • Important: The prompt-mode/tool-filter change is under-tested for the core behavior it claims to provide. Add tests covering PromptAiClaw mode selection, context-file allowlist, built-in tool allowlist, and preservation of MCP group tools after mcp_tool_search activation.
  • Important: This PR edits the default bootstrap templates (AGENTS.md, AGENTS_TASK.md, SOUL.md, TOOLS.md) substantially while the title/body describe only ai-claw prompt mode. Please split generic template compression/refactor from the ai-claw feature so reviewers can reason about behavior changes separately.

Verdict: REQUEST_CHANGES

Next step: split this into (1) a clean upstream ai-claw prompt-mode PR with focused tests, and (2) a separate design/security PR for MCP runtime auth if still needed. Remove fork README/Docker edits from upstream before re-review.

Posted by /github-maintain at 2026-06-21T17:21:30Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation maintain:triaged Triaged by maintain workflow status:blocked Blocked by external dependency or decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants