diff --git a/.github/workflows/action-test.yml b/.github/workflows/action-test.yml new file mode 100644 index 00000000..9d79372a --- /dev/null +++ b/.github/workflows/action-test.yml @@ -0,0 +1,113 @@ +name: Action + +# Tests the action in `action.yml` as another repository would use it: with a +# released CodeWiki, on a small repository made here. `ci.yml` tests this +# repository's own code; this workflow tests only the action's steps. +on: + push: + branches: [main] + paths: + - action.yml + - .github/workflows/action-test.yml + pull_request: + paths: + - action.yml + - .github/workflows/action-test.yml + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + use: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, ubuntu-22.04, windows-latest] + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v7 + + # A repository of its own inside the workspace, in three languages. + - name: Make a small repository + run: | + mkdir -p fixture/src fixture/tools + cd fixture + git init -q -b main + git config user.name "CodeWiki action test" + git config user.email "action-test@users.noreply.github.com" + printf 'pub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n' > src/lib.rs + printf '[package]\nname = "fixture"\nversion = "0.1.0"\nedition = "2021"\n' > Cargo.toml + printf 'def greet(name):\n return "hello " + name\n' > tools/greet.py + printf 'Write-Output "hello"\n' > tools/hello.ps1 + printf '# Fixture\n' > README.md + git add -A + git commit -q -m "a small repository" + + - name: Check it and write its first wiki + id: first + uses: ./ + with: + repo: fixture + wiki: update + + - name: The first run wrote a report and a wiki + env: + REPORT: ${{ steps.first.outputs.report }} + VERSION: ${{ steps.first.outputs.version }} + CHANGED: ${{ steps.first.outputs.wiki-changed }} + run: | + echo "version $VERSION, report $REPORT, wiki changed $CHANGED" + test -n "$VERSION" + test -s "$REPORT" + grep -q '"version"' "$REPORT" + test "$CHANGED" = true + test -f fixture/obsidian/_HOME.md + test -f fixture/obsidian/.codewiki/manifest.json + # The program is on PATH for later steps. + codewiki --version + git -C fixture add -A + git -C fixture commit -q -m "the wiki" + + - name: A wiki that is in sync passes + id: synced + uses: ./ + with: + repo: fixture + check: "false" + wiki: check + + - name: The sync changed nothing + env: + CHANGED: ${{ steps.synced.outputs.wiki-changed }} + run: | + test "$CHANGED" = false + git -C fixture checkout -q -- obsidian + printf 'pub fn sub(a: i32, b: i32) -> i32 {\n a - b\n}\n' >> fixture/src/lib.rs + git -C fixture commit -q -am "code without its wiki" + + - name: Code that changed without its wiki fails + id: stale + continue-on-error: true + uses: ./ + with: + repo: fixture + check: "false" + wiki: check + + - name: It failed, and said that the wiki changed + env: + OUTCOME: ${{ steps.stale.outcome }} + CHANGED: ${{ steps.stale.outputs.wiki-changed }} + run: | + echo "outcome $OUTCOME, wiki changed $CHANGED" + test "$OUTCOME" = failure + test "$CHANGED" = true diff --git a/AGENTS.md b/AGENTS.md index 21fb8ba0..544135e7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -216,9 +216,10 @@ After the zip, `package.ps1` builds `dist\CodeWiki--windows-x64-setup.e ## CI -`.github/workflows/` holds four workflows: +`.github/workflows/` holds five workflows, and the root holds an action: - `ci.yml` runs the four commands above, with `--locked`: format, clippy and the tests on Windows, and `cargo deny` on Linux in two legs (advisories; bans and sources). The licenses of dependencies are not checked, by the owner's decision of 2026-11-20: `deny.toml` has no list of allowed licenses, so a bare `cargo deny check` fails on every crate. The advisories leg can fail with no change in this repository, when a new advisory is published: fix the dependency, or add the advisory's ID to `ignore` in `deny.toml` with a reason. Its job `wiki-check` runs CodeWiki on this repository, on Linux: `codewiki check` uploads its findings to code scanning and never fails the build, and `codewiki update` does fail it. The wiki in `obsidian/` must be what the commit's code generates: the sync there may change nothing but `last_indexed_commit` in the manifest. So a push that changes code, a script, a workflow or a manifest carries its `docs(wiki)` commit (`cargo run -p codewiki -- update` at the repository root); a change to README, ROADMAP, this file or the guide needs none. Three things keep the result the same on every machine. A source file is hashed with CRLF read as LF (`cw_core::source_hash`), because git hands out one file with either ending. The sync counts every file it finds, tracked or not, so sync in a tree with no stray files, and put a folder that is no part of the project into `.codewikiignore`, where `docs/guide/` is. And the job writes `codewiki.sarif` outside the checkout. Dependabot cannot sync, so its pull requests skip the step, and the push that merges one must bring the sync. +- `action.yml` at the root is a GitHub Action for other repositories (`uses: Fly-onlyone/CodeWiki@action-v1`; README, "GitHub Action"). It never builds this repository: it uses a released CodeWiki. On a Linux runner it puts a script named `codewiki` on `PATH` that runs the image `ghcr.io/fly-onlyone/codewiki:` as the runner's user, with the workspace and the temporary folder mounted at their own paths; on a Windows runner it takes `codewiki.exe` from the release's zip and checks the `.sha256`. Then it runs `codewiki check` and, for `wiki: check` or `update`, the sync, with the same comparison as `wiki-check` here. `action-test.yml` uses it as a stranger would, on a small repository made in the job, on `ubuntu-latest`, `ubuntu-22.04` and `windows-latest`; it runs when either file changes. The action's tags are `action-v` (move `action-v1` for a change that breaks no caller): a tag that starts with `v` starts `release.yml`. A release that renames the zip, moves the binary in the image or changes the commands' options breaks the action: run `action-test.yml` by hand (`workflow_dispatch`) after each release. - `security.yml` runs gitleaks over new commits. Never commit a secret, not even a test value that looks real. A confirmed false positive goes in `.gitleaksignore` by its fingerprint. - `release.yml` and `docker.yml` run on a `v*` tag. The tag must equal `v` plus the workspace `version` in the root `Cargo.toml`. A tag publishes the Windows zip, the setup program and a `.sha256` for each as a GitHub Release, and pushes the image to GHCR. `release.yml` also builds the package, without publishing, on pushes to main and on pull requests that change `scripts/setup/**`, `package.ps1`, `install.ps1`, `uninstall.ps1` or `release.yml`. Do not push a tag unless asked. The package carries the DSN of the repository variable `SENTRY_DSN`; after the release, the programs' debug files (`dist\symbols-\`, written by `package.ps1` and never put in the zip) go to the Sentry project `fly-theonlyone/codewiki` with `sentry-cli`, when the secret `SENTRY_AUTH_TOKEN` is set. The token is given to that step alone, never to the build. diff --git a/README.md b/README.md index 9f0ed45b..19a2372e 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,7 @@ The wiki is an Obsidian vault of Markdown notes at `/obsidian/`. It lives - **Works for any language.** A repository in a language CodeWiki has no parser for still gets a wiki: its folders and files, mapped at file level, until a parser for that language exists. - **Keeps it current.** After new commits it rewrites only the notes whose source changed. - **Protects your edits.** A note you edited is never overwritten. Proposed changes wait in a review queue until you approve or reject them. When the code a note describes is deleted, a note with written work goes only where git can bring it back, and notes you wrote yourself only after you approve. The Review page shows the queue beside the open proposal; you can select several (click, Ctrl, Shift or the checkboxes) and approve or reject them in one step. -- **Tells you what happens.** A small notice appears in the corner of the window, and a Windows notification takes its place while the window is hidden or minimized. It says when the app has connected to its backend again and when new proposals wait for review. -- **Reads in tabs.** Right-click a tab to close it, the others, those to its right or left, or all, to reveal its note in the sidebar, or to copy its path. Right-click a note in the sidebar to open it in a new tab, or Ctrl+click or middle-click it. Settings → Appearance → Tabs turns tabs off, or opens every note in a tab of its own. -- **Reconnects by itself.** If the backend stops answering, the app tries again on its own, and so does the Settings page when your embedding model server is not running yet. No restart needed. - **Answers agents.** An MCP server gives Claude Code and other agents the wiki, symbol detail, search, risk and impact analysis. -- **Searches by meaning.** Full-text search, joined by vectors from a model server on your machine (LM Studio, Ollama, Llama for Windows, Lemonade or mistral.rs) that you run and choose the model of. Without one, CodeWiki matches word forms. No key needed, no text leaves the machine. The search box suggests notes, symbols and files as you type. - **Analyses the code.** Hotspots, ownership, change coupling, blast radius, dead code, documentation drift, file health, test impact, coverage gaps, security patterns, refactoring suggestions, decision records and API contracts. Symbols are extracted for Rust, Python, TypeScript, JavaScript, Java, Kotlin, C#, Go, C and C++. Source in any other language (Swift, Ruby, PHP, shell, SQL, HTML, CSS, XAML and the like, named from the file extension) is mapped at file level: a note for each project folder and each folder that holds three or more of its files, with the files, their language and their size in lines, and no symbols, imports or call links. Your coding agent explains those notes from the files themselves. Other files are indexed by path. @@ -345,6 +341,52 @@ docker run --rm -p 127.0.0.1:7411:7411 -e CODEWIKI_TOKEN= -v codewiki-da Each released version is also pushed as `ghcr.io/fly-onlyone/codewiki:`. Point the app or the MCP program at it with `CODEWIKI_URL=http://127.0.0.1:7411` and the same `CODEWIKI_TOKEN`. Set `CODEWIKI_WEBHOOK_SECRET` to let a git host trigger updates through `POST /v1/hooks/git`. +### GitHub Action + +To run CodeWiki in another repository's CI, use the action in this repository. It installs a released CodeWiki on the runner, runs `codewiki check`, and can hold the committed wiki to the code. + +```yaml +jobs: + codewiki: + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write # only for the upload below + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 # hotspots, ownership and change coupling read the history + - id: codewiki + uses: Fly-onlyone/CodeWiki@action-v1 + with: + wiki: check + - if: always() + uses: github/codeql-action/upload-sarif@v4 + with: + sarif_file: ${{ steps.codewiki.outputs.report }} + category: codewiki +``` + +| Input | Default | What it does | +|---|---|---| +| `version` | `latest` | The CodeWiki release to use, as in `0.6.0`. Name one to keep runs the same. | +| `repo` | `.` | The repository's root, from the workspace. | +| `check` | `true` | Runs `codewiki check`, every analysis, and writes the report. | +| `fail-on` | `never` | The lowest level of a finding that fails the job: `note`, `warning`, `error` or `never`. | +| `format` | `sarif` | The report's format: `sarif`, `junit` or `text`. | +| `report` | a file in the runner's temporary folder | Where the report is written. | +| `wiki` | `off` | `check` syncs the wiki in `obsidian/` and fails when the sync changes anything: code changed without its wiki. `update` syncs it, or writes it the first time, and leaves the changes for a later step to commit. | + +The outputs are `version`, `report` (the report's path) and `wiki-changed` (`true` or `false`). After the action, `codewiki` is on `PATH` for the steps that follow. + +It runs on Linux runners, where it uses the image `ghcr.io/fly-onlyone/codewiki` and so needs Docker (GitHub's runners have it), and on Windows runners, where it takes `codewiki.exe` from the release's zip and checks its checksum. There is no build for macOS runners. + +For `wiki: check`: + +- Commit `obsidian/` after every change to code: the check fails when the two disagree. A bot that cannot run the sync, such as Dependabot, needs to be left out with an `if:`. +- CodeWiki counts every file in the checkout. A step that writes a file into it before the action makes the wiki look out of date; write such files elsewhere, or name them in `.codewikiignore`. +- Up to 0.6.0 a source file is recorded by a hash of its bytes, line endings included. A wiki synced on a machine whose files have other line endings than the runner's checkout fails the check until a release after 0.6.0, which reads CRLF as LF. + ## Develop ``` diff --git a/ROADMAP.md b/ROADMAP.md index 44e0f2d5..019e3dfc 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,6 +6,7 @@ Status as of 2026-11-28. "Verified" means covered by automated tests or by a liv - 17 crates. `cargo fmt --check`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace` (1295 tests) and `cargo deny check advisories bans sources` all pass. The licenses of dependencies are no longer checked, by the owner's decision of 2026-11-20. - Not released yet, on main since 2026-11-28: a source file hashes the same with CRLF and LF line endings. Until 0.6.0 the hash was that of the raw bytes, so the same commit gave other hashes in another checkout: notes were marked behind though nothing had changed, and a synced wiki was out of sync on the next machine. Found when CI was made to fail on a wiki that is not what the code generates (`wiki-check` in `ci.yml`); that check has passed on Linux against the wiki written on Windows. Unit tests only; no VM run. +- On main since 2026-11-28, and usable at once because it runs a released CodeWiki: a GitHub Action for other repositories (`action.yml`, `uses: Fly-onlyone/CodeWiki@action-v1`). It runs `codewiki check` and can fail a job whose committed wiki is not what the code generates. Verified by `action-test.yml` on `ubuntu-latest`, `ubuntu-22.04` and `windows-latest` with 0.6.0, on a small repository made in the job; not tried in a real second repository, and not on a self-hosted runner. - Version 0.6.0 is the seventh release, tagged on 2026-11-28 as `v0.6.0`. It brings: - parsers for C#, Go, Kotlin, C and C++, and a file-level map for every other language; - TypeScript path aliases, Python packages without `__init__.py`, and pnpm, yarn and bun projects; diff --git a/action.yml b/action.yml new file mode 100644 index 00000000..e344624b --- /dev/null +++ b/action.yml @@ -0,0 +1,206 @@ +name: CodeWiki +description: >- + Run CodeWiki on a repository in CI: report its findings, and check that the + committed wiki is what the code generates. +author: Fly-onlyone +branding: + icon: book-open + color: purple + +# Uses a released CodeWiki, never a build of this repository: +# Linux the image ghcr.io/fly-onlyone/codewiki:, run with the +# workspace mounted; needs Docker, which GitHub's runners have +# Windows codewiki.exe from the release's zip, checked against its .sha256 +# After the action, `codewiki` is on PATH for the steps that follow. +inputs: + version: + description: >- + The CodeWiki release to use, as in `0.6.0`, or `latest` for the newest + release. + default: latest + repo: + description: The repository's root, from the workspace. + default: . + check: + description: >- + `true` runs `codewiki check` (every analysis) and writes the report. + default: "true" + fail-on: + description: >- + The lowest level of a finding that fails the job: `note`, `warning`, + `error` or `never`. + default: never + format: + description: "The report's format: `sarif`, `junit` or `text`." + default: sarif + report: + description: >- + Where the report is written. The default is outside the checkout, so + that the file is not taken for one of the repository's. + default: "" + wiki: + description: >- + What to do with the wiki in `obsidian/`. `off`: nothing. `check`: sync + it and fail when the sync changes anything, which means the code + changed without its wiki. `update`: sync it (or write it for the first + time) and leave the changes for a later step to commit. + default: "off" + token: + description: Used to look up the newest release. The job's own token does. + default: ${{ github.token }} + +outputs: + version: + description: The CodeWiki version that ran. + value: ${{ steps.version.outputs.version }} + report: + description: The path of the report, when `check` ran. + value: ${{ steps.check.outputs.report }} + wiki-changed: + description: >- + `true` when the sync changed the wiki, `false` when it did not, empty + when `wiki` is `off`. + value: ${{ steps.wiki.outputs.changed }} + +runs: + using: composite + steps: + - name: Find the CodeWiki version + id: version + shell: bash + env: + WANTED: ${{ inputs.version }} + TOKEN: ${{ inputs.token }} + run: | + version="${WANTED#v}" + if [ -z "$version" ] || [ "$version" = "latest" ]; then + tag=$(curl -fsSL -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/Fly-onlyone/CodeWiki/releases/latest \ + | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p' | head -n 1) + if [ -z "$tag" ]; then + echo "::error::Could not read the newest CodeWiki release. Give the input 'version' a number, as in 0.6.0." + exit 1 + fi + version="${tag#v}" + fi + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "CodeWiki $version" + + - name: Install CodeWiki (Linux) + if: runner.os == 'Linux' + shell: bash + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + image="ghcr.io/fly-onlyone/codewiki:$VERSION" + docker pull --quiet "$image" + bin="$RUNNER_TEMP/codewiki-bin" + mkdir -p "$bin" "$RUNNER_TEMP/codewiki-data" + # The program runs in its image, as the runner's user, with the + # workspace and the temporary folder at the paths they have outside: + # a path means the same thing in both places. + cat > "$bin/codewiki" <> "$GITHUB_PATH" + + - name: Install CodeWiki (Windows) + if: runner.os == 'Windows' + shell: pwsh + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + $ErrorActionPreference = "Stop" + $name = "CodeWiki-$env:VERSION-windows-x64.zip" + $base = "https://github.com/Fly-onlyone/CodeWiki/releases/download/v$env:VERSION" + $zip = Join-Path $env:RUNNER_TEMP $name + Invoke-WebRequest "$base/$name" -OutFile $zip + Invoke-WebRequest "$base/$name.sha256" -OutFile "$zip.sha256" + $want = ((Get-Content "$zip.sha256" -Raw) -split '\s+')[0].ToLower() + $have = (Get-FileHash $zip -Algorithm SHA256).Hash.ToLower() + if ($want -ne $have) { throw "$name has the checksum $have, and its .sha256 file says $want" } + $bin = Join-Path $env:RUNNER_TEMP "codewiki-bin" + Expand-Archive $zip -DestinationPath $bin -Force + New-Item -ItemType Directory -Force (Join-Path $env:RUNNER_TEMP "codewiki-data") | Out-Null + Add-Content $env:GITHUB_PATH $bin + "CODEWIKI_DATA_DIR=$(Join-Path $env:RUNNER_TEMP 'codewiki-data')" | Add-Content $env:GITHUB_ENV + + - name: No CodeWiki for this runner + if: runner.os != 'Linux' && runner.os != 'Windows' + shell: bash + run: | + echo "::error::CodeWiki is released for Windows and as a Linux image. Use a Windows or a Linux runner." + exit 1 + + - name: Check the repository + id: check + if: inputs.check == 'true' + shell: bash + env: + REPO: ${{ inputs.repo }} + FAIL_ON: ${{ inputs.fail-on }} + FORMAT: ${{ inputs.format }} + REPORT: ${{ inputs.report }} + run: | + report="$REPORT" + if [ -z "$report" ]; then + case "$FORMAT" in + sarif) report="$RUNNER_TEMP/codewiki.sarif" ;; + junit) report="$RUNNER_TEMP/codewiki.xml" ;; + *) report="$RUNNER_TEMP/codewiki.txt" ;; + esac + fi + echo "report=$report" >> "$GITHUB_OUTPUT" + status=0 + codewiki check --repo "$REPO" --format "$FORMAT" --fail-on "$FAIL_ON" --output "$report" || status=$? + echo "status=$status" >> "$GITHUB_OUTPUT" + if [ "$status" != 0 ]; then + echo "::warning::codewiki check ended with status $status: a finding at or above '$FAIL_ON', or it could not run. The report is at $report." + fi + + - name: Sync the wiki + id: wiki + if: inputs.wiki == 'check' || inputs.wiki == 'update' + shell: bash + env: + REPO: ${{ inputs.repo }} + MODE: ${{ inputs.wiki }} + run: | + if [ -f "$REPO/obsidian/.codewiki/manifest.json" ]; then + codewiki update --repo "$REPO" + elif [ "$MODE" = "update" ]; then + codewiki init --repo "$REPO" + codewiki update --repo "$REPO" + else + echo "::error::$REPO has no wiki in obsidian/ to check. Write one with 'codewiki init', or run this action once with wiki: update, and commit it." + exit 1 + fi + # The manifest names the commit that was indexed, which is this one. + changed=false + git -C "$REPO" diff --exit-code -I'"last_indexed_commit"' -- obsidian > /dev/null || changed=true + added=$(git -C "$REPO" ls-files --others --exclude-standard -- obsidian) + if [ -n "$added" ]; then changed=true; fi + echo "changed=$changed" >> "$GITHUB_OUTPUT" + if [ "$changed" = true ]; then + git -C "$REPO" diff --stat -I'"last_indexed_commit"' -- obsidian + if [ -n "$added" ]; then echo "New notes:"; echo "$added"; fi + fi + if [ "$MODE" = "check" ] && [ "$changed" = true ]; then + echo "::error::The wiki in obsidian/ is not what this commit's code generates. Run 'codewiki update' in the repository and commit obsidian/." + exit 1 + fi + + - name: Fail on findings + if: inputs.check == 'true' && steps.check.outputs.status != '0' + shell: bash + env: + STATUS: ${{ steps.check.outputs.status }} + run: | + echo "::error::codewiki check ended with status $STATUS." + exit 1 diff --git a/obsidian/.codewiki/manifest.json b/obsidian/.codewiki/manifest.json index ac1784fd..5983eaae 100644 --- a/obsidian/.codewiki/manifest.json +++ b/obsidian/.codewiki/manifest.json @@ -2,5 +2,5 @@ "schema": 1, "template_pack": "default", "template_version": 2, - "last_indexed_commit": "71cac1cf7efaceef26a2ec233306fab5afd0d8a1" + "last_indexed_commit": "dc57e0dc07ad52c752a1088da727687693ae3dbe" } diff --git a/obsidian/.codewiki/notes.jsonl b/obsidian/.codewiki/notes.jsonl index 600f60b9..00e9800a 100644 --- a/obsidian/.codewiki/notes.jsonl +++ b/obsidian/.codewiki/notes.jsonl @@ -22,7 +22,7 @@ {"id":"flow:startup:codewiki","path":"00-Architecture/codewiki Startup Flow.md","kind":"flow","origin":"generated","sources":[{"path":"crates/codewiki/src/main.rs","hash":"b6f6c86e4ac0d360dd6074d585681f5ccd09f8ff05ff35c4fb3fa65d020d94b1"}],"body_hash":"4ab9057ddf7f86c5172a8078505e82dcb2e79ca3a403d68f795bb7343f358f37","input_hash":"9b983ff05333683f46f3ce89e1bc2807f88622e822787ec0ec1aa70f448fb0cb","commit":"5c510e10cc691326c863af0b335e7fc0e124b15b","model":"claude-code","explained":{"sections":["How it works","Gotchas"],"sources":[{"path":"crates/codewiki/src/main.rs","hash":"e8ab4bc70b50d6d2422fc65ff05bfadd45503b35da83af51177ee7088a37487a"}],"commit":"695ad7dc8ee2f552725a15ae46d4ca6821e34943"},"behind":["crates/codewiki/src/main.rs changed"]} {"id":"flow:startup:codewiki_app","path":"00-Architecture/codewiki-app Startup Flow.md","kind":"flow","origin":"generated","sources":[{"path":"crates/codewiki-app/src/main.rs","hash":"ff4d983ec499611c160e28dcc902eecd24f53ff1d81b9dd42e447b84ceeadd9b"}],"body_hash":"159beb8c0662e440202a9703866606e82213fa9abe57801be309c5898280e6be","input_hash":"b4e1b540ccf8864e2e9278875087e0b5af35672b3323983fb05649cd5ed41bc3","commit":"a1f9ebe87b27a9fa411e3800130ba9045fbe02b4","model":"claude-code","explained":{"sections":["How it works","Gotchas"],"sources":[{"path":"crates/codewiki-app/src/main.rs","hash":"81a63388f0998d7dd6c96fe7acc6a7aaf947817678cc9c44ae42549aab23c200"}],"commit":"1334bf47a1c6dd66dc5ffb4bc1e578273d9c41db"},"behind":["crates/codewiki-app/src/main.rs changed"]} {"id":"flow:startup:codewiki_mcp","path":"00-Architecture/codewiki-mcp Startup Flow.md","kind":"flow","origin":"generated","sources":[{"path":"crates/codewiki-mcp/src/main.rs","hash":"a2d101493d92ceb2ec18221b2d28474ea22be5b111e46eb613cde0bbb0194b8a"}],"body_hash":"ccc679bbde97aa2b1c59c04e2ff686ba253c047b3f69db694a8ccf8b1c7ab118","input_hash":"74047c0dce4604724cf9859c53f8117d25564708ef5204fdf2a1efa40d043078","commit":"9b5d0e8a90d891f935aac59a73dfed18b10dca7d","model":"claude-code","explained":{"sections":["How it works","Gotchas"],"sources":[{"path":"crates/codewiki-mcp/src/main.rs","hash":"f42b3588381e1943acb38931c0caa9e0381cd2af702793de1e94887df5448255"}],"commit":"695ad7dc8ee2f552725a15ae46d4ca6821e34943"},"behind":["crates/codewiki-mcp/src/main.rs changed"]} -{"id":"home","path":"_HOME.md","kind":"home","origin":"generated","body_hash":"29af72b289f2ee0c4776dac6e800d3c7b8c462fe6626b569c234b734ea3e6d89","input_hash":"a0a3c78dfc8e58ea491a33bba0da444526b96671b04c2707ec323c21adc87664","commit":"f819f88e16c355ecc78e505d7a305227b3a18e0d"} +{"id":"home","path":"_HOME.md","kind":"home","origin":"generated","body_hash":"cd7f953a71f4b708c7609e3786d6e0c7ff14ece3ae90d2ef09fda1f452371b7c","input_hash":"ba3574e0919b9334f3f8467d1f9365287f0814c4aea56de2b42d5555f305c818","commit":"dc57e0dc07ad52c752a1088da727687693ae3dbe"} {"id":"index:00-Architecture","path":"00-Architecture/_index.md","kind":"index","origin":"generated","body_hash":"23d4da2a3f79fa976e74068569d3d310f5b8f18773e1e4b53ab21b0b0ed4de66","input_hash":"47279e063df1ad6eb5eacc575057cc70caeebbde365f416a22408fd28dc9f901","commit":"a1f9ebe87b27a9fa411e3800130ba9045fbe02b4"} {"id":"index:01-Core","path":"01-Core/_index.md","kind":"index","origin":"generated","body_hash":"8bb0459fdb73f8a896e7f6a9692cfe4c584eb1cc98684f4ad17f0fc3e295e9df","input_hash":"b09da46971cdef30e753ed49125185cb5288a41e36831a15e316b0a377dfd0ef","commit":"dcc55e04ac893b533ac09e532c7354065e0d716a"} {"id":"index:01-Core/codewiki","path":"01-Core/codewiki/_index.md","kind":"index","origin":"generated","body_hash":"44ea0a5f12be8b088ca128424c81605eca3d4f1811ba61eb554a9a55590d7c04","input_hash":"ce011bacb5735a748cac5d25a4f3fb5ee9e4d94ac82efa0c170badce0d2a4ff4","commit":"63aedc391b0ff003aee1e040b41448d758724938"} @@ -227,7 +227,7 @@ {"id":"mod:openui_lang::eval","path":"01-Core/openui-lang/Eval Module.md","kind":"concept","origin":"generated","sources":[{"path":"crates/openui-lang/src/eval.rs","hash":"b2da5011746700a6cf2c001e12da14a6cb88c984d332987f44054fc8735c52ff"}],"body_hash":"92c37c50a507bd447a80ef1c202119a526cb95ca3dde26ec9fc934ec41364e83","input_hash":"c4312918c748b718f2117fe94de1d0114c41a7ee07279916d79fc58c58b3c1d6","commit":"a1045089a63dba5abca03a77ddfb2c7e465e895d","model":"claude-code","explained":{"sections":["What it does","How it works","Gotchas"],"sources":[{"path":"crates/openui-lang/src/eval.rs","hash":"b2da5011746700a6cf2c001e12da14a6cb88c984d332987f44054fc8735c52ff"}],"commit":"0131c9bc448caa84be306b09421bd9f1ae44d6d0"}} {"id":"mod:openui_lang::lexer","path":"01-Core/openui-lang/Lexer Module.md","kind":"concept","origin":"generated","sources":[{"path":"crates/openui-lang/src/lexer.rs","hash":"dee133eea67c357aac84f9fcde8444fd42eb7d5c46f20eaa3d85729507733cd9"}],"body_hash":"f159b5ee5dba4e34d8d3476e309478c2c914f063a3630db666dcf0b72b40a2a0","input_hash":"0e327efdae316bb8736a8dc8b5919b9091d5f4344650666657b4ef064377870f","commit":"9b5d0e8a90d891f935aac59a73dfed18b10dca7d","model":"claude-code","explained":{"sections":["What it does","How it works","Gotchas"],"sources":[{"path":"crates/openui-lang/src/lexer.rs","hash":"dee133eea67c357aac84f9fcde8444fd42eb7d5c46f20eaa3d85729507733cd9"}],"commit":"0131c9bc448caa84be306b09421bd9f1ae44d6d0"}} {"id":"mod:openui_lang::parser","path":"01-Core/openui-lang/Parser Module.md","kind":"concept","origin":"generated","sources":[{"path":"crates/openui-lang/src/parser.rs","hash":"5fc3d91a50c0622b5cd5c3d5a155e698e73f43128fcb285bc94a6b1fd1248e76"}],"body_hash":"3c0c436728f3c05fc04c4e13f08dd675a0291ed1e17e5a135759e9842eaa3c93","input_hash":"54a56bd7eac7b0e7f178601a653684a6b6e41102504bf573a2b74f7e94ccb268","commit":"9b5d0e8a90d891f935aac59a73dfed18b10dca7d","model":"claude-code","explained":{"sections":["What it does","How it works","Gotchas"],"sources":[{"path":"crates/openui-lang/src/parser.rs","hash":"5fc3d91a50c0622b5cd5c3d5a155e698e73f43128fcb285bc94a6b1fd1248e76"}],"commit":"0131c9bc448caa84be306b09421bd9f1ae44d6d0"}} -{"id":"ops:build","path":"05-Operations/Build and Test.md","kind":"operations","origin":"generated","sources":[{"path":".github/workflows/ci.yml","hash":"0ab0115ae9e5ea15837ad19d47d903e4ebe7f9fcd8e9435decd4ba119370f13b"},{"path":".github/workflows/docker.yml","hash":"3d88d7ffb8b39aa3ac39d7f60f619e72f3b3e837daf63ae7e932f434eb470174"},{"path":".github/workflows/release.yml","hash":"07256e83f05f48e1b8c0a43e2c5edc73e05df050ccb382c420c7534dc04a2f21"},{"path":".github/workflows/security.yml","hash":"53f9fa609d80bec6749e0db34063ec80a98520a7464fb3c4c9458414fcf95e06"},{"path":"Cargo.toml","hash":"c3ceed68526031114522f269c15d0b99574b34cec466988f213da4a8aff93d79"},{"path":"Dockerfile","hash":"431c4b7be458c4a7dfec880238d9fcd68d24005b158cc985e124ea63242f4c3f"},{"path":"deny.toml","hash":"961820d909e653008c38cbe0f278bafbbc1c987defb5fb2b8f793ece6d1e4142"},{"path":"rust-toolchain.toml","hash":"a6a0bbd29ffaa8182dc22d1d9149709f1091e47df40ed96eb8a78a711c66a4ce"}],"body_hash":"06478da070537a80cae42b422519ef8d91a70ba3593b08a4b0f0c8746ef0c700","input_hash":"cf1463a03ba375198bc840c9904473c5df7e3acd2b02dc9600e1a8c093447b76","commit":"63aedc391b0ff003aee1e040b41448d758724938","model":"claude-code","explained":{"sections":["How it works","Gotchas"],"sources":[{"path":".github/workflows/ci.yml","hash":"e59cc6a74fca9e5ca2d1c258b91d8d3962dfea928547b9b5f6c85db5f7afa90c"},{"path":".github/workflows/docker.yml","hash":"3d88d7ffb8b39aa3ac39d7f60f619e72f3b3e837daf63ae7e932f434eb470174"},{"path":".github/workflows/release.yml","hash":"07256e83f05f48e1b8c0a43e2c5edc73e05df050ccb382c420c7534dc04a2f21"},{"path":".github/workflows/security.yml","hash":"53f9fa609d80bec6749e0db34063ec80a98520a7464fb3c4c9458414fcf95e06"},{"path":"Cargo.toml","hash":"aad52ad2fa5d895351b87be56f96576c20562e74945b07b97b75b67a4fe1e1d7"},{"path":"Dockerfile","hash":"431c4b7be458c4a7dfec880238d9fcd68d24005b158cc985e124ea63242f4c3f"},{"path":"deny.toml","hash":"961820d909e653008c38cbe0f278bafbbc1c987defb5fb2b8f793ece6d1e4142"},{"path":"rust-toolchain.toml","hash":"a6a0bbd29ffaa8182dc22d1d9149709f1091e47df40ed96eb8a78a711c66a4ce"}],"commit":"1334bf47a1c6dd66dc5ffb4bc1e578273d9c41db"},"behind":[".github/workflows/ci.yml changed","Cargo.toml changed"]} +{"id":"ops:build","path":"05-Operations/Build and Test.md","kind":"operations","origin":"generated","sources":[{"path":".github/workflows/action-test.yml","hash":"00ae2197ed4081dadc85dbde414cb4b2981115aa367fbc2c420a47372d339181"},{"path":".github/workflows/ci.yml","hash":"0ab0115ae9e5ea15837ad19d47d903e4ebe7f9fcd8e9435decd4ba119370f13b"},{"path":".github/workflows/docker.yml","hash":"3d88d7ffb8b39aa3ac39d7f60f619e72f3b3e837daf63ae7e932f434eb470174"},{"path":".github/workflows/release.yml","hash":"07256e83f05f48e1b8c0a43e2c5edc73e05df050ccb382c420c7534dc04a2f21"},{"path":".github/workflows/security.yml","hash":"53f9fa609d80bec6749e0db34063ec80a98520a7464fb3c4c9458414fcf95e06"},{"path":"Cargo.toml","hash":"c3ceed68526031114522f269c15d0b99574b34cec466988f213da4a8aff93d79"},{"path":"Dockerfile","hash":"431c4b7be458c4a7dfec880238d9fcd68d24005b158cc985e124ea63242f4c3f"},{"path":"deny.toml","hash":"961820d909e653008c38cbe0f278bafbbc1c987defb5fb2b8f793ece6d1e4142"},{"path":"rust-toolchain.toml","hash":"a6a0bbd29ffaa8182dc22d1d9149709f1091e47df40ed96eb8a78a711c66a4ce"}],"body_hash":"de42d3f888f583db1e27d76132c9aa1e3dff84c780e979f08f9fab03b34a1968","input_hash":"853e80f3f2b3ed4dc0097d540e140b075929567e482f79780b26f4a3e7151c9c","commit":"dc57e0dc07ad52c752a1088da727687693ae3dbe","model":"claude-code","explained":{"sections":["How it works","Gotchas"],"sources":[{"path":".github/workflows/ci.yml","hash":"e59cc6a74fca9e5ca2d1c258b91d8d3962dfea928547b9b5f6c85db5f7afa90c"},{"path":".github/workflows/docker.yml","hash":"3d88d7ffb8b39aa3ac39d7f60f619e72f3b3e837daf63ae7e932f434eb470174"},{"path":".github/workflows/release.yml","hash":"07256e83f05f48e1b8c0a43e2c5edc73e05df050ccb382c420c7534dc04a2f21"},{"path":".github/workflows/security.yml","hash":"53f9fa609d80bec6749e0db34063ec80a98520a7464fb3c4c9458414fcf95e06"},{"path":"Cargo.toml","hash":"aad52ad2fa5d895351b87be56f96576c20562e74945b07b97b75b67a4fe1e1d7"},{"path":"Dockerfile","hash":"431c4b7be458c4a7dfec880238d9fcd68d24005b158cc985e124ea63242f4c3f"},{"path":"deny.toml","hash":"961820d909e653008c38cbe0f278bafbbc1c987defb5fb2b8f793ece6d1e4142"},{"path":"rust-toolchain.toml","hash":"a6a0bbd29ffaa8182dc22d1d9149709f1091e47df40ed96eb8a78a711c66a4ce"}],"commit":"1334bf47a1c6dd66dc5ffb4bc1e578273d9c41db"},"behind":[".github/workflows/ci.yml changed","Cargo.toml changed"]} {"id":"pattern:cw_embed::Embedder","path":"04-Patterns/Implementing Embedder Pattern.md","kind":"pattern","origin":"generated","sources":[{"path":"crates/cw-embed/src/lib.rs","hash":"4c4961ccb5327412e48031bcf7905f353d58c4131b719df402ef4eafd1d57b90"}],"body_hash":"87556c5e28763bbe2a05f0a491ce5dcb00d2ad8fa79c8437b118eb6c3cff680a","input_hash":"36d627a8abfc6cf6c4e26bfe370fe997231248951f3b9725c8812ef62983d1ee","commit":"63aedc391b0ff003aee1e040b41448d758724938","model":"claude-code","explained":{"sections":["Why","Don't"],"sources":[{"path":"crates/cw-embed/src/lib.rs","hash":"4c4961ccb5327412e48031bcf7905f353d58c4131b719df402ef4eafd1d57b90"}],"commit":"695ad7dc8ee2f552725a15ae46d4ca6821e34943"}} {"id":"pattern:cw_wiki::manifests::PackageInfo","path":"04-Patterns/Implementing PackageInfo Pattern.md","kind":"pattern","origin":"generated","sources":[{"path":"crates/cw-wiki/src/manifests.rs","hash":"33eb4709c3e1576dced4ae4bd0d2a1951f430437f5a6f9bff9eae6b7fd9ffb46"}],"body_hash":"467ce6817affef4ecfe02c424ed6557b08d12cabc9cdb9c757b7325225cf6230","input_hash":"7163f3a2fb247441c564ad9ceb4c2d98acfce23446142377db812ede372aa097","commit":"406c29a03c1a9fb83018c57a351e37ba2d760a93","model":"claude-code","explained":{"sections":["Why","Don't"],"sources":[{"path":"crates/cw-wiki/src/manifests.rs","hash":"c01f864da7f3cd767f5afd611288de54bb796d22ab2157abfca589817296402a"}],"commit":"0131c9bc448caa84be306b09421bd9f1ae44d6d0"},"behind":["crates/cw-wiki/src/manifests.rs changed"]} {"id":"pattern:cw_wiki::testmap::TestLanguage","path":"04-Patterns/Implementing TestLanguage Pattern.md","kind":"pattern","origin":"generated","sources":[{"path":"crates/cw-wiki/src/testmap.rs","hash":"5fbf95450ac0d83cfa7ba738afa4e44fd09817596ea26787ab285fdcd8dc66a6"}],"body_hash":"81b0b3021b1b909520ffac3bcb688ef811d3621148b68ed9515cede3f0ce83e9","input_hash":"ec4e2e82ca216d4e11a79a44a370bd0d93e8efc29ad32e49933f01f69450bc6d","commit":"406c29a03c1a9fb83018c57a351e37ba2d760a93"} diff --git a/obsidian/05-Operations/Build and Test.md b/obsidian/05-Operations/Build and Test.md index ba5d9046..a5aa4411 100644 --- a/obsidian/05-Operations/Build and Test.md +++ b/obsidian/05-Operations/Build and Test.md @@ -8,6 +8,7 @@ tags: [operations] ## Source +- `.github/workflows/action-test.yml` — CI workflow - `.github/workflows/ci.yml` — CI workflow - `.github/workflows/docker.yml` — CI workflow - `.github/workflows/release.yml` — CI workflow diff --git a/obsidian/_HOME.md b/obsidian/_HOME.md index 90859938..31e80205 100644 --- a/obsidian/_HOME.md +++ b/obsidian/_HOME.md @@ -6,7 +6,7 @@ tags: [moc, home] A graph-linked tour of the codebase. **Start with the architecture flows**, then drill into crates, modules and patterns. -> **CodeWiki** is a Rust codebase of 17 crates and 387 source files. 21 source files in PowerShell and Batch are mapped at file level: CodeWiki has no parser for them yet. This vault maps its architecture, modules and conventions. +> **CodeWiki** is a Rust codebase of 17 crates and 389 source files. 21 source files in PowerShell and Batch are mapped at file level: CodeWiki has no parser for them yet. This vault maps its architecture, modules and conventions. ## 🧭 Start here — Architecture flows