4 Commits
Author SHA1 Message Date
Claude 6170131dca feat: refactor pipeline skill content to authoring/prompting best practices
Applies Anthropic's official workflow patterns to the four phase skills and
fixes content that had gone stale against the platform itself.

Workflow patterns (official best practices):
- Copyable progress checklists added to capture/methodology/testing/standards
  (the recommended pattern for complex multi-step workflows)
- Every phase now closes by marking phase-state complete (capture and
  standards were missing it; the validator feedback loops were already there)

Progressive disclosure:
- capture: the --mitmproxy variant (interleaved 4x through the default path)
  extracted to references/mitmproxy-mode.md as step substitutions — the
  default path reads clean
- testing: VCR cassette guide extracted to references/vcr-testing.md;
  helper-test and client-side-operation code blocks moved into
  test-code-examples.md (398 -> 332 lines, rules stay inline)
- TOCs added to all 11 reference files over 100 lines (incl. CONVENTIONS,
  RECOVERY); traffic-patterns.md nested reference chain flattened to one
  level

Stale content fixed (skills now match the platform):
- standards: 'Create setup.py' -> install-and-verify (scaffold generates it);
  'add CLI to tests.yml matrix' -> registry-driven flow (matrix and README
  table are GENERATED from registry.json — cli-web-devkit registry
  validate/docs/resync/drift + contract suite); doctor added to install
  verification; smoke-test items renumbered out of the broken 5-9 scheme
- testing: handle_errors exit-code example updated to the v2.1 contract
  (auth=3, unknown=1) with explicit legacy-CLI guidance
- methodology: versioned 'v1.3.0' analysis note rephrased as
  capability-conditional (time-sensitive content rule)

Real pipeline gap found and fixed while verifying:
- Newly scaffolded CLIs did not get mcp_server.py/doctor.py vendored or
  registered: sync.py now vendors both into the plugin's scripts/ (canon:
  cli-web-core), scaffold copies all three runtime files, cli_entry.py.tpl
  registers mcp-serve + doctor
- scaffold flags unified: --resource (repeatable) is canonical and renders
  command modules; --resources kept as comma alias (the skill documented an
  interface the script rejected — proven by scaffolding end-to-end)
- E2E verified: fresh scaffold installs, MCP handshake works, doctor green

Durable enforcement extended: test_skill_quality.py now also checks
reference files (TOC required over 100 lines, one-level reference depth).

Verified: 691 plugin/devkit/core tests, 114 contract tests, 19/19 CLI
suites, verify-plugin 28/28, drift 60/60, ruff+format+mypy clean, README
freshness green.

https://claude.ai/code/session_017wCNXuLy6UpGJ1jcPdsD5i
2026-06-10 07:09:52 +00:00
Claude 5c2f4032b1 feat: fleet-wide doctor command (self-diagnosis) via vendored core module
- cli_web_core/doctor.py: read-only environment diagnosis — Python version,
  entry point on PATH, config dir, auth file presence/permissions/format
  (auth-bearing CLIs only, detected via the auth module), playwright and
  prompt_toolkit availability. Human output + --json envelope; exit 1 only
  on fail-level findings (missing auth is a warn with the exact next step).
- Vendored to all 19 CLIs (SHARED_FILES + resync, sha256 provenance in
  manifests); doctor command wired into every entry point alongside
  mcp-serve.
- Fleet contract test: doctor --json envelope + no fail-level checks x19.
- README: doctor blurb in the agent-native section.

Verified: 425 plugin tests, 210 contract/core/devkit tests, 19/19 CLI
suites, drift 58/58 ok, ruff+format+mypy clean, verify-plugin 28/28.

https://claude.ai/code/session_017wCNXuLy6UpGJ1jcPdsD5i
2026-06-09 22:58:59 +00:00
Claude 61caad16cb feat: Phases 3-5 — generation v2, fleet ops, api-spec IR, MCP serve fleet-wide
Phase 3 (Generation v2):
- scaffold-cli.py migrated to Jinja2 (${} delimiters preserve existing
  templates; StrictUndefined; TEMPLATE_VERSION 2.0.0; .manifest.json
  provenance emission)
- auth.py.tpl unified (google-sso via {% if %} block; auth_google_sso.py.tpl
  deleted); anchor-based method injection replaced by template conditionals
- New scaffolds: command_group.py.tpl (--resource flag), test_e2e.py.tpl
  (canonical subprocess fixtures), README.md.tpl + SKILL.md.tpl (replace
  dead Handlebars .template files, now actually rendered)
- 21-profile golden test matrix (protocol x http_client x auth) — compile-
  clean, no placeholder leaks, profile-correct deps/files
