Skip to content

chore: expand agent guidelines#1018

Merged
zxch3n merged 4 commits into
mainfrom
zxch3n/optimize-context-engineering
Jun 16, 2026
Merged

chore: expand agent guidelines#1018
zxch3n merged 4 commits into
mainfrom
zxch3n/optimize-context-engineering

Conversation

@zxch3n

@zxch3n zxch3n commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Expand root agent context with project structure, verified commands, workflow rules, and a short context index
  • Add CLAUDE.md symlinks to AGENTS.md so Claude and Codex share the same context entries
  • Add nested loro-internal agent indexes for encoding/import-export and state/mergeable-container work
  • Add verified context articles for internal encoding and mergeable container concepts
  • Add a self-maintained context policy and context discoverability backlog
  • Add detailed WASM package agent guidance for pending event flushing, package outputs, and bundler validation
  • Mine the most recent 100 commits and close the highest-priority context gaps found by cold-start subagent probes

Recent 100 Commit Mining

Theme Signal Context action
WASM packaging and bundler outputs package metadata/changelog/build files were among the highest-churn files Kept wasm package rules in crates/loro-wasm/AGENTS.md and fixed stale allowlist wording plus bundler smoke README expectation
Encoding/import/shallow snapshot behavior repeated changes in fast_snapshot.rs, shallow_snapshot.rs, and import rollback tests Indexed current modes, outdated modes, shallow/state-only/snapshot-at behavior, rollback, and validation shortcuts in context/internal-encoding.md
Mergeable containers recent feature and follow-up fixes touch visibility, deterministic IDs, and tests Indexed marker/cid model, conflict behavior, encoding retention, and test entrypoints in context/mergeable-containers.md
Pre-shallow history operations subagent needed 10 hops to connect checkout/diff/revert safety to shallow root behavior Added pre-shallow frontier safety to context/internal-encoding.md, pointing agents to SwitchToVersionBeforeShallowRoot and focused tests

Hop Measurement

Domain Initial subagent result Follow-up
Internal encoding 2 discovery hops: AGENTS.md -> context/internal-encoding.md Healthy; no extra indexing needed
Mergeable containers 2 discovery hops: AGENTS.md -> context/mergeable-containers.md Healthy; no extra indexing needed
WASM packaging 2 discovery hops: AGENTS.md -> crates/loro-wasm/AGENTS.md; found stale prototype wording and stale README expected JSON Fixed both stale docs; post-fix verifier still found 2 hops and no inaccuracies
Shallow/import/undo seam 10 hops for pre-shallow checkout/diff/revert constraints Added missing index entry; post-fix verifier found 2 hops and no inaccuracies

Validation

  • Reinstalled and reread zxch3n/context-engineering skill
  • wc -m budget check for AGENTS files
  • Markdown relative-link resolver script
  • git diff --check origin/main...HEAD
  • Scanned updated context files for TODO/placeholder text
  • Cross-checked new claims against crates/loro-wasm/index.ts, examples/bundler-smoke-tests/scripts/run.mjs, crates/loro-internal/src/loro.rs, and shallow-root regression tests
  • Ran two post-fix cold-start verifier subagents for WASM pending-event wrappers and pre-shallow checkout/diff/revert indexing

Docs/context-only change; no Rust or JS tests were run.

@github-actions

Copy link
Copy Markdown
Contributor

WASM Size Report

  • Original size: 3031.66 KB
  • Gzipped size: 1000.27 KB
  • Brotli size: 702.63 KB

@zxch3n zxch3n merged commit 6424c38 into main Jun 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant