ai-check-template 0.2.0-alpha.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README-ja.md CHANGED
@@ -25,7 +25,7 @@ AI 駆動開発のためのテンプレート集。以下を提供:
25
25
  - `ai:check` **実行スタック**(npm scripts / Claude Code hooks / シェルエントリポイント)
26
26
  - 同じ `ai:check` を PR で走らせる **GitHub Actions テンプレ**(direct workflow / reusable workflow example)
27
27
  - 主要スタック向け**プロファイル**(Next.js / vanilla React / Expo / Node CLI / Supabase + RLS)
28
- - 安全な初期導入のための alpha **CLI foundation**
28
+ - 安全な初期導入のための stable npm **CLI**
29
29
 
30
30
  必要な部分をコピーして自プロジェクトに合わせ、検証可能なループを得る。特定の LLM・フレームワーク・ベンダーに依存しない設計。
31
31
 
@@ -75,24 +75,22 @@ AI 実装
75
75
  | **CI テンプレ** | GitHub Actions `ai-check.yml`(フル)、`ai-check-fast.yml`(PR の fast ループ)、reusable workflow examples |
76
76
  | **Examples** | [`examples/nextjs-basic`](./examples/nextjs-basic/) は AI 生成コードの Before / After を示す runnable example |
77
77
  | **プロファイル** | `react-nextjs` / `react-vanilla` / `expo-rn` / `node-cli` / `supabase-rls` |
78
- | **CLI alpha** | [`docs/cli.md`](./docs/cli.md) は repository-local `init` command、read-only `doctor` command、guarded `update` command、install state(`.ai-check-template.json`)、profile-aware package script migrations、profile docs migration、support script defaults、`pnpm` / `npm` / `yarn` / `bun` の package manager detection と Claude hook / CI workflow command rendering、optional `--install-deps` npm dev dependency install、exact-managed workflow cleanup、advisory profile / missing-script diagnostics warnings、stale managed CI diagnostics、`doctor --strict`、`--profile`、`--package-manager`、`--ci`、`--claude-hooks`、`--dry-run`、`--overwrite`、`npm pack` readiness、`npm publish --dry-run --tag next` preflight を説明 |
78
+ | **CLI** | [`docs/cli.md`](./docs/cli.md) は `ai-check-template@0.2.0` CLI、`init` command、read-only `doctor` command、guarded `update` command、install state(`.ai-check-template.json`)、profile-aware package script migrations、profile docs migration、support script defaults、`pnpm` / `npm` / `yarn` / `bun` の package manager detection と Claude hook / CI workflow command rendering、optional `--install-deps` npm dev dependency install、exact-managed workflow cleanup、advisory profile / missing-script diagnostics warnings、stale managed CI diagnostics、`doctor --strict`、`--profile`、`--package-manager`、`--ci`、`--claude-hooks`、`--dry-run`、`--overwrite` を説明 |
79
79
  | **プロジェクト docs** | [`docs/vision.md`](./docs/vision.md)、[`docs/roadmap.md`](./docs/roadmap.md)、Phase 1 dogfooding プロトコル、[`初回 dogfooding report`](./docs/phase-1-initial-dogfooding-report.md) |
80
80
 
81
81
  ## Quick start / 最短手順
82
82
 
83
- > v0.1.0 は「コピー&カスタマイズ」型としてリリース済み。詳細は [`docs/releases/v0.1.0.md`](./docs/releases/v0.1.0.md)。repository-local の v0.2.0 alpha CLI、install state、profile-aware package script migrations、profile docs migration、support script defaults、package manager detection、package-manager-aware Claude hook / CI workflow rendering、optional `--install-deps`、exact-managed workflow cleanup、advisory profile / missing-script / stale managed CI diagnostics と `doctor --strict`、`npm pack` readiness、`npm publish --dry-run --tag next` preflight [`docs/cli.md`](./docs/cli.md) を参照。actual npm / `npx ai-check-template init` 公開は今後の作業です。
83
+ > v0.1.0 は「コピー&カスタマイズ」型としてリリース済み。詳細は [`docs/releases/v0.1.0.md`](./docs/releases/v0.1.0.md)。v0.2.0 `ai-check-template@0.2.0` stable CLI release prep です。詳細は [`docs/releases/v0.2.0.md`](./docs/releases/v0.2.0.md)、alpha 履歴は [`docs/releases/v0.2.0-alpha.0.md`](./docs/releases/v0.2.0-alpha.0.md)、CLI 詳細は [`docs/cli.md`](./docs/cli.md) を参照。actual publish 前も repository validation で `npm pack` readiness check と `npm publish --dry-run --tag latest` preflight を実行します。
84
84
 
