21 Commits

Author SHA1 Message Date
陈家名 d1eca95a47 fix: normalize PyPI requirements in registry date updater (#446) 2026-08-21 15:25:30 +08:00
yuhao bc536c9beb fix(ci): make root-skill validation refuse to recommend destroying edits
validate_root_skills.py compared source and mirror with a symmetric `!=`,
so it detected divergence but never direction, and printed the same advice
either way: "Run sync_root_skills.py and commit."

That advice is only correct when the harness source moved ahead. When the
edit is in the generated skills/ mirror -- as in #360 -- sync regenerates
the mirror from the source and silently deletes the change. The validator
then passes, so CI turns green and certifies the loss.

Detect the direction. When the mirror holds lines the source lacks, name
them, point at the source file, and never suggest the destructive command.
Regenerable drift keeps the old advice. Also make sync_root_skills.py
report each file it creates or overwrites instead of writing in silence.

Verified: in-sync, mirror-edited, source-edited, missing-mirror, and
idempotent no-op.
2026-07-09 13:05:56 +00:00
陈家名 f5ae8362c0 fix: skip pip --editable option value in registry date updater (#368)
`-e`/`--editable` consumes a path argument in `pip install`, but was not
listed in `PIP_OPTIONS_WITH_VALUES`. As a result `_extract_pypi_package`
returned the editable path (e.g. `.` or `./local/pkg`) instead of the
real package, causing a wasted/incorrect PyPI lookup.

Add `-e` and `--editable` to the option set so the path argument is
skipped, matching how the other value-taking pip options are handled.
Add regression tests for `pip install -e ./local/pkg py4csr` and
`pip install -e .`.
2026-07-09 20:04:45 +08:00
Yuhao 5b9ec80def Feature/cli matrix multi approach (#355)
* feat: CLI-Matrix with multi-approach stages, skill discovery, and matrix search

Introduce CLI-Matrix — curated multi-CLI workflow matrices that agents can
install in one command. The video-creation matrix bundles 11 CLIs across 8
production stages (AI video gen, capture, audio, voice/TTS, music, NLE
editing, captions, thumbnails).

Each stage now exposes a goal, alternative approaches (Python libs, cloud
APIs, native commands), and skill_search_hints that encourage agents to
dynamically discover relevant skills via `npx skills search` rather than
relying on hard-coded tool lists.

Key changes:
- matrix_registry.json: extended stage schema with goal, alternatives,
  skill_search_hints fields
- cli-hub matrix list/search/info/install commands
- matrix_skill.py: renders dynamic SKILL.md with stage tooling overview,
  install status, and aggregated discovery commands
- Fixed brittle parents[2] repo root detection with git-based lookup
- 85 tests passing (10 new)


* update cli-matrix

* feat(cli-matrix): eco-first capability-based matrix, v2 schema + S2-S5 SKILLs

- Add docs/cli-matrix/matrix_registry.schema.md describing v2 capability-based
  registry shape (capabilities[], providers with kind/requires/cost/quality/
  offline, recipes[], known_gaps[], decision rubric, suggest-to-user template).
- Rewrite cli-hub-matrix/video-creation/SKILL.md and matrix_registry.json (S1)
  around capabilities + providers + recipes instead of linear stages.
- Rename Vn -> Sn across cli-matrix-plan.md and test fixtures.
- Reorder scenarios by current completeness; rewrite S2 knowledge-research,
  S3 3d-cad, S4 game-development, S5 image-design in v2 capability form with
  full SKILL.md files.
- Add docs/cli-matrix/test-plans/video-creation.md with 13 long realistic
  end-to-end tasks as checkable todo lists, each exercising 5-9 capabilities.
- Move cli-matrix-plan.md and matrix_registry.schema.md under docs/cli-matrix/.


* Document preview protocol and Audacity autosave

Add the preview bundle protocol plan, record video matrix review evidence, and make one-shot Audacity project mutations persist to disk with E2E coverage.

* Update CLI matrix skill registry and video workflow

* chore(git): always ignore docs/* — working documents stay local


* feat(cli-matrix): video-creation skill WIP — sound design, source triage, render doctor, NLE refs, video_doctor script

- SKILL.md: adds sound.design capability, bundled video_doctor.py provider,
  recipe updates, and links to five new reference modules
- new references: art-direction-review, nle-shotcut-kdenlive, render-doctor,
  sound-design, source-triage; captions and story-structure-audio updated
- scripts/video_doctor.py: bundled probe/diagnose helper


* fix(cli-hub): preflight detects packages by import name or PyPI dist name (P1-3)

_package_available() now tries find_spec as-is, dash->underscore
normalized, then importlib.metadata dist lookup (PEP 503), so registry
entries like edge-tts are detected when installed. All lookup failures
degrade to unavailable instead of crashing preflight. Adds 6 tests.


* feat(cli-hub): distribute matrix skill content to installed skills, wheels, and Pages (P1-4)

- matrix install renders to ~/.cli-hub/matrix/<name>/SKILL.md and copies
  references/ and scripts/ beside it (pycache excluded, idempotent
  reinstall purges stale files); legacy flat <name>.SKILL.md still read
- content lookup chain: repo checkout -> bundled cli_hub/_matrix_data
  (vendored into sdist/wheel by setup.py build hooks + MANIFEST.in) ->
  published Pages URL -> stub
- new 'matrix install --skill-only' renders skill + assets without
  installing CLIs
- deploy-pages.yml: copy cli-hub-matrix/ into the site after the Jekyll
  build (served verbatim at /matrix/<name>/); triggers remain main-only
- 12 new tests in tests/test_matrix_skill_dist.py (142 total pass)


* feat(cli-matrix): register S2-S5 matrices and resync video-creation registry (P1-1, P1-2)

- add knowledge-research (S2, 12 caps), 3d-cad (S3, 12), game-development
  (S4, 10), image-design (S5, 9) derived from their SKILL.md drafts; full
  v2 shape with capabilities, providers, recipes, known_gaps; clis lists
  cross-checked against registry.json (unresolvable tools represented as
  public-cli/native/python/api/agent-skill providers instead)
- video-creation: add sound.design capability (5 providers, wired into 5
  recipes), register scripts/video_doctor.py as bundled-script provider
  under quality.review, cite the 5 new reference modules in provider
  notes, refresh description
- python provider package strings use import names (cv2, edge_tts,
  ffmpeg, skimage, ...) so preflight detection is robust to dist-name
  variants like opencv-python-headless
- fix homepage URLs to docs/cli-matrix/cli-matrix-plan.md; bump
  meta.updated to 2026-06-11


* feat(cli-hub): ship the unified Gallery design as the production homepage

Replace docs/hub/index.html with the finalized "Gallery / R2 Flip" main page
(Steel Sky palette default, Newsreader serif hero title, liquid-glass flip
cards, JS masonry catalog, and the unified Matrices layer with bidirectional
stitching). Production-indexable robots meta retained.

Stop tracking docs/cli-matrix/* — the CLI-Matrix working docs stay local and
confidential; add an explicit /docs/cli-matrix/ ignore rule.

* feat: CLI-Matrix command family + Hub docs/demos pages and responsive nav

---------
2026-06-14 17:27:52 +08:00
陈家名 4583ed246f fix: classify harness docs as documentation (#349) 2026-06-14 16:50:19 +08:00
陈家名 fd676efea2 fix: skip pip option values in registry date updater (#354) 2026-06-14 16:49:28 +08:00
陈家名 f7188b7651 fix: support python pip module installs in registry dates 2026-05-27 20:32:16 +08:00
yuhao 288dedd2a4 Add automatic PR labeling 2026-04-29 12:00:19 +00:00
yuhao 412754f216 feat(hub): fetch live analytics from PostHog in-browser, drop static snapshot
- Page now runs a HogQL countIf query directly against PostHog on load
  and every 60s, using a read-only personal API key scoped to query:read
  on project 393992. Numbers are baseline (Umami cutover) + live increment.
- Remove the static snapshot pipeline: delete
  .github/scripts/update_hub_analytics_stats.py,
  docs/hub/analytics-stats.json, and the Generate hub analytics stats step
  and path trigger in deploy-pages.yml.
- Drop the JS static-fallback branch that read analytics-stats.json.
2026-04-23 16:42:10 +00:00
yuhao 8cae111a48 feat(cli-hub): migrate analytics to PostHog, add stats pipeline and refined footer
- Switch cli-hub analytics client from Umami to PostHog (us.i.posthog.com),
  with agent/human classification derived from env vars and parent-process
  names, and persistent analytics id at ~/.cli-hub/.analytics_id.
- Add daily deploy-pages step running .github/scripts/update_hub_analytics_stats.py
  to pull PostHog totals into docs/hub/analytics-stats.json.
- Redesign docs/hub footer analytics panel (index.html + index-modern.html)
  as a compact Apple/OpenAI-style card: live eyebrow, total, 2px ratio bar,
  and inline Human/Agent split with percentages computed client-side.
- Expand cli-hub tests to cover the new analytics context fields and
  provider switch.
2026-04-23 16:27:14 +00:00
yuhao 87bdfe7697 fix CI 2026-04-18 16:59:59 +00:00
yuhao 42fc5c096d update cli-hub 2026-04-18 16:57:25 +00:00
yuhao e1e48ba6d0 fix missing skills 2026-04-18 11:53:57 +00:00
yuhao 99f92f0525 WIP transfer root-skills and hub updates 2026-04-18 10:12:58 +00:00
yuhao 2c8a7815a8 update cli-hub 2026-04-16 07:47:10 +00:00
yuhao 69a64a30b6 fix update date for outer repo 2026-04-13 09:16:44 +00:00
yuhao e59b7ee367 launch cli-anything-hub pkg manager. 2026-04-10 15:43:51 +00:00
yuhao a81d5b2c0e launch meta-skill for cli-hub 2026-03-23 16:20:30 +00:00
yuhao 3e10b0ab2d fix CLI-Hub 2026-03-22 09:36:34 +00:00
yuhao 776569427f fix github pages build workflow 2026-03-22 09:28:36 +00:00
yuhao b8b21ffe43 update CLI-Hub 2026-03-22 09:21:50 +00:00