Commit graph

18 commits

Author SHA1 Message Date
Alireza Rezvani
58346540df
Merge pull request #973 from alirezarezvani/claude/review-15-reported-issues-vrt6b2
fix: round-2 sweep — rename all built-in-shadowing skill names, harden last cp1252-fatal scripts (#885, #969 follow-through)
2026-08-21 10:44:01 +02:00
Claude
a80eec2267
fix: rename all remaining built-in-shadowing skill names and harden the last cp1252-fatal scripts (#885, #969 follow-through)
Round-2 sweep after re-auditing all 15 reported issues against the merged dev:

- #885 generalized: the original fix only renamed self-improving-agent's
  status/review, but three more plugins shipped skills whose bare names
  shadow Claude Code built-ins. Renamed with the same convention:
  playwright-pro init/review -> pw-init/pw-review, agenthub init/status ->
  hub-init/hub-status, autoresearch-agent status/resume -> ar-status/
  ar-resume. All command references (/pw: /hub: /ar:), docs, audit records,
  harness manifests, and mirror trees/indexes updated; the flat mirror
  namespace no longer collides on 'status'. New scripts/check_skill_names.py
  gate (wired into ci-quality-gate.yml as blocking) fails CI on any future
  bare reserved name; rule added to SKILL-AUTHORING-STANDARD.md.
- #969 follow-through: five more scripts print box-drawing characters that
  cannot exist in cp1252 (api_scorecard, api_linter,
  breaking_change_detector, humanizer_scorer, content_scorer) — same
  guarded UTF-8 reconfigure applied; all smoke-tested under a forced
  legacy encoding.

Verified: check_skill_names (incl. negative test), check_plugin_json,
check_paths, derive_counters, check_dual_publish, smoke_scripts (634/634),
0 broken mirror symlinks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qgc6RYXWJPr5oW9DHU7zR4
2026-08-21 08:38:50 +00:00
Ben Fairless
66ea9621dd
fix(models): remove retired model IDs and stale pricing, flip G7 blocking
Clears every reference the new G7 lint flags, then makes it blocking so the
class cannot drift back. audit/engineering-agentic-2026-07 marked the
senior-ml-engineer half of this STILL-OPEN.

Deleted rather than updated:

  - agent-designer/agent_evaluator.py's _define_cost_benchmarks() held
    per-token prices for gpt-4, gpt-3.5-turbo and claude-3 at 2024 rates. The
    result was assigned to self.cost_benchmarks and never read by anything, so
    the method is gone. Cost analysis uses the cost_usd the caller supplies per
    execution log, which is the only figure that can be accurate

Made model-agnostic, following the precedent already set by
senior-prompt-engineer/scripts/prompt_optimizer.py's --price-per-mtok:

  - senior-ml-engineer SKILL.md and llm_integration_guide.md drop both 2024
    price tables and the context-window table (which claimed GPT-4 = 8,192).
    calculate_cost() takes rates as parameters; count_tokens() takes an
    encoding name, since encodings outlive model IDs and
    encoding_for_model() raises KeyError on anything unmapped
  - OpenAIProvider loses its default model, so the caller must pass one
  - llm-cost-optimizer's routing table names tiers, not models

Pinned to current IDs where an example genuinely needs one: SKILL_PIPELINE.md
(claude-opus-4-6 -> claude-opus-5), prompt-governance (claude-sonnet-4-5 ->
claude-sonnet-5), agent-designer README. Both dual-publish copies of the CAIO
pricing move together, so G4 stays green.

TEAM_STRUCTURE_GUIDE.md documented `prompt_optimizer.py --model gpt-4 --task
classification`. That contract no longer exists: there is no --task flag and
`prompt` is a required positional. Replaced with a runnable invocation.

Four references stay, with reasons in the allowlist: two litreview examples
where the retired model is the subject of the literature being reviewed, one
dated Computer Use citation, and the embedding benchmark already labelled a
2024 snapshot.

Assisted-by: Claude Code:claude-opus-5
2026-08-03 08:55:36 +08:00
Ben Fairless
15a3aa2a12
feat(ci): add retired-model-identifier lint as gate G7 (advisory)
audit/newgen-2026-06/00-MASTER.md proposed a "model-name freshness ... regex
deny-list for retired model identifiers" gate. It was never built, which is
why retired IDs and 2024 price tables survived both the June and July 2026
audits and are still in the tree today.

check_model_freshness.py flags references that mislead or break on execution:
script defaults, config values, cost tables keyed on a retired model, and
copy-pasteable CLI examples pinning a retired versioned ID. It distinguishes
these from legitimate dated citations, which stay silent when the line carries
a year, an arXiv ID, or wording like "model card" / "as of" / "historical" —
unless the line also looks like a live default, since
`model: str = "claude-3-opus"  # 2024 default` still breaks.

Haiku 4.5 is excluded from the Claude 4 sweep in the patterns rather than
per-file, because claude-haiku-4-5-20251001 is current.

Advisory (continue-on-error) for now: it reports 34 references, 13 of them in
executable positions, and the content fixes land in the next change. Flip to
blocking there. --executable-only prints just the 13 that matter first.

Assisted-by: Claude Code:claude-opus-5
2026-08-03 08:55:36 +08:00
Ben Fairless
5b85956d63
feat(ci): add frontmatter YAML validator as gate G10
Every existing gate reads frontmatter with a regex or a line scan
(generate-docs.py, sync-codex-skills.py, check_paths.py), so a block that is
not valid YAML passed CI while Claude Code loaded the skill with no metadata.
The 14 files fixed in the previous commit had drifted that way unnoticed.

check_frontmatter.py parses each block with yaml.safe_load and enforces what
Claude Code actually reads:

  errors   - unparseable YAML, non-mapping frontmatter, missing description,
             missing agent name, an agent name containing ':' (refused since
             CC 2.1.218), or a missing frontmatter block
  warnings - keys outside the current skill/agent frontmatter spec, and a
             combined description + when_to_use over the 1536-char cap that
             the skill listing truncates at

Warnings are non-blocking so this lands without requiring the wider metadata
cleanup; --strict flips them fatal. The run also tallies the off-spec keys no
runtime reads (license 172, metadata 125, domain 76, compatible_tools 37,
triggers 14), which gives that cleanup a worklist regenerated on every run.

Clean on the current tree: 593 files, 0 errors, 17 warnings.

Assisted-by: Claude Code:claude-opus-5
2026-08-03 08:55:36 +08:00
Claude
897c5eea3f
Merge remote-tracking branch 'origin/dev' into claude/skills-plugins-audit-vrttx1
# Conflicts:
#	.github/workflows/ci-quality-gate.yml
2026-06-11 15:36:35 +00:00
Claude
028dc13b35
feat(tooling): JSON-output sample gate (G9) + --sample fixtures (#654)
Implements issue #654 Option A (embedded-sample convention) plus the
verification harness the issue asked for:

- scripts/smoke_json_output.py — new advisory gate (G9) that discovers
  every tool whose --help advertises JSON output, runs <tool> --sample
  <json-flag>, and asserts the stdout parses as JSON. Tools advertising
  JSON without --sample are reported as 'uncovered' (a backlog, not a
  failure) so the gate can be adopted incrementally; --strict flips that
  to a hard failure once coverage is high. Wired into ci-quality-gate.yml
  alongside G8.
- Added --sample embedded fixtures to the 5 tools named in #654:
  error_budget_calculator, slo_review, blast_radius_calculator,
  audit_log_analyzer, api_linter. Their required args are now optional
  when --sample is passed; missing-arg behavior is unchanged otherwise.
- Fixed 4 tools the new gate surfaced (prompt_rater, coach_tip_classifier,
  cheat_code_filter, redaction_linter): their --sample path printed human
  text and ignored --json; it now honors the JSON flag.
- Synced the 3 dual-published standalone copies (slo-architect x2,
  chaos-engineering) so the drift guard stays green.

Gate now reports 16 tools covered, 16 verified, 0 failures.

https://claude.ai/code/session_01CUWsrUNZP9jpxvAwq67UiT
2026-06-11 15:29:39 +00:00
Claude
0c2d8c0180
fix(ci,scripts): post-merge review items M1/M2/A3/A4
- enforce-pr-target.yml: drop the no-op split/trim/join on the comment body
  (array join already produces the final text)
- ci-quality-gate.yml: safety findings now emit a workflow warning instead
  of being silently absorbed by '|| true'
- check_paths.py: fnmatch import hoisted to module level
- smoke_scripts.py: stale exception entries now fail the gate (exit 3) so
  scripts/smoke_exceptions.txt stays tidy

https://claude.ai/code/session_019AJddAL1NADWMXsy1qNPQF
2026-06-11 15:23:27 +00:00
Claude
c3fd4e0ccc
ci: flip the four audit guard gates from advisory to blocking
Every advisory run was green through PR #835, so the burn-in SLA
(2026-07-01 or 10 green runs) is satisfied early. Edge cases route to the
in-repo allowlists (check_paths_allowlist.txt, smoke_exceptions.txt)
instead of continue-on-error.

https://claude.ai/code/session_019AJddAL1NADWMXsy1qNPQF
2026-06-11 15:20:08 +00:00
Claude
f0d180165e
ci,docs: branch-based main-PR enforcement + gate SLA + deprecation notes
- enforce-pr-target.yml: the maintainer exemption let any maintainer PR
  target main — replaced with the branch-based hard rule from CLAUDE.md:
  only dev->main promotion PRs are allowed, regardless of author.
  Maintainer PRs now fail the check with retarget instructions (not
  auto-closed); non-maintainer PRs are commented and closed as before.
  Re-checks on edited/ready_for_review so retargeting clears it.
- ci-quality-gate.yml: flip-to-blocking SLA documented for the 4 advisory
  gates (2026-07-01 or 10 consecutive green runs on dev)
- CHANGELOG.md: Deprecated/Removed Skills section with migration paths for
  command-guide, ai-seo (-> aeo), release-manager (-> changelog-generator)

Addresses automated review feedback on PR #835 (items 1, 3, 6).

https://claude.ai/code/session_019AJddAL1NADWMXsy1qNPQF
2026-06-11 05:06:33 +00:00
Claude
c84e322a99
chore(registry,ci): derive counters, register 11 plugins, add CI guards
- marketplace.json: 11 shipped-but-unregistered plugins added (compliance-os,
  snowflake-development, behuman, claude-coach, grill-with-docs,
  llm-cost-optimizer, prompt-governance, business-investment-advisor,
  video-content-strategist, compliance-team-eu-ai-act, compliance-team-iso42001)
  -> 77/77 registered; self-contradicting counts fixed
- counters reconciled to derived ground truth across README.md, CLAUDE.md,
  agents/CLAUDE.md, marketplace.json (346 skills / 17 domains / 584 tools /
  701 references / 93 agents / 99 commands / 77 plugins)
- new guards: scripts/derive_counters.py (--check, gate G3),
  scripts/check_dual_publish.py (11 pairs, gate G4),
  scripts/smoke_scripts.py + smoke_exceptions.txt (gate G8)
- meta-tooling fixes (gate G9): generate-docs.py --help no longer rewrites
  docs/ as a side effect; audit_skills.py --help instant; markdown-html added
  to hermes/vibe/gemini sync scripts and generate-docs domain maps
- ci-quality-gate.yml: compileall completed 9 -> 17 domains; 4 new advisory
  gate steps (continue-on-error pending burn-in)

Verification (all green): check_plugin_json --all 77 OK; check_paths --all 0
findings; check_dual_publish 0 drifted; smoke 586 pass / 0 fail / 11 by-design
exceptions; derive_counters --check pass; compileall 17 domains rc=0.

https://claude.ai/code/session_019AJddAL1NADWMXsy1qNPQF
2026-06-10 14:33:19 +00:00
Claude
033bfa45ac
chore(repo): hide internal dev artifacts from cloners
Move 54 internal-only files out of the public tree via git rm --cached
+ .gitignore. Files remain on the maintainer's local disk; future fresh
clones see only production skill packages and user-facing docs.

Hidden:
- documentation/ (sprint plans, strategy, roadmaps) — 16 files
- eval-workspace/ (Tessl eval outputs) — 6 files
- megaprompts/ (Path-B draft specs) — 16 files
- tests/ (pytest suite — run locally, not in CI) — 14 files
- .autoresearch/ (autoresearch workspace) — 1 file
- AUDIT_REPORT.md (stale tracked despite prior ignore)

CI: remove the pytest step from ci-quality-gate.yml since tests/ is
no longer tracked. Other quality gates (yamllint, plugin.json schema,
compile-all, safety, link-check) remain in place.

CLAUDE.md: add a Maintainer-Local Folders section near the top so
future readers understand why these paths are referenced but absent
from GitHub.

No history rewrite — going-forward only. Past commits still contain
these files; only HEAD is cleaned.
2026-05-20 06:52:10 +00:00
Claude
bfcd0420d3
chore(ci): block "./skills" regression — validator now rejects it + runs in CI gate (#686 follow-up)
Issue #686 was the second round of the same Claude Code path-validator
tightening: v2.1.107 rejected bare "./" (fixed in #539 by moving to
"./skills"), then v2.1.133 also rejected "./skills". The validator that
codified the #539 fix was still recommending "./skills" verbatim — so a
future round 3 would have hit the same trap.

This commit makes the validator catch the regression and runs it in CI:

- scripts/check_plugin_json.py
  - Reject any "skills" string starting with "./" (catches both
    "./skills" and "./skills/sub" patterns)
  - Update docstring + error message to point at the layout-correct
    forms instead of the now-broken "./skills"
  - Recognize "source" and "attribution" as approved extension fields
    (already documented in CLAUDE.md but not in the validator), so the
    21 pre-existing false-positives go away and CI can run blocking
  - Drop the "./" rejection inside arrays — CLAUDE.md says ["./"] is
    the correct single-skill-at-root form

- .github/workflows/ci-quality-gate.yml
  - Add blocking "Validate plugin.json manifests" step that runs the
    validator on every PR

- CLAUDE.md
  - Add an Enforcement note pointing at the validator and the lockstep
    rule: when CC tightens its path validator again, update validator
    rules and CLAUDE.md together

Verified: 69/69 manifests pass; 6-case smoke test confirms validator
rejects all three known-broken forms ("./skills", "./", "./skills/sub")
and accepts all three documented-valid forms ("skills", ["./"],
explicit array).
2026-05-19 03:50:50 +00:00
Claude
cca920d670
fix(ci): break long compileall line to pass yamllint 160-char limit
https://claude.ai/code/session_01X1RKFAkEwxgg6gQvJG1KCa
2026-04-08 22:18:55 +00:00
Claude
ed2419b8e1
fix(ci): handle fork PRs in GitHub Actions workflows
Fork-based PRs (like PR #498) caused all CI checks to fail due to:
- ci-quality-gate: checkout failed because fork branch names don't exist
  in the base repo. Now uses commit SHA for PR events.
- skill-security-audit: comment posting failed with read-only GITHUB_TOKEN.
  Now continues on error and writes results to job summary as fallback.
- claude-code-review: fallback comment step failed silently. Now continues
  on error and writes status to job summary.

https://claude.ai/code/session_01X1RKFAkEwxgg6gQvJG1KCa
2026-04-08 21:56:45 +00:00
Claude
36678cd00d
feat(tests): add comprehensive test suite with 1493 tests across 4 phases
Phase 1 - Foundation:
- Add pytest, pyproject.toml, requirements-dev.txt
- 593 smoke tests (324 syntax + 269 argparse --help) for all Python scripts
- Harden CI: remove || true from compileall, expand to all 9 directories, add pytest step

Phase 2 - Calculator unit tests:
- RICE prioritizer: formula, prioritization, portfolio analysis, roadmap
- DCF valuation: WACC, cash flow projections, terminal value, sensitivity
- Financial ratios: profitability, liquidity, leverage, efficiency, valuation
- Campaign ROI: metrics, benchmarks, portfolio summary
- Funnel analyzer: stage metrics, bottleneck detection, segment comparison
- OKR tracker: numeric/percentage/milestone/boolean KR scoring, status

Phase 3 - Parser and compliance tests:
- SEO checker: HTML parsing, scoring, heading hierarchy, alt text, word count
- Commit linter: conventional commit regex, lint report, file input
- GDPR compliance: pattern detection, file scanning, project analysis

Phase 4 - Integration tests:
- 671 skill integrity tests: frontmatter, H1 headings, scripts dirs, references

Bug fixes found by tests:
- Fix duplicate --reason argparse arg in document_version_control.py

https://claude.ai/code/session_01MsVmZoAsPvLv7rAGDBGTbL
2026-03-30 19:54:00 +00:00
Alireza Rezvani
b35ba710b3
fix(ci): resolve yamllint blocking CI quality gate (#19) (#20) 2025-11-05 20:18:29 +01:00
Reza Rezvani
6fbe6cdb27 feat(ci): implement comprehensive GitHub automation workflows
Implemented full GitHub automation system from claude-code-skills-factory
with project-specific configuration for claude-skills repository.

## New Workflows

- **ci-quality-gate.yml**: Automated linting, testing, and security checks
- **claude-code-review.yml**: Enhanced with kill switch and bypass mechanisms
- **pr-issue-auto-close.yml**: Auto-close linked issues when PRs merge
- **smart-sync.yml**: Bidirectional sync between issues and project board

## Configuration Files

- **WORKFLOW_KILLSWITCH**: Emergency workflow disable capability
- **branch-protection-config.json**: Branch protection settings
- **commit-template.txt**: Standardized commit message template
- **AUTOMATION_SETUP.md**: Complete setup and configuration guide

## Templates

- **pull_request_template.md**: Enhanced with security and quality checklists

## Key Features

✅ AI-powered code reviews with Claude
✅ Automatic issue closure on PR merge
✅ Bidirectional issue ↔ project board sync
✅ Quality gates (YAML lint, Python syntax, security audit)
✅ Kill switch for emergency workflow disable
✅ Rate limit protection with circuit breakers
✅ 10-second debouncing to prevent sync loops

## Project Configuration

- Repository: alirezarezvani/claude-skills
- Project Number: 9
- Status: Ready for PROJECTS_TOKEN configuration

## Testing

Workflows validated with yamllint and ready for deployment.

See .github/AUTOMATION_SETUP.md for complete setup instructions.
2025-11-04 21:03:52 +01:00