Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c4dc4a7
Agent pmo
MelbourneDeveloper Apr 7, 2026
4142c1a
Fixes
MelbourneDeveloper Apr 7, 2026
1eb2866
Move docs
MelbourneDeveloper Apr 7, 2026
4301be8
docs
MelbourneDeveloper Apr 7, 2026
6ba6e0c
doc update
MelbourneDeveloper Apr 7, 2026
b1023aa
docs
MelbourneDeveloper Apr 7, 2026
868be63
cleanup docs
MelbourneDeveloper Apr 7, 2026
57f0929
fixes
MelbourneDeveloper Apr 26, 2026
6d27e0e
Clean up git ignore
MelbourneDeveloper Apr 26, 2026
d2bd9b4
LSP stuff
MelbourneDeveloper Apr 27, 2026
ff44c1f
Formatting
MelbourneDeveloper Apr 27, 2026
c8b3b5d
LSP integration
MelbourneDeveloper Apr 27, 2026
f0c3759
Skills
MelbourneDeveloper Apr 27, 2026
e50efea
Deployment stuff
MelbourneDeveloper Apr 27, 2026
af2511b
make fix
MelbourneDeveloper Apr 27, 2026
aadba42
Use the live npm and nuget packages
MelbourneDeveloper Apr 27, 2026
5294d44
Fixes
MelbourneDeveloper Apr 28, 2026
c16627d
fixes
MelbourneDeveloper Apr 28, 2026
ca12594
fix
MelbourneDeveloper Apr 28, 2026
d397991
fixes
MelbourneDeveloper Apr 28, 2026
c28c440
Fixes
MelbourneDeveloper Apr 28, 2026
c857f31
release fixes
MelbourneDeveloper Apr 28, 2026
eeccebd
Installation doco
MelbourneDeveloper Apr 28, 2026
70f0937
Implementing deployment plan
MelbourneDeveloper Apr 28, 2026
10203e4
Deployment stuff
MelbourneDeveloper Apr 28, 2026
b72a6b4
fixes
MelbourneDeveloper Apr 28, 2026
ce9107a
fix
MelbourneDeveloper Apr 28, 2026
9ba2c2d
failing test
MelbourneDeveloper Apr 28, 2026
b56af04
fix vsix
MelbourneDeveloper Apr 28, 2026
899385f
add failing test
MelbourneDeveloper Apr 28, 2026
09776b2
works
MelbourneDeveloper Apr 28, 2026
124bc55
fixes
MelbourneDeveloper Jun 3, 2026
27d9a8c
AOT
MelbourneDeveloper Jun 3, 2026
4f91e07
fixes
MelbourneDeveloper Jun 3, 2026
1e5bdf7
Fixes
MelbourneDeveloper Jun 3, 2026
dd48f27
Fixes
MelbourneDeveloper Jun 3, 2026
4ab8ec0
Fixes
MelbourneDeveloper Jun 3, 2026
2811fd6
Fixes
MelbourneDeveloper Jun 3, 2026
cf8f4fe
fixes
MelbourneDeveloper Jun 3, 2026
4cd45dd
fixes
MelbourneDeveloper Jun 3, 2026
ca52bf8
Fixes
MelbourneDeveloper Jun 3, 2026
fa4596d
Fixes
MelbourneDeveloper Jun 3, 2026
b79ae04
Stuff
MelbourneDeveloper Jun 3, 2026
0cfbb9a
Stuff
MelbourneDeveloper Jun 3, 2026
1bcc197
Fixes
MelbourneDeveloper Jun 3, 2026
b370763
fix(release): regenerate Types.Generated.fs (typeDiagram) before F# b…
MelbourneDeveloper Jun 3, 2026
84000b0
fix(release): self-contained AOT on bare Linux + cross-platform VSIX …
MelbourneDeveloper Jun 3, 2026
a919703
fix(vscode): resolve bundled CLI at bin/<platform>/ in dev + e2e
MelbourneDeveloper Jun 3, 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
107 changes: 107 additions & 0 deletions .claude/skills/ci-prep/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
name: ci-prep
description: Prepares the current branch for CI by running the exact same steps locally and fixing issues. If CI is already failing, fetches the GH Actions logs first to diagnose. Use before pushing, when CI is red, or when the user says "fix ci".
argument-hint: "[--failing] [optional job name to focus on]"
---

<!-- agent-pmo:74cf183 -->

# CI Prep

Prepare the current state for CI. If CI is already failing, fetch and analyze the logs first.

## Arguments

- `--failing` — Indicates a GitHub Actions run is already failing. When present, you MUST execute **Step 1** before doing anything else.
- Any other argument is treated as a job name to focus on (but all failures are still reported).

If `--failing` is NOT passed, skip directly to **Step 2**.

## Step 1 — Fetch failed CI logs (only when `--failing`)

