Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9507269
fix: Windows cross-platform compatibility
bilersan Mar 17, 2026
19e9ab7
feat: add Copilot Chat session parser for recall
bilersan Mar 17, 2026
7dcbdf6
feat: VS Code extension with MCP integration and detection ring
bilersan Mar 17, 2026
f83ba41
feat: MCP governance engine with detection ring integration
bilersan Mar 17, 2026
6dbcf66
fix(vscode): resolve Insiders dual extension host hang
bilersan Mar 17, 2026
e4601ca
fix: CI failures and marketplace readiness
bilersan Mar 18, 2026
bf18bb0
fix: resolve build errors after rebase onto v0.8.0
bilersan Mar 25, 2026
28c6bac
docs: persist session context for PR #45 v0.8.0 rebase
bilersan Mar 25, 2026
43fd029
feat: Copilot CLI hook generation (Phase 1)
bilersan Mar 25, 2026
f8857d0
feat: Phase 2 agent instructions and Copilot CLI extras
bilersan Mar 25, 2026
c0cbca4
feat(copilot-cli): Phase 3 — MCP registration + session parser
bilersan Mar 25, 2026
31fdab2
feat(copilot-cli): Phase 4 — Copilot CLI skill templates
bilersan Mar 25, 2026
2d71229
Merge main into feat/copilot-governance (PR #45 conflict resolution)
josealekhine Apr 1, 2026
252087c
Remove zombie prompt templates reintroduced by PR #45
josealekhine Apr 1, 2026
7d70df9
Move PR #45 rebase session notes from .context/sessions/ to specs/
josealekhine Apr 1, 2026
7bf3d3d
Add Copilot CLI skill sync from canonical ctx skills
josealekhine Apr 1, 2026
2f4859d
copilot changes.
josealekhine Apr 1, 2026
f4b7b1f
Rename ctx hook → ctx setup, assets/hooks → assets/integrations
josealekhine Apr 1, 2026
cb2ae97
Fix copilot-instructions.md list formatting: dashes back to colons
josealekhine Apr 1, 2026
5063759
Move hook messages back to assets/hooks/messages/
josealekhine Apr 1, 2026
ca3e17a
Remove dead VS Code template overrides
josealekhine Apr 1, 2026
e44893b
Refactor VS Code artifacts: extract magic strings, split writers
josealekhine Apr 1, 2026
f5a6c93
Move VS Code writers to core/vscode/ subpackage, fix magic newlines
josealekhine Apr 1, 2026
bb1a93d
Move copilot-instructions.md to integrations/copilot/
josealekhine Apr 1, 2026
6e0492c
Code quality sweep: conventions, magic strings, package structure
josealekhine Apr 1, 2026
7f4b0ec
Convention sweep: docstrings, magic strings, package structure
josealekhine Apr 1, 2026
91fa3a0
Extract magic strings from setup/run.go and vscode/mcp.go
josealekhine Apr 1, 2026
789e22b
Extract setup deployment logic to core packages
josealekhine Apr 1, 2026
bdc4660
Split ensureVSCodeMCP to own file, rename DeployHooks to Deploy
josealekhine Apr 1, 2026
5217c40
Fix magic skip strings in copilot_cli deploy helpers
josealekhine Apr 1, 2026
800e65b
Split copilot.go into domain-specific files
josealekhine Apr 1, 2026
976493d
Enrich governance.go docstrings
josealekhine Apr 1, 2026
b50e192
Final quality pass: magic numbers, docstrings, file conventions
josealekhine Apr 1, 2026
9973278
Fix last cmd.Println in copilot_cli Deploy
josealekhine Apr 1, 2026
fa4a2e9
Move Copilot parser constants to config/copilot package
josealekhine Apr 1, 2026
6d8de4c
Move governance types to types.go, extract violations to own file
josealekhine Apr 1, 2026
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
43 changes: 0 additions & 43 deletions .context/PROMPT.md

This file was deleted.

2 changes: 1 addition & 1 deletion .context/architecture-dia-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ctx/
│ │ ├── doctor/ # ctx doctor
│ │ ├── drift/ # ctx drift
│ │ ├── guide/ # ctx guide
│ │ ├── hook/ # ctx hook
│ │ ├── setup/ # ctx setup
│ │ ├── initialize/ # ctx init
│ │ ├── journal/ # ctx journal
│ │ ├── learning/ # ctx learning
Expand Down
4 changes: 2 additions & 2 deletions .context/templates/decision.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
**Context**: [What situation prompted this decision? What constraints exist?]

**Alternatives Considered**:
1. **[Option A]**: [Description] Pros: [...] / Cons: [...]
2. **[Option B]**: [Description] Pros: [...] / Cons: [...]
1. **[Option A]**: [Description]: Pros: [...] / Cons: [...]
2. **[Option B]**: [Description]: Pros: [...] / Cons: [...]

**Decision**: [What was decided?]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Context System

This project uses Context (`ctx`) for persistent AI context
management. Your memory is NOT ephemeral: it lives in `.context/` files.
management. Your memory is NOT ephemeral it lives in `.context/` files.

## On Session Start

Expand Down Expand Up @@ -50,7 +50,7 @@ After completing meaningful work, save a session summary to
Create a file named `YYYY-MM-DD-topic.md`:

```markdown
# Session: YYYY-MM-DD - Brief Topic Description
# Session: YYYY-MM-DD Brief Topic Description

## What Was Done
- Describe completed work items
Expand All @@ -77,20 +77,20 @@ Create a file named `YYYY-MM-DD-topic.md`:

Proactively update context files as you work:

| Event | Action |
|-----------------------------|----------------------------------|
| Made architectural decision | Add to `.context/DECISIONS.md` |
| Discovered gotcha/bug | Add to `.context/LEARNINGS.md` |
| Event | Action |
|-----------------------------|-------------------------------------|
| Made architectural decision | Add to `.context/DECISIONS.md` |
| Discovered gotcha/bug | Add to `.context/LEARNINGS.md` |
| Established new pattern | Add to `.context/CONVENTIONS.md` |
| Completed task | Mark [x] in `.context/TASKS.md` |
| Completed task | Mark [x] in `.context/TASKS.md` |

## Self-Check

Periodically ask yourself:

> "If this session ended right now, would the next session know what happened?"

If no: save a session file or update context files before continuing.
If no save a session file or update context files before continuing.

## CLI Commands

Expand All @@ -100,7 +100,7 @@ If `ctx` is installed, use these commands:
ctx status # Context summary and health check
ctx agent # AI-ready context packet
ctx drift # Check for stale context
ctx journal source # Recent session history
ctx recall list # Recent session history
```

<!-- ctx:copilot:end -->
57 changes: 57 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Context - Claude Code Context


# Project Context

<!-- ctx:context -->
<!-- DO NOT REMOVE: This marker indicates ctx-managed content -->

## IMPORTANT: You Have Persistent Memory

This project uses Context (`ctx`) for context persistence across sessions.
**Your memory is NOT ephemeral** — it lives in the `.context/` directory.

## On Session Start

1. **Read `.context/AGENT_PLAYBOOK.md`** — it explains how to use this system
2. **Run `ctx agent --budget 4000`** in a terminal for an AI-optimized context summary
3. **Check `.context/TASKS.md`** for active work items

## When Asked "Do You Remember?"

**Do this FIRST (silently):**
- Read TASKS.md, DECISIONS.md, and LEARNINGS.md from `.context/`
- Run `ctx recall list --limit 5` for recent session history

**Then respond with a structured readback:**

1. **Last session**: cite the most recent session topic and date
2. **Active work**: list pending or in-progress tasks
3. **Recent context**: mention 1-2 recent decisions or learnings
4. **Next step**: offer to continue or ask what to focus on

**Never** lead with "I don't have memory." The `.context/` files are
your memory. Read them silently, then present what you found as recall.

## Quick Context Load

```bash
# Get AI-optimized context packet (what you should know)
ctx agent --budget 4000

# Or see full status
ctx status
```

## Context Files

| File | Purpose |
|------|---------|
| CONSTITUTION.md | Hard rules - NEVER violate |
| TASKS.md | Current work items |
| DECISIONS.md | Architectural decisions with rationale |
| LEARNINGS.md | Gotchas, tips, lessons learned |
| CONVENTIONS.md | Code patterns and standards |

All files live in the `.context/` directory.

<!-- ctx:end -->

## IMPORTANT: You Have Persistent Memory

This project uses Context (ctx) for context persistence across sessions.
Expand Down
6 changes: 3 additions & 3 deletions IMPLEMENTATION_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ This file provides high-level direction. Detailed tasks live in `.context/TASKS.

What does "done" look like for this project?

1. **Goal** Define your end state
2. **Validation** How will you know it works?
3. **Handoff** Can someone else pick this up?
1. **Goal**: Define your end state
2. **Validation**: How will you know it works?
3. **Handoff**: Can someone else pick this up?

## Notes

Expand Down
27 changes: 24 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.PHONY: build test vet fmt lint lint-style lint-drift clean all release build-all help \
test-coverage smoke site site-feed site-serve site-serve-lan site-setup audit check plugin-reload \
journal journal-serve journal-serve-lan gpg-fix gpg-test register-mcp reinstall \
sync-version check-version-sync sync-why check-why gemini-search
sync-version check-version-sync sync-why check-why sync-copilot-skills check-copilot-skills gemini-search

# Default binary name and output
BINARY := ctx
Expand All @@ -21,8 +21,8 @@ sync-version:
mv internal/assets/claude/.claude-plugin/plugin.json.tmp internal/assets/claude/.claude-plugin/plugin.json; \
echo "Plugin version synced to $$V"

## build: Build for current platform (syncs version + embedded docs first)
build: sync-version sync-why
## build: Build for current platform (syncs version + embedded docs + copilot skills first)
build: sync-version sync-why sync-copilot-skills
CGO_ENABLED=0 go build -ldflags="-X github.com/ActiveMemory/ctx/internal/bootstrap.version=$$(cat VERSION | tr -d '[:space:]')" -o $(OUTPUT) ./cmd/ctx

## test: Run tests with coverage summary
Expand Down Expand Up @@ -128,6 +128,8 @@ audit:
@$(MAKE) --no-print-directory check-version-sync
@echo "==> Checking why docs freshness..."
@$(MAKE) --no-print-directory check-why
@echo "==> Checking Copilot skills freshness..."
@$(MAKE) --no-print-directory check-copilot-skills
@echo "==> Running tests..."
@CGO_ENABLED=0 CTX_SKIP_PATH_CHECK=1 go test ./...
@echo ""
Expand Down Expand Up @@ -251,6 +253,25 @@ check-version-sync:
fi; \
echo "Version sync OK ($$V)."

## sync-copilot-skills: Sync Copilot CLI skills from canonical ctx skills
sync-copilot-skills:
@./hack/sync-copilot-skills.sh

## check-copilot-skills: Verify Copilot CLI skills match ctx source skills
check-copilot-skills:
@TMPDIR=$$(mktemp -d) && \
cp -r internal/assets/integrations/copilot-cli/skills/ "$$TMPDIR/before" && \
./hack/sync-copilot-skills.sh > /dev/null && \
if ! diff -rq "$$TMPDIR/before" internal/assets/integrations/copilot-cli/skills/ > /dev/null 2>&1; then \
echo "FAIL: Copilot CLI skills are stale — run 'make sync-copilot-skills'"; \
diff -rq "$$TMPDIR/before" internal/assets/integrations/copilot-cli/skills/ || true; \
cp -r "$$TMPDIR/before/"* internal/assets/integrations/copilot-cli/skills/; \
rm -rf "$$TMPDIR"; \
exit 1; \
fi; \
rm -rf "$$TMPDIR"; \
echo "Copilot CLI skills are in sync."

## check-why: Verify embedded why docs match source docs
check-why:
@diff -q docs/index.md internal/assets/why/manifesto.md || (echo "FAIL: manifesto.md is stale — run 'make sync-why'" && exit 1)
Expand Down
4 changes: 2 additions & 2 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ created by `ctx init`. Running a command without one produces:
ctx: not initialized - run "ctx init" first
```

Commands that work before initialization: `ctx init`, `ctx hook`,
Commands that work before initialization: `ctx init`, `ctx setup`,
`ctx doctor`, and grouping commands that only show help (e.g. `ctx`
with no subcommand, `ctx system`). Hidden hook commands have their
own guards and no-op gracefully.
Expand All @@ -60,7 +60,7 @@ own guards and no-op gracefully.
| [`ctx journal`](recall.md#ctx-journal) | Generate static site from journal entries |
| [`ctx serve`](recall.md#ctx-serve) | Serve any zensical directory (default: journal site) |
| [`ctx watch`](tools.md#ctx-watch) | Auto-apply context updates from AI output |
| [`ctx hook`](tools.md#ctx-hook) | Generate AI tool integration configs |
| [`ctx setup`](tools.md#ctx-hook) | Generate AI tool integration configs |
| [`ctx loop`](tools.md#ctx-loop) | Generate autonomous loop script |
| [`ctx memory`](tools.md#ctx-memory) | Bridge Claude Code auto memory into .context/ |
| [`ctx notify`](tools.md#ctx-notify) | Send webhook notifications |
Expand Down
12 changes: 6 additions & 6 deletions docs/cli/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ ctx watch --dry-run

---

### `ctx hook`
### `ctx setup`

Generate AI tool integration configuration.

```bash
ctx hook <tool> [flags]
ctx setup <tool> [flags]
```

**Flags**:
Expand All @@ -68,17 +68,17 @@ ctx hook <tool> [flags]

!!! note "Claude Code Uses the Plugin system"
Claude Code integration is now provided via the `ctx` plugin.
Running `ctx hook claude-code` prints plugin install instructions.
Running `ctx setup claude-code` prints plugin install instructions.

**Example**:

```bash
# Print hook instructions to stdout
ctx hook cursor
ctx hook aider
ctx setup cursor
ctx setup aider

# Generate and write .github/copilot-instructions.md
ctx hook copilot --write
ctx setup copilot --write
```

---
Expand Down
2 changes: 1 addition & 1 deletion docs/home/common-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ These are infrastructure: used in scripts, CI, or one-time setup.
| `ctx task complete` | Mark a task done by substring match |
| `ctx sync` | Reconcile context with codebase state |
| `ctx compact` | Consolidate and clean up context files |
| `ctx hook` | Generate AI tool integration config |
| `ctx setup` | Generate AI tool integration config |
| `ctx watch` | Watch AI output and auto-apply context updates |
| `ctx serve` | Serve any zensical directory (default: journal) |
| `ctx permission snapshot` | Save settings as a golden image |
Expand Down
2 changes: 1 addition & 1 deletion docs/home/first-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ via hooks, but the explicit ceremony gives you a **readback** to verify.
With **VS Code Copilot Chat** (*and the
[ctx extension](../operations/integrations.md#vs-code-chat-extension-ctx)*),
type `@ctx /agent` in chat to load your context packet, or `@ctx /status`
to check your project context. Run `ctx hook copilot --write` once
to check your project context. Run `ctx setup copilot --write` once
to generate `.github/copilot-instructions.md` for automatic context loading.

If you are not using Claude Code, generate a
Expand Down
2 changes: 1 addition & 1 deletion docs/home/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ via hooks.
With **VS Code Copilot Chat**, install the
[ctx extension](../operations/integrations.md#vs-code-chat-extension-ctx) and use
`@ctx /status`, `@ctx /agent`, and other slash commands directly in chat.
Run `ctx hook copilot --write` to generate `.github/copilot-instructions.md`
Run `ctx setup copilot --write` to generate `.github/copilot-instructions.md`
for automatic context loading.

For other tools, paste the output of:
Expand Down
10 changes: 5 additions & 5 deletions docs/operations/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ files directly.

```bash
# Generate Cursor configuration
ctx hook cursor
ctx setup cursor

# Initialize context
ctx init --minimal
Expand Down Expand Up @@ -390,7 +390,7 @@ Aider works well with context files through its `--read` flag.

```bash
# Generate Aider configuration
ctx hook aider
ctx setup aider

# Initialize context
ctx init
Expand Down Expand Up @@ -444,7 +444,7 @@ instructions file, a VS Code Chat extension, and manual patterns.
ctx init

# Generate .github/copilot-instructions.md
ctx hook copilot --write
ctx setup copilot --write
```

The `--write` flag creates `.github/copilot-instructions.md`, which
Expand All @@ -453,7 +453,7 @@ contains your project's constitution rules, current tasks, conventions,
and architecture: giving Copilot persistent context without manual
copy-paste.

Re-run `ctx hook copilot --write` after updating your `.context/` files
Re-run `ctx setup copilot --write` after updating your `.context/` files
to regenerate the instructions.

### VS Code Chat Extension (`@ctx`)
Expand Down Expand Up @@ -568,7 +568,7 @@ Windsurf supports custom instructions and file-based context.

```bash
# Generate Windsurf configuration
ctx hook windsurf
ctx setup windsurf

# Initialize context
ctx init
Expand Down
10 changes: 5 additions & 5 deletions docs/operations/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ to it:
You can generate a tool-specific configuration with:

```bash
ctx hook cursor # Generate Cursor config snippet
ctx hook aider # Generate .aider.conf.yml
ctx hook copilot # Generate Copilot tips
ctx hook windsurf # Generate Windsurf config
ctx setup cursor # Generate Cursor config snippet
ctx setup aider # Generate .aider.conf.yml
ctx setup copilot # Generate Copilot tips
ctx setup windsurf # Generate Windsurf config
```

### Migrating Content Into `.context/`
Expand Down Expand Up @@ -296,7 +296,7 @@ You don't need the whole team to switch at once:

1. One person runs `ctx init --merge` and commits;
2. `CLAUDE.md` instructions work immediately for Claude Code users;
3. Other tool users can adopt at their own pace using `ctx hook <tool>`;
3. Other tool users can adopt at their own pace using `ctx setup <tool>`;
4. Context files benefit everyone who reads them, even without tool integration.

---
Expand Down
Loading
Loading