Skip to content
Development
Skill

/night-market-collective-memory

Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.

From plugin
claude-night-market
337200 skills59 agents162 commands1 MCP
Install
$ npx -y skills add athola/claude-night-market --skill night-market-collective-memory --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/night-market-collective-memory

Context preview

The summary Claude sees to decide when to auto-load this skill.

Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.

SKILL.md

night-market-collective-memory.SKILL.md
name: night-market-collective-memory
description: 'Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.'

Night Market Collective Memory

This repo treats GitHub Discussions as agent collective memory (ADR-0007, `docs/adr/0007-github-discussions-integration.md`, accepted 2026-02-19). Sessions are amnesiac by default. The memory system fixes that with four layers: Discussions (cross-session, searchable), the decision journal (append-only tradeoff and lesson logs), numbered ADRs (architecture decisions), and dated research syntheses in `docs/research/`. One caveat on the fourth layer: `docs/research/` is gitignored and machine-local, so it exists only on the authoring machine and is empty on fresh clones. A synthesis counts as collective memory only after promotion to a Discussion, ADR, or rule. This skill tells you where each kind of knowledge lives, how to read it, and how to write to it.

One hard fact first: there is NO `gh discussion` subcommand. Discussions are GraphQL-only. Minister playbooks once referenced a CLI that does not exist, and ADR-0007 replaced every reference with `gh api graphql` calls. Never guess a `gh discussion` command.

Routing table: which memory layer

| You have | Record or read it via | |----------|----------------------| | Settled battle, revert, dead end | `night-market-failure-archaeology` skill (read only, do not relitigate) | | Tradeoff (chose A, sacrificed B) | Decision journal `docs/tradeoffs.md`, TR-NNN entry | | Lesson, failed approach, rework | Decision journal `docs/lessons-learned.md`, LL-NNN entry | | Architecture decision | Numbered ADR in `docs/adr/` (0001-0017 exist today) | | Session insight, skill stats | `[Learning]` Discussion (auto-posted daily, see below) | | Strategy debate, big design | `[War Room]` Discussion (Decisions category) | | Durable synthesis, audit result | `[Knowledge]` Discussion (Knowledge category) | | PR review finding worth keeping | `[PR Finding]` Discussion (Learnings category) | | Multi-source research output | Dated file in `docs/research/` (LOCAL ONLY: gitignored, absent on fresh clones). Promote durable syntheses to a `[Knowledge]` Discussion, ADR, or rule to make them collective memory |

Retrieval discipline: search before re-investigating

Before investigating any question about this repo's history, design, or past failures, run these searches first. Re-deriving a settled answer wastes a session and risks contradicting an accepted decision.

# 1. Search Discussions by keyword (tested 2026-07-02)
gh api graphql -f query='
query($q: String!) {
  search(query: $q, type: DISCUSSION, first: 10) {
    nodes { ... on Discussion { number title url category { name } } }
  }
}' -f q='repo:athola/claude-night-market YOUR SEARCH TERMS'

# 2. Search local docs of record. Note: docs/research/ is gitignored
#    and machine-local, so it is empty on fresh clones and this
#    search only helps on the authoring machine.
rg -il "your terms" docs/research/ docs/adr/ CHANGELOG.md

# 3. Check the decision journal (if the files exist yet, see below)
rg -in "your terms" docs/tradeoffs.md docs/lessons-learned.md

Also check the `night-market-failure-archaeology` sibling for settled battles. A leyline SessionStart hook (`plugins/leyline/hooks/fetch-recent-discussions.sh`) already injects the 5 most recent Decisions discussions at session start, bounded to under 600 tokens with a 3-second timeout.

Discussion taxonomy (verified live 2026-07-02)

Repo categories include the four ADR-0007 ones (Decisions, Deliberations, Learnings, Knowledge) plus GitHub defaults. Title prefixes are the working taxonomy:

| Prefix | Category | What it is | Verified examples | |--------|----------|------------|-------------------| | `[Learning]` | Learnings | Daily digest, auto-posted | #601, #602 (2026-07-01/02) | | `[Knowledge]` | Knowledge | Durable syntheses | #448, #449 (April 2026 skill audit synthesis and Wave-3 backlog) | | `[War Room]` | Decisions | Strategy deliberations | #222 (collective memory design), #271 (wiring publishing into workflows) | | `[PR Finding]` | Learnings | Review findings worth keeping | #424, #595 |

The [Learning] pipeline

Daily digests are auto-posted by abstract's Stop hook, part of the improvement feedback loop (Issue #69). The chain:

1. `plugins/abstract/hooks/skill_execution_logger.py` (PreToolUse/PostToolUse) logs skill executions. 2. `plugins/abstract/scripts/aggregate_skill_logs.py` writes `~/.claude/skills/LEARNINGS.md` with skill-performance stats (skills analyzed, high-impact issues, slow and low-rated skills). 3. `plugins/abstract/hooks/post_learnings_stop.py` (Stop hook, registered in `plugins/abstract/hooks/hooks.json`) posts a `[Learning] YYYY-MM-DD` digest, deduplicated by title. Opt-out: `~/.claude/skills/discussions/config.json`. 4. Promotion: 3 or more fire-emoji reactions on a Learnings discussion promote it to a GitHub Issue via `plugins/abstract/scripts/promote_discussion_to_issue.py` (default threshold 3, configurable via `promotion_threshold`).

Reading Discussions (tested queries)

List recent discussions, newest first (tested 2026-07-02, returned #602 and siblings):

gh api graphql -f query='
query($owner: String!, $name: String!) {
  repository(owner: $owner, name: $name) {
    discussions(first: 10,
                orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes { number title category { name } createdAt url }
    }
  }
}' -f owner=athola -f name=claude-night-market

Fetch one discussion by number. The number is a GraphQL `Int`, so pass it with `-F` (typed), not `-f` (string). Passing `-f` fails with a type error:

gh api graphql -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    discussion(number: $number) {
      title body url cat
Read more
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

Get the whole plugin

Other skills on claude-night-market.