elliot-stack 1.0.36 → 1.0.37

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 (81) hide show
  1. package/LICENSE +21 -21
  2. package/bin/install.cjs +981 -981
  3. package/hooks/repo-search-nudge.js +32 -32
  4. package/package.json +1 -1
  5. package/skills/estack-active-learning-tutor/SKILL.md +339 -339
  6. package/skills/estack-better-title/SKILL.md +64 -64
  7. package/skills/estack-better-title/scripts/rename.sh +55 -55
  8. package/skills/estack-chris-voss/SKILL.md +80 -80
  9. package/skills/estack-chris-voss/references/elliot-notes.md +120 -120
  10. package/skills/estack-chris-voss/references/voss-principles.md +210 -210
  11. package/skills/estack-customer-discovery/SKILL.md +60 -60
  12. package/skills/estack-flight-planner/SKILL.md +332 -332
  13. package/skills/estack-flight-planner/references/config_schema.md +156 -156
  14. package/skills/estack-flight-planner/references/flight_history_schema.md +97 -97
  15. package/skills/estack-flight-planner/references/shuttle_schedules.md +98 -98
  16. package/skills/estack-flight-planner/scripts/check_setup.sh +89 -89
  17. package/skills/estack-flight-planner/scripts/fetch_flights.py +99 -99
  18. package/skills/estack-flight-planner/scripts/filter_flights.py +265 -265
  19. package/skills/estack-flight-planner/scripts/pair_shuttles.py +173 -173
  20. package/skills/estack-github-issue-tracker/SKILL.md +322 -322
  21. package/skills/estack-github-issue-tracker/bin/tracker-tools.cjs +1358 -1358
  22. package/skills/estack-github-issue-tracker/references/gh-cli-patterns.md +124 -124
  23. package/skills/estack-github-issue-tracker/references/result-file-schema.md +156 -156
  24. package/skills/estack-github-issue-tracker/references/tracker-schema.md +96 -96
  25. package/skills/estack-github-issue-tracker/tracker-template.md +58 -58
  26. package/skills/estack-leadership-coach/SKILL.md +1 -1
  27. package/skills/estack-leadership-coach/adding-references.md +1 -1
  28. package/skills/estack-migrate-claude-session-history/SKILL.md +15 -2
  29. package/skills/estack-pdf-to-md/SKILL.md +1 -2
  30. package/skills/estack-prompt-builder-coach/SKILL.md +81 -81
  31. package/skills/estack-prompt-builder-coach/definition-of-done-generator.md +42 -42
  32. package/skills/estack-prompt-builder-coach/prompt-builder.md +37 -37
  33. package/skills/estack-prompt-builder-coach/task-shaper.md +36 -36
  34. package/skills/estack-prompt-builder-coach/vague-ask-auditor.md +37 -37
  35. package/skills/estack-read-claude-session-history/SKILL.md +224 -204
  36. package/skills/estack-read-claude-session-history/references/jsonl-schema.md +126 -126
  37. package/skills/estack-read-claude-session-history/references/modes.md +423 -423
  38. package/skills/estack-read-claude-session-history/references/recipes.md +271 -271
  39. package/skills/estack-read-claude-session-history/scripts/lib/__init__.py +1 -1
  40. package/skills/estack-read-claude-session-history/scripts/lib/parser.py +460 -460
  41. package/skills/estack-read-claude-session-history/scripts/lib/paths.py +234 -234
  42. package/skills/estack-read-claude-session-history/scripts/lib/search.py +179 -179
  43. package/skills/estack-read-claude-session-history/scripts/lib/subagents.py +88 -88
  44. package/skills/estack-read-claude-session-history/scripts/lib/tools.py +144 -144
  45. package/skills/estack-read-claude-session-history/scripts/read_transcript.py +1776 -1776
  46. package/skills/estack-read-claude-session-history/scripts/tests/conftest.py +40 -40
  47. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/README.md +20 -20
  48. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/all-noise.jsonl +4 -4
  49. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/basic-session.jsonl +2 -2
  50. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-gaps.jsonl +9 -9
  51. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-noise.jsonl +7 -7
  52. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-a.jsonl +3 -3
  53. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-b.jsonl +3 -3
  54. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-waiting.jsonl +5 -5
  55. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/interrupted.jsonl +2 -2
  56. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/multi-compact.jsonl +8 -8
  57. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/pending-user.jsonl +2 -2
  58. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta/subagents/agent-aaa.jsonl +2 -2
  59. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta.jsonl +2 -2
  60. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.jsonl +2 -2
  61. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.meta.json +1 -1
  62. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent.jsonl +4 -4
  63. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/time-spread.jsonl +6 -6
  64. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/timeline-day-test.jsonl +5 -5
  65. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/tool-zoo.jsonl +10 -10
  66. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/truncated.jsonl +2 -2
  67. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/unicode.jsonl +2 -2
  68. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-advisor.jsonl +3 -3
  69. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-compact.jsonl +5 -5
  70. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-thinking.jsonl +2 -2
  71. package/skills/estack-read-claude-session-history/scripts/tests/test_backup_roots.py +56 -56
  72. package/skills/estack-read-claude-session-history/scripts/tests/test_engagement.py +239 -239
  73. package/skills/estack-read-claude-session-history/scripts/tests/test_json_format.py +201 -201
  74. package/skills/estack-read-claude-session-history/scripts/tests/test_modes.py +199 -199
  75. package/skills/estack-read-claude-session-history/scripts/tests/test_parser.py +195 -195
  76. package/skills/estack-read-claude-session-history/scripts/tests/test_paths.py +133 -133
  77. package/skills/estack-read-claude-session-history/scripts/tests/test_search.py +78 -78
  78. package/skills/estack-read-claude-session-history/scripts/tests/test_subagents.py +43 -43
  79. package/skills/estack-read-claude-session-history/scripts/tests/test_timeline.py +179 -179
  80. package/skills/estack-read-claude-session-history/scripts/tests/test_timezone_and_project.py +212 -212
  81. package/skills/estack-read-claude-session-history/scripts/tests/test_tools.py +80 -80
