From platinum-seo-engine
Use when: kullanıcı "haftalık portföy", "portfolio weekly", "tüm projeler haftalık", "haftalık brief", "weekly brief", "portföy haftalık raporu", "active_projects haftalık özet" der ya da cadence.weekly_brief.day cron tetiklenir. Also use when: portfolio.config.json v1.1 mevcut + active_projects doldurulmuş; her proje için master.xlsx + _state/events.jsonl ulaşılabilir; haftalık 7 günlük delta + last_sync_at freshness rapor olarak istenir; tek bir slug değil PORTFÖY ÇAPINDA özet beklenir; READ-ONLY agregasyon yeterli (yazma kapsamı YOK). Do not use when: portfolio.config.json yokken (init-portfolio önce çalışmalı, DURUR PortfolioConfigSchemaError); tek proje weekly istenirse (weekly-summary skill'ine yönlendir, bu skill PORTFÖY scope); aylık dökümle karıştırma (monthly-report skill'i ayrı); master.xlsx writer çağrısı isteniyorsa (FORBIDDEN — bu skill 100% READ-ONLY, hiçbir master_task hücresine yazmaz).
How this skill is triggered — by the user, by Claude, or both
Slash command
/platinum-seo-engine:portfolio-weekly-briefThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Multi-project LOCAL aggregator. Reads `projects/_portfolio/portfolio.config.json`
Multi-project LOCAL aggregator. Reads projects/_portfolio/portfolio.config.json
v1.1, iterates active_projects[], and for each project emits a 7-day
delta (tasks_added, tasks_done, work_events) plus a
freshness_flag (fresh | stale) computed from last_sync_at
versus slas.weekly_sync_max_days.
This skill follows the convention authority established by
skills/planning/master-task-sync/SKILL.md (Phase 8 Wave 2 — pure
function transform + READ-ONLY discipline + plugin-agnostik). The
discipline (DURUR raises, no silent fallback, schema-first, plugin
agnostik, append-only state contract) is reused verbatim. Deviate
only with an ADR.
Unlike Phase 8 master_task_sync, this skill never writes to any
project's master.xlsx or _state/events.jsonl. Outputs land
exclusively under the portfolio workspace
(projects/_portfolio/outputs/reports/ + inbox/local/).
| Name | Type | Default | Notes |
|---|---|---|---|
portfolio_root | string | — | Optional. Defaults to projects/_portfolio/ under workspace root. |
week_end | string | — | Optional ISO date override (YYYY-MM-DD). |
workspace_root is resolved via PSEO_WORKSPACE_ROOT env or explicit
test override (mirrors workflow_runner / events_writer / W-D1).
master.xlsx#none — sentinel acknowledging that the skill READS
master.xlsx#master_task from each active project but writes
ZERO cells anywhere. The frontmatter outputs[] entry is intentional
schema documentation (no openpyxl mutation, no transaction layer
call).projects/_portfolio/outputs/reports/{week_end}-portfolio-weekly-brief.md
— human-readable Markdown brief (multi-project delta table +
freshness flag column + totals).projects/_portfolio/inbox/local/{week_end}-portfolio-weekly-brief.json
— drift-recovery snapshot; full PortfolioBrief envelope including
per-project deltas + totals + sla band.| # | Source | Discipline |
|---|---|---|
| 1 | portfolio.config.json v1.1 | active_projects + cadence + slas |
| 2 | per-project master.xlsx#master_task | created_date / done_date in window |
| 3 | per-project _state/events.jsonl | event_kind=work, last 7 days |
| 4 | per-project last_sync_at (config field) | freshness vs weekly_sync_max_days |
schemas/portfolio-config.schema.json v1.1:
cadence.weekly_brief.day — enum [Monday..Sunday] (drives default
week_end).cadence.weekly_brief.hour — integer 0-23 (advisory, used by the
scheduler — not by this transform).slas.weekly_sync_max_days — integer 1-30 (drives the freshness
threshold).active_projects[].last_sync_at — ISO timestamp expected; null →
always stale.editorial_overrides.sla_days — per-project SLA override (1-30);
takes precedence over slas.weekly_sync_max_days.The transform raises PortfolioConfigSchemaError (DURUR) if any of
these fields drift from the schema. Tests assert the cadence/sla
branches against the canonical Draft 7 schema.
scripts/reporting/portfolio_weekly_brief.py (pure function, < 600
lines — transform size gate; ADR-027 sets the < 1500L policy):
build_portfolio_brief(portfolio_config, workspace_root, now, week_end=None) -> PortfolioBrief — top-level idempotent aggregator.aggregate_project(...) -> ProjectDelta — one project's 7-day
rollup.compute_freshness_flag(last_sync_at, sla_days, now) -> str —
isolated freshness logic (test sentinel).read_events_in_window(events_path, ...) — fault-tolerant
events.jsonl reader.read_master_task_delta(workbook_path, window_start, window_end) —
openpyxl thin wrapper, read_only=True, INLINE (no shared excel
helper imported).render_brief_markdown(brief, template_path) — string.Template
$var substitution, matches scripts/reporting/render_template.py
engine.templates/reports/portfolio-weekly-brief.template.md — Markdown with
YAML frontmatter (week_start, week_end, generated_at,
scope, sla_weekly_sync_max_days, projects_count). Body
includes:
$totals_summary — single-line rollup sentence.$projects_delta_table — multi-row Markdown table with columns
slug | tasks_added | tasks_done | last_sync_at | freshness_flag.string.Template engine (NOT jinja2) — same as
scripts/reporting/render_template.py (Phase 1 mirası). All variables
are stringified by build_template_vars() so the template engine
never sees a non-string value.
last_sync_at = None or "": → "stale" (never synced)
sla_days < 1 or > 30: → FreshnessFlagInputError (DURUR)
now - last_sync_at > sla_days: → "stale"
otherwise: → "fresh"
now is passed in (UTC, timezone-aware) so the computation is
reproducible across machines + test harnesses. The acceptance gate
sentinel: last_sync_at = (now - 8 days), sla = 7 → flag == "stale"
is asserted by tests/skills/test_portfolio_weekly_brief.py.
Stop and flag the manager — do not patch, do not fall back.
portfolio.config.json missing
cadence or slas, or cadence.weekly_brief.day not in the
weekday enum, or slas.weekly_sync_max_days out of [1, 30], or
active_projects empty / missing slug.week_end is not a valid
ISO date OR the cadence-derived week_end could not be computed.PSEO_WORKSPACE_ROOT env var unset
AND no explicit workspace_root passed.last_sync_at malformed, OR
sla_days out of range, OR now is naive (timezone-unaware).Same portfolio.config.json + same per-project master.xlsx
snapshot + same per-project events.jsonl snapshot + same now →
byte-identical PortfolioBrief tuple → byte-identical Markdown + JSON
output. deltas.sort(key=lambda d: d.slug) enforces deterministic
project order; generated_at is microsecond-truncated to second
precision.
transaction.append / transaction.update calls anywhere.events_writer.append_* calls anywhere (REVIZE 3 of the Phase 9
brief; Q-RP-01 governance refinement deferred to Phase 14).openpyxl.load_workbook(read_only=True, data_only=True) for every
master.xlsx open.master.xlsx#none outputs[] entry documents the READ-ONLY
contract: no logical sheet is touched.portfolio.config.json.active_projects[].slug.Schema-first override Section 4c paterni reuse (drift-check Phase 5 doğum belgesi). event_kind=audit row append per rules/events-writer.md Section 4c — event_type field YASAK per Section 6 disambiguation.
import os
import sys
from pathlib import Path
sys.path.insert(0, os.getcwd())
project_slug = os.environ.get("PSEO_PROJECT_ID")
if not project_slug:
print("PSEO_PROJECT_ID not set — audit event skip")
sys.exit(0)
report_date = os.environ.get("REPORT_DATE", "2026-05-06")
workspace_root_env = os.environ.get("PSEO_WORKSPACE_ROOT")
workspace_root = (
Path(workspace_root_env) if workspace_root_env
else Path.home() / "Documents" / "platinum-seo-workspace"
)
from scripts.state import events_writer
events_writer.append_audit(
project_id=project_slug,
audit_action="accessed",
audit_target=f"reports:portfolio-weekly-brief:{report_date}",
actor="agent:portfolio-weekly-brief",
workspace_root=workspace_root,
notes=f"local_aggregation report-only (portfolio-weekly-brief; date={report_date})",
)
schemas/portfolio-config.schema.json v1.1
(cadence/slas/active_projects branches), schemas/skill-frontmatter.schema.json
(this frontmatter validates against it), schemas/events.schema.json
(READ-only awareness; event_kind="work" filter).scripts/reporting/render_template.py
(string.Template engine reuse — actually re-instantiated locally
in render_brief_markdown for purity). NO transaction.py, NO
events_writer.py, NO workflow_runner.py imports.scripts/reporting/portfolio_weekly_brief.py.templates/reports/portfolio-weekly-brief.template.md.tests/skills/test_portfolio_weekly_brief.py (≥6 cases incl.
cadence/sla schema validate, freshness sentinel, empty events
tolerance, cross-project delta merge, natural_language min length,
forbidden tokens guard).skills/planning/master-task-sync/SKILL.md
(Phase 8 W-D1 — local aggregation + plugin-agnostik discipline).schemas/skill-frontmatter.schema.json Draft 7; cadence + sla
branches validated against portfolio-config.schema.json v1.1.Use when / Also use when / Do not use when are
STRING content inside description, not separate fields.transaction.* / events_writer.* imports
in the transform module.now → byte-stable
output (asserted by smoke test).npx claudepluginhub popiliadam/platinum-seo-engine --plugin platinum-seo-engineUse when: kullanıcı "aylık portföy", "portfolio monthly roundup", "tüm projeler aylık", "aylık roundup", "monthly roundup", "portföy aylık özet", "active_projects aylık rapor" der ya da cadence.monthly_roundup.day_of_month cron tetiklenir; portföy çapında bir aylık KPI roll-up + EditorialOverrides notları istendiğinde devreye girer. Also use when: portfolio.config.json v1.1 mevcut + active_projects doluyken (1-12 entry, schema maxItems=12); her aktif proje için master.xlsx ulaşılabilir; aylık 30 günlük dilim üzerinden exec_summary + keywords_up + pages_up + tech_seo_done + content_revised + new_content + next_month_plan toplaması istenir; per-project EditorialOverrides (sla_days / priority / cadence / override_rationale / ramp_plan) precedence ile raporlanır; READ-ONLY agregasyon yeterli (yazma kapsamı YOK). Do not use when: portfolio.config.json yokken (init-portfolio önce çalışmalı, DURUR PortfolioConfigMissingError); tek proje aylık istenirse (monthly-report skill'ine yönlendir, bu skill PORTFÖY scope); haftalık dökümle karıştırma (portfolio-weekly-brief skill'i ayrı); master.xlsx writer çağrısı isteniyorsa (FORBIDDEN — bu skill 100% READ-ONLY, hiçbir master_task hücresine yazmaz).
Resumes portfolio projects by discovering project state, surfacing progress, and recommending next steps. Useful for multi-session portfolio work.
Generates a weekly business retrospective from snapshots, learnings, skill-usage telemetry, and optional revenue data. Outputs decisions, shipped items, stalled work, skill activity, and suggested next focus.