Stevesolun commited on
Commit
29c07f3
·
verified ·
1 Parent(s): 576ff13

Sync ctx 0d3237d

Browse files

GitHub commit: 0d3237df9965b8142d0f74ea4c4bea30f3ef16c9

.github/workflows/huggingface-sync.yml CHANGED
@@ -75,12 +75,121 @@ jobs:
75
  env:
76
  GH_TOKEN: ${{ github.token }}
77
  run: |
78
- latest_tag="$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName --jq .tagName)"
79
- echo "Hydrating graph artifacts from release ${latest_tag}"
80
- rm -f graph/wiki-graph.tar.gz graph/wiki-graph-runtime.tar.gz graph/skills-sh-catalog.json.gz
81
- gh release download "$latest_tag" --repo "$GITHUB_REPOSITORY" --dir graph --pattern wiki-graph.tar.gz
82
- gh release download "$latest_tag" --repo "$GITHUB_REPOSITORY" --dir graph --pattern wiki-graph-runtime.tar.gz
83
- gh release download "$latest_tag" --repo "$GITHUB_REPOSITORY" --dir graph --pattern skills-sh-catalog.json.gz
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  - name: Set up Python
86
  if: ${{ env.HF_TOKEN != '' }}
 
75
  env:
76
  GH_TOKEN: ${{ github.token }}
77
  run: |
78
+ set -euo pipefail
79
+ echo "Resolving graph artifacts from matching release assets to avoid Git LFS bandwidth."
80
+ python - <<'PY'
81
+ import hashlib
82
+ import json
83
+ import os
84
+ from pathlib import Path
85
+ import subprocess
86
+ import time
87
+ import urllib.request
88
+
89
+ repo = os.environ["GITHUB_REPOSITORY"]
90
+ release_asset_wait_seconds = 300
91
+ release_asset_poll_seconds = 10
92
+ expected_graph_assets = {
93
+ "graph/wiki-graph.tar.gz": {
94
+ "sha256": "d051d4f21208abe3e73975a9c30650150138d88919c27979d725be936a6ea10a",
95
+ "size": 296113770,
96
+ },
97
+ "graph/wiki-graph-runtime.tar.gz": {
98
+ "sha256": "993fc08377fdb09edcff4414c59b10fc121189b4a161bf796e3f8f6600907bb1",
99
+ "size": 122141091,
100
+ },
101
+ "graph/skills-sh-catalog.json.gz": {
102
+ "sha256": "d1bb927e93d65ef86cdbc6d68c7f57511d64c8f13026e8193287a9c4ca6f5815",
103
+ "size": 10763626,
104
+ },
105
+ }
106
+
107
+ def load_releases() -> list[dict]:
108
+ return json.loads(subprocess.check_output(
109
+ ["gh", "api", f"repos/{repo}/releases?per_page=50"],
110
+ text=True,
111
+ ))
112
+
113
+ def hydrate_from_release(path_name: str, hydrated_min_size: int) -> None:
114
+ artifact = Path(path_name)
115
+ fallback = expected_graph_assets[path_name]
116
+ expected_oid = fallback["sha256"]
117
+ expected_size = int(fallback["size"])
118
+ if artifact.exists():
119
+ pointer = artifact.read_text(encoding="utf-8", errors="replace")
120
+ for line in pointer.splitlines():
121
+ if line.startswith("oid sha256:"):
122
+ expected_oid = line.split(":", 1)[1].strip()
123
+ elif line.startswith("size "):
124
+ expected_size = int(line.split(" ", 1)[1].strip())
125
+ if not pointer.startswith("version https://git-lfs.github.com/spec/v1") and artifact.stat().st_size > hydrated_min_size:
126
+ print(f"{artifact} is already hydrated")
127
+ return
128
+
129
+ deadline = time.monotonic() + release_asset_wait_seconds
130
+ while True:
131
+ candidates = []
132
+ for release in load_releases():
133
+ tag_name = str(release.get("tag_name") or "")
134
+ is_graph_cache = tag_name.startswith("graph-artifacts-")
135
+ if release.get("draft") or (
136
+ release.get("prerelease") and not is_graph_cache
137
+ ):
138
+ continue
139
+ for asset in release.get("assets", []):
140
+ if asset.get("name") != artifact.name:
141
+ continue
142
+ digest = str(asset.get("digest") or "")
143
+ size = int(asset.get("size") or 0)
144
+ if size != expected_size:
145
+ continue
146
+ if digest and digest != f"sha256:{expected_oid}":
147
+ continue
148
+ candidates.append((tag_name, asset))
149
+
150
+ if candidates:
151
+ break
152
+ if time.monotonic() >= deadline:
153
+ raise SystemExit(
154
+ f"No release asset matches {path_name} "
155
+ f"sha256:{expected_oid} size:{expected_size}"
156
+ )
157
+ print(
158
+ f"Waiting for matching release asset {artifact.name} "
159
+ f"sha256:{expected_oid} size:{expected_size}"
160
+ )
161
+ time.sleep(release_asset_poll_seconds)
162
+
163
+ source_tag, asset = candidates[0]
164
+ tmp = artifact.with_name(f"{artifact.name}.download")
165
+ sha = hashlib.sha256()
166
+ total = 0
167
+ with urllib.request.urlopen(asset["browser_download_url"], timeout=300) as resp: # noqa: S310
168
+ with tmp.open("wb") as fh:
169
+ while True:
170
+ chunk = resp.read(1024 * 1024)
171
+ if not chunk:
172
+ break
173
+ sha.update(chunk)
174
+ total += len(chunk)
175
+ fh.write(chunk)
176
+ actual_oid = sha.hexdigest()
177
+ if actual_oid != expected_oid or total != expected_size:
178
+ tmp.unlink(missing_ok=True)
179
+ raise SystemExit(
180
+ f"Downloaded {path_name} does not match expected artifact: "
181
+ f"sha256:{actual_oid} size:{total}"
182
+ )
183
+ tmp.replace(artifact)
184
+ print(
185
+ f"Hydrated {path_name} from {source_tag} release asset "
186
+ f"sha256:{actual_oid} size:{total}"
187
+ )
188
+
189
+ hydrate_from_release("graph/wiki-graph.tar.gz", 100_000_000)
190
+ hydrate_from_release("graph/wiki-graph-runtime.tar.gz", 10_000_000)
191
+ hydrate_from_release("graph/skills-sh-catalog.json.gz", 1_000_000)
192
+ PY
193
 
