ai-project-boilerplate 1.1.2 → 1.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/bin/cli.js CHANGED
@@ -39,8 +39,30 @@ function compareVersions(a, b) {
39
39
  async function checkForUpdate() {
40
40
  const latest = await fetchLatestVersion();
41
41
  if (latest && compareVersions(latest, CURRENT_VERSION) > 0) {
42
- console.log(`\n Update available: ${CURRENT_VERSION} ${latest}`);
43
- console.log(` Run to update: npm install -g ai-project-boilerplate\n`);
42
+ const yellow = (s) => `\x1b[33m${s}\x1b[0m`;
43
+ const cyan = (s) => `\x1b[36m${s}\x1b[0m`;
44
+ const bold = (s) => `\x1b[1m${s}\x1b[0m`;
45
+ const dim = (s) => `\x1b[2m${s}\x1b[0m`;
46
+
47
+ const tag = bold(yellow("UPDATE AVAILABLE"));
48
+ const from = dim(CURRENT_VERSION);
49
+ const arrow = "→";
50
+ const to = bold(cyan(latest));
51
+ const cmd = bold(cyan("npm install -g ai-project-boilerplate"));
52
+ const url = cyan(`https://github.com/${REPO}/releases/tag/v${latest}`);
53
+ const line1 = ` ${tag} ${from} ${arrow} ${to}`;
54
+ const line2 = ` Run ${cmd} to update`;
55
+ const line3 = ` See what's changed: ${url}`;
56
+
57
+ const strip = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
58
+ const width = Math.max(strip(line1).length, strip(line2).length, strip(line3).length) + 2;
59
+ const border = yellow("─".repeat(width));
60
+
61
+ console.error(`\n${yellow("┌")}${border}${yellow("┐")}`);
62
+ console.error(`${yellow("│")} ${line1.padEnd(line1.length + width - strip(line1).length - 1)}${yellow("│")}`);
63
+ console.error(`${yellow("│")} ${line2.padEnd(line2.length + width - strip(line2).length - 1)}${yellow("│")}`);
64
+ console.error(`${yellow("│")} ${line3.padEnd(line3.length + width - strip(line3).length - 1)}${yellow("│")}`);
65
+ console.error(`${yellow("└")}${border}${yellow("┘")}\n`);
44
66
  return true;
45
67
  }
46
68
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-project-boilerplate",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "CLI to scaffold AI-collaborated projects with stage-based AI instruction files",
5
5
  "bin": {
6
6
  "ai-project": "bin/cli.js"
@@ -8,6 +8,42 @@
8
8
  /
9
9
  ```
10
10
 
11
+ ## Git Workflow
12
+ - Every new feature or bug fix must be developed on a dedicated branch — never commit directly to `main`
13
+ - Branch naming:
14
+ - `feature/<short-description>` — for new functionality
15
+ - `fix/<short-description>` — for bug fixes
16
+ ### PR Flow
17
+ ```bash
18
+ # 1. Create and switch to branch
19
+ git checkout -b feature/<short-description>
20
+
21
+ # 2. Implement, commit changes, then push
22
+ git push -u origin feature/<short-description>
23
+
24
+ # 3. Create PR
25
+ gh pr create --title "<title>" --body "$(cat <<'EOF'
26
+ ## Summary
27
+ - <bullet points>
28
+
29
+ ## Test plan
30
+ - [ ] <manual test steps>
31
+ EOF
32
+ )"
33
+
34
+ # 4. Check CI status
35
+ gh pr checks
36
+
37
+ # 5. Merge and delete branch after approval
38
+ gh pr merge --squash --delete-branch
39
+ ```
40
+
41
+ ### Release Flow
42
+ ```bash
43
+ # Bump version, tag, and create GitHub release
44
+ ./scripts/release.sh <patch|minor|major>
45
+ ```
46
+
11
47
  ## Key Conventions
12
48
  <!-- Naming, file organization, patterns to follow -->
13
49
  -