@jabworks/condux 0.24.0 → 0.24.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jabworks/condux",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "OpenCode plugin for the condux workflow toolkit — bundles the condux skills and injects the specialist agents (coder, explorer, planner, researcher) plus an opt-in plan-review listener.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -21,11 +21,14 @@ mkdir -p "$SCRATCH_DIR"
21
21
  SLUG=$(basename "$PLAN_FILE" .md)
22
22
  BRIEF_FILE="$SCRATCH_DIR/${SLUG}-task-${TASK_N}-brief.md"
23
23
 
24
+ # A card is a `## Task N:` heading (draft-plan's plan-template.md) or the older
25
+ # `### Task N:`. The card ends at the next card of either shape, or at any
26
+ # other `## ` section — a trailing "## Verification" is not part of the brief.
24
27
  awk -v n="$TASK_N" '
25
28
  BEGIN { found = 0 }
26
- /^### Task [0-9]+:/ {
29
+ /^##+ Task [0-9]+:/ || /^## / {
27
30
  if (found) exit
28
- if ($0 ~ ("^### Task " n ":")) { found = 1 }
31
+ if ($0 ~ ("^##+ Task " n ":")) { found = 1 }
29
32
  }
30
33
  found { print }
31
34
  ' "$PLAN_FILE" > "$BRIEF_FILE"
@@ -23,7 +23,7 @@ to place the spec.
23
23
  {feature-slug}/ # cross-cutting, or scaffolded from the repo root
24
24
  apps/web/
25
25
  {feature-slug}/ # scaffolded while working in apps/web
26
- index.md # purpose, TOC, last updated, commit hash, changelog ← scaffold creates this
26
+ index.md # purpose, TOC, last updated, PR stamp, changelog ← scaffold creates this
27
27
  decisions.md # Design decisions with context + rationale
28
28
  api.md # Endpoints, types, external APIs consumed
29
29
  fields.md # Field mappings: BE/3rd-party → UI, or forwarding chains
@@ -86,10 +86,16 @@ bash path/to/skill/references/scaffold.sh "WanConfig"
86
86
  ```
87
87
 
88
88
  The script outputs one line:
89
- - `created:/abs/path/to/specs/wan-config commit:abc1234 date:2026-06-24` — new spec, `index.md` written
90
- - `exists:/abs/path/to/specs/wan-config commit:abc1234 date:2026-06-24` — spec already exists
89
+ - `created:/abs/path/to/specs/wan-config date:2026-06-24 commit:PR #pending` — new spec, `index.md` written
90
+ - `exists:/abs/path/to/specs/wan-config date:2026-06-24 commit:PR #pending` — spec already exists
91
91
 
92
- Parse `commit`, `date`, and the **absolute spec path** from the output — use the absolute path when writing content files and launching the preview server.
92
+ Parse `date` and the **absolute spec path** from the output — use the absolute path when writing content files and launching the preview server.
93
+
94
+ The `**Commit:**` stamp names the PR that carries the change (`PR #153`), never
95
+ a commit hash: a hash written on a feature branch is orphaned by the
96
+ squash-merge that lands it, so it resolves only in clones that had the branch.
97
+ The scaffold writes `PR #pending`; replace it with the number once the PR is
98
+ open, and use the same form in changelog lines.
93
99
 
94
100
  ## After Scaffold: Writing Content Files
95
101
 
@@ -131,7 +137,7 @@ path that resolves nowhere.
131
137
  When scaffold output is `exists:`:
132
138
  1. Read `index.md` to see current state and which files exist
133
139
  2. Update only files with new or changed content
134
- 3. Bump `Last updated` and `Commit` in `index.md` using values from scaffold output
140
+ 3. Bump `Last updated` in `index.md` from scaffold output; set `Commit` to the PR carrying this change (`PR #pending` until it is open)
135
141
  4. Append to the `## Changelog` in `index.md`
136
142
 
137
143
  ## Live HTML Preview & Review (Optional)
@@ -188,7 +194,8 @@ feedback file, if a decision is submitted).
188
194
  | Mistake | Fix |
189
195
  |---------|-----|
190
196
  | Skipping the notification/confirmation | Always announce before writing, wait for approval |
191
- | Not using scaffold output for date/commit | Parse them from the script — don't run git separately |
197
+ | Not using scaffold output for the date | Parse it from the script — don't run git separately |
198
+ | Stamping a commit hash | The stamp is `PR #N` — a branch hash is orphaned by squash-merge; `PR #pending` until the PR is open |
192
199
  | Rewriting all files on update | Read `index.md` first, only touch files with new content |
193
200
  | Vague decisions | Each decision needs context + rationale + consequences |
194
201
  | Creating empty placeholder files | Only create a file when it has real content |
@@ -38,7 +38,12 @@ if [[ -z "$SLUG" || ! "$SLUG" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
38
38
  fi
39
39
 
40
40
  DATE=$(date +%Y-%m-%d)
41
- COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "no-git")
41
+ # The stamp names the PR that carries the spec, not a commit. A hash taken
42
+ # here is HEAD on a feature branch, and a squash-merge orphans it the moment
43
+ # the PR lands — it resolves only in clones that had the branch. The PR number
44
+ # is not known until the PR is open, so the scaffold writes a placeholder for
45
+ # the author to replace; a spec still stamped `PR #pending` is unfinished.
46
+ COMMIT="PR #pending"
42
47
  REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
43
48
  [[ -z "$REPO_ROOT" ]] && REPO_ROOT="${PWD}"
44
49
 
@@ -76,7 +81,7 @@ case "$SPEC_DIR" in
76
81
  esac
77
82
 
78
83
  if [[ -d "$SPEC_DIR" ]]; then
79
- echo "exists:$SPEC_DIR commit:$COMMIT date:$DATE"
84
+ echo "exists:$SPEC_DIR date:$DATE commit:$COMMIT"
80
85
  exit 0
81
86
  fi
82
87
 
@@ -110,4 +115,4 @@ cat > "$SPEC_DIR/index.md" <<EOF
110
115
  - $DATE ($COMMIT): Initial spec
111
116
  EOF
112
117
 
113
- echo "created:$SPEC_DIR commit:$COMMIT date:$DATE"
118
+ echo "created:$SPEC_DIR date:$DATE commit:$COMMIT"
@@ -20,7 +20,7 @@ follow. Write each table row as a claim someone could check, not a label.
20
20
  > shows for the spec — without it the spec is listed with no description.
21
21
 
22
22
  **Last updated:** {YYYY-MM-DD}
23
- **Commit:** {short-hash}
23
+ **Commit:** PR #{N}
24
24
  **Status:** draft | review | stable
25
25
 
26
26
  ## Contents
@@ -31,9 +31,14 @@ follow. Write each table row as a claim someone could check, not a label.
31
31
  | [Quirks](quirks.md) | what will bite you, and whether it is mitigated |
32
32
 
33
33
  ## Changelog
34
- - {YYYY-MM-DD} ({short-hash}): Initial spec
34
+ - {YYYY-MM-DD} (PR #{N}): Initial spec
35
35
  ```
36
36
 
37
+ The stamp names the PR that carries the change, never a commit hash: a hash
38
+ written on a feature branch is orphaned by the squash-merge that lands it.
39
+ The scaffold writes `PR #pending`; replace it once the PR is open, and use the
40
+ same form in changelog lines.
41
+
37
42
  The Contents table answers *which file do I open* — one row per concern file
38
43
  that actually exists, each `Answers` cell saying what a reader comes to it
39
44
  for. Files that don't exist get no row.