Skip to content

ContentHawk v2: skill-based rewrite (Phase 1)#10

Draft
Marxoz wants to merge 5 commits into
mainfrom
v2
Draft

ContentHawk v2: skill-based rewrite (Phase 1)#10
Marxoz wants to merge 5 commits into
mainfrom
v2

Conversation

@Marxoz
Copy link
Copy Markdown
Member

@Marxoz Marxoz commented Jun 3, 2026

ContentHawk v2 — skill-based rewrite (Phase 1)

Replaces the v1 GitHub-Actions + Copilot-CLI pipeline with self-contained Claude Code skills. The agent performs the audit directly, so there are no workflows, secrets, or npm app to set up — the thing that made v1 hard to adopt.

v1 is preserved on the legacy/v1 branch and the v0.1.x releases. This is a breaking change → version bumped to 2.0.0-beta.0.

What's in this PR (Phase 1)

  • Removed v1 infra: gh-aw workflows (.github/workflows/content-*, .github/aw/), .github/actions/, the entire scripts/ React+Express form app, and its vite/vitest/tsconfig/package.json config.
  • Plugin foundation added:
    • ssw-contenthawk/shared/doctor.md — preflight (gh installed/authed/scoped, git identity, inside a GitHub repo) shared by all skills.
    • ssw-contenthawk/checks/ — 6 built-in audit rubrics: outdated-content, ambiguity, broken-links, code-sample-validity, terminology-consistency, placeholders.
    • ssw-contenthawk/templates/config.yml — the default .contenthawk/config.yml written into target repos.
  • contenthawk-install rewritten — runs the doctor, detects content folders, scaffolds .contenthawk/ (config + checks + campaigns), and offers to chain into the first campaign.
  • Docs: rewrote README.md + AGENTS.md for v2; added _docs/v2-design.md (full architecture & decisions).

Not in this PR (follow-ups)

  • Phase 2contenthawk-add-campaign (currently a stub): snapshot scope + active campaign.
  • Phase 3contenthawk-manage-campaigns (currently a stub): run the audit, open issues + fix PRs, report.

Notes for reviewers

  • Skill/plugin/marketplace names are unchanged so existing installs upgrade in place.
  • Skills reference bundled files by path relative to their SKILL.md (e.g. ../../shared/doctor.md); only skills/ is loaded as skills.
  • Draft until Phases 2–3 land.

🤖 Generated with Claude Code

Marxoz and others added 5 commits June 3, 2026 15:57
Replace the v1 GitHub-Actions/Copilot-CLI pipeline with self-contained Claude Code
skills. The agent performs the audit directly — no workflows, secrets, or npm app.

- Remove v1 infra: gh-aw workflows, .github/actions, the scripts/ React+Express
  form app, and its vite/vitest/npm config.
- Add the plugin foundation: shared doctor preflight, the built-in check library
  (6 rubrics), and the default .contenthawk/config.yml template.
- Rewrite contenthawk-install to run the doctor and scaffold .contenthawk/.
- Stub contenthawk-add-campaign (Phase 2) and contenthawk-manage-campaigns
  (Phase 3) pending rewrite.
- Bump plugin to 2.0.0-beta.0; rewrite README + AGENTS.md; add _docs/v2-design.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…idance

Dogfooded contenthawk-install against the tina-hugo starter:
- Install now steers toward content-root-scoped globs and excludes vendored/
  generated dirs (Hugo themes/, archetypes/, resources/, build outputs). The
  tina-hugo theme alone ships ~30 markdown files that must not be audited.
- Doctor check 5 now diagnoses "not a git repo" vs "no remote" and gives an
  actionable fix for each.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rewrite the campaign-start skill for v2: doctor preflight (incl. .contenthawk/
check), resolve scope from config.yml, snapshot the in-scope files with content
hashes into .contenthawk/campaigns/<id>/snapshot.json, initialise findings.json,
optionally open an umbrella tracking issue, and set the active campaign in
state.json.

Snapshot recipe hardened against two git-pathspec gotchas found while dogfooding
against tina-hugo: pathspecs don't expand braces ({md,mdx} matches nothing), and
the :(exclude) form silently drops everything — use :!(glob) instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…engine)

The core v2 engine: doctor preflight, load the active campaign + enabled checks,
drift-check each snapshotted file (warn + skip changed files, no auto-rebaseline),
judge content against the check rubrics, dedup against findings.json and open
labelled issues/PRs, then open per-file issues and per-file fix PRs per the
configured severity actions. Persists findings.json and reports. Also handles
campaign lifecycle: list / status / switch / close.

Idempotent and resumable by design; proposes only — never merges.

All three v2 skills are now implemented (Phases 1-3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d in dogfood)

End-to-end dogfood against a testbed confirmed the marker-based dedup; the
--search query is cleaner than listing+grepping all open items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant