PKC Materialize (WikiTicket → OKF)
Batch-emit OKF concepts from WikiTicket without making PKC the system of record for status.
When to use
- Project uses WikiTicket SDD (
.work/todo.jsonl,bin/worklog) - User asks to “sync tickets into knowledge”, “materialize the worklog”, “import ADRs/designs”
Mapping (normative)
| WikiTicket source | OKF type(s) |
|---|---|
| Work item epic/story | Feature + TicketLink |
| Work item task/subtask | TicketLink (+ parent Feature link when possible) |
Plan (docs/plans/*.md) |
Specification |
| Design / walkthrough | Design |
| ADR | DecisionRecord |
| Release notes | Release |
| Significant PR page | CodeChange |
Process
Confirm knowledge root and ensure bundle:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/pkc_common.py" init-bundle --repo . --bundle knowledgeObtain worklog fold (repo-local CLI — not part of this plugin):
bin/worklog fold > /tmp/fold.json # or pipe: bin/worklog fold | python3 "${CLAUDE_PLUGIN_ROOT}/scripts/pkc_materialize.py" \ --repo . --bundle knowledge --from-docsOr from a saved fold / fixture:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/pkc_materialize.py" \ --repo . \ --fold /tmp/fold.json \ --include features,decisions,designs,releases,tickets,specs \ --from-docsRespect truth_state
- Do not overwrite
snapshot/superseded/archivedwith current data unless--forceor user requests.
- Do not overwrite
Idempotency
- Re-run updates in place; report
created/updated/skipped.
- Re-run updates in place; report
Preserve
wiki_key,worklog_id,external_id,external_systemwhen present.Present the materialize report to the user. Offer okf validation if available.
Config (optional)
.pkc/config.yml or under pkc: in .work/config.yml:
pkc:
enabled: true
knowledge_root: knowledge
materialize:
from_worklog: true
from_docs: true
include: [features, decisions, designs, releases, tickets, specs]
Rules
- Never hand-edit
.work/todo.jsonl— usebin/worklogonly. - PKC does not publish to wiki (WikiTicket wiki-publish remains the publishing plane).
- Generated concepts set
generated: true.
Done when
- Report lists created/updated/skipped counts
- TicketLinks exist for open work items
- Features exist for epic/story items
- Catalogs refreshed