85
85
  ```bash
86
86
  # 1. リポをクローン
87
87
  git clone https://github.com/heidayo/ai-check-template.git
88
88
 
89
- # 2. alpha CLI init を dry-run するか、手動コピー用 profile を確認
90
- node ai-check-template/bin/ai-check-template.mjs init --target . --profile react-nextjs --dry-run
91
- node ai-check-template/bin/ai-check-template.mjs init --target . --profile react-nextjs --install-deps --dry-run
92
- node ai-check-template/bin/ai-check-template.mjs init --target . --profile node-cli --package-manager npm --dry-run
93
- node ai-check-template/bin/ai-check-template.mjs doctor --target . --ci none
94
- node ai-check-template/bin/ai-check-template.mjs doctor --target . --strict --json
95
- node ai-check-template/bin/ai-check-template.mjs update --target . --dry-run
89
+ # 2. npm から stable CLI init を dry-run
90
+ npx -y ai-check-template init --target . --profile react-nextjs --dry-run
91
+ npx -y ai-check-template init --target . --profile node-cli --package-manager npm --ci none --dry-run
92
+ npx -y ai-check-template doctor --target . --ci none
93
+ npx -y ai-check-template update --target . --dry-run
96
94
 
97
95
  # 3. スタックに合う profile を確認
98
96
  cat ai-check-template/package-templates/profiles/react-nextjs/README.md
@@ -131,7 +129,7 @@ pnpm ai:check
131
129
  | バージョン | テーマ | 状態 |
132
130
  |---|---|---|
133
131
  | **v0.1.0** | 手動コピーで使うテンプレ集 | Released([notes](./docs/releases/v0.1.0.md)) |
134
- | **v0.2.0** | CLI scaffolding(`npx ai-check-template init`) | 進行中([alpha CLI docs + `npm pack` readiness](./docs/cli.md)) |
132
+ | **v0.2.0** | CLI scaffolding(`npx ai-check-template init`) | Stable release prep([notes](./docs/releases/v0.2.0.md)、[alpha notes](./docs/releases/v0.2.0-alpha.0.md)、[CLI docs](./docs/cli.md)) |
135
133
  | **v0.3.0+** | Reusable workflow + Composite Action(GitHub Marketplace) | 計画中 |
136
134
 
137
135
  詳細: [`docs/roadmap.md`](./docs/roadmap.md)。
package/README.md CHANGED
@@ -23,7 +23,7 @@ A template collection for AI-driven development. It bundles:
23
23
  - An **`ai:check` execution stack** (npm scripts, Claude Code hooks, shell entry points)
24
24
  - **GitHub Actions templates** that run the same `ai:check` on every PR, including direct and reusable workflow examples
25
25
  - **Profiles** for common stacks (Next.js, vanilla React, Expo, Node CLI, Supabase + RLS)
26
- - An alpha **CLI foundation** for safer repository-local initialization
26
+ - A stable npm **CLI** for safer initialization
27
27
 
28
28
  You copy what you need, adapt to your project, and get a verifiable loop — without depending on any specific LLM, framework, or vendor.
29
29
 
@@ -73,24 +73,22 @@ The repository ships templates and prompts for every step in this loop.
73
73
  | **CI templates** | GitHub Actions `ai-check.yml` (full), `ai-check-fast.yml` (PR-only fast loop), and reusable workflow examples |
74
74
  | **Examples** | [`examples/nextjs-basic`](./examples/nextjs-basic/) shows a Before / After of AI-generated code under `ai-check-template` |
75
75
  | **Profiles** | `react-nextjs`, `react-vanilla`, `expo-rn`, `node-cli`, `supabase-rls` |
76
- | **CLI alpha** | [`docs/cli.md`](./docs/cli.md) documents the repository-local `init`, read-only `doctor`, and guarded `update` commands, install state (`.ai-check-template.json`), profile-aware package script migrations, profile docs migration, support script defaults, package manager detection plus Claude hook and CI workflow command rendering for `pnpm` / `npm` / `yarn` / `bun`, optional `--install-deps` npm dev dependency install, exact-managed workflow cleanup, advisory profile and missing-script diagnostics warnings, stale managed CI diagnostics, `doctor --strict`, `--profile`, `--package-manager`, `--ci`, `--claude-hooks`, `--dry-run`, `--overwrite`, `npm pack` readiness, and `npm publish --dry-run --tag next` preflight |
76
+ | **CLI** | [`docs/cli.md`](./docs/cli.md) documents the `ai-check-template@0.2.0` CLI, `init`, read-only `doctor`, and guarded `update` commands, install state (`.ai-check-template.json`), profile-aware package script migrations, profile docs migration, support script defaults, package manager detection plus Claude hook and CI workflow command rendering for `pnpm` / `npm` / `yarn` / `bun`, optional `--install-deps` npm dev dependency install, exact-managed workflow cleanup, advisory profile and missing-script diagnostics warnings, stale managed CI diagnostics, `doctor --strict`, `--profile`, `--package-manager`, `--ci`, `--claude-hooks`, `--dry-run`, and `--overwrite` |
77
77
  | **Project docs** | [`docs/vision.md`](./docs/vision.md), [`docs/roadmap.md`](./docs/roadmap.md), Phase 1 dogfooding protocol, [`initial dogfooding report`](./docs/phase-1-initial-dogfooding-report.md) |
78
78
 
79
79
  ## Quick start
80
80
 
81
- > v0.1.0 is released as "copy & adapt." See [`docs/releases/v0.1.0.md`](./docs/releases/v0.1.0.md). A repository-local v0.2.0 alpha CLI, install state, profile-aware package script migrations, profile docs migration, support script defaults, package manager detection, package-manager-aware Claude hook and CI workflow rendering, optional `--install-deps`, exact-managed workflow cleanup, advisory profile / missing-script / stale managed CI diagnostics with `doctor --strict`, `npm pack` readiness, and `npm publish --dry-run --tag next` preflight are available in [`docs/cli.md`](./docs/cli.md); actual npm / `npx ai-check-template init` publishing is still future work.
81
+ > v0.1.0 is released as "copy & adapt." See [`docs/releases/v0.1.0.md`](./docs/releases/v0.1.0.md). v0.2.0 is the stable CLI release prep for `ai-check-template@0.2.0`; see [`docs/releases/v0.2.0.md`](./docs/releases/v0.2.0.md), the alpha history in [`docs/releases/v0.2.0-alpha.0.md`](./docs/releases/v0.2.0-alpha.0.md), and [`docs/cli.md`](./docs/cli.md). Repository validation uses `npm pack` readiness checks and `npm publish --dry-run --tag latest` preflight before actual publish.
82
82
 
83
83
  ```bash
