Skip to content

Commit 91637cc

Browse files
CSZHKclaude
andcommitted
v0.2.0: quality + acceptance infrastructure
Self-validating skill. The same 11 checks the skill teaches users to write against now police the skill's own examples in CI. Added: - scripts/lint-condition.ts — 11 static checks for /goal conditions - tests/acceptance.md + bad-conditions/ — 6 positive + 3 negative fixtures - .github/workflows/ci.yml — runs lint --all + manifest validation + version consistency - README CI badge - Validation section in SKILL.md Changed: - Trigger phrases now cover debug-entry intents (won't converge / 不收敛 / evaluator 看不到) - Each workflow step states Claude-does-X vs User-does-Y for UX clarity - 4-piece recipe deduped: SKILL.md keeps summary, patterns.md is canonical Fixed: - Linter L2/L3 regex initially only matched 'proven by'; now accepts proven-by / such-that / where, matching the keyword variety across existing examples - Self-test exposed 4 of 6 examples were failing the linter on first run, all fixed - Frontmatter author CSZHK (was kang) Acceptance: bun scripts/lint-condition.ts --all → 9/9 PASS Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0498c2d commit 91637cc

12 files changed

Lines changed: 725 additions & 34 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": "Defensive /goal condition templates for Claude Code — 4-piece recipe, 6 patterns, anti-pattern checklist",
9-
"version": "0.1.0"
9+
"version": "0.2.0"
1010
},
1111
"plugins": [
1212
{
1313
"name": "goal-conditions",
1414
"source": "./",
1515
"description": "Author robust /goal conditions that survive the evaluator's see-only-the-conversation constraint. Provides the 4-piece recipe (end state + proof + invariant + bound), 6 pattern templates, and anti-pattern checklist.",
16-
"version": "0.1.0",
16+
"version": "0.2.0",
1717
"category": "developer-tools",
1818
"tags": ["claude-code", "/goal", "agent-workflow", "condition-design", "automation"]
1919
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "goal-conditions",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Author defensive /goal conditions for Claude Code. Provides 4-piece recipe + 6 patterns + anti-pattern checklist. The evaluator only reads the transcript — never runs tools. This skill exists to make conditions the evaluator can actually judge.",
55
"author": {
66
"name": "CSZHK",

.github/markdown-link-check.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"ignorePatterns": [
3+
{ "pattern": "^https://github.com/CSZHK/goal-conditions/issues/new" },
4+
{ "pattern": "^https://code.claude.com" }
5+
],
6+
"retryOn429": true,
7+
"retryCount": 3,
8+
"fallbackRetryDelay": "30s"
9+
}

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
acceptance:
11+
name: Lint conditions + acceptance suite
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Run acceptance suite (lint --all)
22+
run: bun scripts/lint-condition.ts --all
23+
24+
manifest:
25+
name: Validate plugin manifests
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Validate marketplace.json is parseable JSON
31+
run: |
32+
node -e "JSON.parse(require('fs').readFileSync('.claude-plugin/marketplace.json', 'utf8'))"
33+
echo "✓ marketplace.json is valid JSON"
34+
35+
- name: Validate plugin.json is parseable JSON
36+
run: |
37+
node -e "JSON.parse(require('fs').readFileSync('.claude-plugin/plugin.json', 'utf8'))"
38+
echo "✓ plugin.json is valid JSON"
39+
40+
- name: Verify required fields in plugin.json
41+
run: |
42+
node <<'EOF'
43+
const m = JSON.parse(require('fs').readFileSync('.claude-plugin/plugin.json', 'utf8'));
44+
const required = ['name', 'version', 'description', 'author', 'license'];
45+
const missing = required.filter(k => !(k in m));
46+
if (missing.length) { console.error('Missing fields:', missing); process.exit(1); }
47+
console.log('✓ plugin.json has all required fields');
48+
EOF
49+
50+
- name: Verify version consistency
51+
run: |
52+
node <<'EOF'
53+
const fs = require('fs');
54+
const plugin = JSON.parse(fs.readFileSync('.claude-plugin/plugin.json', 'utf8'));
55+
const market = JSON.parse(fs.readFileSync('.claude-plugin/marketplace.json', 'utf8'));
56+
const marketVersion = market.metadata?.version || market.plugins?.[0]?.version;
57+
if (plugin.version !== marketVersion) {
58+
console.error(`Version mismatch: plugin.json=${plugin.version} marketplace.json=${marketVersion}`);
59+
process.exit(1);
60+
}
61+
console.log('✓ plugin.json and marketplace.json versions match:', plugin.version);
62+
EOF
63+
64+
markdown-links:
65+
name: Markdown link check
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- name: Check internal markdown links
71+
uses: gaurav-nelson/github-action-markdown-link-check@v1
72+
with:
73+
use-quiet-mode: 'yes'
74+
use-verbose-mode: 'yes'
75+
config-file: '.github/markdown-link-check.json'
76+
continue-on-error: false

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## 0.2.0 — 2026-05-12
4+
5+
Quality + acceptance infrastructure release. Self-validating skill.
6+
7+
### Added
8+
9+
- **`scripts/lint-condition.ts`** — static linter for `/goal` conditions. 11 checks covering the 4-piece recipe, length, subjective-phrase scan, and the `all tests pass` trap. Accepts `--condition` (inline) / `--file` (markdown) / `--all` (acceptance run) modes.
10+
- **`tests/acceptance.md`** — executable spec. Documents that 6 positive examples MUST pass all 11 checks, and 3 negative fixtures MUST fail with specific check IDs.
11+
- **`tests/bad-conditions/`** — 3 negative fixtures: missing bound, subjective end-state, `all tests pass` without test command. Each carries `<!-- expect-fail: Lxx -->` comment for automated verification.
12+
- **`.github/workflows/ci.yml`** — runs the acceptance suite, validates plugin manifest JSON, and checks version consistency between `plugin.json` and `marketplace.json` on every push.
13+
- **Validation section in SKILL.md** — documents how to invoke the linter from within the workflow for objective second opinions.
14+
15+
### Changed
16+
17+
- **Trigger phrases enriched** — added debug-entry words ("goal won't converge", "goal 不收敛", "evaluator can't see", "把验收点写成 goal"). Now covers both initial-design and debug-this-runaway entry points.
18+
- **Workflow steps clarified** — each step now explicitly states "Claude does X / User does Y" so the UX is predictable from either side.
19+
- **4-piece recipe deduped** — SKILL.md now keeps a single-slide summary and references `patterns.md` as the canonical source. Reduces maintenance cost.
20+
- **Author updated** — frontmatter author and homepage now point to CSZHK.
21+
22+
### Fixed
23+
24+
- **Linter L2/L3 regex** — initially only accepted `proven by:` keyword; now accepts `proven by` / `such that` / `where` as proof transitions, matching the variety in existing examples. Caught during self-test (4 of 6 examples were initially failing — the linter found inconsistencies the author missed).
25+
26+
### Source basis
27+
28+
- Same as 0.1.0; no new external sources cited.
29+
- All 11 lint checks are derived from the same official docs + the 4-piece recipe.
30+
31+
---
32+
333
## 0.1.0 — 2026-05-12
434

535
Initial release, within 48 hours of `/goal` launch.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
> The skill `/goal` should have shipped with.
44
55
[![claude-code](https://img.shields.io/badge/claude--code-skill-0E7C66)](https://code.claude.com/docs/en/goal)
6-
[![version](https://img.shields.io/badge/version-0.1.0-0E7C66)](./CHANGELOG.md)
6+
[![version](https://img.shields.io/badge/version-0.2.0-0E7C66)](./CHANGELOG.md)
7+
[![CI](https://github.com/CSZHK/goal-conditions/actions/workflows/ci.yml/badge.svg)](https://github.com/CSZHK/goal-conditions/actions/workflows/ci.yml)
78
[![license](https://img.shields.io/badge/license-MIT-0E7C66)](./LICENSE)
89

910
`/goal` shipped 2026-05-11 in Claude Code v2.1.139. Its evaluator only reads the

0 commit comments

Comments
 (0)