Skip to content

Commit d746b30

Browse files
committed
remove telemetry system — will revisit in a later version
Strip gstack's Supabase telemetry backend, remote sync, analytics CLI, and all telemetry prompts/epilogues from skill preambles. Local eureka logging retained. Telemetry may return in a future version once pstack has its own infrastructure.
1 parent 1776216 commit d746b30

42 files changed

Lines changed: 826 additions & 5181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SKILL.md

Lines changed: 7 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,6 @@ REPO_MODE=${REPO_MODE:-unknown}
3939
echo "REPO_MODE: $REPO_MODE"
4040
_LAKE_SEEN=$([ -f ~/.pstack/.completeness-intro-seen ] && echo "yes" || echo "no")
4141
echo "LAKE_INTRO: $_LAKE_SEEN"
42-
_TEL=$(~/.claude/skills/pstack/bin/pstack-config get telemetry 2>/dev/null || true)
43-
_TEL_PROMPTED=$([ -f ~/.pstack/.telemetry-prompted ] && echo "yes" || echo "no")
44-
_TEL_START=$(date +%s)
45-
_SESSION_ID="$$-$(date +%s)"
46-
echo "TELEMETRY: ${_TEL:-off}"
47-
echo "TEL_PROMPTED: $_TEL_PROMPTED"
48-
mkdir -p ~/.pstack/analytics
49-
echo '{"skill":"pstack","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.pstack/analytics/skill-usage.jsonl 2>/dev/null || true
50-
# zsh-compatible: use find instead of glob to avoid NOMATCH error
51-
for _PF in $(find ~/.pstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
52-
if [ -f "$_PF" ]; then
53-
if [ "$_TEL" != "off" ] && [ -x "~/.claude/skills/pstack/bin/pstack-telemetry-log" ]; then
54-
~/.claude/skills/pstack/bin/pstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true
55-
fi
56-
rm -f "$_PF" 2>/dev/null || true
57-
fi
58-
break
59-
done
6042
```
6143

6244
If `PROACTIVE` is `"false"`, do not proactively suggest pstack skills AND do not
@@ -72,52 +54,19 @@ of `/qa`, `/pstack-ship` instead of `/ship`). Disk paths are unaffected — alwa
7254

7355
If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.claude/skills/pstack/pstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED <from> <to>`: tell user "Running pstack v{to} (just updated!)" and continue.
7456

75-
If `LAKE_INTRO` is `no`: Before continuing, introduce the pstack philosophy.
76-
Tell the user: "pstack follows the **Revenue First** principle — ship what makes money,
77-
iterate on what gets traction. Build only your unique value, buy everything else.
78-
Read ETHOS.md for the full philosophy."
79-
Then run:
57+
If `LAKE_INTRO` is `no`: Before continuing, introduce the Shipping Principle.
58+
Tell the user: "pstack follows the **Revenue First** principle — always do the complete
59+
thing when AI makes the marginal cost near-zero. Read more: See ETHOS.md for pstack principles"
60+
Then offer to open the essay in their default browser:
8061

8162
```bash
63+
open See ETHOS.md for pstack principles
8264
touch ~/.pstack/.completeness-intro-seen
8365
```
8466

85-
This only happens once.
67+
Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.
8668

87-
If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,
88-
ask the user about telemetry. Use AskUserQuestion:
89-
90-
> Help pstack get better! Community mode shares usage data (which skills you use, how long
91-
> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.
92-
> No code, file paths, or repo names are ever sent.
93-
> Change anytime with `pstack-config set telemetry off`.
94-
95-
Options:
96-
- A) Help pstack get better! (recommended)
97-
- B) No thanks
98-
99-
If A: run `~/.claude/skills/pstack/bin/pstack-config set telemetry community`
100-
101-
If B: ask a follow-up AskUserQuestion:
102-
103-
> How about anonymous mode? We just learn that *someone* used pstack — no unique ID,
104-
> no way to connect sessions. Just a counter that helps us know if anyone's out there.
105-
106-
Options:
107-
- A) Sure, anonymous is fine
108-
- B) No thanks, fully off
109-
110-
If B→A: run `~/.claude/skills/pstack/bin/pstack-config set telemetry anonymous`
111-
If B→B: run `~/.claude/skills/pstack/bin/pstack-config set telemetry off`
112-
113-
Always run:
114-
```bash
115-
touch ~/.pstack/.telemetry-prompted
116-
```
117-
118-
This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.
119-
120-
If `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,
69+
If `PROACTIVE_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,
12170
ask the user about proactive behavior. Use AskUserQuestion:
12271

12372
> pstack can proactively figure out when you might need a skill while you work —
@@ -189,39 +138,6 @@ ATTEMPTED: [what you tried]
189138
RECOMMENDATION: [what the user should do next]
190139
```
191140

192-
## Telemetry (run last)
193-
194-
After the skill workflow completes (success, error, or abort), log the telemetry event.
195-
Determine the skill name from the `name:` field in this file's YAML frontmatter.
196-
Determine the outcome from the workflow result (success if completed normally, error
197-
if it failed, abort if the user interrupted).
198-
199-
**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to
200-
`~/.pstack/analytics/` (user config directory, not project files). The skill
201-
preamble already writes to the same directory — this is the same pattern.
202-
Skipping this command loses session duration and outcome data.
203-
204-
Run this bash:
205-
206-
```bash
207-
_TEL_END=$(date +%s)
208-
_TEL_DUR=$(( _TEL_END - _TEL_START ))
209-
rm -f ~/.pstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
210-
# Local analytics (always available, no binary needed)
211-
echo '{"skill":"SKILL_NAME","duration_s":"'"$_TEL_DUR"'","outcome":"OUTCOME","browse":"USED_BROWSE","session":"'"$_SESSION_ID"'","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' >> ~/.pstack/analytics/skill-usage.jsonl 2>/dev/null || true
212-
# Remote telemetry (opt-in, requires binary)
213-
if [ "$_TEL" != "off" ] && [ -x ~/.claude/skills/pstack/bin/pstack-telemetry-log ]; then
214-
~/.claude/skills/pstack/bin/pstack-telemetry-log \
215-
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
216-
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &
217-
fi
218-
```
219-
220-
Replace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with
221-
success/error/abort, and `USED_BROWSE` with true/false based on whether `$B` was used.
222-
If you cannot determine the outcome, use "unknown". The local JSONL always logs. The
223-
remote binary only runs if telemetry is not off and the binary exists.
224-
225141
## Plan Status Footer
226142

227143
When you are in plan mode and about to call ExitPlanMode:

0 commit comments

Comments
 (0)