You MUST do this before any other work.

```bash
BRANCH=$(git branch --show-current)
PR_JSON=$(gh pr list --head "$BRANCH" --state open --json number,title,url --limit 1)
```

If the JSON array is empty, **stop immediately**:
> No open PR found for branch `$BRANCH`. Create a PR first.

Otherwise fetch the logs:

```bash
PR_NUMBER=$(echo "$PR_JSON" | jq -r '.[0].number')
gh pr checks "$PR_NUMBER"
RUN_ID=$(gh run list --branch "$BRANCH" --limit 1 --json databaseId --jq '.[0].databaseId')
gh run view "$RUN_ID"
gh run view "$RUN_ID" --log-failed
```

Read **every line** of `--log-failed` output. For each failure note the exact file, line, and error message. If a job name argument was provided, prioritize that job but still report all failures.

## Step 2 — Analyze the CI workflow

1. Find the CI workflow file. Look in `.github/workflows/` for `ci.yml`, `build.yml`, `test.yml`, `checks.yml`, `main.yml`, `pull_request.yml`, or any workflow triggered on `pull_request` or `push`.
2. Read the workflow file completely. Parse every job and every step.
3. Extract the ordered list of commands the CI actually runs (e.g., `make lint`, `make fmt-check`, `make test`, `make coverage-check`, `make build`, or whatever the workflow specifies — it may use `npm`, `cargo`, `dotnet`, raw shell commands, or anything else).
4. Note any environment variables, matrix strategies, or conditional steps that affect execution.

**Do NOT assume the steps are `make lint`, `make test`, `make coverage-check`, `make build`.** The actual CI may run different commands, in a different order, with different targets. Extract what the CI *actually does*.

## Step 3 — Run each CI step locally, in order

Work through failures in this priority order:

1. **Formatting** — run auto-formatters first to clear noise
2. **Compilation errors** — must compile before lint/test
3. **Lint violations** — fix the code pattern
4. **Runtime / test failures** — fix source code to satisfy the test

For each command extracted from the CI workflow:

1. Run the command exactly as CI would run it (adjusting only for local environment differences like not needing `actions/checkout`).
2. If the step fails, **stop and fix the issues** before continuing to the next step.
3. After fixing, re-run the same step to confirm it passes.
4. Move to the next step only after the current one succeeds.

### Hard constraints

- **NEVER modify test files** — fix the source code, not the tests
- **NEVER add suppressions** (`#[allow(...)]`, `// eslint-disable`, `#pragma warning disable`)
- **NEVER use `any` in TypeScript** to silence type errors
- **NEVER delete or ignore failing tests**
- **NEVER remove assertions**

If stuck on the same failure after 5 attempts, ask the user for help.

## Step 4 — Report

- List every step that was run and its result (pass/fail/fixed).
- If any step could not be fixed, report what failed and why.
- Confirm whether the branch is ready to push.

## Step 5 — Commit/Push (only when `--failing`)

Once all CI steps pass locally:

1. Commit, but DO NOT MARK THE COMMIT WITH YOU AS AN AUTHOR!!! Only the user authors the commit!
2. Push
3. Monitor until completion or failure
4. Upon failure, go back to Step 1

## Rules

- **Always read the CI workflow first.** Never assume what commands CI runs.
- Do not push if any step fails (unless `--failing` and all steps now pass)
- Fix issues found in each step before moving to the next
- Never skip steps or suppress errors
- If the CI workflow has multiple jobs, run all of them (respecting dependency order)
- Skip steps that are CI-infrastructure-only (checkout, setup-node/python/rust actions, cache steps, artifact uploads) — focus on the actual build/test/lint commands

## Success criteria

- Every command that CI runs has been executed locally and passed
- All fixes are applied to the working tree
- The CI passes successfully (if you are correcting and existing failure)
110 changes: 110 additions & 0 deletions .claude/skills/code-dedup/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
name: code-dedup
description: Searches for duplicate code, duplicate tests, and dead code, then safely merges or removes them. Use when the user says "deduplicate", "find duplicates", "remove dead code", "DRY up", or "code dedup". Requires test coverage — refuses to touch untested code.
---

<!-- agent-pmo:74cf183 -->

# Code Dedup

Carefully search for duplicate code, duplicate tests, and dead code across the repo. Merge duplicates and delete dead code — but only when test coverage proves the change is safe.

## Prerequisites — hard gate

Before touching ANY code, verify these conditions. If any fail, stop and report why.