84
84
  # 1. Clone or browse the templates
85
85
  git clone https://github.com/heidayo/ai-check-template.git
86
86
 
87
- # 2. Preview the alpha CLI init, or pick a profile and copy manually
88
- node ai-check-template/bin/ai-check-template.mjs init --target . --profile react-nextjs --dry-run
89
- node ai-check-template/bin/ai-check-template.mjs init --target . --profile react-nextjs --install-deps --dry-run
90
- node ai-check-template/bin/ai-check-template.mjs init --target . --profile node-cli --package-manager npm --dry-run
91
- node ai-check-template/bin/ai-check-template.mjs doctor --target . --ci none
92
- node ai-check-template/bin/ai-check-template.mjs doctor --target . --strict --json
93
- node ai-check-template/bin/ai-check-template.mjs update --target . --dry-run
87
+ # 2. Preview the stable CLI init from npm
88
+ npx -y ai-check-template init --target . --profile react-nextjs --dry-run
89
+ npx -y ai-check-template init --target . --profile node-cli --package-manager npm --ci none --dry-run
90
+ npx -y ai-check-template doctor --target . --ci none
91
+ npx -y ai-check-template update --target . --dry-run
94
92
 
95
93
  # 3. Pick a profile that matches your stack
96
94
  cat ai-check-template/package-templates/profiles/react-nextjs/README.md
@@ -129,7 +127,7 @@ Detailed walkthrough: see [`docs/roadmap.md`](./docs/roadmap.md) and the per-pro
129
127
  | Version | Theme | Status |
130
128
  |---|---|---|
