Skip to content

docs(agents): split scoped workflow guidance - #65241

Merged
vincentkoc merged 6 commits into
mainfrom
fix/agents-scope-cleanup
Apr 12, 2026
Merged

vincentkoc merged 6 commits into
mainfrom
fix/agents-scope-cleanup

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Apr 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Problem: the repo root AGENTS.md had grown into a mixed policy file, ops note dump, and duplicated boundary guide, with repeated rules already owned by scoped AGENTS.md files.
  • Why it matters: duplicated instructions drift, and the root file already had a real contradiction on file-size guidance.
  • What changed: added scoped AGENTS.md guides for docs/, ui/, and scripts/, added matching CLAUDE.md symlinks, and trimmed the root file so it points to scoped guides instead of restating them.
  • What did NOT change (scope boundary): no runtime code, tests, CI behavior, or package boundaries changed.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: the root guide accumulated domain-specific policy that should have lived in scoped files, so the same rules existed in multiple places and one file-size guideline drifted into contradiction.
  • Missing detection / guardrail: no scoped AGENTS.md existed for docs/, ui/, or scripts/, so the root file became the dumping ground.
  • Contributing context (if known): the repo already had a good scoped pattern for extensions/, src/plugin-sdk/, src/channels/, src/plugins/, and shared test helpers, but it was not applied consistently.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: AGENTS.md, docs/AGENTS.md, ui/AGENTS.md, scripts/AGENTS.md
  • Scenario the test should lock in: scoped instructions exist where domain-specific policy lives, and the root file no longer carries contradictory LOC guidance.
  • Why this is the smallest reliable guardrail: this is documentation/policy structure, not runtime behavior.
  • Existing test that already covers this (if any): git diff --check
  • If no new test is added, why not: there is no executable behavior change to lock with unit or integration coverage.

User-visible / Behavior Changes

None.

Diagram (if applicable)

Before:
[root AGENTS] -> [repo-global rules + docs rules + UI rules + scripts rules + duplicated boundary rules]

After:
[root AGENTS] -> [repo-global rules + pointers]
              -> [docs/AGENTS]
              -> [ui/AGENTS]
              -> [scripts/AGENTS]

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local repo checkout
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): N/A

Steps

  1. Audit repo-local AGENTS.md files and compare scope overlap.
  2. Split docs/UI/scripts guidance into scoped guides and add required CLAUDE.md symlinks.
  3. Trim root AGENTS.md duplication and remove contradictory LOC guidance.

Expected

  • Root guide stays repo-global.
  • Domain-specific rules live in scoped guides.
  • No duplicate numeric LOC guidance remains in the root file.

Actual

  • Matches expected.

Evidence

Attach at least one:

  • Trace/log snippets
  • Failing test/log before + passing after
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: audited all repo-local AGENTS.md files, confirmed new scoped guides exist, confirmed CLAUDE.md symlinks point at AGENTS.md, confirmed root diff removes duplicated boundary/docs/UI content.
  • Edge cases checked: root no longer contains conflicting 500 vs 700 LOC guidance; no stray numeric LOC text remains in the new scoped guides.
  • What you did not verify: no runtime/test/CI behavior because this PR does not change code paths.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps:

Risks and Mitigations

  • Risk: a moved rule could become harder to find if reviewers only read the root file.
    • Mitigation: the root guide now explicitly points at docs/AGENTS.md, ui/AGENTS.md, and scripts/AGENTS.md.

Plugin Architecture Alignment

This PR now also tightens the plugin-related AGENTS guidance around the current architecture direction captured in ~/.spec/2026-04-11_ocplugins.md:

  • manifest-first control plane
  • targeted activation planning
  • narrow runtime resolution instead of broad registry materialization
  • versioned host/kernel seam over ambient host reachability
  • global mutable runtime registry treated as transitional compatibility, not target design

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts labels Apr 12, 2026
@vincentkoc vincentkoc self-assigned this Apr 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Apr 12, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review April 12, 2026 07:57
@greptile-apps

greptile-apps Bot commented Apr 12, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR splits domain-specific workflow guidance from the repo root AGENTS.md into three new scoped guides — docs/AGENTS.md, ui/AGENTS.md, and scripts/AGENTS.md — each with a matching CLAUDE.md symlink per the repo convention. The root file now carries a concise "Scoped Workflow Guides" pointer section in place of the inline duplicated rules. No runtime code, tests, CI behavior, or package boundaries were changed.

Confidence Score: 5/5

Safe to merge; documentation-only reorganization with no runtime changes.

All changed files are markdown/symlink documentation. CLAUDE.md symlinks are correctly created. The only finding is a P2 style inconsistency (@jospalmbier not backtick-wrapped in docs/AGENTS.md). No logic, build, or behavior changes.

docs/AGENTS.md — minor @mention style fix

Comments Outside Diff (1)

  1. docs/AGENTS.md, line 32 (link)

    P2 Unguarded @mention will notify the user on GitHub

    The existing root AGENTS.md wraps GitHub usernames in backticks (e.g. `@thewilloftheshadow`) to prevent unintended notifications. This line leaves @jospalmbier bare, so committing or viewing this file on GitHub will ping that account.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: docs/AGENTS.md
    Line: 32
    
    Comment:
    **Unguarded `@mention` will notify the user on GitHub**
    
    The existing root `AGENTS.md` wraps GitHub usernames in backticks (e.g. `` `@thewilloftheshadow` ``) to prevent unintended notifications. This line leaves `@jospalmbier` bare, so committing or viewing this file on GitHub will ping that account.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: docs/AGENTS.md
Line: 32

Comment:
**Unguarded `@mention` will notify the user on GitHub**

The existing root `AGENTS.md` wraps GitHub usernames in backticks (e.g. `` `@thewilloftheshadow` ``) to prevent unintended notifications. This line leaves `@jospalmbier` bare, so committing or viewing this file on GitHub will ping that account.

```suggestion
- If the docs i18n pipeline is dragging, ping `@jospalmbier` on Discord instead of hacking around it.
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Update AGENTS.md" | Re-trigger Greptile

@vincentkoc
vincentkoc merged commit 80730c5 into main Apr 12, 2026
21 of 27 checks passed
@vincentkoc
vincentkoc deleted the fix/agents-scope-cleanup branch April 12, 2026 08:09
trudbot pushed a commit to trudbot/openclaw that referenced this pull request Apr 12, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
TOMUIV pushed a commit to TOMUIV/openclaw that referenced this pull request Apr 14, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
* docs(agents): add scoped workflow guides

* docs(agents): trim root guide duplication

* Update AGENTS.md

* docs(agents): restore root boundary context

* docs(agents): clarify plugin architecture direction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant