@cloverleaf/reference-impl 0.6.5 → 0.6.6

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.
@@ -14,11 +14,5 @@
14
14
  "methodology",
15
15
  "ai-first",
16
16
  "reference-implementation"
17
- ],
18
- "skills": [
19
- {
20
- "name": "cloverleaf-release",
21
- "description": "Publish a new @cloverleaf/reference-impl release. Runs pre-flight checks then executes git tag, git push, npm publish, gh release create. Accepts [--dry-run] [--yes] flags."
22
- }
23
17
  ]
24
18
  }
@@ -111,9 +111,10 @@ export function runPreflightChecks(repoRoot) {
111
111
  try {
112
112
  const changelogPath = join(repoRoot, 'reference-impl', 'CHANGELOG.md');
113
113
  const changelog = readFileSync(changelogPath, 'utf-8');
114
- const pattern = new RegExp(`^##\\s+\\[?${version.replace(/\./g, '\\.')}[^\\n]*\\n([\\s\\S]*?)(?=^##\\s|$)`, 'm');
115
- const m = changelog.match(pattern);
116
- notes = m ? m[1].trim() : '';
114
+ const versionRegex = new RegExp(`^##\\s+\\[?${version.replace(/\./g, '\\.')}`, 'm');
115
+ const sections = changelog.split(/\n(?=## )/);
116
+ const match = sections.find((s) => versionRegex.test(s));
117
+ notes = match ? match.replace(/^[^\n]*\n/, '').trim() : '';
117
118
  }
118
119
  catch {
119
120
  notes = '';
@@ -159,9 +159,10 @@ export function runPreflightChecks(repoRoot: string): PreflightResult {
159
159
  try {
160
160
  const changelogPath = join(repoRoot, 'reference-impl', 'CHANGELOG.md');
161
161
  const changelog = readFileSync(changelogPath, 'utf-8');
162
- const pattern = new RegExp(`^##\\s+\\[?${version.replace(/\./g, '\\.')}[^\\n]*\\n([\\s\\S]*?)(?=^##\\s|$)`, 'm');
163
- const m = changelog.match(pattern);
164
- notes = m ? m[1].trim() : '';
162
+ const versionRegex = new RegExp(`^##\\s+\\[?${version.replace(/\./g, '\\.')}`, 'm');
163
+ const sections = changelog.split(/\n(?=## )/);
164
+ const match = sections.find((s) => versionRegex.test(s));
165
+ notes = match ? match.replace(/^[^\n]*\n/, '').trim() : '';
165
166
  } catch {
166
167
  notes = '';
167
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloverleaf/reference-impl",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Reference implementation of the Cloverleaf methodology as Claude Code skills. Implements the Tight Loop (Implementer + Reviewer).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@ description: Autonomous DAG walker for Cloverleaf Plans. Given a PLAN-ID in stat
12
12
  ```bash
13
13
  cd <repo_root>
14
14
  current=$(git rev-parse --abbrev-ref HEAD)
15
- if [ "$current" != "main" ]; then git checkout main; fi
15
+ if [ "$current" != "main" ]; then git -C <repo_root> checkout main; fi
16
16
  git status --short
17
17
  ```
18
18
 
@@ -146,15 +146,14 @@ description: Autonomous DAG walker for Cloverleaf Plans. Given a PLAN-ID in stat
146
146
 
147
147
  First, **guard against conflict markers** — scan every file changed on the task branch for unresolved conflict markers before attempting the merge:
148
148
  ```bash
149
- cd <repo_root>
150
- git checkout main
151
- CHANGED_FILES=$(git diff --name-only main..cloverleaf/<TASK-ID>)
149
+ git -C <repo_root> checkout main
150
+ CHANGED_FILES=$(git -C <repo_root> diff --name-only main..cloverleaf/<TASK-ID>)
152
151
  if [ -n "$CHANGED_FILES" ] && echo "$CHANGED_FILES" | xargs grep -l -E '^(<{7}|={7}|>{7})' 2>/dev/null | grep -q .; then
153
152
  echo "ERROR: conflict markers found in changed files — aborting merge for <TASK-ID>"
154
153
  echo "$CHANGED_FILES" | xargs grep -l -E '^(<{7}|={7}|>{7})' 2>/dev/null
155
154
  # Do NOT proceed; mark task escalated and surface to user
156
155
  else
157
- git merge --no-ff cloverleaf/<TASK-ID> -m "cloverleaf: <TASK-ID> merged (<fast_lane | full_pipeline>)"
156
+ git -C <repo_root> merge --no-ff cloverleaf/<TASK-ID> -m "cloverleaf: <TASK-ID> merged (<fast_lane | full_pipeline>)"
158
157
  fi
159
158
  ```
160
159
 
@@ -170,11 +169,11 @@ description: Autonomous DAG walker for Cloverleaf Plans. Given a PLAN-ID in stat
170
169
  cloverleaf-cli advance-status <repo_root> <TASK-ID> merged human final_approval_gate full_pipeline
171
170
  ```
172
171
  ```bash
173
- git add .cloverleaf/ && git commit -m "cloverleaf: <TASK-ID> merged"
172
+ git -C <repo_root> add .cloverleaf/ && git -C <repo_root> commit -m "cloverleaf: <TASK-ID> merged"
174
173
  ```
175
174
  Capture the merge commit SHA:
176
175
  ```bash
177
- MERGE_COMMIT=$(git rev-parse HEAD)
176
+ MERGE_COMMIT=$(git -C <repo_root> rev-parse HEAD)
178
177
  ```
179
178
  Immediately update walk-state to record the successful merge (bug #7 fix — walk-state must reflect `merged` state):
180
179
  ```bash
@@ -207,9 +206,9 @@ description: Autonomous DAG walker for Cloverleaf Plans. Given a PLAN-ID in stat
207
206
  Once all tasks are merged, run the following commands in order to tag and publish the release:
208
207
 
209
208
  ```bash
210
- git tag -a reference-impl-v<VERSION> -m "reference-impl v<VERSION>"
211
- git push origin main
212
- git push origin reference-impl-v<VERSION>
209
+ git -C <repo_root> tag -a reference-impl-v<VERSION> -m "reference-impl v<VERSION>"
210
+ git -C <repo_root> push origin main
211
+ git -C <repo_root> push origin reference-impl-v<VERSION>
213
212
  (cd reference-impl && npm publish --access public)
214
213
  gh release create reference-impl-v<VERSION> --title "reference-impl v<VERSION>" --notes-from-tag
215
214
  ```