131
129
  | **v0.1.0** | Manual templates for AI code verification | Released ([notes](./docs/releases/v0.1.0.md)) |
132
- | **v0.2.0** | CLI scaffolding (`npx ai-check-template init`) | In progress ([alpha CLI docs + `npm pack` readiness](./docs/cli.md)) |
130
+ | **v0.2.0** | CLI scaffolding (`npx ai-check-template init`) | Stable release prep ([notes](./docs/releases/v0.2.0.md), [alpha notes](./docs/releases/v0.2.0-alpha.0.md), [CLI docs](./docs/cli.md)) |
133
131
  | **v0.3.0+** | Reusable workflow + Composite Action (GitHub Marketplace) | Planned |
134
132
 
135
133
  Full breakdown: [`docs/roadmap.md`](./docs/roadmap.md).
package/docs/cli.md CHANGED
@@ -1,11 +1,20 @@
1
- # CLI alpha
1
+ # CLI
2
2
 
3
- `ai-check-template` now includes an alpha CLI foundation for v0.2.0. It is repository-local in this slice and is not an npm-published stable release yet.
3
+ `ai-check-template` includes a CLI for v0.2.0. The stable release candidate package version is `ai-check-template@0.2.0`.
4
4
 
5
5
  Use it to copy the v0.1.0 templates into an existing project with safer defaults than manual copy.
6
6
 
7
7
  ## Command
8
8
 
9
+ ```bash
10
+ npx -y ai-check-template init --target ../your-project --profile react-nextjs --dry-run
11
+ npx -y ai-check-template init --target ../your-project --profile react-nextjs --yes
12
+ npx -y ai-check-template doctor --target ../your-project
13
+ npx -y ai-check-template update --target ../your-project --dry-run
14
+ ```
15
+
16
+ Repository-local commands are still useful when testing a checked-out clone:
17
+
9
18
  ```bash
10
19
  node bin/ai-check-template.mjs init --target ../your-project --profile react-nextjs --yes
11
20
  node bin/ai-check-template.mjs doctor --target ../your-project
@@ -79,7 +88,7 @@ Malformed or unsupported install state is reported by `doctor` as an issue. `upd
79
88
 
80
89
  ## Package manager detection
81
90
 
82
- The CLI alpha generates profile-aware package scripts for `pnpm`, `npm`, `yarn`, and `bun`. Detection uses:
91
+ The CLI generates profile-aware package scripts for `pnpm`, `npm`, `yarn`, and `bun`. Detection uses:
83
92
 
84
93
  1. explicit `--package-manager`
85
94
  2. install state
@@ -128,7 +137,7 @@ Current advisory checks cover:
128
137
  - `supabase-rls`: missing RLS-related DB / integration test scripts
129
138
  - `ai:check` / `ai:check:fast`: missing referenced package scripts such as `typecheck`, `lint`, or `test:unit`
130
139
 
131
- Warnings remain advisory by default in this alpha. `doctor --strict` is available for stricter local or CI checks. Missing script diagnostics do not install dependencies or create scripts; profile-specific file / CI migrations remain future work.
140
+ Warnings remain advisory by default. `doctor --strict` is available for stricter local or CI checks. Missing script diagnostics do not install dependencies or create scripts.
132
141
 
133
142
  ## CI diagnostics
134
143
 
@@ -142,7 +151,7 @@ Custom workflows with the same paths are not treated as stale managed files unle
142
151
 
143
152
  ## Profile-aware scripts
144
153
 
145
- The manual `package-templates/package.scripts.fragment.json` remains a generic copy-and-adapt fragment. The CLI alpha uses a profile-aware script resolver instead:
154
+ The manual `package-templates/package.scripts.fragment.json` remains a generic copy-and-adapt fragment. The CLI uses a profile-aware script resolver instead:
146
155
 
147
156
  - `react-nextjs` adds React Doctor and dead-code checks to `ai:check`
148
157
  - `react-vanilla` keeps SPA scripts without Next.js-specific commands
@@ -316,7 +325,7 @@ node bin/ai-check-template.mjs doctor --help
316
325
  node bin/ai-check-template.mjs update --help
