Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
507e732
Add Cursor global skills under .cursor/skills for ContextStream locke…
wgutmann Mar 23, 2026
f827dc6
docs: point CLAUDE at ContextStream team skills and memory catalog
wgutmann Mar 23, 2026
d2d5ce3
Add local Prometheus stack, OTLP collector, and plugin OTLP metrics e…
wgutmann Mar 23, 2026
14cf359
Add obs port collision audit script and document SimHub 8889 conflict
wgutmann Mar 23, 2026
705decd
Map OTel collector metrics to host 18889 to avoid SimHub 8889 bind
wgutmann Mar 23, 2026
14db350
docs(skill): ContextStream semantic vs graph pairing and density knobs
wgutmann Mar 23, 2026
969565a
Add secretlint and Gitleaks workflows; use npx for Ollama MCP (portab…
wgutmann Mar 23, 2026
472f6dd
Improve ContextStream mapping: corpus hygiene, code map, ingest npm s…
wgutmann Mar 23, 2026
cfb59bf
obs: load Grafana admin from .env.observability.local and document reset
wgutmann Mar 23, 2026
bf3f885
fix inverted SIMHUB_SKIP_LAUNCH check in deploy.ps1
wgutmann Mar 23, 2026
7cd1d98
Add Grafana deploy health dashboard and Loki deploy markers from depl…
wgutmann Mar 23, 2026
8d3e8b4
load .env dynamically in deploy and observability scripts
wgutmann Mar 23, 2026
7a95c4f
deploy marker: Grafana Cloud Basic auth + clearer Loki push errors
wgutmann Mar 23, 2026
bc1d86e
docs: Loki pipeline matches code (JSONL + deploy marker; no plugin PO…
wgutmann Mar 23, 2026
e5f0f01
load .env via Import-DotEnv in grafana validate/bootstrap/publish scr…
wgutmann Mar 23, 2026
9669fac
deploy: default deploy_marker to local Loki; fix Cloud URL without cr…
wgutmann Mar 23, 2026
94a8dd9
deploy: -EnvFile parameter for secrets (merged with observability .env)
wgutmann Mar 23, 2026
eac9a1f
expose pluginVersion in state, SimHub UI, dashboard; bump Version 1.0.1
wgutmann Mar 23, 2026
c9b5dea
deploy: print plugin version; skills/rules + Loki marker detail; agen…
wgutmann Mar 23, 2026
9ab4526
deploy: warn when SimHub HTTP 8888 down; doc §3b refused connection
wgutmann Mar 23, 2026
5ab1991
deploy: copy all dashboard *.html (incl. data-capture-suite); doc 404…
wgutmann Mar 23, 2026
33cd1f9
deploy: ASCII warning text for TROUBLESHOOTING ref
wgutmann Mar 23, 2026
47e7e5a
deploy: verify all dashboard HTML copied; doc dashboards-in-deploy
wgutmann Mar 23, 2026
1d01d8b
update test suiate and claude
wgutmann Mar 25, 2026
a500fb8
stash
wgutmann Mar 25, 2026
f0211c0
merge: resolve .mcp.json conflict — adopt envmcp from main
wgutmann Mar 25, 2026
1f6829f
post took hook
wgutmann Mar 25, 2026
15d70a9
refactor: clean up Loki logging labels — split app namespaces and con…
wgutmann Mar 25, 2026
4a376af
add Grafana Alloy log shipper + data capture suite logging gaps
wgutmann Mar 25, 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
12 changes: 11 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"mcp__contextstream__search",
"mcp__contextstream__session",
"mcp__contextstream__skill",
"mcp__contextstream__workspace"
"mcp__contextstream__workspace",
"WebSearch",
"mcp__claude_ai_Sentry__*"
]
},
"enabledPlugins": {
"superpowers@claude-plugins-official": true,
"claude-md-management@claude-plugins-official": true,
"github@claude-plugins-official": true,
"security-guidance@claude-plugins-official": true,
"sentry@claude-plugins-official": true,
"code-review@claude-plugins-official": true
}
}
1 change: 1 addition & 0 deletions .claude/worktrees/gifted-wilbur
Submodule gifted-wilbur added at 47e7e5
37 changes: 18 additions & 19 deletions .cursor/mcp.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
{
"mcpServers": {
"ollama": {
"command": "node",
"args": [
"C:\\Users\\winth\\AppData\\Roaming\\npm\\node_modules\\@muhammadmehdi\\ollama-mcp-server\\dist\\index.js"
],
"env": {
"OLLAMA_BASE_URL": "http://localhost:11434",
"OLLAMA_NUM_CTX": "131072"
}
},
"contextstream": {
"command": "npx",
"args": [
"-y",
"envmcp",
"--env-file",
".env",
"cmd",
"/c",
"contextstream-mcp"
],
"command": "cmd",
"env": {
"CONTEXTSTREAM_ALLOW_HEADER_AUTH": "false",
"CONTEXTSTREAM_API_KEY": "cbiq_SlhoP2xlfUE-jzVnFbeOBFSoaPPvf1aFET6TI3P9DXg",
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_AUTO_HIDE_INTEGRATIONS": "true",
"CONTEXTSTREAM_CONSOLIDATED": "true",
Expand All @@ -32,13 +18,26 @@
"CONTEXTSTREAM_LOG_LEVEL": "quiet",
"CONTEXTSTREAM_OUTPUT_FORMAT": "compact",
"CONTEXTSTREAM_PROGRESSIVE_MODE": "false",
"CONTEXTSTREAM_PROJECT_ID": "253a5461-8d7a-410e-a4a8-c8923e49eddc",
"CONTEXTSTREAM_ROUTER_MODE": "false",
"CONTEXTSTREAM_SEARCH_LIMIT": "16",
"CONTEXTSTREAM_SEARCH_MAX_CHARS": "1024",
"CONTEXTSTREAM_SEARCH_LIMIT": "10",
"CONTEXTSTREAM_SEARCH_MAX_CHARS": "800",
"CONTEXTSTREAM_SHOW_TIMING": "false",
"CONTEXTSTREAM_TOOLSET": "standard",
"CONTEXTSTREAM_TRANSCRIPTS_ENABLED": "false",
"CONTEXTSTREAM_USER_AGENT": "contextstream-mcp-rust/0.1.74"
"CONTEXTSTREAM_USER_AGENT": "contextstream-mcp-rust/0.1.77",
"CONTEXTSTREAM_WORKSPACE_ID": "f5c5b873-acfb-47ec-b93b-4acabfa78a8b"
}
},
"ollama": {
"args": [
"-y",
"@muhammadmehdi/ollama-mcp-server"
],
"command": "npx",
"env": {
"OLLAMA_BASE_URL": "http://localhost:11434",
"OLLAMA_NUM_CTX": "131072"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/SimHub.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ alwaysApply: false

## Deployment & Testing

- **No deploy without 100% passing tests.** The `deploy.ps1` script enforces this: build must succeed, `dotnet test` must pass (if test projects exist), and post-deploy scripts in `tests/` must exit 0.
- **No deploy without 100% passing tests.** The `deploy.ps1` script enforces this: build must succeed, `dotnet test` must pass (if test projects exist), and post-deploy scripts in `tests/` must exit 0. **`deploy.ps1` always copies all dashboard `*.html` from `src/SimSteward.Dashboard/` to `SimHub\Web\sim-steward-dash\`** (verified after copy); “deploy” includes dashboards, not DLLs-only.
- **Retry-once-then-stop rule**: when a test or build fails, the agent gets **one** additional attempt to fix and rerun. If it fails again, **hard stop** — do not keep iterating. Either halt the deploy entirely (if downstream work depends on it) or skip and move on to the next independent task.
- **Linter checks** (`ReadLints`) on edited files must show 0 new errors before committing or deploying.
- Tests include: `dotnet build` (0 errors), `dotnet test` (0 failures), `tests/*.ps1` scripts (exit 0, `PASS:` lines only), and linter checks on changed files.
- See `.cursor/skills/simsteward-deploy/SKILL.md` for the full deploy workflow and test phase details.
- **`deploy.ps1` prints plugin build id** (`=== SimSteward plugin version (deployed): … ===`, then `Deploy complete. Plugin version: …`). When the user asks the agent to run deploy, **repeat that version in the reply** (same string as WebSocket `state.pluginVersion`).

## Community References

Expand Down
7 changes: 7 additions & 0 deletions .cursor/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": {
"grafana-assistant": {
"enabled": true
}
}
}
28 changes: 27 additions & 1 deletion .cursor/skills/contextstream/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,35 @@ Use only when the ContextStream MCP is enabled; otherwise skip and use local too
- Ops cost: keyword (2), pattern (2), semantic (5), hybrid (5).
- Output format: `minimal` or `paths`.

## Semantic vs code graph (pairing)
- **Concepts / “what files matter”:** `search` with `mode` `semantic`, `hybrid`, or `auto` — not `graph` for keyword or content lookup.
- **Structure / deps / usages:** `graph` actions (`related`, `dependencies`, `impact`, `usages`, `call_path`, `path`, etc.) — not a substitute for text search; use **after** `search` narrows targets when you need edges.
- **C# / SimStewardPlugin:** Smoke tests (`graph(dependencies)` on `src/SimSteward.Plugin/SimStewardPlugin.cs`) may return **0 edges** — do not assume a rich C# call graph. Prefer **`search`** plus the **Code map** table at the top of [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md) for module ↔ file mapping.
- **Corpus:** Rely on `project(action="index_status")` / `ingest_local` so both search and graph see the repo. After large refactors or if structural queries look empty or wrong, run **`graph(action="ingest", wait=true)`** (or queue ingest and retry later).

## Corpus hygiene (Cursor vs ContextStream)
- **[`.cursorignore`](../../.cursorignore)** reduces noise for **Cursor** (plans, build outputs, `.claude/projects/`, `.claude/file-history/`, etc.). It is **not guaranteed** to be applied by ContextStream server ingest; treat it as **local IDE** hygiene plus a signal for what should not dominate embeddings.
- **Refresh remote index:** `npm run contextstream:ingest:force` from repo root (runs [scripts/contextstream-ingest.ps1](../../scripts/contextstream-ingest.ps1) `-Force`), or MCP **`project(action="ingest_local", path="<repo>", force=true)`**. Poll **`project(action="index_status")`** until idle/fresh.

## Workspace binding (mapping quality)
- Open **only** this repo root as the Cursor workspace when doing ContextStream-heavy work (avoids cross-root hits under unrelated paths).
- Keep the ContextStream **project** path aligned with that same folder.

## When to force ingest
- After **`.cursorignore`** edits, **large moves** under `src/`, **architecture doc** reshuffles, or when **`index_status`** / search results look **stale** or polluted. Then: `contextstream:ingest:force` and optionally `graph(ingest, wait=true)`.

## Context and search density
- **`context`:** Default before tools: `format="minified"`, `max_tokens=100`, `mode="fast"` for quick turns. For deep refactors or broad changes, raise **`max_tokens`** toward **200–400** and/or use full `context(...)` without `fast`. Use **`distill=true`** or **`mode="pack"`** when the session is long or the pack must shrink; optional **`session_tokens`** / **`context_threshold`** when the client tracks cumulative usage.
- **`search`:** Prefer **`output_format`** `minimal` or `paths`; default **`limit`** **3–5** unless you need exhaustive hits. Lower **`content_max_chars`** when you only need locations; add **`context_lines`** when you need local snippet context around matches.
- **Long threads:** Keep **`session(action="compress")`** after 30+ turns or milestones (see Maintenance).

## Deploy + plugin version (agents)
- When the user asks to **run deploy** (`deploy.ps1`), run it and **quote the plugin version** from script output: the cyan line `=== SimSteward plugin version (deployed): … ===` and/or the final `Deploy complete. Plugin version: …`. Same value is WebSocket `state.pluginVersion` and Loki `deploy_marker` JSON `detail` suffix `pluginVersion=…`.
- **Memory (semantic):** Prefer `memory(action="create_node", node_type="fact", …)` for durable deploy/testing facts; tag `simsteward`, `deploy`, `testing` when relevant.

## Operations
- **Plans:** ALWAYS `session(action="capture_plan")` + `memory(action="create_task")`. NO markdown files.
- **Repo ↔ ContextStream sync:** Use MCP **`project(action="index")`** or **`project(action="ingest_local", path="…")`** — the server-side ingest/index task. Do **not** sync via custom HTTP/API scripts, committed JSON arg files, or non-MCP CLI automation (see `docs/CONTEXTSTREAM-UPLOAD-PLAN.md`). After a sync, log with **`session(action="capture", event_type="operation", …)`**.
- **Repo ↔ ContextStream sync:** Use MCP **`project(action="index")`** or **`project(action="ingest_local", path="…")`** — the server-side ingest/index task. Prefer **`npm run contextstream:ingest[:force]`** for CLI ingest with `.env` via envmcp. Do **not** sync via ad-hoc HTTP clients or committed JSON payload dumps. After a sync, log with **`session(action="capture", event_type="operation", …)`**.
- **Optional Memory mirror:** `memory(create_doc|update_doc)` only through MCP in Cursor when you intentionally duplicate a spec in Memory — not via external API clients.
- **Todos:** `memory(action="create_todo")`.
- **Memory/Notes:** `session(action="capture", event_type="decision|note|lesson")`.
Expand Down
164 changes: 164 additions & 0 deletions .cursor/skills/create-rule/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
name: create-rule
description: >-
Create Cursor rules for persistent AI guidance. Use when you want to create a
rule, add coding standards, set up project conventions, configure
file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or
AGENTS.md.
---
# Creating Cursor Rules

Create project rules in `.cursor/rules/` to provide persistent context for the AI agent.

## Gather Requirements

Before creating a rule, determine:

1. **Purpose**: What should this rule enforce or teach?
2. **Scope**: Should it always apply, or only for specific files?
3. **File patterns**: If file-specific, which glob patterns?

### Inferring from Context

If you have previous conversation context, infer rules from what was discussed. You can create multiple rules if the conversation covers distinct topics or patterns. Don't ask redundant questions if the context already provides the answers.

### Required Questions

If the user hasn't specified scope, ask:
- "Should this rule always apply, or only when working with specific files?"

If they mentioned specific files and haven't provided concrete patterns, ask:
- "Which file patterns should this rule apply to?" (e.g., `**/*.ts`, `backend/**/*.py`)

It's very important that we get clarity on the file patterns.

Use the AskQuestion tool when available to gather this efficiently.

---

## Rule File Format

Rules are `.mdc` files in `.cursor/rules/` with YAML frontmatter:

```
.cursor/rules/
typescript-standards.mdc
react-patterns.mdc
api-conventions.mdc
```

### File Structure

```markdown
---
description: Brief description of what this rule does
globs: **/*.ts # File pattern for file-specific rules
alwaysApply: false # Set to true if rule should always apply
---

# Rule Title

Your rule content here...
```

### Frontmatter Fields

| Field | Type | Description |
|-------|------|-------------|
| `description` | string | What the rule does (shown in rule picker) |
| `globs` | string | File pattern - rule applies when matching files are open |
| `alwaysApply` | boolean | If true, applies to every session |

---

## Rule Configurations

### Always Apply

For universal standards that should apply to every conversation:

```yaml
---
description: Core coding standards for the project
alwaysApply: true
---
```

### Apply to Specific Files

For rules that apply when working with certain file types:

```yaml
---
description: TypeScript conventions for this project
globs: **/*.ts
alwaysApply: false
---
```

---

## Best Practices

### Keep Rules Concise

- **Under 50 lines**: Rules should be concise and to the point
- **One concern per rule**: Split large rules into focused pieces
- **Actionable**: Write like clear internal docs
- **Concrete examples**: Ideally provide concrete examples of how to fix issues

---

## Example Rules

### TypeScript Standards

```markdown
---
description: TypeScript coding standards
globs: **/*.ts
alwaysApply: false
---

# Error Handling

\`\`\`typescript
// ❌ BAD
try {
await fetchData();
} catch (e) {}

// ✅ GOOD
try {
await fetchData();
} catch (e) {
logger.error('Failed to fetch', { error: e });
throw new DataFetchError('Unable to retrieve data', { cause: e });
}
\`\`\`
```

### React Patterns

```markdown
---
description: React component patterns
globs: **/*.tsx
alwaysApply: false
---

# React Patterns

- Use functional components
- Extract custom hooks for reusable logic
- Colocate styles with components
```

---

## Checklist

- [ ] File is `.mdc` format in `.cursor/rules/`
- [ ] Frontmatter configured correctly
- [ ] Content under 500 lines
- [ ] Includes concrete examples
Loading
Loading