workflow-memory
Maintains workflow-scoped task memory for Productize runs using .productize/tasks/<name>/memory/ files. Use when a task prompt provides workflow memory paths and requires the agent to read, update, compact, and promote durable context across PRD task executions. Do not use for PR review remediation, global user preferences, or programmatic event-log summarization.
- License 许可
- MIT
- 最近更新
- 2026-08-07
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- workflow-memory
- description
- Maintains workflow-scoped task memory for Productize runs using .productize/tasks/<name>/memory/ files. Use when a task prompt provides workflow memory paths and requires the agent to read, update, compact, and promote durable context across PRD task executions. Do not use for PR review remediation, global user preferences, or programmatic event-log summarization.
02 资源文件 1
- 参考文档references/memory-guidelines.md2.0 KB
03 SKILL.md 正文
Workflow Memory
Maintain the workflow memory files provided by the caller.
Required Inputs
- Workflow memory directory path.
- Shared workflow memory file path.
- Current task memory file path.
- Optional caller signal indicating whether either file must be compacted before proceeding.
Workflow
If the caller marks the task as isolated or task-local-only for parallel execution, read the shared workflow memory as required context but never modify it. Write all new facts only to the current task memory file. The Productize coordinator owns shared-memory reconstruction after task branches are merged.
-
Load the memory state before editing code.
- Read the shared workflow memory file and the current task memory file before making any code change.
- Treat these files as mandatory context for the run, not optional notes.
- If the caller marks either file for compaction, read
references/memory-guidelines.mdand compact that file before proceeding with implementation.
-
Keep memory current while the task runs.
- Update the current task memory whenever the objective changes, a non-obvious decision is made, an important learning appears, or an error changes the plan.
- Promote only durable cross-task context into the shared workflow memory.
- Keep task-local execution details in the current task memory file.
-
Close out the run cleanly.
- Update memory before any completion claim, handoff, or commit.
- Record only facts that help the next run start faster and with fewer mistakes.
- Re-read
references/memory-guidelines.mdbefore compacting if the file has grown noisy or repetitive.
Critical Rules
- Do not invent history, decisions, or status that did not happen.
- Do not copy large code blocks, stack traces, or task specs into memory files.
- Do not duplicate facts that are obvious from the repository, git diff, task file, or PRD documents.
- Do not read unrelated task memory files unless the shared workflow memory or the caller explicitly points to them.
- Keep shared memory durable and cross-task. Keep task memory local and operational.
- In isolated parallel execution, never write shared workflow memory even when a durable fact would normally qualify for promotion; record it in task memory for coordinator promotion after integration.
Promotion Decision Test
Before promoting an item from task memory to shared workflow memory, ask:
- Will another task need this information to avoid a mistake or rediscovery?
- Is this fact durable across multiple runs, not just the current execution?
- Is this information NOT already obvious from the PRD, techspec, task files, or the repository itself?
All three must be "yes" to promote. If any is "no," the item stays in task memory.
Examples that belong in shared workflow memory:
- A discovered constraint that affects multiple tasks (e.g., "the API rate limits to 100 req/s, batch operations must respect this")
- A cross-cutting architectural decision made during implementation (e.g., "chose channel-based coordination over mutex for the pipeline")
- An open risk that future tasks must account for (e.g., "migration depends on schema v3 which is not yet deployed to staging")
Examples that stay in task memory:
- Files touched during this task's implementation
- Debugging steps taken to resolve a task-specific error
- The current task's objective and acceptance criteria snapshot
- A workaround applied only to the current task's scope
Compaction Rules
When the caller flags a memory file for compaction, apply these rules inline. Read references/memory-guidelines.md for full detail, but these rules are sufficient for most compaction passes:
- If both files need compaction, compact the shared workflow memory first, then compact the task memory. The shared file sets the cross-task context that the task file should not duplicate.
- Preserve: current state, durable decisions, reusable learnings, open risks, and handoff notes.
- Remove: repetition, stale notes, long command transcripts, and facts already derivable from the repository, PRD, or task files.
- Rewrite retained items as short factual bullets. Do not preserve narrative logs or chronological play-by-play.
- Keep the default section headings from the template intact. Remove empty sections only if they are truly unused.
When To Read the Reference
Read references/memory-guidelines.md when any of these apply:
- the caller requests compaction and the inline rules above do not cover the situation
- it is unclear what belongs in shared memory versus task memory
- the current memory file has drifted into noisy notes or redundant detail
Error Handling
- If any caller-provided memory path is missing, stop and report the mismatch instead of guessing another path.
- If memory content conflicts with the repository or task specification, trust the repository and task documents, then correct the memory file.
- If compaction would remove active risks, decisions, or handoff context, keep those items and remove lower-value repetition first.
04 同仓库更多 Skills
review-round
Performs a comprehensive code review of a PRD implementation and generates a review round directory with issue files compatible with fix-reviews. Use when reviewing implemented PRD tasks, creating a manual review round without an external provider, or performing a quality audit of code changes. Do not use for fetching reviews from external providers, fixing existing review issues, executing PRD tasks, or editing source code.
productize
Productize root skill for building, shipping, operating, and growing AI products inside a coding harness. Routes work across thesis framing, discovery, research, positioning, finance, decision making, requirements, design, metrics, AI-builder execution, code implementation, verification, stakeholder narratives, growth, launch, operation, and learning workflows. Use when the user wants to build a product from zero, improve an existing product, or needs product work that spans multiple lifecycle stages before code, launch, operation, or growth execution.
productize-wwas
Why-What-Acceptance. Use when writing backlog items in Why-What-Acceptance format, breaking features into independent valuable work, or adding strategic context to delivery items.
productize-writing-plans
Create comprehensive implementation plans with bite-sized tasks. Use when you have requirements before touching code.
productize-write-spec
Write a feature spec or PRD from a problem statement or feature idea. Use when turning a vague idea into a structured document, scoping goals and non-goals, defining success metrics and acceptance criteria, or breaking a big ask into phases.
productize-write-query
Write optimized SQL for a specific dialect with best practices. Use when translating a natural language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a large partitioned-table query, or getting Snowflake, BigQuery, Postgres, or other dialect syntax.