317
326
  node --test tests/cli/*.test.mjs
318
327
  npm pack --dry-run --json
319
- npm publish --dry-run --tag next --json
328
+ npm publish --dry-run --tag latest --json
320
329
  make validate
321
330
  ```
322
331
 
@@ -331,18 +340,18 @@ node --test tests/cli/package.test.mjs
331
340
 
332
341
  The package tests assert that runtime files are included, repository-only SAGE artifacts are excluded, and a tarball-installed `ai-check-template` binary can run both `--help` and `init`.
333
342
 
334
- This still does not mean the package is published to npm. Until the publish SPEC is complete, use a local clone or local tarball for CLI trials.
343
+ The package has an alpha history at `ai-check-template@0.2.0-alpha.0` under the `next` dist-tag. Local tarball smoke remains part of repository validation because it catches package contents regressions before future publishes.
335
344
 
336
345
  ## Publish preflight
337
346
 
338
- Because `0.2.0-alpha.0` is a prerelease version, npm requires an explicit dist-tag. The publish preflight command is:
347
+ For stable `0.2.0` release prep, the publish preflight command is:
339
348
 
340
349
  ```bash
341
- npm publish --dry-run --tag next --json
350
+ npm publish --dry-run --tag latest --json
342
351
  ```
343
352
 
344
- This command validates the publish payload without writing to the registry. Actual `npm publish --tag next` requires explicit maintainer approval and npm authentication, and is not performed by repository validation.
353
+ This command validates the publish payload without writing to the registry. Actual `npm publish --tag latest` still requires explicit maintainer approval and npm authentication.
345
354
 
346
355
  ## 日本語メモ
347
356
 
348
- この CLI は v0.2.0 alpha foundation です。現時点では npm 公開済みの安定版ではありません。`npm pack` local tarball smoke で package readiness を検証し、`npm publish --dry-run --tag next --json` で publish preflight を検証しますが、registry への actual publish は別 SPEC で扱います。まず `init --dry-run` で差分を確認し、問題なければ `init --yes` を付けて実行してください。導入後は `.ai-check-template.json` に選択した profile / package manager / CI / Claude hooks が保存され、`doctor` と `update` は明示 flag がない場合にその state を使います。CLI alpha は profile ごとの package scripts と missing support scripts を導入・診断・更新し、`pnpm` / `npm` / `yarn` / `bun` の script invocation を生成できます。`--install-deps --dry-run` は npm dev dependency install command を表示し、`--install-deps --yes` は package manager binary を preflight してから missing dev dependencies を install します。Supabase CLI、Maestro、React Doctor などの external toolchain install は対象外です。profile diagnostics warnings、missing referenced package script warnings、stale managed CI workflow warnings は通常 advisory ですが、CI や release prep では `doctor --strict` で warning を failure として扱えます。`update --dry-run` で更新予定を確認できます。inactive な exact-managed workflow は `update --yes` で cleanup できますが、custom workflow は保持されます。既存ファイルや既存 scripts は `--overwrite` を付けない限り上書きしません。既存 support scripts は `--overwrite` の有無に関係なく保持されます。
357
+ この CLI は v0.2.0 stable release candidate です。まず `npx -y ai-check-template init --dry-run` で差分を確認し、問題なければ `init --yes` を付けて実行してください。導入後は `.ai-check-template.json` に選択した profile / package manager / CI / Claude hooks が保存され、`doctor` と `update` は明示 flag がない場合にその state を使います。CLI は profile ごとの package scripts と missing support scripts を導入・診断・更新し、`pnpm` / `npm` / `yarn` / `bun` の script invocation を生成できます。`--install-deps --dry-run` は npm dev dependency install command を表示し、`--install-deps --yes` は package manager binary を preflight してから missing dev dependencies を install します。Supabase CLI、Maestro、React Doctor などの external toolchain install は対象外です。profile diagnostics warnings、missing referenced package script warnings、stale managed CI workflow warnings は通常 advisory ですが、CI や release prep では `doctor --strict` で warning を failure として扱えます。`update --dry-run` で更新予定を確認できます。inactive な exact-managed workflow は `update --yes` で cleanup できますが、custom workflow は保持されます。既存ファイルや既存 scripts は `--overwrite` を付けない限り上書きしません。既存 support scripts は `--overwrite` の有無に関係なく保持されます。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-check-template",
3
- "version": "0.2.0-alpha.0",
3
+ "version": "0.2.0",
4
4
  "description": "Templates and CLI for verifying, repairing, and safely merging AI-generated code.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",