Skip to content

Examples - #7

Merged
gwitwer merged 7 commits into
mainfrom
docs/gwitwer/add-examples
Dec 3, 2025
Merged

Examples#7
gwitwer merged 7 commits into
mainfrom
docs/gwitwer/add-examples

Conversation

@gwitwer

@gwitwer gwitwer commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread examples/.env.example Outdated
@gwitwer
gwitwer force-pushed the docs/gwitwer/add-examples branch 2 times, most recently from 1536ec2 to b31d60a Compare December 3, 2025 01:26
@gwitwer
gwitwer force-pushed the docs/gwitwer/add-examples branch from b31d60a to c0f354c Compare December 3, 2025 01:30
@gwitwer
gwitwer merged commit ef28a46 into main Dec 3, 2025
2 checks passed
ratataque added a commit that referenced this pull request Aug 5, 2026
- Move `agent.created` detection into the store and emit ONLY from the
  workspace-watcher `workflows.changed` bus — the one client signal for a
  sapiom.json built in-app. The initial load and explicit imports
  (`scanWorkflows` / `connectWorkflow`) fold paths into the seen-set WITHOUT
  emitting, so importing existing agents or switching projects no longer
  inflates "agents built" (review #2).
- Emit the deploy outcome exactly once: an `outcomeSettled` guard stops a
  post-terminal `refreshWorkflows()` rejection from logging `agent.deploy_failed`
  on top of an already-recorded `agent.deploy_succeeded` (review #1).
- Unify `workflow_slug` on the folder basename (`slugFromPath`) across
  `agent.created` and `agent.deploy_*`, so a built→deployed funnel joins; drop
  the now-unused `workflowSlug` helper and the dead `wf ?` branch (review #3, #6).
- Reword the events.ts mock-recorder comment — `interceptMockTrack` writes
  `trackEvents`; this writes `productEvents` (review #7).

Gates green: typecheck, build, vitest 1740, web e2e 288, canvas 10, terminology.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LucasMarsala pushed a commit that referenced this pull request Aug 5, 2026
…mplates / deployed) (#534)

* feat(harness): agent-lifecycle product metrics to PostHog (built / templates / deployed)

Wire the three product KPIs into the existing typed PostHog layer (SAP-1988),
which declared agent.deploy_*/agent.template_cloned but fired none of them.

- agent.created — a new agent (fresh sapiom.json) appears in the workspace
  registry; deduped by path and seeded on first load so pre-existing agents
  never count. The "agents built" metric — confirmed existence, not the click
  that kicked off scaffolding.
- agent.template_cloned — fired in handleUseTemplate with the template slug and
  the on-ramp surface (welcome / template_gallery).
- agent.deploy_started / _succeeded (duration) / _failed (coarse error_kind
  enum) — fired from the deploy stream in use-harness-state.

Payloads carry ids/enums/counts/durations only; the slug is the folder basename,
never the absolute path. Capture stays gated by the product-analytics consent
tiers and no-ops under mock/e2e. A VITE_MOCK recorder on
window.__HARNESS_TEST__.productEvents lets e2e assert the wiring.

Pure helpers live in analytics/lifecycle.ts (unit-tested); e2e coverage in
product-events.spec.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(harness): address code-review findings on lifecycle metrics

- Move `agent.created` detection into the store and emit ONLY from the
  workspace-watcher `workflows.changed` bus — the one client signal for a
  sapiom.json built in-app. The initial load and explicit imports
  (`scanWorkflows` / `connectWorkflow`) fold paths into the seen-set WITHOUT
  emitting, so importing existing agents or switching projects no longer
  inflates "agents built" (review #2).
- Emit the deploy outcome exactly once: an `outcomeSettled` guard stops a
  post-terminal `refreshWorkflows()` rejection from logging `agent.deploy_failed`
  on top of an already-recorded `agent.deploy_succeeded` (review #1).
- Unify `workflow_slug` on the folder basename (`slugFromPath`) across
  `agent.created` and `agent.deploy_*`, so a built→deployed funnel joins; drop
  the now-unused `workflowSlug` helper and the dead `wf ?` branch (review #3, #6).
- Reword the events.ts mock-recorder comment — `interceptMockTrack` writes
  `trackEvents`; this writes `productEvents` (review #7).

Gates green: typecheck, build, vitest 1740, web e2e 288, canvas 10, terminology.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant