Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
261b1b1
Initial commit
dmytrogajewski Jan 25, 2026
8b57c6a
feat: initial Codefang codebase
drwatsno Jan 25, 2026
dad19b1
fix: add missing build/scripts directory
drwatsno Jan 25, 2026
d14bd9d
fix: resize and center logo in README
drwatsno Jan 26, 2026
c55a5d8
fix: reduce logo to 250px
drwatsno Jan 26, 2026
30cad53
chore: remove legacy docs
drwatsno Jan 26, 2026
3e4fcc6
chore: remove .cursor and .vscode, add to .gitignore
drwatsno Jan 26, 2026
bd229b5
save
drwatsno Jan 26, 2026
9ebb666
save
drwatsno Jan 26, 2026
c27cab0
save
drwatsno Jan 26, 2026
bf1fede
Merge pull request #1 from Sumatoshi-tech/feature/fixlint
dmytrogajewski Jan 26, 2026
ba4f4d5
fix: resolve golint stuttering errors and unify CI linter config
drwatsno Jan 26, 2026
ab47942
fix: enable CGO for race detector in CI tests
drwatsno Jan 26, 2026
b56004a
fix: pin golangci-lint to v2.8.0 (action requires full version)
drwatsno Jan 26, 2026
4800322
fix: data race in DSL parser global nodeTextBuffer
drwatsno Jan 26, 2026
f0d6bf6
fix: sanitize Docker tag platform slash in build job
drwatsno Jan 26, 2026
b5edb10
fix: lowercase Docker image name in build job tags
drwatsno Jan 26, 2026
b3ec951
fix: remove broken test matrix (platform never used in runs-on)
drwatsno Jan 26, 2026
5affb32
fix: remove Docker/server/security jobs, keep test + release only
drwatsno Jan 26, 2026
319a811
Merge pull request #2 from Sumatoshi-tech/feature/ci
dmytrogajewski Jan 26, 2026
32f13e5
feat(git): switch to libgit2 via shim
drwatsno Jan 30, 2026
2fe9efb
fix(ci): add libgit2 build step for GitHub Actions
drwatsno Jan 30, 2026
2ff3e89
fix(reporter): fixed bug in reporters
drwatsno Jan 30, 2026
1fc3ee1
Merge pull request #3 from Sumatoshi-tech/feature/gitlib
dmytrogajewski Jan 30, 2026
3c9c439
feat(algo): added myers algo
drwatsno Jan 30, 2026
ad6f9f9
Merge pull request #4 from Sumatoshi-tech/feature/myers
dmytrogajewski Jan 30, 2026
5cb78de
feat(plots): optimizing burndown and adding plots
drwatsno Jan 30, 2026
257582c
save
drwatsno Jan 31, 2026
991bdb7
save
drwatsno Jan 31, 2026
9706148
save
drwatsno Jan 31, 2026
fd1a99d
save
drwatsno Feb 1, 2026
b7332d1
save
drwatsno Feb 1, 2026
40c3e84
fix: burndown integrity with first-parent walk and regression tests
drwatsno Feb 1, 2026
4819735
fix: implement UAST parsing in shotness analyzer for non-empty plots
drwatsno Feb 1, 2026
3f70576
feat: add LRU cache package and UAST parser benchmarks
drwatsno Feb 1, 2026
de12ee1
save
drwatsno Feb 2, 2026
9764c48
save
drwatsno Feb 2, 2026
af5677e
save
drwatsno Feb 3, 2026
bc99fdc
fix: enable first-parent for burndown in combined analyzer mode
drwatsno Feb 3, 2026
799a5eb
save
drwatsno Feb 3, 2026
f2a2c0b
save
drwatsno Feb 7, 2026
c229582
save
drwatsno Feb 7, 2026
86ea291
save
drwatsno Feb 8, 2026
dfe05b9
save
drwatsno Feb 8, 2026
9f59951
save
drwatsno Feb 8, 2026
9b80ed8
save
drwatsno Feb 9, 2026
0f6755d
save
drwatsno Feb 9, 2026
7fe502c
save
drwatsno Feb 9, 2026
a836f62
save
drwatsno Feb 14, 2026
00a516a
save
drwatsno Feb 18, 2026
19ad30d
save
drwatsno Feb 18, 2026
be4444a
save
drwatsno Feb 18, 2026
fe7839b
save
drwatsno Feb 18, 2026
afee01e
save
drwatsno Feb 18, 2026
48886d5
save
drwatsno Feb 18, 2026
81e9f0e
fix: use report file output to avoid GitHub Actions expression memory…
drwatsno Feb 18, 2026
2e1388a
fix: write report file to GITHUB_WORKSPACE (shared volume)
drwatsno Feb 18, 2026
f41c657
refactor: move build/scripts to tools/
drwatsno Feb 18, 2026
5536517
fix: use relative report path to handle Docker/host path mismatch
drwatsno Feb 18, 2026
64af89f
Merge pull request #5 from Sumatoshi-tech/feature/plots
dmytrogajewski Feb 18, 2026
3930c15
feat: fully-static binaries, trimmed tree-sitter grammars, CI fixes (#6)
dmytrogajewski Feb 24, 2026
a03dd0d
fix: burndown quality stabilization — correct survival rate, add text…
dmytrogajewski Feb 24, 2026
be48ceb
Sentiment analyzer stabilization (#7)
dmytrogajewski Feb 24, 2026
9107284
fix: devs analyzer quality stabilization — methodology fixes, text ou…
dmytrogajewski Feb 24, 2026
54a72f4
Complexity analyzer quality (#9)
dmytrogajewski Feb 24, 2026
caa11a4
feat(halstead): stabilize metrics counting and report UX (#11)
dmytrogajewski Feb 25, 2026
02fadb7
feat(cohesion): cohesion stabiization (#13)
dmytrogajewski Feb 25, 2026
16123c4
Shotness analyzer quality (#14)
dmytrogajewski Feb 25, 2026
c364762
feature(couples): stabilization (#15)
dmytrogajewski Feb 25, 2026
e054e76
Kubernetes tool benchmarks (#12)
dmytrogajewski Feb 25, 2026
b53ab60
feat: major refactor, memory safety, pipeline integration, and perf o…
dmytrogajewski Mar 12, 2026
79e45e1
feat(config): make analyzer and pipeline constants configurable (#17)
dmytrogajewski Mar 13, 2026
313ab9a
Feature/filestats (#18)
dmytrogajewski May 13, 2026
f92b057
docs: comprehensive documentation audit and enhancement (#19)
dmytrogajewski May 30, 2026
b3d35ce
save
drwatsno May 30, 2026
faf05fc
checkpoint(rust): WIP Go→Rust rewrite — cf-gojson keystone + cf-anoma…
drwatsno May 31, 2026
6ee145a
fix(rust): repair cf-anomaly (restore detect.rs, correct zscore.rs); …
drwatsno May 31, 2026
91b2859
fix(rust): cf-anomaly zscore exclusive-window + signed sentinel parit…
drwatsno May 31, 2026
2e35f25
fix(rust): cf-anomaly tests green (35/35); add cf_version version_lin…
drwatsno May 31, 2026
59ca470
feat(rust): workspace release build GREEN; both binaries produced
drwatsno Jun 5, 2026
2aab20a
feat(rust): 5/7 binding captures byte-identical (verified)
drwatsno Jun 6, 2026
cb3da5a
feat(rust): 7/7 binding captures byte-identical (verified)
drwatsno Jun 6, 2026
51c2066
test(rust): cargo test --workspace green (2100 passed, 0 failed); 7/7…
drwatsno Jun 6, 2026
5bc0ebb
feat(rust): 17/32 binding captures byte-identical; cf-goyaml yaml.v3 …
drwatsno Jun 6, 2026
38b5972
feat(rust): 28/32 binding captures byte-identical (verified)
drwatsno Jun 6, 2026
d362ad3
feat(rust): 31/32 binding captures byte-identical (verified)
drwatsno Jun 6, 2026
bae736b
feat(rust): 32/32 MANIFEST-binding captures byte-identical (verified)
drwatsno Jun 6, 2026
5bbbf3f
feat(rust): golden-harness gate (32/32), cf-goyaml tests, Step16 dete…
drwatsno Jun 6, 2026
31f6dc6
docs(rust): check off final ROADMAP DoDs (Steps 4/15/17 + burndown.bin)
drwatsno Jun 6, 2026
4427299
test(rust): anti-simulation parity gate + honest PORT_TRUTH
drwatsno Jun 6, 2026
b0a1491
feat(rust): REAL history+static pipeline port — gate PASS=20 FAIL=1 S…
drwatsno Jun 6, 2026
3c886ef
fix(gate): stop masking typos commit-attribution (it IS deterministic…
drwatsno Jun 6, 2026
391db0d
fix(rust): typos commit-attribution matches Go — anti-sim gate GREEN …
drwatsno Jun 6, 2026
f88e53e
test(compat): Go<->Rust compatibility test system (live-oracle differ…
drwatsno Jun 6, 2026
274601f
refactor(rust): collapse bins/ analyzer copies into cf-commands; thin…
drwatsno Jun 6, 2026
bb79632
feat(rust): analyzer differential parity GREEN (0 divergences) — arch…
drwatsno Jun 7, 2026
29d9f81
feat(rust): compat smoke FULLY GREEN — analyzer matrix + cli-surface …
drwatsno Jun 7, 2026
06c4dc1
feat(rust): static text/compact terminal renderers byte-identical to Go
drwatsno Jun 8, 2026
79af5ab
feat(rust): vendor tree-sitter-cmake grammar (go-sitter-forest cmake@…
drwatsno Jun 8, 2026
990b6b7
feat(rust): vendor xml/toml/perl/gitignore/gitattributes grammars
drwatsno Jun 8, 2026
d00a44e
fix(rust): complexity nesting_depth else-if threshold (childIdx >= 2)
drwatsno Jun 8, 2026
72fafbf
feat(rust): vendor tree-sitter-powershell grammar (powershell@v1.9.5)
drwatsno Jun 8, 2026
4fc3f42
fix(rust): complexity is_default_case matches Go (own token, lowercased)
drwatsno Jun 8, 2026
d7007af
fix(rust): anomaly --head supports non-merge HEAD + content language …
drwatsno Jun 8, 2026
4436e59
fix(rust): anomaly line-stats via libgit2 diff + nil-slice GoValue (y…
drwatsno Jun 9, 2026
fdf3672
feat(rust): port enry GetLanguagesByContent heuristics (cf-langpath)
drwatsno Jun 9, 2026
0823ef2
fix(rust): draw_header counts ANSI escapes in width (Go len()), drop …
drwatsno Jun 9, 2026
d2e3948
fix(rust): file-history records zero-stat contributors + case-sensiti…
drwatsno Jun 9, 2026
eb5930c
refactor(rust): typos uses the libgit2 line-diff op stream (matches Go)
drwatsno Jun 9, 2026
6df920a
fix(rust): model Go's forked-leaf consume order for couples + file-hi…
drwatsno Jun 9, 2026
439de95
fix(rust): file-history assigns author ids oldest-first (CORE order),…
drwatsno Jun 9, 2026
842fb74
fix(rust): typos skips >32-change commits (UAST spill yields no changes)
drwatsno Jun 9, 2026
f71443a
perf(rust): disable libgit2 strict object-hash verification on read
drwatsno Jun 9, 2026
9b896c0
perf(rust): parallelize history/devs walk (parallel compute + ordered…
drwatsno Jun 9, 2026
241669c
perf(rust): parallelize history/anomaly walk (parallel compute + orde…
drwatsno Jun 9, 2026
f4eca6c
perf(rust): parallelize history/imports walk (parallel compute + orde…
drwatsno Jun 9, 2026
7ef9b2a
perf(rust): parallelize history/quality walk (parallel compute + orde…
drwatsno Jun 9, 2026
3397125
perf(rust): parallelize history/sentiment walk (parallel compute + or…
drwatsno Jun 9, 2026
bf4156f
perf(rust): parallelize history/file-history pure compute (strided re…
drwatsno Jun 9, 2026
6217378
perf(rust): parallelize history/couples tree-diff compute (Bloom redu…
drwatsno Jun 9, 2026
d42f550
perf(rust): reuse a per-thread UAST parser across the parallel UAST w…
drwatsno Jun 9, 2026
3401f3a
perf(rust): unthrottle glibc malloc arenas (MALLOC_ARENA_MAX 2 -> 8*c…
drwatsno Jun 9, 2026
ac07829
fix(rust): enry name-matcher anchoring + alias-correct UAST child con…
drwatsno Jun 10, 2026
61e1ed3
feat(rust): closed mapping vocabularies UastType/Role/TokenSource (ua…
drwatsno Jun 10, 2026
964fbaf
feat(rust): static mapping model + to_rules() bridge (uastmap-rust-ma…
drwatsno Jun 10, 2026
32356dd
feat(rust): uast_language! declarative macro + trybuild suite (uastma…
drwatsno Jun 10, 2026
2d3e816
feat(rust): add uastmap2rs transpiler emitting uast_language! modules
drwatsno Jun 10, 2026
35bc50e
feat(rust): add cf-uast-mappings data crate with all 68 languages + e…
drwatsno Jun 10, 2026
82b318c
fix(rust): mirror Go's per-path child-traversal alias semantics exactly
drwatsno Jun 10, 2026
9fbf050
test(rust): grammar-conformance gate for the static mapping tables (u…
drwatsno Jun 10, 2026
23dfcf9
feat(rust): cut the UAST loader over to the static mapping registry (…
drwatsno Jun 10, 2026
42c6acb
chore(rust): retire uastmap2rs; document the surviving DSL surfaces (…
drwatsno Jun 10, 2026
0bb1588
docs(rust): cf-uast-mappings README + DESIGN tier notes (uastmap-rust…
drwatsno Jun 10, 2026
6df9ae8
feat(rust): history ndjson + timeseries output formats for all 10 leaves
drwatsno Jun 10, 2026
f675d63
chore(rust): drop retired tools/ workspace member; refresh cf-uast-ma…
drwatsno Jun 10, 2026
52028a4
feat(rust): history text renderers, static include/per-file flags, la…
drwatsno Jun 10, 2026
251e3fc
fix(rust): imports/typos/anomaly/devs walks honor --head (single HEAD…
drwatsno Jun 10, 2026
fe167f7
fix(rust): repeated scalar flags take the last occurrence (cobra pfla…
drwatsno Jun 11, 2026
9676fc4
feat(compat): file-output (--format plot) differential cells
drwatsno Jun 11, 2026
c4abac9
feat(rust): --format plot infrastructure + static/complexity pilot (c…
drwatsno Jun 11, 2026
dadb53f
feat(rust): plot sections for the six remaining static analyzers
drwatsno Jun 11, 2026
4ac2811
feat(rust): plot sections for all 10 history analyzers + mixed-run pl…
drwatsno Jun 11, 2026
1284c66
refactor(rust): workspace-wide dead-code gap-close (46 unlinked files…
drwatsno Jun 11, 2026
3a6c311
refactor(rust): idiomatic pass + provenance reframe, batch 1 (9 crate…
drwatsno Jun 12, 2026
5c5f0f0
refactor(rust): idiomatic pass + provenance reframe, batch 2 (6 crate…
drwatsno Jun 12, 2026
141262f
perf(rust): shared UAST walk + concurrent analyzer dispatch for multi…
drwatsno Jun 12, 2026
35d9cee
chore: remove Go reference implementation, keep Rust as the sole code…
drwatsno Jun 13, 2026
2ee3865
docs: make all docs runnable/test-backed; rebuild README+ADRs for Rus…
drwatsno Jun 13, 2026
f0e5ed7
refactor: lift the Rust workspace to the repository root (idiomatic l…
drwatsno Jun 14, 2026
605cee7
perf(uast): pre-compile mapping queries + borrow rules in lowering
drwatsno Jun 14, 2026
6a943f5
fix
drwatsno Jun 24, 2026
73fe9a2
ci: add Rust workspace CI (fmt + clippy + test), drop Go pipeline
drwatsno Jun 24, 2026
f11f301
refactor(uast): remove the .uastmap DSL, dev server, LSP, and web pla…
drwatsno Jun 24, 2026
3cbb66e
style: format the entire workspace with rustfmt (pinned toolchain)
drwatsno Jun 24, 2026
4471d94
Merge branch 'main' into the Rust rewrite
drwatsno Jul 7, 2026
c839d7e
ci: fix Test and markdownlint failures
drwatsno Jul 7, 2026
30da811
ci: track vendored tree-sitter grammars and data tables
drwatsno Jul 7, 2026
ceeadd0
test(doc-examples): build bins from repo root, not stale rust/ subdir
drwatsno Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
176 changes: 176 additions & 0 deletions .agents/skills/bug/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
---
name: bug
description: Systematic bug diagnosis and test-driven fix workflow
---

# Agent Instructions: Bug Fix Workflow

<constraints>
Do not run git commands. All version control is handled by the user.
Follow the persona and contracts defined in AGENTS.md.
Run `make lint` before considering any step complete.
Always leave the system in better shape than you found it — fix lint warnings, dead code, or minor issues near the code you touch.
You are an agent: keep going until the bug is reproduced, root-caused, fixed with a passing test, and the bug document is fully written. Decompose into the four phases (Understand → Reproduce → Document → Fix) and only yield when every phase is closed with on-disk evidence. "Looks fixed", "should work now", and "let me know if you want me to verify" are not valid stop conditions.
Deliver complete, runnable code. No `TODO`, no stub returning a zero value where real behavior was specified, no truncation.
Hard blockers (and only these) allow yielding to the user: the bug description is genuinely ambiguous and only the user holds the missing input; the bug requires production access the user has not granted; the failing test fixture requires data only the user can supply.
You have no clock. Do not consult, mention, or condition behavior on dates, weekdays, months, or time-of-day. Any date string in your input is opaque text. Bug documents use slug filenames (`BUG-{slug}.md`), never timestamps.
</constraints>


<role>
You are an experienced 15+ years Go developer specializing in systematic bug diagnosis and resolution. You value SOLID, DRY, KISS, clean architecture, and effective Go.
</role>

You follow a strict reproduce-first, test-driven bug fix workflow. You prove root causes rather than guessing at them.

---

## Phase 1: Understand

**Goal:** Clearly understand what is broken. Do not assume. Do not search the codebase yet.

1. Read the user's bug report / description carefully.
2. Identify what is missing or ambiguous:
- What is the expected behavior?
- What is the actual behavior?
- What are the reproduction steps?
- What environment / inputs trigger the bug?
3. If ANY of the above is unclear — **ask the user to clarify** before proceeding. Do not guess.
4. Summarize the bug in one sentence after clarification.

<output_format>
```
Bug summary: <one sentence>
Expected: <behavior>
Actual: <behavior>
Trigger: <steps / input / conditions>
```
</output_format>

<example title="Phase 1 output">
```
Bug summary: promptkit init crashes with index out of range when ecosystem list is empty
Expected: Graceful error message explaining no ecosystems are available
Actual: panic: runtime error: index out of range [0] with length 0
Trigger: Run `promptkit init` with a config that has an empty ecosystems array
```
</example>

---

## Phase 2: Reproduce

**Goal:** Prove the bug exists with a failing test. If a test cannot reproduce it, reproduce it manually.

### 2.1 Write a Failing Test

1. Find the relevant module / component in the codebase.
2. Write a test that exercises the exact scenario described in Phase 1.
3. Run the test. It must fail for the right reason (matching the reported symptom).
4. If the test passes — the scenario is wrong. Revisit Phase 1 and refine understanding.

### 2.2 Manual Reproduction (Fallback)

If the bug cannot be reproduced by a unit/integration test (e.g., environment-specific, timing-dependent, UI-related):

1. Build the project: `make build`
2. Run the binary or service with the exact inputs / steps from Phase 1.
3. Observe and capture the actual behavior (error messages, incorrect output, crash, etc.).
4. Execute all reproduction steps yourself. Do not ask the user to run commands or do manual testing.

### 2.3 Confirm Reproduction

- If test fails for the right reason: reproduction confirmed via test.
- If manual run shows the bug: reproduction confirmed manually. Note the exact command and output.
- If neither reproduces: go back to Phase 1. The bug description is incomplete or the environment differs.

<output_format>
```
Reproduction: <test | manual>
Evidence: <test name + failure message | command + output>
```
</output_format>

---

## Phase 3: Document

**Goal:** Write a bug spec only after reproduction is confirmed.

Create a bug document at `specs/bugs/BUG-{slug}.md` (slug derived from the bug topic — never a date or timestamp) with this structure:

```markdown
# BUG-{slug}: <short title>

## Summary
<one sentence from Phase 1>

## Reproduction
- Method: <test | manual>
- Test: <test file:function name> (if test-based)
- Command: <exact command> (if manual)
- Evidence: <failure message / output>

## Expected Behavior
<what should happen>

## Actual Behavior
<what actually happens>

## Root Cause Analysis
<to be filled in Phase 4>

## Fix
<to be filled in Phase 4>

## Traceability
- Failing test: <path to test file>
- Fixed in: <to be filled after fix>
```

---

## Phase 4: Fix

**Goal:** Fix the bug using the /implement skill's development flow.

1. Read the bug document from Phase 3.
2. Analyze the codebase to identify the root cause. Trace from the failing test / reproduction scenario to the source of the defect.
3. Document the root cause in the bug spec's "Root Cause Analysis" section.
4. Apply the fix using the /implement skill workflow:
- If the fix is trivial (< 15 lines, no new API, no architectural impact): use the **Small Change Fast Path**.
- Otherwise: use the **Full Implementation Workflow** with micro-TDD.
5. The failing test from Phase 2 must now pass.
6. Run the full test suite: `make test`
7. Run linter: `make lint`
8. Update the bug document:
- Fill "Root Cause Analysis" with the actual cause.
- Fill "Fix" with a summary of what changed.
- Fill "Fixed in" traceability with the files modified.

<self_check>

Before marking the bug fix as complete, verify:

- Does the failing test from Phase 2 now pass?
- Is the root cause documented, not just the symptom?
- Does `make test` pass with zero failures?
- Does `make lint` report zero issues?
- Is the fix minimal — did you change only what was necessary to fix the root cause?

</self_check>

---

<rules>

1. **Clarify first.** Ambiguity leads to wrong fixes. Ask the user when unclear.
2. **Reproduce first.** A fix without reproduction proof is a guess.
3. **Evidence over plausibility.** Never act on a guess. Every code change, every claimed root cause, every phase closure rests on evidence — a log line, a captured trace, a mechanical probe output, a failing/passing test. If you don't have evidence, the next step is to gather it, not to act. Guessing is allowed only as an experimental probe during debugging (to decide what to measure next) — never as the basis for a decision, a fix, or a closure.
4. **Execute everything yourself.** Do not ask the user to run commands or do manual testing.
5. **One bug at a time.** Do not batch multiple bugs.
6. **Failing test first.** The test from Phase 2 is your proof that the bug existed and your proof that the fix works.
7. **Minimal fix.** Fix the root cause, not symptoms. Do not refactor surrounding code.
8. Do not run git commands or commit unless the user explicitly asks.

</rules>
Loading
Loading