lossless-group_perplexed-pl.../release-notes/0.3.0.md

60 lines
8 KiB
Markdown
Raw Permalink Normal View History

feat(release): 0.3.0 — three analyst-grade templates for VC/PE/equities + four infrastructure fixes for deep-research reliability 0.3.0 turns Perplexed into a serious analyst tooling layer for Venture Capital, Private Equity, and equities-trading workflows. Three new directory templates produce 6-9K-word cited analyst drafts in a single Perplexity Deep Research run. Underneath them, four infrastructure fixes turn deep-research from a brittle "might work" workflow into something you can put real analyst time behind. The three new templates: market-map-profile (analyst memo for Known Category or Thesis-Driven maps), standards-and-specs-profile (open-spec profiles with five-way authority typing and three-tier adoption framing), market-category-profile (concept-folder reference card with three financial-stage tiers — Incumbents / Challengers / Innovators). The four infrastructure fixes: per-template request-timeout-ms wall-clock override (yesterday, pressure-relief valve), structural port of per-chunk idle-timeout discipline from the legacy modal flow into the directory-template flow (yesterday, structural fix), per-template max-tokens Perplexity output-budget override (today, fixes silent clean-truncation when finish_reason=length fires mid-template), and a strengthened mermaid-discipline partial plus new latex-discipline partial (today, fixes the 4-of-5 broken-Mermaid rate via paired BAD/GOOD examples and a six-item pre-emit self-check). New templates (src/docs/templates/): - market-map-profile.md — sonar-deep-research, request-timeout-ms 2400000 (40-min ceiling), max-tokens 24000. Anti-incumbent editorial stance. - standards-and-specs-profile.md — sonar-deep-research, request-timeout-ms 0 (idle-only safety), max-tokens 24000. Five-way authority typing, named editors, stewardship transitions, named critics. - market-category-profile.md — sonar-deep-research, request-timeout-ms 0, max-tokens 24000. Three-tier financial-stage framing, separate Why Now and What's Happening sections, Industry Coverage sub-grouped into Market Reports / Industry Articles / Financial News. Rendering-discipline partials (src/docs/partials/): - mermaid-discipline.md rewritten — paired BAD/GOOD examples throughout, the &amp; escape rule, explicit \n vs <br/> ban, six-item self-check before emit, simplify-rather-than-break ethos. Original ~250 tokens expanded to ~440. - latex-discipline.md new — Obsidian MathJax delimiters and \$ escaping in prose to avoid accidental inline-math spans. - concept-profile.md wired in {{include: latex-discipline}} alongside the existing {{include: mermaid-discipline}}, placed immediately after the "render a mermaid codefence here" instruction so the rules are in scope at the moment of generation. Streaming, timeout, and output-budget infrastructure (src/services/ directoryTemplateService.ts): - streamPerplexityToFile now races each reader.read() against a fresh per-chunk idle timer (270s deep-research, 90s normal — matches the legacy modal flow at perplexityService.ts:659). Closes the "Wall-clock-timeout cuts off long deep-research streams" issue. - request-timeout-ms cft override is now the optional absolute wall-clock ceiling (belt-and-suspenders backstop on top of the idle timer); explicit 0 disables. - max-tokens cft override added to buildPayload — passes through to Perplexity's max_tokens parameter; lifts the silent ~8K-token default ceiling that was clean-truncating thorough drafts via finish_reason: length. Documentation (README.md, docs/directory-templates.md): - README — new top-level section "For Venture Capital, Private Equity, and Equities-Trading Workflows" with a five-row table mapping each analyst workflow to the template that produces it. Directory Templates section updated to seven shipped templates plus the new per-template cft-block knobs. - docs/directory-templates.md — new "Per-template max-tokens override" section with the diagnostic table for distinguishing wall-clock-timeout truncation (mid-sentence cutoff, no sources footer) from max_tokens truncation (clean section-end, full sources footer). The diagnostic vocabulary that did not exist before this release. Seeding (src/services/templateSeederService.ts): - Registered all three new templates plus the new latex-discipline partial so they auto-seed into vaults on first plugin load and appear in Re-seed runs. Version bump (manifest.json, package.json, versions.json): - 0.2.1 to 0.3.0. minAppVersion unchanged at 1.8.10. Engineering changelog entries (changelog/): - 2026-05-26_02.md — the structural idle-timeout port. - 2026-05-27_01.md — the two new templates, max-tokens override, and rendering-discipline partial work. Includes the diagnostic-led narrative on the vault-drift bug that caused the 4-of-5 broken-Mermaid rate. Release narratives: - changelog/releases/0.3.0.md — full marketing-quality release narrative with frontmatter, four-audience cascade, three diagnostic-led stories (streaming-timeout, max_tokens, rendering-discipline), explicit upgrade notes including the vault-drift warning, three deferred items for 0.4.x. - release-notes/0.3.0.md — prose-only release-page body picked up by the release.yml workflow when the 0.3.0 tag is pushed. Tighter cut of the same narrative, suited for the GitHub release page. Context-v stamp: - context-v/issues/Wall-Clock-Timeout-Cuts-Off-Long-Deep-Research-Streams.md marked status: resolved, date_resolved 2026-05-26, with the four open items reorganized into "what landed" (3 of 4) and "deferred follow-ups" (cross-service audit, settings-pane exposure, deep-research detection robustness). Files changed: - manifest.json, package.json, versions.json - README.md, docs/directory-templates.md - src/services/directoryTemplateService.ts - src/services/templateSeederService.ts - src/docs/templates/README.md - src/docs/templates/concept-profile.md - src/docs/templates/market-map-profile.md - src/docs/templates/market-category-profile.md (new) - src/docs/templates/standards-and-specs-profile.md (new) - src/docs/partials/mermaid-discipline.md - src/docs/partials/latex-discipline.md (new) - changelog/2026-05-26_02.md (new) - changelog/2026-05-27_01.md (new) - changelog/releases/0.3.0.md (new) - release-notes/0.3.0.md (new) - context-v/issues/Wall-Clock-Timeout-Cuts-Off-Long-Deep-Research-Streams.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 22:41:13 +00:00
**0.3.0 turns Perplexed into a serious analyst tooling layer for Venture Capital, Private Equity, and equities-trading workflows. Three new directory templates produce 6-9K-word cited analyst drafts in a single Perplexity Deep Research run. Underneath them, four infrastructure fixes turn deep-research from a brittle "might work" workflow into something you can put real analyst time behind.**
## Why care?
If your work involves naming the actual companies in a market category, mapping who's playing where in an emerging market, or profiling the open specs an investment thesis depends on — 0.3.0 is the release where Perplexed becomes a serious analyst tooling layer, not just a notes-with-citations plugin.
**Three new directory templates.** Each produces a 6-9K-word cited analyst draft in a single Perplexity Deep Research run. Each was designed for the kind of document a VC analyst, PE associate, or equities-trading desk strategist hands to a partner or IC:
- **Market-category profiles** (`concepts/Market-Categories/`) name the companies in a category, sorted into three explicit financial-stage tiers — Incumbents (public / late-stage private / PE-owned), Challengers (Series C+ scale-ups), Innovators (Pre-Seed through Series B) — with separate *Why Now* / *What's Happening* sections covering CAGR and category-creation momentum, and a fully-sourced Industry Coverage section sub-grouped into Market Reports (Gartner, IDC, Forrester, ABI) / Industry Articles / Financial News (Bloomberg, FT, Pitchbook).
- **Market-map drafts** (`lost-in-public/market-maps/`) produce the analyst memo itself — 4-8 sub-segments, 20-40 named innovator cards with funding stage and lead investor, Market Dynamics with cited sizing data and capital concentration, and a Frontier section with open questions framed as questions.
- **Standards-and-specs profiles** (`Sources/Standards-and-Specs/`) turn an open protocol or convention into a strategic-context document — five-way authority typing (de-jure / consortium / vendor-led-open / community / de-facto), three-tier structural adoption framing plus notable holdouts, named editors, stewardship-transition stories, named public critics with their arguments. Surfaces what an analyst needs to know about a spec: is it surviving its originating vendor, who has it captured, who's working to break the capture.
**Four infrastructure fixes** — each one solving a class of "deep-research silently produces broken output" failure mode that would otherwise have kept the analyst-grade workflow brittle:
- **Per-chunk idle-timeout discipline.** The timer that decides "is this stream still alive?" is now armed per-chunk, not once per request. A healthy slow stream completes naturally regardless of total duration; a silently-stalled one fails in seconds, not at the wall-clock ceiling. Ported from the legacy `PerplexityModal` flow into the directory-template runtime.
- **Per-template `request-timeout-ms:` cft override.** Becomes the optional absolute wall-clock ceiling (belt-and-suspenders backstop on top of the idle timer). Set to `0` to disable entirely and rely on idle-only safety — the recommended setting for the two new analyst-grade templates.
- **Per-template `max-tokens:` cft override.** Fixes the silent-truncation pathology where Perplexity's default output cap (~8,192 tokens, ~6K words for `sonar-deep-research`) was ending the stream cleanly mid-template — full sources footer, no Notice, no truncation flag, looking like a healthy completion that just happened to be missing the back half. The three deep-research templates ship with `max-tokens: 24000` (~18K-word budget).
- **Strengthened rendering-discipline partials.** `mermaid-discipline.md` rewritten with paired BAD/GOOD examples throughout, the `&amp;` escape rule, an explicit `\n` vs `<br/>` ban, a six-item self-check before emit, and a simplify-rather-than-break ethos. New `latex-discipline.md` partial covers Obsidian MathJax delimiters and `$` escaping. Both wired into `concept-profile.md`.
## Diagnostic vocabulary for streaming failures
| Symptom | Cause |
|---|---|
| Mid-sentence cutoff (ends with a partial word); no sources footer; "stream went idle" Notice or no Notice at all | Wall-clock timer (`request-timeout-ms:`) or idle timer (`stream-idle-timeout-ms:`) fired during streaming |
| Clean section-end cutoff; **sources footer renders correctly with all citations**; no Notice | Perplexity `max_tokens` cap; stream completed via `finish_reason: "length"` |
The three streaming knobs (`request-timeout-ms`, `stream-idle-timeout-ms`, `max-tokens`) are independent — a template can hit any of them, all of them, or none. The three new deep-research templates set all three generously so analyst-grade runs land reliably.
## Editorial discipline diverges by template
The three new deep-research templates share a common technical substrate but apply different editorial stances on big tech:
- **Market-map** caps big tech at 1-of-5-10 in any sub-bucket to counteract training-data bias — the analyst's job is to name the named operators driving the curve.
- **Standards-and-specs** names big tech freely in the Incumbents tier (large dominant implementations) and aggressively in the Innovators tier (where the next extensions come from). Suppression would distort the implementation landscape.
- **Market-category** names big tech as the FIRST move in Incumbents because for a category profile, knowing the incumbents IS the work product.
Each template's system prompt states its editorial stance explicitly so a future template-modifier doesn't accidentally cross-pollinate the wrong stance across templates.
## Upgrade notes
**Vault template drift — the gotcha worth five seconds of attention.** If your `Content-Dev/Templates/concept-profile.md` was seeded before today, it may be missing the `{{include: mermaid-discipline}}` and `{{include: latex-discipline}}` directives. Without them, every concept-profile run generates Mermaid with no rendering rules in scope at all, producing broken diagrams 4-of-5 times. Open the file, find the *Defining and Describing* section, and insert both directives immediately after the "render a `mermaid` codefence here" instruction. The re-seed button won't add them — it only writes missing files.
**Re-seed pulls in the new templates and the new partial.** The seven shipped templates plus the two partials are bundled into `main.js`. After upgrading, click *Settings → Directory templates → Re-seed templates* to write the new files into your vault. The button only adds files whose filenames don't already exist; nothing existing gets overwritten. You'll see `market-map-profile.md`, `standards-and-specs-profile.md`, `market-category-profile.md` appear in templates and `latex-discipline.md` appear in partials.
**Backward compatibility.** All cft-block additions are opt-in. Templates that don't declare the new knobs inherit sensible defaults. The four pre-0.3.0 templates (concept, vocabulary, source, toolkit) run unchanged.
**Plugin-level default request timeout bumped 10 min → 30 min.** Visible in *Settings → Directory templates → Request timeout (ms)*. If you had previously set a custom value, it's preserved.
## Deferred to 0.4.x
Three follow-ups that surfaced during the 0.3.0 work cycle:
- A `cf_finish_reason` frontmatter stamp on every run — would have made the max-tokens diagnostic instant instead of an investigation.
- A "Continue directory template on current file" command — for runs cut off by max-tokens, would re-prompt with only the missing sections plus URL-keyed citation merge.
- A "diff and patch user files" mode for re-seed — the vault-drift bug we caught is structural: re-seed only writes missing files, so partial/template improvements never reach users who've already seeded.
## Compatibility
`minAppVersion: 1.8.10` — unchanged from 0.2.1. Desktop-only — unchanged. No new external dependencies; the three new templates and two partials are bundled into `main.js` at build time. The cleanup pipeline behavior (think-block wrap, image-marker swap, sources footer) is unchanged.