Skip to content
Skills Library
Management & product · Automation

openspec-journal

/openspec-journal

Owns the append-only interaction journal for an OpenSpec change — `openspec/changes/<change>/journal.jsonl` — and the fixed event vocabulary written to it (change.created, artifact.added/revised, mode.chosen, task.start/complete/blocked, verifier.result, decision, handoff, archive, skill.invoked, agent.spawned, context.compacted, turn.start/end). Invoked by name from the openspec-* skills whenever one of those events happens; not a user-facing entry point on its own. Use for "log this to the journal", "emit a journal event", "what fields does task.complete need", or "why did the journal helper

Repository
rhdh-skills ↗
Licence
Apache-2.0
Last repository change
27.10.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
2
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/openspec-journal-precompact-hook.sh, scripts/openspec-journal.py

What it does and when to use it

Owns the append-only interaction journal for an OpenSpec change — `openspec/changes/<change>/journal.jsonl` — and the fixed event vocabulary written to it (change.created, artifact.added/revised, mode.chosen, task.start/complete/blocked, verifier.result, decision, handoff, archive, skill.invoked, agent.spawned, context.compacted, turn.start/end). Invoked by name from the openspec-* skills whenever one of those events happens; not a user-facing entry point on its own. Use for "log this to the journal", "emit a journal event", "what fields does task.complete need", or "why did the journal helper

Triggers from the description

log this to the journalemit a journal eventwhat fields does task.complete need
Original author description

Owns the append-only interaction journal for an OpenSpec change — `openspec/changes/<change>/journal.jsonl` — and the fixed event vocabulary written to it (change.created, artifact.added/revised, mode.chosen, task.start/complete/blocked, verifier.result, decision, handoff, archive, skill.invoked, agent.spawned, context.compacted, turn.start/end). Invoked by name from the openspec-* skills whenever one of those events happens; not a user-facing entry point on its own. Use for "log this to the journal", "emit a journal event", "what fields does task.complete need", or "why did the journal helper

How it works

  1. Route
  2. Turn bookending is the default discipline
  3. Ordering and length
  4. Precompact hook
  5. Completion
Original SKILL.md headings · 70 lines, 437 words
SKILL.md preview
---
name: openspec-journal
description: >-
  Owns the append-only interaction journal for an OpenSpec change —
  `openspec/changes/<change>/journal.jsonl` — and the fixed event vocabulary
  written to it (change.created, artifact.added/revised, mode.chosen,
  task.start/complete/blocked, verifier.result, decision, handoff, archive,
  skill.invoked, agent.spawned, context.compacted, turn.start/end). Invoked by
  name from the openspec-* skills whenever one of those events happens; not a
  user-facing entry point on its own. Use for "log this to the journal",
  "emit a journal event", "what fields does task.complete need", or "why did
  the journal helper reject my write".
compatibility: "Python 3.9+ on PATH. No network access. Self-contained; discovers the OpenSpec workspace root by walking up for an openspec/changes/ directory."
---

# OpenSpec journal

Write one line of structured, append-only history per load-bearing interaction
inside an OpenSpec change, so a change's `journal.jsonl` becomes a session log
that survives context compaction and long-running work — not a full
transcript, and not optional narration.

## Route

Run the bundled helper that ships with this skill. Resolve
`scripts/openspec-journal.py` next to this skill's `SKILL.md` (the host skill
install path). Do **not** look for it under the product repo's `scripts/` —
that path is never installed. Keep the product repo as the working directory
so the helper can find `openspec/changes/`:

```bash
python3 <skill-dir>/scripts/openspec-journal.py <change> <event> [k=v ...]
python3 <skill-dir>/scripts/openspec-journal.py <change> show [--limit N]
python3 <skill-dir>/scripts/openspec-journal.py <change> doctor
python3 <skill-dir>/scripts/openspec-journal.py --schema
```

Run with no arguments for the full usage contract, and `--schema` for the
authoritative event-name -> required-field table. Read those outputs instead
of memorizing the vocabulary — the script is the single source of truth for
it, so a caller who invents its own field name or event name gets a rejection,
not a silent write.

## Turn bookending is the default discipline

Whenever the active working directory is inside an OpenSpec change, bookend
every user turn with two writes, independent of whether any file changed:

1. **Before starting work**, log `turn.start input="<paraphrase of the ask,
   <=200 chars>"`.
2. **After finishing**, log `turn.end output="<what changed, was decided, or
   was answered>"`.

Writing the input *before* doing the work is a commitment device against
post-hoc rationalization. This applies to every prompt, including pure Q&A
turns with no file changes.

## Ordering and length

Events describe things that already happened — log `change.created` after
`openspec new change <name>` succeeds, not before. `input`/`output` are
rejected (exit 2) above 200 characters so the caller rewrites shorter rather
than truncating silently; move long content into `design.md` or an ADR and
point at it (`output="See design.md §3 for full rationale."`).

`--input-file` / `--output-file` paths must resolve under the change
directory. Change names `.` and `archive` are rejected. Reserved fields
`ts`, `event`, and `phase` cannot be forged via `k=v`.

## Precompact hook

`scripts/openspec-journal-precompact-hook.sh` emits `context.compacted` for
the most recently active change when an agent host fires a pre-compaction
lifecycle hook (for example Claude Code's `PreCompact`). It is self-contained,
silent on any failure, and never blocks compaction. Wire it once per host;
skills never call it directly.

## Completion

Complete when the event was accepted (exit 0) and, for `show`/`doctor`, the
requested output was returned. A rejected write (exit 1 usage error, exit 2
validation error) is not silently swallowed — surface the helper's exact error
to the caller so it can fix the event name, field, or length and retry.
Files in this package (4)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB
  • scripts/openspec-journal-precompact-hook.sh 3 KB
  • scripts/openspec-journal.py 24 KB

Versions

The database has no other skills named openspec-journal.

Database snapshot: 13.11.2026 · package version c4f85a7d28c7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 88openspec-ff-change
    快速创建实现所需的所有产出物。当用户想要快速创建实现所需的所有产出物,而不是逐个创建时使用。
  • 90openspec-plan
    Create OpenSpec change proposals. Use when: user wants to plan a feature, create a proposal, or start a new OpenSpec change.
  • 100publish-openspec-wiki
    将 OpenSpec change 的生命周期状态映射到 docs/changes WIKI 文档。新建 change 后生成 active 页面,归档后迁移为 archive 页面,并同步索引和 Sidebar、检查 delta specs 与 include 链接。遇到 openspec new、openspec archive 或需要全量校准 docs/changes 时使用。
  • 100openspec-pipeline-order
    把一批 OpenSpec change 排成变更流水线,并给每一格写清它自己的验收口径。 当用户说「把这批 change 排进流水线」「按顺序画好图」「排一下先后」「哪些能并行」 「今晚把它们都跑掉」「接着往下跑」时使用。走 openspec_pipeline 的 wire:串行 / 串并 / 任意依赖,一次调用落成图。不写 pipeline.json、不删格子、不覆盖人手断开过的线、 不替用户改模型。
  • 96openspec-archive-change
    Archive a completed OpenSpec change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete. Also use when the user says "openspec archive" or "opsx archive".
  • 88openspec-continue-change
    通过创建下一个产出物继续处理 OpenSpec 变更。当用户想要推进其变更、创建下一个产出物或继续其工作流程时使用。

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.