Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Stop re-explaining your project to AI coding agents.**

MemoryGuard is a local-first developer CLI that turns durable project facts into generated context files for coding agents. It helps keep `AGENTS.md`, `CLAUDE.md`, `MEMORY.md`, and Cursor rules aligned with the current truth of your project, while redacting secret-looking values before they reach generated context.
MemoryGuard is a local-first developer CLI that turns durable project facts into generated context files for coding agents. It helps keep `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `MEMORY.md`, and Cursor rules aligned with the current truth of your project, while redacting secret-looking values before they reach generated context.

**[Visit the public alpha site and quickstart](https://atharvmantri.github.io/MemoryGuard/)**

Expand Down Expand Up @@ -218,6 +218,7 @@ MemoryGuard Context Sync writes managed blocks to:

- `AGENTS.md`
- `CLAUDE.md`
- `.github/copilot-instructions.md`
- `MEMORY.md`
- `.cursor/rules/memoryguard.mdc`

Expand Down Expand Up @@ -245,7 +246,7 @@ MemoryGuard redacts common secret-looking values before displaying capture candi

projectmem is stronger today for event-sourced memory, pre-commit warnings, cross-project memory, and judgment workflows.

MemoryGuard has a different focus: context-file sync for `AGENTS.md`, `CLAUDE.md`, `MEMORY.md`, and Cursor rules. MemoryGuard's wedge is current project truth, supersession of outdated decisions, and secret-safe generated context. Different focus, not fake superiority.
MemoryGuard has a different focus: context-file sync for `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `MEMORY.md`, and Cursor rules. MemoryGuard's wedge is current project truth, supersession of outdated decisions, and secret-safe generated context. Different focus, not fake superiority.

## Roadmap

