chore: ai written CLAUDE.md files#271
Conversation
📝 WalkthroughWalkthroughThis PR establishes a centralized documentation structure for the NEAR Intents project, creating a root ChangesDocumentation Structure and Subsystem Guides
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/AGENTS.md:
- Around line 157-169: The listed CLAUDE documentation links (e.g.,
contracts/defuse/CLAUDE.md, contracts/escrow-swap/CLAUDE.md,
contracts/global-deployer/CLAUDE.md, contracts/outlayer-app/CLAUDE.md,
contracts/poa/CLAUDE.md, contracts/wallet/CLAUDE.md, crates/outlayer/CLAUDE.md)
are pointing to the wrong locations; update each reference to include the hidden
`.claude/` directory (e.g., contracts/defuse/.claude/CLAUDE.md,
contracts/escrow-swap/.claude/CLAUDE.md, etc.) so the links match the PR’s file
layout and are not stale.
In `@crates/outlayer/.agents/AGENTS.md`:
- Around line 9-17: The fenced code block containing the architecture diagram
(the block that begins with "on-chain: defuse-outlayer-app ..." and ends with
"Executor → vm-runner (wasmtime) + host imports") lacks a language hint; update
the opening triple-backtick to include the text language hint (change ``` to
```text) so the Markdown linter MD040 is satisfied and keep the closing
triple-backtick as-is.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9365f3a3-8325-463a-801e-32f14142107f
📒 Files selected for processing (15)
.agents/AGENTS.mdcontracts/defuse/.agents/AGENTS.mdcontracts/defuse/.claude/CLAUDE.mdcontracts/escrow-swap/.agents/AGENTS.mdcontracts/escrow-swap/.claude/CLAUDE.mdcontracts/global-deployer/.agents/AGENTS.mdcontracts/global-deployer/.claude/CLAUDE.mdcontracts/outlayer-app/.agents/AGENTS.mdcontracts/outlayer-app/.claude/CLAUDE.mdcontracts/poa/.agents/AGENTS.mdcontracts/poa/.claude/CLAUDE.mdcontracts/wallet/.agents/AGENTS.mdcontracts/wallet/.claude/CLAUDE.mdcrates/outlayer/.agents/AGENTS.mdcrates/outlayer/.claude/CLAUDE.md
| - `contracts/defuse/CLAUDE.md` — the **Verifier**, the core of NEAR Intents | ||
| (largest contract in the repo, `far` variant available). | ||
| - `contracts/escrow-swap/CLAUDE.md` — deterministic escrow-swap (NEP-616, | ||
| immutable params). | ||
| - `contracts/global-deployer/CLAUDE.md` — two-step approve/deploy manager for | ||
| global contract code on NEP-616 accounts (upgrade mechanism for NEP-591). | ||
| - `contracts/outlayer-app/CLAUDE.md` — on-chain piece of Outlayer; per-app | ||
| `(code_hash, code_url)` reference at a deterministic account. | ||
| - `contracts/poa/CLAUDE.md` — Proof-of-Authority bridge factory + token. | ||
| - `contracts/wallet/CLAUDE.md` — generic sharded account-abstraction wallet | ||
| (**not audited yet**). | ||
| - `crates/outlayer/CLAUDE.md` — the off-chain Outlayer runtime | ||
| (wasmtime-based component sandbox), spanning 9 subcrates. This is becoming a |
There was a problem hiding this comment.
Fix subsystem CLAUDE paths to include .claude/ directory.
The pointers in this section reference .../CLAUDE.md, but this PR’s structure places these files at .../.claude/CLAUDE.md. As written, these links are stale/misleading (see Line 157 onward).
Suggested patch
-- `contracts/defuse/CLAUDE.md` — the **Verifier**, the core of NEAR Intents
+- `contracts/defuse/.claude/CLAUDE.md` — the **Verifier**, the core of NEAR Intents
...
-- `contracts/escrow-swap/CLAUDE.md` — deterministic escrow-swap (NEP-616,
+- `contracts/escrow-swap/.claude/CLAUDE.md` — deterministic escrow-swap (NEP-616,
...
-- `contracts/global-deployer/CLAUDE.md` — two-step approve/deploy manager for
+- `contracts/global-deployer/.claude/CLAUDE.md` — two-step approve/deploy manager for
...
-- `contracts/outlayer-app/CLAUDE.md` — on-chain piece of Outlayer; per-app
+- `contracts/outlayer-app/.claude/CLAUDE.md` — on-chain piece of Outlayer; per-app
...
-- `contracts/poa/CLAUDE.md` — Proof-of-Authority bridge factory + token.
+- `contracts/poa/.claude/CLAUDE.md` — Proof-of-Authority bridge factory + token.
-- `contracts/wallet/CLAUDE.md` — generic sharded account-abstraction wallet
+- `contracts/wallet/.claude/CLAUDE.md` — generic sharded account-abstraction wallet
...
-- `crates/outlayer/CLAUDE.md` — the off-chain Outlayer runtime
+- `crates/outlayer/.claude/CLAUDE.md` — the off-chain Outlayer runtime🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.agents/AGENTS.md around lines 157 - 169, The listed CLAUDE documentation
links (e.g., contracts/defuse/CLAUDE.md, contracts/escrow-swap/CLAUDE.md,
contracts/global-deployer/CLAUDE.md, contracts/outlayer-app/CLAUDE.md,
contracts/poa/CLAUDE.md, contracts/wallet/CLAUDE.md, crates/outlayer/CLAUDE.md)
are pointing to the wrong locations; update each reference to include the hidden
`.claude/` directory (e.g., contracts/defuse/.claude/CLAUDE.md,
contracts/escrow-swap/.claude/CLAUDE.md, etc.) so the links match the PR’s file
layout and are not stale.
| ``` | ||
| on-chain: defuse-outlayer-app { admin_id, code_hash, code_url } | ||
| AccountId = NEP-616(StateInit) | ||
| │ | ||
| ▼ | ||
| off-chain: Outlayer service → Resolver (URL → bytes; verify SHA-256) | ||
| Cache (moka, keyed by hash) | ||
| Executor → vm-runner (wasmtime) + host imports | ||
| ``` |
There was a problem hiding this comment.
Add a language hint to the fenced block to satisfy markdown lint.
The code fence starting at Line 9 has no language, triggering MD040. Use text for the architecture diagram.
Suggested patch
-```
+```text
on-chain: defuse-outlayer-app { admin_id, code_hash, code_url }
AccountId = NEP-616(StateInit)
│
▼
off-chain: Outlayer service → Resolver (URL → bytes; verify SHA-256)
Cache (moka, keyed by hash)
Executor → vm-runner (wasmtime) + host imports</details>
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>
[warning] 9-9: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @crates/outlayer/.agents/AGENTS.md around lines 9 - 17, The fenced code block
containing the architecture diagram (the block that begins with "on-chain:
defuse-outlayer-app ..." and ends with "Executor → vm-runner (wasmtime) + host
imports") lacks a language hint; update the opening triple-backtick to include
the text language hint (change totext) so the Markdown linter MD040 is
satisfied and keep the closing triple-backtick as-is.
</details>
<!-- fingerprinting:phantom:triton:hawk -->
<!-- This is an auto-generated comment by CodeRabbit -->
Summary by CodeRabbit