- Skills consolidation: skills/shared/CONVENTIONS.md (single definition of
  every implementation rule) + RECOVERY.md (per-gate failure decision
  trees); boilerplate skill 829 -> 106 lines; HARNESS.md now navigational;
  reviewer agents de-overlapped; gap-analyzer mandatory first step of
  /refine; quality checklist tiered (38 Tier-1 critical checks) with
  --tier1-only/--strict in validate-checklist.py

Phase 4 (Fleet ops):
- cli-web-devkit canary: registry-declared read-only live-site smoke
  commands (12 no-auth CLIs) + daily canary.yml workflow that auto-files
  site-breakage issues
- contract.yml workflow: fleet contract suite + vendored-file drift on PR
- release-please switched to manifest/monorepo mode (root + cli-web-core +
  devkit packages, per-package changelogs); publish.yml with PyPI trusted
  publishing (setup guide in docs/PUBLISHING.md)
- cli-web-devkit docs: README fleet table + install block generated from
  registry.json between markers, --check freshness gate in CI (caught the
  install list missing linkedin)

Phase 5 (Product leaps):
- MCP SERVE FLEET-WIDE: cli_web_core/mcp_server.py adapter (vendored to all
  19 CLIs, synced by resync) exposes every Click command as a typed MCP
  tool over stdio; mcp-serve wired into all 19 entry points;
  contract-tested handshake x19
- api-spec.json IR: evidence-required endpoint schema + cli-web-devkit
  spec validate; wired into methodology Phase 2 (structural enforcement of
  never-invent-endpoints)
- cli-web-devkit gaps: deterministic captured-vs-implemented-vs-exposed
  diff (AST-based), wired into gap-analyzer skill Step 0
- Capture quality scoring (0-100) in validate-capture report

Fleet contract fixes found by the new gates:
- gh-trending emitted bare JSON arrays instead of the success envelope
  (fixed + e2e updated; stale version assertion fixed)
- notebooklm/stitch/codewiki/chatgpt lacked --version (fixed in Phase 2
  commit); booking registry commands corrected

Verified: 514 plugin/devkit/core tests, 95 fleet contract tests (incl. 19
MCP handshakes), 19/19 CLI unit suites, gh-trending e2e live, ruff+format
clean (512 files), mypy strict clean, verify-plugin 28/28, drift 39/39 ok,
registry + README freshness gates green.

https://claude.ai/code/session_017wCNXuLy6UpGJ1jcPdsD5i
2026-06-09 22:54:20 +00:00
Claude bbb6a88276 feat: Phase 1+2 — quality gates, cli-web-devkit, cli-web-core, fleet sync
Phase 1 (Foundations):
- Root pyproject.toml: ruff lint+format (whole monorepo), pytest, coverage,
  strict mypy on the new packages; .pre-commit-config.yaml with ruff +
  hygiene hooks + registry validation
- Repo-wide lint/format pass: 274 files reformatted, ~1,700 violations
  fixed (unused imports, import order, pyupgrade, exception chaining
  B904 x55, dead assignments, ambiguous names); futbin quoted-annotation
  imports hoisted to module level
- devkit/ (cli-web-devkit package, stdlib-only, mypy --strict):
  registry.json loader + two-way fleet validation, GitHub Actions matrix
  generation, typed TrafficEntry / PipelineState models mirroring the
  pipeline scripts' schemas
- CI rewrite: lint+format+registry job, plugin/devkit test job with
  coverage and mypy, dynamic 19-CLI test matrix generated from
  registry.json, crossed with Python 3.10 + 3.12

Phase 2 (Core runtime):
- cli-web-core/ package: canonical exceptions hierarchy (+ raise_for_status,
  error codes), --json envelope, exponential-backoff polling, REPL skin,
  subprocess test fixtures (resolve_cli/run_cli/parse_json_output) and
  fleet contract assertions; py.typed, zero hard deps
- repl_skin canon v2.0.0: back-ported display_name (gh-trending/hackernews
  variant), accent override + fleet brand colors (amazon variant), robust
  prompt_toolkit fallback (airbnb variant)
- Vendoring-with-provenance: cli-web-devkit drift/resync keep all 20
  vendored repl_skin copies byte-identical to canon; per-CLI
  .manifest.json records source + sha256 (+ override escape hatch)
- Fleet contract test suite (tests/contract): --help/--version/REPL-exit/
  no-protocol-leaks/registry-vs-help for all 19 CLIs, offline
- Fixed contract violations it caught: notebooklm/stitch/codewiki/chatgpt
  had no --version; booking registry entry described nonexistent commands

Verified: ruff check+format clean (482 files), mypy strict clean,
242 plugin/devkit/core tests, 76 contract tests, 19/19 CLI unit suites.

https://claude.ai/code/session_017wCNXuLy6UpGJ1jcPdsD5i
2026-06-09 22:28:58 +00:00