Repository navigation
docs: improve LocalAi module documentation and agent coding rules - #1329
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 9, 2026, 12:17 PM ET / 16:17 UTC (Revision 7). ClawSweeper reviewWhat this changesAdds ownership explanations and usage examples to nine Local AI modules, concise coding rules, and a Claude instruction file importing repository guidance. Merge readiness⛔ Blocked before merge - 2 items remain The earlier example defects are corrected, and this remains a useful documentation contribution without an established merged replacement. No blocking patch defect remains, but the external-PR real-behavior proof requirement is still unmet. Priority: P3 Review scores
Verification
How this fits togetherThe Windows companion manages a local llama-server process using installation receipts, launch settings, and health/model checks. It publishes the verified endpoint for gateway use and reports runtime state to consumers. flowchart LR
A[Installation receipt] --> B[Router launch settings]
B --> C[Managed local AI process]
C --> D[Health and model checks]
D --> E[Endpoint lifecycle]
E --> F[Gateway routing]
D --> G[Runtime state consumers]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the corrected examples and portable instruction import, supported by observed use of the documented entrypoints. Do we have a high-confidence way to reproduce the issue? Not applicable: this is documentation work, and source inspection confirms the previously reported example errors are corrected. Is this the best way to solve the issue? Yes: the revised comments describe existing owners and APIs without introducing parallel implementations, and the portable import follows the explicit review discussion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5aff6f799e9b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
d2096db to
8fd97be
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Align the Local AI examples with public API contracts and lazy-load semantics, keep agent guidance scoped to repository conventions, and preserve Claude skill discovery. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4f97b3a3-def7-4f33-b7d5-ece171b4fd0b
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
What this improves
Agent-facing context for the Local AI subsystem was thin: the modules under
src/OpenClaw.Connection/LocalAidid not explain their ownership boundaries or demonstrate their primary APIs, and repository coding guidance did not concisely state the existing preference for focused, idiomatic implementation.Changes
/v1endpoint validation, lazy-loadVerified/Loadedsemantics, manifest failure behavior, and gateway batch configurationAGENTS.mdwithout moving the mandatory targeted-validation hierarchyCLAUDE.mdimport ofAGENTS.mdwhile preserving discovery of.agents/skills/No runtime behavior, public API, dependency, workflow, or persisted format changes.
Required proof pools
none: documentation and agent-instruction changes only. The examples were compiled or checked against the current public/internal API surface; no runtime behavior changed.Validation
Current head:
a88d1ae9..\build.ps1: passeddotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore --filter "FullyQualifiedName~LlamaServerClientTests|FullyQualifiedName~LlamaServerInferenceClientTests|FullyQualifiedName~LocalAiPortLifecycleTests": 52 passeddotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,943 passed, 32 skippeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,861 passedReal behavior proof
A scratch .NET 10 console project outside the repository referenced
OpenClaw.Connectionand compiled the public examples for:LlamaServerClient.ProbeManagedModelAsyncusing the requiredhttp://127.0.0.1:<port>/v1endpointLlamaServerInferenceClient.VerifyAsyncLlamaServerRouterConfiguration.BuildLlamaServerRuntimeServiceandILocalAiEndpointLifecycleinjectionLocalAiRuntimeSnapshot.ModelEvidence.StatewithVerified or LoadedreadinessLocalAiGatewayProviderDefinition.BuildProviderJson,BuildProviderBatchJson, andMatchesProviderJsonLocalAiPathsandLocalAiManifestStoreThe proof build succeeded with 0 warnings and 0 errors. The process-host example uses internal types by design and was verified argument-for-argument against the real
LlamaServerRuntimeServicecall site.The source comments also now document these non-obvious invariants:
Verifiedis the healthy lazy-unloaded model state;Loadedmeans active inferenceNot verified / blocked: none for this documentation-only change.
Security impact
No permissions, credentials, network calls, command surfaces, or data-access behavior changed.