194
  - name: Set up Python
195
  if: ${{ env.HF_TOKEN != '' }}
README.md CHANGED
@@ -18,7 +18,7 @@ tags:
18
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
19
  [![Python 3.11+](https://img.shields.io/badge/Python-3.11+-green.svg)](https://python.org)
20
  [![PyPI](https://img.shields.io/pypi/v/claude-ctx.svg)](https://pypi.org/project/claude-ctx/)
21
- [![Tests](https://img.shields.io/badge/Tests-4310_collected-brightgreen.svg)](https://github.com/stevesolun/ctx/actions/workflows/test.yml)
22
  [![Graph](https://img.shields.io/badge/Graph-79%2C958_nodes_/_1%2C778%2C069_edges-red.svg)](https://stevesolun.github.io/ctx/knowledge-graph/)
23
  [![Skills](https://img.shields.io/badge/Skills-68%2C494-blue.svg)](https://stevesolun.github.io/ctx/catalog/?type=skill)
24
  [![Agents](https://img.shields.io/badge/Agents-467-purple.svg)](https://stevesolun.github.io/ctx/catalog/?type=agent)
 
18
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
19
  [![Python 3.11+](https://img.shields.io/badge/Python-3.11+-green.svg)](https://python.org)
20
  [![PyPI](https://img.shields.io/pypi/v/claude-ctx.svg)](https://pypi.org/project/claude-ctx/)
21
+ [![Tests](https://img.shields.io/badge/Tests-4315_collected-brightgreen.svg)](https://github.com/stevesolun/ctx/actions/workflows/test.yml)
22
  [![Graph](https://img.shields.io/badge/Graph-79%2C958_nodes_/_1%2C778%2C069_edges-red.svg)](https://stevesolun.github.io/ctx/knowledge-graph/)
23
  [![Skills](https://img.shields.io/badge/Skills-68%2C494-blue.svg)](https://stevesolun.github.io/ctx/catalog/?type=skill)
24
  [![Agents](https://img.shields.io/badge/Agents-467-purple.svg)](https://stevesolun.github.io/ctx/catalog/?type=agent)
docs/index.md CHANGED
@@ -208,13 +208,13 @@ ones are flagged. New ones self-ingest.
208
  ---
209
 
210
  **v1.0.19** — MIT, CI-matrixed (Ubuntu 3.12 plus Windows/macOS 3.11/3.12),
211
- 4,308 tests collected. Ships console scripts including `ctx-init`,
212
  `ctx-monitor` (local dashboard with graph + wiki + load/unload for
213
  skills, agents, and MCP servers, plus Harness Setup for user-owned LLMs),
214
  `ctx-incremental-attach`, `ctx-incremental-shadow`, `ctx-dedup-check`
215
  (pre-ship near-duplicate gate), and
216
  `ctx-tag-backfill` (entity hygiene), plus a fast runtime graph artifact
217
- and the full ~314 MiB wiki tarball with **79,958 nodes / 1,778,069 edges / 52 Louvain communities**.
218
 
219
  [:octicons-arrow-right-24: CHANGELOG](https://github.com/stevesolun/ctx/blob/main/CHANGELOG.md) ·
220
  [Repository](https://github.com/stevesolun/ctx)
 
208
  ---
209
 
210
  **v1.0.19** — MIT, CI-matrixed (Ubuntu 3.12 plus Windows/macOS 3.11/3.12),
211
+ 4,315 tests collected. Ships console scripts including `ctx-init`,
212
  `ctx-monitor` (local dashboard with graph + wiki + load/unload for
213
  skills, agents, and MCP servers, plus Harness Setup for user-owned LLMs),
214
  `ctx-incremental-attach`, `ctx-incremental-shadow`, `ctx-dedup-check`
215
  (pre-ship near-duplicate gate), and
216
  `ctx-tag-backfill` (entity hygiene), plus a fast runtime graph artifact
217
+ and the full ~282 MiB wiki tarball with **79,958 nodes / 1,778,069 edges / 52 Louvain communities**.
218
 
219
  [:octicons-arrow-right-24: CHANGELOG](https://github.com/stevesolun/ctx/blob/main/CHANGELOG.md) ·
220
  [Repository](https://github.com/stevesolun/ctx)
docs/qa/feature-user-story-status.csv CHANGED
@@ -1,7 +1,7 @@
1
  feature_id,surface,feature,entrypoint_or_route,source_evidence,user_story,expected_behavior,setup_preconditions,test_command_or_steps,status,first_test_result,error_id,error_summary,fix_status,retest_result,last_verified_at,notes
2
  CLI-001,CLI,Generic model run harness,ctx,pyproject.toml project.scripts,As a user I can run or resume a model-agnostic ctx session,ctx creates or resumes a session with configured provider tools budgets and transcript ordering intact,Provider credentials or dry-run/local test provider available,ctx --help then focused run/resume smoke,Tested Pass,test_harness_cli_run.py: 67 passed for ctx run/resume/sessions.,,,,,2026-06-23,Validated in focused pytest or isolated temp CLI smoke during A-Z pass.
3
  CLI-002,CLI,Repository recommendation,ctx-recommend,pyproject.toml project.scripts,As a user I can ask ctx for current repo recommendations,ctx returns capped relevant skill agent MCP recommendations from the shared graph engine,Graph installed and target repo available,ctx-recommend --help then sample repo recommendation,Tested Pass,recommend CLI/golden subset: 24 passed for ctx-recommend and shared recommendation surfaces.,,,,,2026-06-23,Validated in focused pytest or isolated temp CLI smoke during A-Z pass.
4
- CLI-003,CLI,Initial setup,ctx-init,pyproject.toml project.scripts,As a new user I can install hooks graph and model mode from one command,ctx-init installs requested pieces idempotently and reports failures with non-zero exit,Writable user config directory,ctx-init --model-mode skip --graph,Needs Fix,"PASS: temp USERPROFILE ctx-init --model-mode skip --knowledge-mode skip created .claude config/toolboxes and exited 0. PASS: temp USERPROFILE ctx-init --graph --graph-install-mode runtime --model-mode skip installed graph.json and harness page in 129.2s.",CTX-AZ-006,Full graph install is still too slow for the 10-minute Windows smoke budget: native-tar full install completed in 759.0s and cleanup took 171.7s.,Added ctx-init full-mode warning native-tar full extraction and packed-full wiki-pack extraction support; shipped full artifact still needs repack with wiki-packs before Windows smoke can pass budget.,PARTIAL: runtime install passed; packed full install path has focused regression coverage but current shipped full tarball still lacks wiki-packs and remains above budget.,2026-06-23,Runtime path is usable; full path now supports packed wiki pages but the shipped artifact must be repacked before this story can be fully retested.
5
  CLI-004,CLI,Claude hook install,ctx-install-hooks,pyproject.toml project.scripts,As a Claude Code user I can install ctx hooks,Hooks are installed idempotently and point to existing modules,Claude config path writable,ctx-install-hooks --help then temp-home smoke,Tested Pass,inject hooks/ctx-init hook subset: 24 passed for hook install and failure handling.,,,,,2026-06-23,Validated in focused pytest or isolated temp CLI smoke during A-Z pass.
6
  CLI-005,CLI,Repo stack scan,ctx-scan-repo,pyproject.toml project.scripts,As a developer I can scan a repo and get stack plus recommendations,Scan detects stack signatures and renders recommendations consistently with graph engine,Sample repos available,ctx-scan-repo --repo . --recommend,Retested Pass,FAIL: first run classified ctx as ml-project because optional embeddings extra contains torch,CTX-AZ-002,Optional pyproject extras were treated as primary project-type dependencies,Fixed by excluding optional/dev pyproject deps from primary project-type classification while keeping them as searchable signals,PASS: focused scan tests 5 passed; live scan now reports Type infrastructure and recommendations render,2026-06-23,
7
  CLI-006,CLI,Skill add,ctx-skill-add,pyproject.toml project.scripts,As a user I can add or update a skill,Skill is validated micro-skill gated written to wiki and attached to graph/index without duplicate stale edges,Temp skill directory and wiki path,ctx-skill-add --skill-path temp/SKILL.md --name demo --wiki temp/wiki,Retested Pass,Failed in isolated A-Z flow: Windows UTF-8 BOM input was rejected by markdown/JSON parsing; some rejected batch CLIs could still exit 0.,CTX-AZ-004,"Entity onboarding was not Windows-BOM-safe across skill/agent/MCP/harness inputs, and failed batches needed non-zero exits.",Fixed,Skill add accepted BOM-prefixed SKILL.md and wrote wiki entity in temp CLI flow. Focused pytest regressions passed.,2026-06-23,Regression coverage added for BOM inputs and MCP rejected-batch exit.
@@ -84,3 +84,26 @@ HARNESS-001,Harness,Own-model harness recommendation,ctx-init and ctx-harness-in
84
  HARNESS-002,Harness,No-fit harness PRD,ctx-harness-install,harness_install.py,As a user with no fitting harness I get instructions to build one,No-fit path produces provider-aware PRD attachable to ctx recommendation system,Graph with threshold forcing no match,ctx-harness-install --dry-run with restrictive constraints,Tested Pass,PASS: --plan-on-no-fit printed provider-aware Custom Harness PRD for openai/gpt-4.1 with runtime/tools/privacy/verification fields,,,,,2026-06-23,
85
  DOC-001,Docs,Public docs install path,docs/index.md and docs/*.md,docs file inventory,As a first-time user I can follow docs exactly,Docs commands are current numbers accurate no dead module paths no future-roadmap fluff,Docs built locally,mkdocs build or docs route smoke,Tested Pass,python -m mkdocs build --strict passed; python src/update_repo_stats.py --check passed.,,,,,2026-06-23,Validated in final A-Z pass.
86
  DOC-002,Docs,README badges/catalog links,README.md and docs/catalog.md,README plus public docs,As a GitHub visitor I can click badges and browse catalog,Skill agent MCP harness badges open public catalog pages with working search guidance,Public docs available,Inspect README links and catalog route,Tested Pass,"README top badges checked for Tests, Graph, Skills, Agents, MCPs, Harnesses; update_repo_stats --check passed.",,,,,2026-06-23,Validated in final A-Z pass.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  feature_id,surface,feature,entrypoint_or_route,source_evidence,user_story,expected_behavior,setup_preconditions,test_command_or_steps,status,first_test_result,error_id,error_summary,fix_status,retest_result,last_verified_at,notes
2
  CLI-001,CLI,Generic model run harness,ctx,pyproject.toml project.scripts,As a user I can run or resume a model-agnostic ctx session,ctx creates or resumes a session with configured provider tools budgets and transcript ordering intact,Provider credentials or dry-run/local test provider available,ctx --help then focused run/resume smoke,Tested Pass,test_harness_cli_run.py: 67 passed for ctx run/resume/sessions.,,,,,2026-06-23,Validated in focused pytest or isolated temp CLI smoke during A-Z pass.
3
  CLI-002,CLI,Repository recommendation,ctx-recommend,pyproject.toml project.scripts,As a user I can ask ctx for current repo recommendations,ctx returns capped relevant skill agent MCP recommendations from the shared graph engine,Graph installed and target repo available,ctx-recommend --help then sample repo recommendation,Tested Pass,recommend CLI/golden subset: 24 passed for ctx-recommend and shared recommendation surfaces.,,,,,2026-06-23,Validated in focused pytest or isolated temp CLI smoke during A-Z pass.
4
+ CLI-003,CLI,Initial setup,ctx-init,pyproject.toml project.scripts,As a new user I can install hooks graph and model mode from one command,ctx-init installs requested pieces idempotently and reports failures with non-zero exit,Writable user config directory,ctx-init --model-mode skip --graph,Retested Pass,"PASS: temp USERPROFILE ctx-init --model-mode skip --knowledge-mode skip created .claude config/toolboxes and exited 0. PASS: temp USERPROFILE ctx-init --graph --graph-install-mode runtime --model-mode skip installed graph.json and harness page in 129.2s.",CTX-AZ-006,Full graph install exceeded the 10-minute Windows smoke budget before packed wiki artifacts: native-tar full install completed in 759.0s and cleanup took 171.7s.,Packed full artifact now ships wiki-packs and omits expanded non-root markdown fanout; ctx-init checksum updated.,PASS: temp USERPROFILE ctx-init --graph --graph-install-mode full --model-mode skip --knowledge-mode skip exited 0 in 409.7s with graph-store.sqlite3 wiki-packs harness pages and no expanded skills/agents/MCP/converted/concepts markdown.,2026-06-23,Runtime path remains usable; full path now installs packed markdown wiki under the smoke budget while keeping harness pages direct.
5
  CLI-004,CLI,Claude hook install,ctx-install-hooks,pyproject.toml project.scripts,As a Claude Code user I can install ctx hooks,Hooks are installed idempotently and point to existing modules,Claude config path writable,ctx-install-hooks --help then temp-home smoke,Tested Pass,inject hooks/ctx-init hook subset: 24 passed for hook install and failure handling.,,,,,2026-06-23,Validated in focused pytest or isolated temp CLI smoke during A-Z pass.
6
  CLI-005,CLI,Repo stack scan,ctx-scan-repo,pyproject.toml project.scripts,As a developer I can scan a repo and get stack plus recommendations,Scan detects stack signatures and renders recommendations consistently with graph engine,Sample repos available,ctx-scan-repo --repo . --recommend,Retested Pass,FAIL: first run classified ctx as ml-project because optional embeddings extra contains torch,CTX-AZ-002,Optional pyproject extras were treated as primary project-type dependencies,Fixed by excluding optional/dev pyproject deps from primary project-type classification while keeping them as searchable signals,PASS: focused scan tests 5 passed; live scan now reports Type infrastructure and recommendations render,2026-06-23,
7
  CLI-006,CLI,Skill add,ctx-skill-add,pyproject.toml project.scripts,As a user I can add or update a skill,Skill is validated micro-skill gated written to wiki and attached to graph/index without duplicate stale edges,Temp skill directory and wiki path,ctx-skill-add --skill-path temp/SKILL.md --name demo --wiki temp/wiki,Retested Pass,Failed in isolated A-Z flow: Windows UTF-8 BOM input was rejected by markdown/JSON parsing; some rejected batch CLIs could still exit 0.,CTX-AZ-004,"Entity onboarding was not Windows-BOM-safe across skill/agent/MCP/harness inputs, and failed batches needed non-zero exits.",Fixed,Skill add accepted BOM-prefixed SKILL.md and wrote wiki entity in temp CLI flow. Focused pytest regressions passed.,2026-06-23,Regression coverage added for BOM inputs and MCP rejected-batch exit.
 
84
  HARNESS-002,Harness,No-fit harness PRD,ctx-harness-install,harness_install.py,As a user with no fitting harness I get instructions to build one,No-fit path produces provider-aware PRD attachable to ctx recommendation system,Graph with threshold forcing no match,ctx-harness-install --dry-run with restrictive constraints,Tested Pass,PASS: --plan-on-no-fit printed provider-aware Custom Harness PRD for openai/gpt-4.1 with runtime/tools/privacy/verification fields,,,,,2026-06-23,
85
  DOC-001,Docs,Public docs install path,docs/index.md and docs/*.md,docs file inventory,As a first-time user I can follow docs exactly,Docs commands are current numbers accurate no dead module paths no future-roadmap fluff,Docs built locally,mkdocs build or docs route smoke,Tested Pass,python -m mkdocs build --strict passed; python src/update_repo_stats.py --check passed.,,,,,2026-06-23,Validated in final A-Z pass.
86
  DOC-002,Docs,README badges/catalog links,README.md and docs/catalog.md,README plus public docs,As a GitHub visitor I can click badges and browse catalog,Skill agent MCP harness badges open public catalog pages with working search guidance,Public docs available,Inspect README links and catalog route,Tested Pass,"README top badges checked for Tests, Graph, Skills, Agents, MCPs, Harnesses; update_repo_stats --check passed.",,,,,2026-06-23,Validated in final A-Z pass.
87
+ DIST-001,Distribution,GitHub About metadata,GitHub repository About,src/update_repo_stats.py,As a GitHub visitor I can understand ctx positioning and current counts from the repo About,About says ctx is a recommendation layer not a marketplace and uses shipped graph counts,GitHub CLI authenticated,python src/update_repo_stats.py --check-github-about,Tested Pass,GitHub About description is up to date.,,,,,2026-06-23,Validated after the recommendation-layer positioning update.
88
+ DIST-002,Distribution,Main CI test workflow,.github/workflows/test.yml,.github/workflows/test.yml,As a contributor I can trust the required main test workflow,Main push runs static gates unit-linux canaries package smoke browser security and required CI aggregate,GitHub Actions available,gh run list --branch main,Tested Pass,Main Tests workflow for Hydrate Hugging Face sync artifacts by checksum (#195) completed successfully.,,,,,2026-06-23,Observed from GitHub Actions run 28053096394.
89
+ DIST-003,Distribution,Docs deploy workflow,.github/workflows/docs.yml,.github/workflows/docs.yml,As a docs visitor I get the current public docs after main updates,Docs workflow builds strict MkDocs and deploys GitHub Pages without stale generated content,GitHub Pages enabled,gh run list --branch main,Tested Pass,Deploy docs to GitHub Pages workflow for Align graph validator defaults with shipped graph (#194) completed successfully.,,,,,2026-06-23,Observed from GitHub Actions run 28052467169; #195 did not touch docs.
90
+ DIST-004,Distribution,Hugging Face sync workflow,.github/workflows/huggingface-sync.yml,.github/workflows/huggingface-sync.yml and scripts/sync_huggingface.py,As a Hugging Face visitor I get the same tracked repo and graph artifacts as GitHub,Workflow hydrates graph artifacts by matching LFS sha/size release assets before publishing and refuses stale README/docs stats,HF_TOKEN configured in GitHub secrets,GitHub Actions Sync Hugging Face workflow on main,Retested Pass,FAIL: older workflow hydrated the latest release tarball and update_repo_stats --check saw stale 314 MiB docs value.,CTX-AZ-007,Latest-release artifact hydration could publish stale graph tarball to Hugging Face,Fixed by checksum and size release-asset resolver in PR #195,PASS: main Sync Hugging Face workflow completed successfully after PR #195.,2026-06-23,Observed from GitHub Actions run 28053096390.
91
+ DIST-005,Distribution,Clean host contract workflow,.github/workflows/clean-host-contract.yml,.github/workflows/clean-host-contract.yml,As a new installer I can verify ctx works on a clean host,Workflow installs the package in a clean environment and runs the clean-host smoke contract,GitHub Actions available,gh run list --workflow clean-host-contract or required checks,Tested Pass,Clean host contract job passed inside the PR #195 required checks.,,,,,2026-06-23,Observed from PR #195 checks before merge.
92
+ DIST-006,Distribution,PyPI publish workflow,.github/workflows/publish.yml,.github/workflows/publish.yml,As a PyPI user I can install the tagged release with matching graph artifacts,Tag publish builds the wheel validates graph artifacts uploads release assets and publishes the package,Next release tag available,Tag next patch release and inspect publish workflow result,Needs Validation,Inventoried from .github/workflows/publish.yml; tag-driven publish was not exercised in this tracker slice.,,,,,2026-06-23,Validate on the next release tag before marking pass.
93
+ DIST-007,Distribution,Parallel pytest experiment workflow,.github/workflows/xdist-experiment.yml,.github/workflows/xdist-experiment.yml,As a maintainer I can benchmark pytest-xdist safely before adopting it,Workflow runs only when explicitly dispatched and does not affect required checks until proven stable,GitHub Actions available,Manual workflow_dispatch run for xdist experiment,Tested Pass,GitHub Actions run 28133264595 passed on ubuntu-latest windows-latest and macos-latest with Python 3.12.,,,,,2026-06-24,Dispatched manually on main; optional experiment remains out of required checks.
94
+ MAINT-001,Maintainer,Backup snapshot audit,scripts/audit_backup.py,scripts/audit_backup.py,As a maintainer I can inspect backup snapshots for missing expected files,Script summarizes backup contents and flags missing graph/wiki/report artifacts without mutating the repo,Backup fixture available,Run script against representative backup fixture,Retested Pass,FAIL: BOM-prefixed manifest.json from PowerShell Set-Content -Encoding UTF8 raised JSONDecodeError.,CTX-AZ-008,Backup audit read manifest JSON with utf-8 and rejected common Windows BOM input,Fixed by reading manifest.json with utf-8-sig,PASS: temp backup fixture with BOM manifest printed entries and OK coverage; regression pytest passed.,2026-06-23,
95
+ MAINT-002,Maintainer,Dashboard graph index builder,scripts/build_dashboard_graph_index.py,scripts/build_dashboard_graph_index.py,As a dashboard user I get fast graph search and neighborhoods,Script builds the dashboard SQLite/index artifacts from graph exports for fast monitor reads,Graph fixture available,Run script against small graph fixture and query resulting index,Retested Pass,FAIL: BOM-prefixed graph.json from PowerShell Set-Content -Encoding UTF8 raised JSONDecodeError.,CTX-AZ-008,Dashboard graph index builder read graph JSON with utf-8 and rejected common Windows BOM input,Fixed by reading graph JSON with utf-8-sig,PASS: temp graph fixture built SQLite index with 2 nodes and neighbor mcp-server:github; regression pytest passed.,2026-06-23,
96
+ MAINT-003,Maintainer,CI change classifier,scripts/ci_classifier.py,scripts/ci_classifier.py and .github/workflows/test.yml,As a contributor I get the right CI gates for the files I changed,Classifier marks docs graph source package browser and similarity changes conservatively,CI classifier tests available,python -m pytest src/tests/test_ci_classifier.py -q,Tested Pass,CI classifier suite covers path classes and workflow contract behavior.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
97
+ MAINT-004,Maintainer,No-test policy gate,scripts/ci_no_test_policy.py,scripts/ci_no_test_policy.py and .github/workflows/test.yml,As a reviewer I can reject risky code or workflow changes without test updates,Policy fails contract changes that omit matching tests while allowing metadata-only releases,CI policy tests available,python -m pytest src/tests/test_ci_classifier.py -q,Tested Pass,CI classifier suite covers no-test policy contract files and release metadata exceptions.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
98
+ MAINT-005,Maintainer,Required CI aggregate,scripts/ci_required.py,scripts/ci_required.py and .github/workflows/test.yml,As a branch maintainer I can trust the required CI summary,Aggregate rejects failed missing or wrongly skipped required jobs and allows documented conditional skips,CI required tests available,python -m pytest src/tests/test_ci_classifier.py -q,Tested Pass,CI classifier suite covers required job dependency success failure and conditional skip cases.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
99
+ MAINT-006,Maintainer,CI preflight gate,scripts/ci_preflight.py,scripts/ci_preflight.py and scripts/ci_classifier.py,As a contributor I can run the same preflight logic locally that CI uses,Preflight classifies changes then emits the exact docs graph browser package and similarity gates required,Repo checkout with git available,Run scripts/ci_preflight.py against representative changed files,Tested Pass,"select_checks(base_ref='origin/main', files=['README.md','docs/index.md'], profile='quick') returned whitespace repo stats and docs strict build.",,,,,2026-06-23,Validated through the script's public selection seam without launching expensive full preflight.
100
+ MAINT-007,Maintainer,Clean host contract script,scripts/clean_host_contract.py,scripts/clean_host_contract.py and .github/workflows/clean-host-contract.yml,As a new installer I can smoke ctx on a clean host,Script builds a clean venv installs ctx and runs init scan harness and monitor checks,Network and clean temp venv available,GitHub clean-host contract or local script smoke,Tested Pass,Clean host contract job passed inside PR #195 required checks.,,,,,2026-06-23,Workflow evidence covers the script path.
101
+ MAINT-008,Maintainer,Dashboard smoke script,scripts/dashboard_smoke.py,scripts/dashboard_smoke.py,As a maintainer I can smoke the monitor routes before release,Script starts or probes ctx-monitor and checks key pages/APIs with optional warmup,Monitor smoke tests available,python -m pytest src/tests/test_dashboard_smoke.py -q,Tested Pass,Dashboard smoke test suite covers command construction route probing and failure reporting.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
102
+ MAINT-009,Maintainer,Graph artifact guard,scripts/graph_artifact_guard.py,scripts/graph_artifact_guard.py,As a maintainer I can prevent huge graph artifacts from bloating local Git state,Guard parks unparks and prunes graph artifacts safely without deleting unrelated files,Graph artifact fixture available,python -m pytest src/tests/test_graph_artifact_guard.py -q,Tested Pass,Graph artifact guard suite covers park unpark prune and explicit git prune safety.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
103
+ MAINT-010,Maintainer,Overlay wiki entities,scripts/overlay_wiki_entities.py,scripts/overlay_wiki_entities.py,As a graph maintainer I can apply curated entity overlays to the wiki artifact,Script overlays entity pages and rebuilds dashboard index without corrupting packed wiki structure,Overlay fixture available,python -m pytest src/tests/test_overlay_wiki_entities.py -q,Tested Pass,Overlay wiki entities tests cover page generation replacements and CLI help.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
104
+ MAINT-011,Maintainer,Full wiki tar repacker,scripts/pack_full_wiki_tar.py,scripts/pack_full_wiki_tar.py,As a maintainer I can ship a packed full LLM-wiki artifact without huge expanded fanout,Repacker moves high-fanout pages into wiki packs omits raw originals and is idempotent,Wiki tar fixture available,python -m pytest src/tests/test_pack_full_wiki_tar.py -q,Tested Pass,Pack full wiki tar tests cover packed wiki output original omission and idempotent repack.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
105
+ MAINT-012,Maintainer,SkillSpector wiki pruner,scripts/prune_skillspector_wiki.py,scripts/prune_skillspector_wiki.py,As a maintainer I can prune low-value SkillSpector wiki noise before shipping,Script builds pruned artifacts in dry-run/apply modes while preserving required catalog metadata,Prune fixture available,python -m pytest src/tests/test_prune_skillspector_wiki.py -q,Tested Pass,Prune SkillSpector wiki tests cover dry-run apply and artifact rewrite behavior.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
106
+ MAINT-013,Maintainer,Hugging Face sync script,scripts/sync_huggingface.py,scripts/sync_huggingface.py and .github/workflows/huggingface-sync.yml,As a Hugging Face visitor I get a clean repo-card snapshot without ignored local artifacts,Script exports tracked files adds repo-card metadata validates graph artifacts and removes stale remote files,HF token or fake API available,python -m pytest src/tests/test_huggingface_sync.py -q,Tested Pass,Hugging Face sync tests cover metadata wrapping stale remote cleanup and hardened workflow contract.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
107
+ MAINT-014,Maintainer,Similarity threshold tuner,scripts/tune_similarity_thresholds.py,scripts/tune_similarity_thresholds.py,As a graph maintainer I can calibrate similarity thresholds against fixtures,Tuner sweeps threshold settings and reports quality metrics without mutating graph artifacts,Similarity fixture corpus available,Run tuner against fixture corpus,Tested Pass,python scripts/tune_similarity_thresholds.py completed and printed near/distinct/adversarial score distributions plus threshold sweep.,,,,,2026-06-23,Validated with current fixture corpus; unauthenticated HF warning did not block local cached model load.
108
+ PUBLIC-001,Docs,Public catalog search JavaScript,docs/assets/javascripts/catalog.js,docs/assets/javascripts/catalog.js and docs/catalog.md,As a GitHub Pages visitor I can filter catalog tiles without a local dashboard,JavaScript wires input and checkbox filters and updates visible catalog cards/counts client-side,Docs assets available,python -m pytest src/tests/test_docs_catalog_page.py -q,Tested Pass,Docs catalog page tests verify script inclusion input listener and public non-local links.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
109
+ PUBLIC-002,Docs,Public repo stats refresh JavaScript,docs/assets/javascripts/repo-stats-refresh.js,docs/assets/javascripts/repo-stats-refresh.js and mkdocs.yml,As a docs visitor I see current repo stats when GitHub allows client refresh,JavaScript is included by MkDocs and degrades safely when live repo stats cannot be fetched,Docs assets available,python -m pytest src/tests/test_docs_repo_stats.py -q,Tested Pass,Docs repo stats tests verify MkDocs includes the script and the script has the expected refresh behavior.,,,,,2026-06-23,Validated by focused pytest in this tracker slice.
graph/README.md CHANGED
@@ -294,8 +294,21 @@ python src/import_skills_sh_catalog.py \
294
  --update-wiki-tar
295
  ```
296
 
297
- For a full local wiki repack, write the tarball to the sibling staged path,
298
- then promote that staged candidate after validation:
 
 
 
 
 
 
 
 
 
 
 
 
 
299
 
300
  ```bash
301
  cd ~/.claude/skill-wiki
 
294
  --update-wiki-tar
295
  ```
296
 
297
+ For a full local wiki repack from an existing artifact, use the packed-page
298
+ repacker. It writes `wiki-packs/base-<export-id>/`, removes expanded
299
+ skill/agent/MCP entity pages from the tar member list, and leaves harness pages
300
+ directly available for fast runtime setup:
301
+
302
+ ```bash
303
+ python scripts/pack_full_wiki_tar.py \
304
+ --source graph/wiki-graph.tar.gz \
305
+ --target graph/wiki-graph.tar.gz.staged
306
+ python -c "from pathlib import Path; from ctx.core.wiki.artifact_promotion import promote_staged_artifact; from import_skills_sh_catalog import _validate_wiki_tarball_candidate; promote_staged_artifact(Path('graph/wiki-graph.tar.gz.staged'), Path('graph/wiki-graph.tar.gz'), validate=_validate_wiki_tarball_candidate)"
307
+ ```
308
+
309
+ For a full local wiki repack from an expanded `~/.claude/skill-wiki` tree, write
310
+ the tarball to the sibling staged path, then promote that staged candidate after
311
+ validation:
312
 
313
  ```bash
314
  cd ~/.claude/skill-wiki
graph/wiki-graph-stats.json CHANGED
@@ -2,8 +2,8 @@
2
  "schema_version": 1,
3
  "artifact": {
4
  "path": "graph/wiki-graph.tar.gz",
5
- "size": 329276669,
6
- "sha256": "e487ec2109803e3c05cb2ca6906e8a0bae681f32a4fe79f3fb2f168fbea2c947"
7
  },
8
  "source": "validated graph artifact release contract",
9
  "counts": {
 
2
  "schema_version": 1,
3
  "artifact": {
4
  "path": "graph/wiki-graph.tar.gz",
5
+ "size": 296113770,
6
+ "sha256": "d051d4f21208abe3e73975a9c30650150138d88919c27979d725be936a6ea10a"
7
  },
8
  "source": "validated graph artifact release contract",
9
  "counts": {
graph/wiki-graph.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e487ec2109803e3c05cb2ca6906e8a0bae681f32a4fe79f3fb2f168fbea2c947
3
- size 329276669
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d051d4f21208abe3e73975a9c30650150138d88919c27979d725be936a6ea10a
3
+ size 296113770