1. Run `make test` — all tests must pass. If tests fail, stop. Do not dedup a broken codebase.
2. Run `make coverage-check` — coverage must meet the repo's threshold. If it doesn't, stop.
3. Verify the project uses **static typing**. The Napper repo is fully statically typed (F#, TypeScript strict mode, Rust). Proceed.

## Steps

Copy this checklist and track progress:

```
Dedup Progress:
- [ ] Step 1: Prerequisites passed (tests green, coverage met, typed)
- [ ] Step 2: Dead code scan complete
- [ ] Step 3: Duplicate code scan complete
- [ ] Step 4: Duplicate test scan complete
- [ ] Step 5: Changes applied
- [ ] Step 6: Verification passed (tests green, coverage stable)
```

### Step 1 — Inventory test coverage

Before deciding what to touch, understand what is tested.

1. Run `make test` and `make coverage-check` to confirm green baseline
2. Note the current coverage percentage — this is the floor. It must not drop.
3. Identify which files/modules have coverage and which do not. Only files WITH coverage are candidates for dedup.

### Step 2 — Scan for dead code

Search for code that is never called, never imported, never referenced.

1. Look for unused exports, unused functions, unused classes, unused variables
2. Use language-appropriate tools where available:
- Rust: the compiler already warns on dead code — check `make lint` output
- TypeScript: check for `noUnusedLocals`/`noUnusedParameters` in tsconfig, look for unexported functions with zero references
- F#/C#: analyzer warnings for unused members
3. For each candidate: **grep the entire codebase** for references (including tests, scripts, configs). Only mark as dead if truly zero references.
4. List all dead code found with file paths and line numbers. Do NOT delete yet.

### Step 3 — Scan for duplicate code

Search for code blocks that do the same thing in multiple places.

1. Look for functions/methods with identical or near-identical logic
2. Look for copy-pasted blocks (same structure, maybe different variable names)
3. Look for multiple implementations of the same algorithm or pattern
4. Check across module boundaries — duplicates often hide in different packages/crates/projects. **For Napper specifically, check whether F# logic in Napper.Cli, Napper.Lsp, or Napper.VsCode could move into Napper.Core.**
5. For each duplicate pair: note both locations, what they do, and how they differ (if at all)
6. List all duplicates found. Do NOT merge yet.

### Step 4 — Scan for duplicate tests

Search for tests that verify the same behavior.

1. Look for test functions with identical assertions against the same code paths
2. Look for test fixtures/helpers that are duplicated across test files
3. Look for integration tests that fully cover what a unit test also covers (keep the integration test, mark the unit test as redundant per CLAUDE.md rules)
4. List all duplicate tests found. Do NOT delete yet.

### Step 5 — Apply changes (one at a time)

For each change, follow this cycle: **change → test → verify coverage → continue or revert**.

#### 5a. Remove dead code
- Delete dead code identified in Step 2
- After each deletion: run `make test` and `make coverage-check`
- If tests fail or coverage drops: **revert immediately** and investigate
- Dead code removal should never break tests or drop coverage

#### 5b. Merge duplicate code
- For each duplicate pair: extract the shared logic into a single function/module
- Update all call sites to use the shared version
- After each merge: run `make test` and `make coverage-check`
- If tests fail: **revert immediately**. The duplicates may have subtle differences you missed.
- If coverage drops: the shared code must have equivalent test coverage. Add tests if needed before proceeding.

#### 5c. Remove duplicate tests
- Delete the redundant test (keep the more thorough one)
- After each deletion: run `make coverage-check`
- If coverage drops: **revert immediately**. The "duplicate" test was covering something the other wasn't.

### Step 6 — Final verification

1. Run `make test` — all tests must still pass
2. Run `make coverage-check` — coverage must be >= the baseline from Step 1
3. Run `make lint` and `make fmt-check` — code must be clean
4. Report: what was removed, what was merged, final coverage vs baseline

## Rules

- **No test coverage = do not touch.** If a file has no tests covering it, leave it alone entirely. You cannot safely dedup what you cannot verify.
- **Coverage must not drop.** If removing or merging code causes coverage to decrease, revert and investigate. The coverage floor from Step 1 is sacred.
- **One change at a time.** Make one dedup change, run tests, verify coverage. Never batch multiple dedup changes before testing.
- **When in doubt, leave it.** If two code blocks look similar but you're not 100% sure they're functionally identical, leave both. False dedup is worse than duplication.
- **Preserve public API surface.** Do not change function signatures, class names, or module exports that external code depends on. Internal refactoring only.
- **Three similar lines is fine.** Do not create abstractions for trivial duplication. The cure must not be worse than the disease. Only dedup when the shared logic is substantial (>10 lines) or when there are 3+ copies.
2 changes: 2 additions & 0 deletions .claude/skills/fix-bug/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ argument-hint: "[bug description]"
allowed-tools: Read, Grep, Glob, Edit, Write, Bash
---

<!-- agent-pmo:74cf183 -->

# Bug Fix Skill — Test-First Workflow

You MUST follow this exact workflow. Do NOT skip steps. Do NOT fix the bug before writing a failing test.
Expand Down
Loading
Loading