devlyn-cli 1.14.0 → 1.15.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.
Files changed (22) hide show
  1. package/CLAUDE.md +28 -149
  2. package/config/skills/devlyn:auto-resolve/SKILL.md +165 -515
  3. package/config/skills/devlyn:auto-resolve/evals/evals.json +21 -0
  4. package/config/skills/devlyn:auto-resolve/evals/task-doctor-subcommand.md +42 -0
  5. package/config/skills/devlyn:auto-resolve/references/build-gate.md +36 -22
  6. package/config/skills/devlyn:auto-resolve/references/engine-routing.md +43 -165
  7. package/config/skills/devlyn:auto-resolve/references/findings-schema.md +103 -0
  8. package/config/skills/devlyn:auto-resolve/references/phases/phase-1-build.md +54 -0
  9. package/config/skills/devlyn:auto-resolve/references/phases/phase-2-evaluate.md +45 -0
  10. package/config/skills/devlyn:auto-resolve/references/phases/phase-3-critic.md +84 -0
  11. package/config/skills/devlyn:auto-resolve/references/pipeline-routing.md +114 -0
  12. package/config/skills/devlyn:auto-resolve/references/pipeline-state.md +201 -0
  13. package/config/skills/devlyn:auto-resolve/scripts/archive_run.py +104 -0
  14. package/config/skills/devlyn:auto-resolve/scripts/terminal_verdict.py +96 -0
  15. package/config/skills/devlyn:ideate/SKILL.md +12 -64
  16. package/config/skills/devlyn:ideate/references/codex-critic-template.md +42 -0
  17. package/config/skills/devlyn:preflight/SKILL.md +25 -40
  18. package/config/skills/devlyn:preflight/references/auditors/code-auditor.md +6 -10
  19. package/config/skills/devlyn:reap/SKILL.md +104 -0
  20. package/config/skills/devlyn:reap/scripts/reap.sh +129 -0
  21. package/config/skills/devlyn:reap/scripts/scan.sh +116 -0
  22. package/package.json +5 -1
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env bash
2
+ # devlyn:reap — scan orphan processes by safe-to-kill category.
3
+ # Read-only. Never kills anything. Always exits 0 on success.
4
+ #
5
+ # Output format: one TSV line per category with
6
+ # CATEGORY COUNT OLDEST_ETIME PIDS NOTE
7
+ # Followed by an "UNKNOWN_ORPHANS" line reporting non-system orphans we
8
+ # deliberately left out of the whitelist — these will NOT be touched by reap.sh.
9
+
10
+ set -u
11
+ LC_ALL=C
12
+ export LC_ALL
13
+
14
+ # PPID=1 user-owned processes. Column layout: PID PPID ETIME COMMAND...
15
+ ME="$(id -un)"
16
+ SNAPSHOT="$(ps -eo pid=,ppid=,user=,etime=,command= 2>/dev/null | awk -v me="$ME" '$2==1 && $3==me')"
17
+
18
+ # -----------------------------------------------------------------------------
19
+ # Category matchers (grep -E patterns). These target processes that are KNOWN
20
+ # to leak from specific tools that do not reap their children on exit.
21
+ # Conservative by design — if unsure, leave it UNKNOWN.
22
+ # -----------------------------------------------------------------------------
23
+ match_telegram_bun() { grep -E '/bun[^ ]* server\.ts( |$)'; }
24
+ match_superset_codex_sh() { grep -E '/bin/bash .*/\.superset/bin/codex( |$)'; }
25
+ match_superset_codex_tl() { grep -E 'tail .*superset-codex-session-.*\.jsonl'; }
26
+ match_workerd_dev() { grep -E '@cloudflare/workerd-darwin-[^/]+/bin/workerd serve '; }
27
+
28
+ emit() {
29
+ local name="$1"; shift
30
+ local note="$1"; shift
31
+ local lines; lines="$(cat)"
32
+ local count; count="$(printf '%s\n' "$lines" | grep -c . || true)"
33
+ if [ "${count:-0}" -eq 0 ]; then
34
+ printf '%-24s\t0\t-\t-\t%s\n' "$name" "$note"
35
+ return
36
+ fi
37
+ local pids oldest
38
+ # ps column order is: pid ppid user etime command...
39
+ pids="$(printf '%s\n' "$lines" | awk '{print $1}' | paste -sd, -)"
40
+ oldest="$(printf '%s\n' "$lines" | awk '{print $4}' | sort -r | head -1)"
41
+ printf '%-24s\t%s\t%s\t%s\t%s\n' "$name" "$count" "$oldest" "$pids" "$note"
42
+ }
43
+
44
+ printf 'CATEGORY \tCOUNT\tOLDEST\tPIDS\tNOTE\n'
45
+
46
+ # Verify the bun server belongs to the telegram plugin before classifying it.
47
+ # cwd is the reliable signal; command line alone is ambiguous.
48
+ TELEGRAM_PIDS=""
49
+ if [ -n "$SNAPSHOT" ]; then
50
+ BUN_CANDIDATES="$(printf '%s\n' "$SNAPSHOT" | match_telegram_bun | awk '{print $1}')"
51
+ for pid in $BUN_CANDIDATES; do
52
+ cwd="$(lsof -a -d cwd -p "$pid" 2>/dev/null | awk 'NR==2 {for(i=9;i<=NF;i++) printf "%s ", $i; print ""}')"
53
+ case "$cwd" in
54
+ *"/plugins/cache/claude-plugins-official/telegram/"*)
55
+ TELEGRAM_PIDS="${TELEGRAM_PIDS}${pid}
56
+ " ;;
57
+ esac
58
+ done
59
+ fi
60
+
61
+ if [ -n "$TELEGRAM_PIDS" ]; then
62
+ # Reconstruct rows for accurate ETIME/command display.
63
+ printf '%s' "$TELEGRAM_PIDS" | grep -v '^$' | while read -r pid; do
64
+ printf '%s\n' "$SNAPSHOT" | awk -v p="$pid" '$1==p'
65
+ done | emit "telegram-bun" "cwd=.../telegram/ plugin — safe"
66
+ else
67
+ printf '' | emit "telegram-bun" "cwd=.../telegram/ plugin — safe"
68
+ fi
69
+
70
+ printf '%s\n' "$SNAPSHOT" | match_superset_codex_sh | emit \
71
+ "superset-codex-bash" ".superset/bin/codex wrapper leak — safe"
72
+ printf '%s\n' "$SNAPSHOT" | match_superset_codex_tl | emit \
73
+ "superset-codex-tail" "superset-codex-session-*.jsonl tail — safe"
74
+ printf '%s\n' "$SNAPSHOT" | match_workerd_dev | emit \
75
+ "workerd-dev" "cloudflare dev server — opt-in (include=workerd)"
76
+
77
+ # -----------------------------------------------------------------------------
78
+ # UNKNOWN_ORPHANS: everything else that is PPID=1 and user-owned. Informational
79
+ # only. These will NOT be killed without a human explicitly extending the
80
+ # whitelist. macOS system helpers (launchd, /usr/libexec/**, Application
81
+ # bundles, Electron helpers, etc.) are filtered out — they're not orphans in
82
+ # the leak sense, they legitimately run under launchd.
83
+ # -----------------------------------------------------------------------------
84
+ SYSTEM_FILTER='(^|/)(launchd|aslmanager|cloudphotod|automountd|autofsd|usernotificationsd|voicebankingd|veraport)( |$)|^/System/|^/usr/libexec/|^/usr/sbin/|^/Library/Apple|^/Library/Developer/PrivateFrameworks/CoreSimulator|^/Library/PrivilegedHelperTools/|^/Applications/|CoreSimulator|raonsecure|TEK_|ChatGPTHelper|FigmaAgent|figma_agent|iniLINE|CrossEX|com\.apple\.|Superset Helper|Electron Framework|QuickLookUIService|SandboxHelper|MTLCompilerService|extensionkitservice|ssh-agent|Squirrel|app-server-broker\.mjs'
85
+
86
+ UNKNOWN="$(printf '%s\n' "$SNAPSHOT" \
87
+ | grep -Ev "$SYSTEM_FILTER" \
88
+ | awk '{printf "%s\t", $1; for(i=5;i<=NF;i++) printf "%s ", $i; print ""}')"
89
+
90
+ # Strip already-whitelisted categories from the UNKNOWN set so we don't
91
+ # double-count them.
92
+ WHITELIST_PIDS="$( {
93
+ printf '%s' "$TELEGRAM_PIDS"
94
+ printf '%s\n' "$SNAPSHOT" | match_superset_codex_sh | awk '{print $1}'
95
+ printf '%s\n' "$SNAPSHOT" | match_superset_codex_tl | awk '{print $1}'
96
+ printf '%s\n' "$SNAPSHOT" | match_workerd_dev | awk '{print $1}'
97
+ } | grep -v '^$' | sort -u)"
98
+
99
+ printf '\nUNKNOWN_ORPHANS (informational — NOT killed by reap.sh):\n'
100
+ if [ -z "$UNKNOWN" ]; then
101
+ printf ' (none)\n'
102
+ else
103
+ # awk can't take a multi-line string via -v (literal newlines are rejected),
104
+ # so pass the whitelist as a temp file instead.
105
+ WL_TMP="$(mktemp -t devlyn-reap-wl)"
106
+ # shellcheck disable=SC2064
107
+ trap "rm -f '$WL_TMP'" EXIT
108
+ printf '%s\n' "$WHITELIST_PIDS" > "$WL_TMP"
109
+ printf '%s\n' "$UNKNOWN" | awk -v wlf="$WL_TMP" '
110
+ BEGIN {
111
+ while ((getline line < wlf) > 0) if (line != "") wh[line]=1
112
+ close(wlf)
113
+ }
114
+ { if (!($1 in wh)) print " " $0 }
115
+ '
116
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlyn-cli",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "AI development toolkit for Claude Code — ideate, auto-resolve, and ship with context engineering and agent orchestration",
5
5
  "homepage": "https://github.com/fysoul17/devlyn-cli#readme",
6
6
  "bin": {
@@ -13,6 +13,10 @@
13
13
  "!config/skills/preflight-workspace/**",
14
14
  "!config/skills/devlyn:ideate-workspace",
15
15
  "!config/skills/devlyn:ideate-workspace/**",
16
+ "!config/skills/devlyn:auto-resolve-workspace",
17
+ "!config/skills/devlyn:auto-resolve-workspace/**",
18
+ "!config/skills/roadmap-archival-workspace",
19
+ "!config/skills/roadmap-archival-workspace/**",
16
20
  "agents-config",
17
21
  "optional-skills",
18
22
  "CLAUDE.md"