@skilldeck/craft 0.1.0 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Design interrogation, hands-on TDD and deep-module refactoring: a grilling interview with a resumable decision log and capped question frontier, a TDD loop that fit-checks, confirms seams and enforces red-first, and a zero-dependency architecture scanner that ranks shallow modules by churn, fan-in, interface depth, pass-throughs and import cycles.",
5
5
  "author": {
6
6
  "name": "SkillDeck"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilldeck/craft",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Design craft for coding agents: grill a plan one question at a time with a resumable decision log, drive TDD loops with confirmed seams and pasted red output, and find shallow modules backed by churn, fan-in, interface-depth, pass-through and cycle metrics.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "LICENSE"
20
20
  ],
21
21
  "dependencies": {
22
- "@skilldeck/core": "^0.1.1"
22
+ "@skilldeck/core": "^1.0.0"
23
23
  },
24
24
  "engines": {
25
25
  "node": ">=20"
@@ -15,10 +15,11 @@
15
15
  // Exit 0 on success, 1 when the root can't be read, 2 on bad usage.
16
16
  // Zero dependencies. Node 20+.
17
17
 
18
+ import { realpathSync } from 'node:fs'
19
+ import { fileURLToPath } from 'node:url'
18
20
  import fs from 'node:fs'
19
21
  import path from 'node:path'
20
22
  import { spawnSync } from 'node:child_process'
21
- import { pathToFileURL } from 'node:url'
22
23
 
23
24
  const HELP = `arch-scan: rank shallow-module candidates with metrics
24
25
 
@@ -781,4 +782,11 @@ export function main(argv) {
781
782
  return 0
782
783
  }
783
784
 
784
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = main(process.argv.slice(2))
785
+ // Run only when this file is the entry point. Real paths are compared because
786
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
787
+ // skills folder), and then it never equals the module's own URL.
788
+ function isEntryPoint(url) {
789
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
790
+ }
791
+
792
+ if (isEntryPoint(import.meta.url)) process.exitCode = main(process.argv.slice(2))
@@ -20,9 +20,10 @@
20
20
  // 3 when adding would exceed the frontier cap.
21
21
  // Zero dependencies. Node 20+.
22
22
 
23
+ import { realpathSync } from 'node:fs'
24
+ import { fileURLToPath } from 'node:url'
23
25
  import fs from 'node:fs'
24
26
  import path from 'node:path'
25
- import { pathToFileURL } from 'node:url'
26
27
 
27
28
  const HELP = `decision-log: a resumable decision log for grilling a plan
28
29
 
@@ -331,4 +332,11 @@ export function main(argv) {
331
332
  }
332
333
  }
333
334
 
334
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = main(process.argv.slice(2))
335
+ // Run only when this file is the entry point. Real paths are compared because
336
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
337
+ // skills folder), and then it never equals the module's own URL.
338
+ function isEntryPoint(url) {
339
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
340
+ }
341
+
342
+ if (isEntryPoint(import.meta.url)) process.exitCode = main(process.argv.slice(2))