Expand Down
4 changes: 4 additions & 0 deletions apps/landing/app/docs/context-sync/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export default function ContextSyncPage() {
<li>
<code>CLAUDE.md</code>
</li>
<li>
<code>.github/copilot-instructions.md</code>
</li>
<li>
<code>MEMORY.md</code>
</li>
Expand Down Expand Up @@ -80,6 +83,7 @@ memoryguard context watch --yes --once`}</CodeBlock>
<p>
Treat generated context as code-adjacent output. Review{" "}
<code>AGENTS.md</code>, <code>CLAUDE.md</code>,{" "}
<code>.github/copilot-instructions.md</code>, <code>MEMORY.md</code>,{" "}
<code>MEMORY.md</code>, and the Cursor rules before committing or
sharing them.
</p>
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/app/docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const cards = [
[
"/docs/context-sync",
"Context Sync",
"Render approved project memory into AGENTS.md, CLAUDE.md, MEMORY.md, and Cursor rules.",
"Render approved project memory into AGENTS.md, CLAUDE.md, Copilot instructions, MEMORY.md, and Cursor rules.",
],
[
"/docs/security",
Expand Down
3 changes: 2 additions & 1 deletion apps/landing/app/docs/security/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default function SecurityPage() {
MemoryGuard attempts to detect and omit secret-looking content
before rendering generated context. This is a guardrail, not a
guarantee. Review <code>AGENTS.md</code>, <code>CLAUDE.md</code>,{" "}
<code>MEMORY.md</code>, and the Cursor rules before publishing.
<code>.github/copilot-instructions.md</code>, <code>MEMORY.md</code>, and
the Cursor rules before publishing.
</p>

<h2>Transcript hygiene</h2>
Expand Down
13 changes: 7 additions & 6 deletions apps/landing/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const features: {
{
kicker: "Sync",
title: "One memory store. Many agent files.",
body: "Render approved project memory into AGENTS.md, CLAUDE.md, MEMORY.md, and Cursor rules.",
body: "Render approved project memory into AGENTS.md, CLAUDE.md, Copilot instructions, MEMORY.md, and Cursor rules.",
icon: "⇄",
wide: true,
},
Expand Down Expand Up @@ -91,7 +91,7 @@ const compRows: {
generic: CellKind;
mg: CellKind;
}[] = [
{ capability: "Syncs AGENTS.md / CLAUDE.md / MEMORY.md / Cursor rules", manual: "partial", generic: "partial", mg: "yes" },
{ capability: "Syncs AGENTS.md / CLAUDE.md / Copilot / MEMORY.md / Cursor rules", manual: "partial", generic: "partial", mg: "yes" },
{ capability: "Review-first transcript capture", manual: "no", generic: "partial", mg: "yes" },
{ capability: "Supersedes outdated project decisions", manual: "no", generic: "partial", mg: "yes" },
{ capability: "Secret-aware generated context", manual: "no", generic: "partial", mg: "yes" },
Expand All @@ -106,7 +106,7 @@ const workflow = [
{ step: "Sync", desc: "Write clean context into the files your tools already inspect.", cmd: "memoryguard sync" },
];

const generatedFiles = ["AGENTS.md", "CLAUDE.md", "MEMORY.md", ".cursor/rules/memoryguard.mdc"];
const generatedFiles = ["AGENTS.md", "CLAUDE.md", ".github/copilot-instructions.md", "MEMORY.md", ".cursor/rules/memoryguard.mdc"];

/* ── Page ─────────────────────────────────────────────────── */

Expand All @@ -122,7 +122,7 @@ export default function HomePage() {
MemoryGuard keeps your project&apos;s agent context files accurate
across sessions. Capture decisions, review what matters, supersede
outdated facts, and sync clean context into AGENTS.md, CLAUDE.md,
MEMORY.md, and Cursor rules.
.github/copilot-instructions.md, MEMORY.md, and Cursor rules.
</p>
<div className="hero-actions">
<Button href={githubUrl} variant="primary">Star on GitHub</Button>
Expand Down Expand Up @@ -224,7 +224,7 @@ export default function HomePage() {
[ok] uv on PATH
$ memoryguard demo
Agent Capture demo passed.
Extracted 10 candidates, approved 9, wrote 4 context files.`}
Extracted 10 candidates, approved 9, wrote 5 context files.`}
</Terminal>
</div>
</section>
Expand Down Expand Up @@ -306,13 +306,14 @@ function ProductMockup() {
<div className="mockup-panel-title">Generated Context</div>
<div className="gen-file">AGENTS.md</div>
<div className="gen-file">CLAUDE.md</div>
<div className="gen-file">Copilot instructions</div>
<div className="gen-file">MEMORY.md</div>
<div className="gen-file">Cursor rules</div>
</div>
<div className="mockup-terminal">
<span className="cmd">$ memoryguard capture approve --all</span><br />
<span className="cmd">$ memoryguard sync</span><br />
<span className="ok">✓ wrote 4 context files</span>
<span className="ok">✓ wrote 5 context files</span>
</div>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def test_status_shows_project_health(tmp_path):
assert "AGENTS.md" in result.stdout
assert "CLAUDE.md" in result.stdout
assert "MEMORY.md" in result.stdout
assert ".github/copilot-instructions.md" in result.stdout
assert ".cursor/rules/memoryguard.mdc" in result.stdout
assert "suggested next command" in out
assert 'memoryguard remember "This project uses ..."' in result.stdout
Expand Down Expand Up @@ -785,8 +786,8 @@ def test_doctor_exit_zero_when_store_and_context_files_present(tmp_path):
out = result.stdout
# Store + context-files rows are explicit "pass" cells.
assert "pass" in out
# The context-files row should report "all 4 present" once sync wrote them.
assert "all 4 present" in out
# The context-files row should report "all 5 present" once sync wrote them.
assert "all 5 present" in out
# The friendly "all checks passed" verdict is rendered on a full pass.
assert "all checks passed" in out.lower()

Expand Down
1 change: 1 addition & 0 deletions packages/core/memoryguard_core/context_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"AGENTS.md",
"CLAUDE.md",
"MEMORY.md",
".github/copilot-instructions.md",
".cursor/rules/memoryguard.mdc",
)

Expand Down
24 changes: 24 additions & 0 deletions packages/core/tests/test_context_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,30 @@ def test_context_generation_uses_memories_and_repo_metadata(tmp_path):
assert "Package manager: pnpm" in agents.proposed


def test_context_generation_includes_copilot_repository_instructions(tmp_path):
engine = _engine(tmp_path)
engine.create_memory(
content="Use focused tests for feature changes.",
source_type=SourceType.USER,
source_ref="user://qa",
scope=Scope.PROJECT,
scope_ref="demo",
)

plan = build_context_sync_plan(tmp_path, engine.store)
copilot = next(
item for item in plan.files if item.path == ".github/copilot-instructions.md"
)

assert "Use focused tests for feature changes." in copilot.proposed
write_pending_context_plan(plan)
written, paths = approve_context_sync(tmp_path)

assert written == 5
assert ".github/copilot-instructions.md" in paths
assert (tmp_path / ".github/copilot-instructions.md").is_file()


def test_context_generation_redacts_secrets(tmp_path):
engine = _engine(tmp_path)
engine.create_memory(
Expand Down
Loading