Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ All notable user-visible changes to this project are documented in this file.

### Changed

- Discover skills dynamically in the startup header and show analyzed episodes from `dist/analysis/`, so returning users can see what already exists.
- Remove the unused `[outputs]`, `[transcription]`, and `[video_scan]` sections from `podguy.example.toml`; document which sections are read by code vs. by the agent.

### Fixed
20 changes: 4 additions & 16 deletions podguy.example.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copy this file to podguy.toml and customize it for your show.
#
# The top-level fields are a show profile read by pi as context (prose, not
# strict config). The named sections below are read by code:
# [youtube] -> scripts/youtube_publish.py

show_name = "My Podcast"
show_slug = "my-podcast"
Expand All @@ -9,22 +13,6 @@ audience = "listeners interested in the episode topic"
chapter_style = "concise, listener-friendly chapters"
preferred_review = "quick_pass"

[outputs]
chapters = true
clips = true
cuts = true
show_notes = true
quotes = true
proper_nouns = true

[transcription]
preferred_backend = "auto"
preferred_model = ""

[video_scan]
enabled = true
sample_interval_seconds = 0.5

[youtube]
# Defaults for scripts/youtube_publish.py; flags override these.
default_privacy = "private"
Expand Down
1 change: 0 additions & 1 deletion src/podguy-post-production/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Use profile fields such as:
- `audience`
- `chapter_style`
- `preferred_review`
- `[outputs]` toggles

Do not assume a specific show, hosts, audience, tone, domain, or episode naming pattern unless the user or profile provides it.

Expand Down
45 changes: 39 additions & 6 deletions src/podguy-startup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { existsSync, readFileSync } from "node:fs";
import { existsSync, readFileSync, readdirSync } from "node:fs";
import { homedir } from "node:os";
import { relative, resolve } from "node:path";
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
Expand All @@ -22,6 +22,35 @@ function toDisplayPath(filePath: string): string {
return normalized;
}

function discoverSkillPaths(): string[] {
// The launcher loads every skill under src/; discover them the same way so
// new skills show up here without editing this list.
const skillsRoot = resolve(cwd, "src");
if (!existsSync(skillsRoot)) return [];
try {
return readdirSync(skillsRoot, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => resolve(skillsRoot, entry.name, "SKILL.md"))
.filter((path) => existsSync(path))
.sort();
} catch {
return [];
}
}

function analyzedEpisodes(): string[] {
const analysisRoot = resolve(cwd, "dist/analysis");
if (!existsSync(analysisRoot)) return [];
try {
return readdirSync(analysisRoot, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => entry.name)
.sort();
} catch {
return [];
}
}

function readProfileSummary(): string | undefined {
for (const profilePath of [resolve(cwd, "podguy.toml"), resolve(cwd, "podcast.toml")]) {
if (!existsSync(profilePath)) continue;
Expand Down Expand Up @@ -65,11 +94,7 @@ export default function podguyStartupExtension(pi: ExtensionAPI) {

const projectAgents = resolve(cwd, "AGENTS.md");
const userAgents = resolve(home, ".pi/agent/AGENTS.md");
const skillPaths = [
resolve(cwd, "src/podguy-post-production/SKILL.md"),
resolve(cwd, "src/podguy-clip-cutter/SKILL.md"),
resolve(cwd, "src/podguy-youtube-publisher/SKILL.md"),
];
const skillPaths = discoverSkillPaths();
const promptsPath = resolve(cwd, "prompts");
const extensionPath = resolve(cwd, "src/podguy-startup.ts");
const profilePath = [resolve(cwd, "podguy.toml"), resolve(cwd, "podcast.toml")].find(
Expand Down Expand Up @@ -103,6 +128,13 @@ export default function podguyStartupExtension(pi: ExtensionAPI) {
: [];

const profileSummary = readProfileSummary();
const episodes = analyzedEpisodes();
const episodesSummary =
episodes.length === 0
? "no episodes analyzed yet"
: episodes.length <= 6
? `episodes analyzed: ${episodes.join(", ")}`
: `episodes analyzed: ${episodes.slice(0, 6).join(", ")} (+${episodes.length - 6} more)`;

return [
accent(" __ "),
Expand All @@ -113,6 +145,7 @@ export default function podguyStartupExtension(pi: ExtensionAPI) {
accent("/_/ /____/ /____/"),
muted(" Podcast post-production"),
dim(profileSummary ? ` profile: ${profileSummary}` : " no podguy.toml profile yet"),
dim(` ${episodesSummary}`),
"",
...formatSection(theme, "Context", contextItems),
...formatSection(theme, "Profile", profileItems),
Expand Down
Loading