Portfolio Weekly Brief 标志

Portfolio Weekly Brief

社区
popiliadam
portfolio-weekly-brief

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).

Add to TypingMind

概览

发布者popiliadam
代码仓库platinum-seo-engine
技能名称portfolio-weekly-brief
星标数
26
复刻数
3
附带文件
仅含指令
许可协议AGPL-3.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 popiliadam 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Portfolio Weekly Brief AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/popiliadam/platinum-seo-engine/tree/main/skills/reporting/portfolio-weekly-brief
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/popiliadam/platinum-seo-engine.git /tmp/platinum-seo-engine
mkdir -p .claude/skills
cp -r /tmp/platinum-seo-engine/skills/reporting/portfolio-weekly-brief .claude/skills/portfolio-weekly-brief
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Portfolio Weekly Brief,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Portfolio Weekly Brief。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Portfolio Weekly Brief 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

portfolio-weekly-brief — reporting skill (Phase 9 Wave 1)

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/).

Inputs (frontmatter contract)

NameTypeDefaultNotes
portfolio_rootstring—Optional. Defaults to projects/_portfolio/ under workspace root.
week_endstring—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).

Outputs (artifacts produced)

  • 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.

Consumed (READ-ONLY)

#SourceDiscipline
1portfolio.config.json v1.1active_projects + cadence + slas
2per-project master.xlsx#master_taskcreated_date / done_date in window
3per-project _state/events.jsonlevent_kind=work, last 7 days
4per-project last_sync_at (config field)freshness vs weekly_sync_max_days

Schema authority

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.

Transform contract

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.

Template

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.
  • Totals breakdown table (tasks_added / tasks_done / work_events / fresh / stale projects).

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.

Freshness flag semantics

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.

DURUR conditions

Stop and flag the manager — do not patch, do not fall back.

  1. PortfolioConfigSchemaError — 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.
  2. WeekEndParseError — caller-supplied week_end is not a valid ISO date OR the cadence-derived week_end could not be computed.
  3. WorkspaceRootUnsetError — PSEO_WORKSPACE_ROOT env var unset AND no explicit workspace_root passed.
  4. FreshnessFlagInputError — last_sync_at malformed, OR sla_days out of range, OR now is naive (timezone-unaware).

Idempotency contract

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.

READ-ONLY discipline

  • NO transaction.append / transaction.update calls anywhere.
  • NO 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.

Plugin agnostik

  • Project slugs flow in via portfolio.config.json.active_projects[].slug.
  • Zero hardcoded slug literals in the transform module (asserted by the worker brief acceptance gate #9 + the skill test suite's base64-obfuscated grep guard).

Audit Event Emit (Q-RP-01 RESOLVED 2026-05-06 Phase B post-closeout)

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.

python
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})",
)

Cross-references

  • Schemas: 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).
  • Cross-modules (IMPORT-only): 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.
  • Transform: scripts/reporting/portfolio_weekly_brief.py.
  • Template: templates/reports/portfolio-weekly-brief.template.md.
  • Tests: 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).
  • Pattern reference: skills/planning/master-task-sync/SKILL.md (Phase 8 W-D1 — local aggregation + plugin-agnostik discipline).

Discipline checklist

  • TODO/fallback YASAK — every DURUR raises, none silently downgrade.
  • Schema-first — frontmatter validates against schemas/skill-frontmatter.schema.json Draft 7; cadence + sla branches validated against portfolio-config.schema.json v1.1.
  • Plugin-agnostik — no slug literals; slugs flow from portfolio.config.json.
  • ADR-013: Use when / Also use when / Do not use when are STRING content inside description, not separate fields.
  • READ-ONLY — zero transaction.* / events_writer.* imports in the transform module.
  • Append-only state — events.jsonl is READ-only consumed; this skill does NOT append (REVIZE 3, Q-RP-01 defer Phase 14).
  • Idempotency contract — same inputs + same now → byte-stable output (asserted by smoke test).
  • Forbidden tokens (4 grep CLEAN): the four Phase 7+ lesson tokens (per-call / per-url credit-cost-per-X fields, the Q-CO-01 metric naming token, hardcoded slugs) are absent; transform contains no leftover task markers in code.
  • natural_language phrases ≥ 30 char (min length sentinel asserted by test).
  • line count gate < 600 (transform).

常见问题

Portfolio Weekly Brief AI 技能有什么作用?

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-p...

为什么在 TypingMind 中使用 Portfolio Weekly Brief?

因为您只需安装一次,就能搭配任何模型使用。Portfolio Weekly Brief 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Portfolio Weekly Brief?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/popiliadam/platinum-seo-engine/tree/main/skills/reporting/portfolio-weekly-brief。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Portfolio Weekly Brief?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Portfolio Weekly Brief 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Portfolio Weekly Brief 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Portfolio Weekly Brief AI 技能免费吗?

是的。popiliadam 已在 GitHub 上根据 AGPL-3.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