plumbbob 0.5.3 → 0.5.4
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/.claude-plugin/plugin.json +1 -1
- package/dist/lib/sidecar.js +3 -2
- package/dist/verbs/start.js +16 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plumbbob",
|
|
3
3
|
"displayName": "PlumbBob",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.4",
|
|
5
5
|
"description": "Attention-first build process — driver skills + a CLI that keep you the decider; guidance, not enforcement.",
|
|
6
6
|
"author": { "name": "Rob McLarty", "email": "hello@robmclarty.com", "url": "https://robmclarty.com" },
|
|
7
7
|
"homepage": "https://github.com/robmclarty/plumbbob#readme",
|
package/dist/lib/sidecar.js
CHANGED
|
@@ -27,8 +27,9 @@ export function buildDir(root, slug) {
|
|
|
27
27
|
// Derive a filesystem-safe slug from a build title: lowercased, every run of
|
|
28
28
|
// non-alphanumerics collapsed to a single hyphen, trimmed of leading/trailing
|
|
29
29
|
// hyphens. The CLI stays dumb and explicit (D38) — collision handling belongs to
|
|
30
|
-
// the caller (`start` refuses rather than silently suffixing `-2
|
|
31
|
-
//
|
|
30
|
+
// the caller (`start` refuses rather than silently suffixing `-2`, and prepends
|
|
31
|
+
// the `YYYY-MM-DD-` date that keeps `listBuilds`' lexical sort chronological). A
|
|
32
|
+
// title with no alphanumerics yields `''`, which the caller must reject or override.
|
|
32
33
|
export function slugify(title) {
|
|
33
34
|
return title
|
|
34
35
|
.toLowerCase()
|
package/dist/verbs/start.js
CHANGED
|
@@ -15,7 +15,7 @@ export function start(cwd, args) {
|
|
|
15
15
|
const allowDirty = args.includes('--allow-dirty');
|
|
16
16
|
const local = args.includes('--local');
|
|
17
17
|
const title = (positionals[0] ?? '').trim();
|
|
18
|
-
const slug = (flagValue(args, '--slug') ??
|
|
18
|
+
const slug = (flagValue(args, '--slug') ?? datedSlug(title)).trim();
|
|
19
19
|
if (title.length === 0) {
|
|
20
20
|
process.stderr.write('plumbbob: start needs a title. Try: plumbbob start "what you are building".\n');
|
|
21
21
|
return 1;
|
|
@@ -55,8 +55,8 @@ export function start(cwd, args) {
|
|
|
55
55
|
// D26: `--local` keeps today's fully-untracked flat layout (whole `.plumbbob/`
|
|
56
56
|
// excluded); the default plants a tracked, PR-riding `builds/<slug>/` folder
|
|
57
57
|
// (D26) and points the per-worktree cursor at it (D28), excluding only control
|
|
58
|
-
// files (D17). The slug is
|
|
59
|
-
// suffixes (D38).
|
|
58
|
+
// files (D17). The slug is date-prefixed when derived (see datedSlug) and
|
|
59
|
+
// validated unique above — the CLI refuses, never suffixes (D38).
|
|
60
60
|
let intentLocation;
|
|
61
61
|
if (local) {
|
|
62
62
|
writeFileSync(checkpointsPath(root), `baseline ${sha}\n`);
|
|
@@ -78,6 +78,19 @@ export function start(cwd, args) {
|
|
|
78
78
|
process.stdout.write(`plumbbob: started "${title}" — baseline ${sha.slice(0, 9)}. Frame and decide in ${intentLocation}; \`build\` a step once the decisions are made.\n`);
|
|
79
79
|
return 0;
|
|
80
80
|
}
|
|
81
|
+
// Derived slugs carry a `YYYY-MM-DD-` prefix (local time) so `builds/` sorts
|
|
82
|
+
// chronologically under `listBuilds`' plain lexical sort — ordering by
|
|
83
|
+
// construction, not by titling convention. An explicit `--slug` stays verbatim
|
|
84
|
+
// (D38: the CLI never rewrites what the caller chose). An untitleable title
|
|
85
|
+
// yields `''` so the empty-slug guard fires instead of minting a date-only slug.
|
|
86
|
+
function datedSlug(title) {
|
|
87
|
+
const base = slugify(title);
|
|
88
|
+
if (base.length === 0)
|
|
89
|
+
return '';
|
|
90
|
+
const now = new Date();
|
|
91
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
92
|
+
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}-${base}`;
|
|
93
|
+
}
|
|
81
94
|
// Read the value that follows a `--flag` in argv (e.g. `--slug my-build`), or
|
|
82
95
|
// undefined when the flag is absent or trails with no value.
|
|
83
96
|
function flagValue(args, flag) {
|