@@ -1,173 +1,173 @@
1
- """
2
- Pair filtered flights with the best shuttle option and output a ranked
3
- markdown plans table.
4
-
5
- Inputs:
6
- --flights-json JSON list from filter_flights.py (file path or "-" for stdin)
7
- --shuttles-json JSON dict with "shuttles" array (see references/shuttle_schedules.md)
8
- --shuttle-costs Comma-separated AIRPORT:USD list (e.g. "ORD:60,IND:30"). Each
9
- airport in your shuttle config must be listed here.
10
- --tz-offsets Comma-separated AIRPORT:OFFSET_MIN list relative to home/origin
11
- timezone (e.g. "ORD:-60,MDW:-60"). Airports omitted assume 0
12
- (same timezone as the shuttle's `departs_local` zone).
13
- --min-buffer-min Min minutes between shuttle arrival at airport and flight
14
- departure. Default 90 (1.5h).
15
- --max-wait-min Max acceptable wait at airport. Default 240 (4h).
16
-
17
- Output: markdown table on stdout, one row per flight, sorted by viability
18
- then total cost then departure time.
19
-
20
- Timezones: shuttle entries record departure time in the home timezone
21
- (`departs_local`) and arrival time in the airport's local timezone
22
- (`arrives_local`). Pass --tz-offsets so this script can compare them on a
23
- single timeline for buffer math.
24
- """
25
- import argparse
26
- import json
27
- import sys
28
-
29
-
30
- def parse_kv_int(csv: str, value_label: str):
31
- """Parse "KEY:VAL,KEY:VAL" into a dict[str,int]."""
32
- out = {}
33
- if not csv:
34
- return out
35
- for item in csv.split(","):
36
- item = item.strip()
37
- if not item:
38
- continue
39
- if ":" not in item:
40
- print(f"ERROR: bad {value_label} entry {item!r} — expected KEY:VAL", file=sys.stderr)
41
- sys.exit(2)
42
- k, v = item.split(":", 1)
43
- try:
44
- out[k.strip()] = int(v.strip())
45
- except ValueError:
46
- print(f"ERROR: {value_label} {k!r} value {v!r} is not an int", file=sys.stderr)
47
- sys.exit(2)
48
- return out
49
-
50
-
51
- def hm_to_min(hm: str) -> int:
52
- h, m = hm.split(":")
53
- return int(h) * 60 + int(m)
54
-
55
-
56
- def viability(buffer_min: int, min_buffer: int, max_wait: int) -> str:
57
- if buffer_min < min_buffer:
58
- return "TOO_TIGHT"
59
- if buffer_min > max_wait:
60
- return "LONG_WAIT"
61
- if buffer_min < min_buffer + 30:
62
- return "TIGHT"
63
- if buffer_min <= min_buffer + 90:
64
- return "COMFORTABLE"
65
- return "GENEROUS"
66
-
67
-
68
- VIABILITY_RANK = {"COMFORTABLE": 0, "GENEROUS": 1, "TIGHT": 2, "LONG_WAIT": 3, "TOO_TIGHT": 4}
69
- VIABILITY_NOTE = {
70
- "COMFORTABLE": "Comfortable buffer",
71
- "GENEROUS": "Comfortable, longer wait",
72
- "TIGHT": "Tight - runs on shuttle being on time",
73
- "LONG_WAIT": "Long airport wait",
74
- "TOO_TIGHT": "Too tight - not viable",
75
- }
76
-
77
-
78
- def to_home_min(time_local: str, airport: str, tz_offsets: dict) -> int:
79
- """Convert a local-airport HH:MM into home-timezone-equivalent minutes."""
80
- return hm_to_min(time_local) - tz_offsets.get(airport, 0)
81
-
82
-
83
- def best_shuttle_for_flight(flight, shuttles, min_buffer, max_wait, tz_offsets):
84
- """Pick the shuttle with the best viability score for this flight."""
85
- dep_airport = flight["from"]
86
- flight_dep_min = to_home_min(flight["departs"], dep_airport, tz_offsets)
87
- candidates = []
88
- for s in shuttles:
89
- if s.get("to") != dep_airport:
90
- continue
91
- arr = s.get("arrives_local", "")
92
- if not arr:
93
- continue
94
- shuttle_arr_min = to_home_min(arr, dep_airport, tz_offsets)
95
- buffer = flight_dep_min - shuttle_arr_min
96
- if buffer < 0:
97
- continue # shuttle arrives after flight leaves
98
- v = viability(buffer, min_buffer, max_wait)
99
- candidates.append((VIABILITY_RANK[v], buffer, v, s))
100
- if not candidates:
101
- return None, None, None
102
- candidates.sort(key=lambda c: c[0])
103
- _, buf, v, s = candidates[0]
104
- return s, buf, v
105
-
106
-
107
- def main() -> int:
108
- p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
109
- p.add_argument("--flights-json", required=True, help="Path to filter_flights.py output, or '-' for stdin")
110
- p.add_argument("--shuttles-json", required=True)
111
- p.add_argument("--shuttle-costs", default="",
112
- help='Comma-separated "AIRPORT:USD" pairs (e.g. "ORD:60,IND:30")')
113
- p.add_argument("--tz-offsets", default="",
114
- help='Comma-separated "AIRPORT:OFFSET_MIN" pairs relative to home tz')
115
- p.add_argument("--min-buffer-min", type=int, default=90)
116
- p.add_argument("--max-wait-min", type=int, default=240)
117
- args = p.parse_args()
118
-
119
- shuttle_costs = parse_kv_int(args.shuttle_costs, "--shuttle-costs")
120
- tz_offsets = parse_kv_int(args.tz_offsets, "--tz-offsets")
121
-
122
- if args.flights_json == "-":
123
- flights = json.load(sys.stdin)
124
- else:
125
- with open(args.flights_json, encoding="utf-8") as f:
126
- flights = json.load(f)
127
-
128
- with open(args.shuttles_json, encoding="utf-8") as f:
129
- shuttles = json.load(f).get("shuttles", [])
130
-
131
- rows = []
132
- for fl in flights:
133
- s, buf, v = best_shuttle_for_flight(
134
- fl, shuttles, args.min_buffer_min, args.max_wait_min, tz_offsets,
135
- )
136
- if s is None:
137
- continue
138
- shuttle_cost = shuttle_costs.get(fl["from"], 0)
139
- total = (fl["price"] or 0) + shuttle_cost
140
- rows.append({
141
- "flight": fl, "shuttle": s, "buffer_min": buf, "viability": v,
142
- "shuttle_cost": shuttle_cost, "total": total,
143
- })
144
-
145
- # Sort: viability tier, then priority band, then total cost, then departure time
146
- rows.sort(key=lambda r: (
147
- VIABILITY_RANK[r["viability"]],
148
- r.get("flight", {}).get("priority_band", 0),
149
- r["total"],
150
- r["flight"]["departs"],
151
- ))
152
-
153
- if not rows:
154
- print("(no viable flight+shuttle pairings)")
155
- return 0
156
-
157
- print("| # | Date | Flight | From | To | Departs | Arrives | Shuttle | Shuttle Departs | Buffer | Flight $ | Shuttle $ | **Total** | Notes |")
158
- print("|---|---|---|---|---|---|---|---|---|---|---|---|---|---|")
159
- for i, r in enumerate(rows, 1):
160
- f = r["flight"]; s = r["shuttle"]
161
- depart_label = s.get("departs_local") or s.get("departs_et") or "?"
162
- print(
163
- f"| {i} | {f['date']} | {f['flight']} | {f['from']} | {f['to']} | "
164
- f"{f['departs']} | {f['arrives']} | {s.get('company','?')} | "
165
- f"{depart_label} | {r['buffer_min']} min | "
166
- f"${f['price']} | ${r['shuttle_cost']} | **${r['total']}** | "
167
- f"{VIABILITY_NOTE[r['viability']]} |"
168
- )
169
- return 0
170
-
171
-
172
- if __name__ == "__main__":
173
- sys.exit(main())
1
+ """
2
+ Pair filtered flights with the best shuttle option and output a ranked
3
+ markdown plans table.
4
+
5
+ Inputs:
6
+ --flights-json JSON list from filter_flights.py (file path or "-" for stdin)
7
+ --shuttles-json JSON dict with "shuttles" array (see references/shuttle_schedules.md)
8
+ --shuttle-costs Comma-separated AIRPORT:USD list (e.g. "ORD:60,IND:30"). Each
9
+ airport in your shuttle config must be listed here.
10
+ --tz-offsets Comma-separated AIRPORT:OFFSET_MIN list relative to home/origin
11
+ timezone (e.g. "ORD:-60,MDW:-60"). Airports omitted assume 0
12
+ (same timezone as the shuttle's `departs_local` zone).
13
+ --min-buffer-min Min minutes between shuttle arrival at airport and flight
14
+ departure. Default 90 (1.5h).
15
+ --max-wait-min Max acceptable wait at airport. Default 240 (4h).
16
+
17
+ Output: markdown table on stdout, one row per flight, sorted by viability
18
+ then total cost then departure time.
19
+
20
+ Timezones: shuttle entries record departure time in the home timezone
21
+ (`departs_local`) and arrival time in the airport's local timezone
22
+ (`arrives_local`). Pass --tz-offsets so this script can compare them on a
23
+ single timeline for buffer math.
24
+ """
25
+ import argparse
26
+ import json
27
+ import sys
28
+
29
+
30
+ def parse_kv_int(csv: str, value_label: str):
31
+ """Parse "KEY:VAL,KEY:VAL" into a dict[str,int]."""
32
+ out = {}
33
+ if not csv:
34
+ return out
35
+ for item in csv.split(","):
36
+ item = item.strip()
37
+ if not item:
38
+ continue
39
+ if ":" not in item:
40
+ print(f"ERROR: bad {value_label} entry {item!r} — expected KEY:VAL", file=sys.stderr)
41
+ sys.exit(2)
42
+ k, v = item.split(":", 1)
43
+ try:
44
+ out[k.strip()] = int(v.strip())
45
+ except ValueError:
46
+ print(f"ERROR: {value_label} {k!r} value {v!r} is not an int", file=sys.stderr)
47
+ sys.exit(2)
48
+ return out
49
+
50
+
51
+ def hm_to_min(hm: str) -> int:
52
+ h, m = hm.split(":")
53
+ return int(h) * 60 + int(m)
54
+
55
+
56
+ def viability(buffer_min: int, min_buffer: int, max_wait: int) -> str:
57
+ if buffer_min < min_buffer:
58
+ return "TOO_TIGHT"
59
+ if buffer_min > max_wait:
60
+ return "LONG_WAIT"
61
+ if buffer_min < min_buffer + 30:
62
+ return "TIGHT"
63
+ if buffer_min <= min_buffer + 90:
64
+ return "COMFORTABLE"
65
+ return "GENEROUS"
66
+
67
+
68
+ VIABILITY_RANK = {"COMFORTABLE": 0, "GENEROUS": 1, "TIGHT": 2, "LONG_WAIT": 3, "TOO_TIGHT": 4}
69
+ VIABILITY_NOTE = {
70
+ "COMFORTABLE": "Comfortable buffer",
71
+ "GENEROUS": "Comfortable, longer wait",
72
+ "TIGHT": "Tight - runs on shuttle being on time",
73
+ "LONG_WAIT": "Long airport wait",
74
+ "TOO_TIGHT": "Too tight - not viable",
75
+ }
76
+
77
+
78
+ def to_home_min(time_local: str, airport: str, tz_offsets: dict) -> int:
79
+ """Convert a local-airport HH:MM into home-timezone-equivalent minutes."""
80
+ return hm_to_min(time_local) - tz_offsets.get(airport, 0)
81
+
82
+
83
+ def best_shuttle_for_flight(flight, shuttles, min_buffer, max_wait, tz_offsets):
84
+ """Pick the shuttle with the best viability score for this flight."""
85
+ dep_airport = flight["from"]
86
+ flight_dep_min = to_home_min(flight["departs"], dep_airport, tz_offsets)
87
+ candidates = []
88
+ for s in shuttles:
89
+ if s.get("to") != dep_airport:
90
+ continue
91
+ arr = s.get("arrives_local", "")
92
+ if not arr:
93
+ continue
94
+ shuttle_arr_min = to_home_min(arr, dep_airport, tz_offsets)
95
+ buffer = flight_dep_min - shuttle_arr_min
96
+ if buffer < 0:
97
+ continue # shuttle arrives after flight leaves
98
+ v = viability(buffer, min_buffer, max_wait)
99
+ candidates.append((VIABILITY_RANK[v], buffer, v, s))
100
+ if not candidates:
101
+ return None, None, None
102
+ candidates.sort(key=lambda c: c[0])
103
+ _, buf, v, s = candidates[0]
104
+ return s, buf, v
105
+
106
+
107
+ def main() -> int:
108
+ p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
109
+ p.add_argument("--flights-json", required=True, help="Path to filter_flights.py output, or '-' for stdin")
110
+ p.add_argument("--shuttles-json", required=True)
111
+ p.add_argument("--shuttle-costs", default="",
112
+ help='Comma-separated "AIRPORT:USD" pairs (e.g. "ORD:60,IND:30")')
113
+ p.add_argument("--tz-offsets", default="",
114
+ help='Comma-separated "AIRPORT:OFFSET_MIN" pairs relative to home tz')
115
+ p.add_argument("--min-buffer-min", type=int, default=90)
116
+ p.add_argument("--max-wait-min", type=int, default=240)
117
+ args = p.parse_args()
118
+
119
+ shuttle_costs = parse_kv_int(args.shuttle_costs, "--shuttle-costs")
120
+ tz_offsets = parse_kv_int(args.tz_offsets, "--tz-offsets")
121
+
122
+ if args.flights_json == "-":
123
+ flights = json.load(sys.stdin)
124
+ else:
125
+ with open(args.flights_json, encoding="utf-8") as f:
126
+ flights = json.load(f)
127
+
128
+ with open(args.shuttles_json, encoding="utf-8") as f:
129
+ shuttles = json.load(f).get("shuttles", [])
130
+
131
+ rows = []
132
+ for fl in flights:
133
+ s, buf, v = best_shuttle_for_flight(
134
+ fl, shuttles, args.min_buffer_min, args.max_wait_min, tz_offsets,
135
+ )
136
+ if s is None:
137
+ continue
138
+ shuttle_cost = shuttle_costs.get(fl["from"], 0)
139
+ total = (fl["price"] or 0) + shuttle_cost
140
+ rows.append({
141
+ "flight": fl, "shuttle": s, "buffer_min": buf, "viability": v,
142
+ "shuttle_cost": shuttle_cost, "total": total,
143
+ })
144
+
145
+ # Sort: viability tier, then priority band, then total cost, then departure time
146
+ rows.sort(key=lambda r: (
147
+ VIABILITY_RANK[r["viability"]],
148
+ r.get("flight", {}).get("priority_band", 0),
149
+ r["total"],
150
+ r["flight"]["departs"],
151
+ ))
152
+
153
+ if not rows:
154
+ print("(no viable flight+shuttle pairings)")
155
+ return 0
156
+
157
+ print("| # | Date | Flight | From | To | Departs | Arrives | Shuttle | Shuttle Departs | Buffer | Flight $ | Shuttle $ | **Total** | Notes |")
158
+ print("|---|---|---|---|---|---|---|---|---|---|---|---|---|---|")
159
+ for i, r in enumerate(rows, 1):
160
+ f = r["flight"]; s = r["shuttle"]
161
+ depart_label = s.get("departs_local") or s.get("departs_et") or "?"
162
+ print(
163
+ f"| {i} | {f['date']} | {f['flight']} | {f['from']} | {f['to']} | "
164
+ f"{f['departs']} | {f['arrives']} | {s.get('company','?')} | "
165
+ f"{depart_label} | {r['buffer_min']} min | "
166
+ f"${f['price']} | ${r['shuttle_cost']} | **${r['total']}** | "
167
+ f"{VIABILITY_NOTE[r['viability']]} |"
168
+ )
169
+ return 0
170
+
171
+
172
+ if __name__ == "__main__":
173
+ sys.exit(main())