Agent skill

decision-extraction

Identify and formalize durable product and technical decisions from agent outputs into long-term memory. Activate after Discovery produces artefacts, Delivery resolves trade-offs, or product direction materially changes.

Stars 123
Forks 27

Install this agent skill to your Project

npx add-skill https://github.com/Fr-e-d/GAAI-framework/tree/main/.gaai/core/skills/cross/decision-extraction

Metadata

Additional technical details for this skill

id
SKILL-DECISION-EXTRACTION-001
track
cross-cutting
author
gaai-framework
status
stable
version
1.0
category
cross
updated at
1775347200

SKILL.md

Decision Extraction

Purpose / When to Activate

Activate after:

  • Discovery produces epics, scope clarifications, or priorities
  • Delivery resolves technical trade-offs or architectural constraints
  • QA surfaces systemic issues requiring policy decisions
  • Product direction materially changes

Do NOT use for trivial steps, implementation details, brainstorming, or reversible micro-choices.


Process

  1. Decision Consistency Gate (mandatory). Before extracting any new decision:

    • Read contexts/memory/index.md → scan the Decision Registry by domain to identify relevant existing decisions
    • Load the specific decisions/DEC-{ID}.md files for decisions in the affected domain(s)
    • Verify the proposed decision does NOT contradict any active decision
    • If contradiction found: either explicitly supersede (set superseded_by in old file + supersedes in new file) with rationale, or STOP and escalate to human. When escalating due to contradiction: before surfacing the escalation, grep contexts/ for all occurrences of DEC-{id} (where {id} is the contradicted decision's ID). Collect every file path that references the contradicted DEC — memory files, stories, and architecture docs. Present this impact list alongside the escalation message so the human can assess scope before deciding. If the contexts/ directory scan fails: proceed with the escalation without the impact list — the escalation is more important than the impact details.
    • If unable to determine consistency → STOP and escalate to human
    • Never record a decision silently if it may conflict with an existing one
  2. Scan outputs for explicit or implicit decisions: architectural choices, accepted trade-offs, scope boundaries, prioritization shifts, constraints introduced

  3. Filter strictly for durable, governance-relevant decisions

  4. Deduplication check: Scan the Decision Registry in index.md for existing entries covering the same topic. If found: (a) if the new decision supersedes the old, update the old DEC-{ID}.md file's frontmatter (status: superseded, superseded_by: DEC-{new-id}) and record the supersession in the new entry's supersedes field; (b) if the new decision confirms the old, skip writing a duplicate. 3b. Cross-reference assignment: For the new decision, populate related_to with up to 5 DEC IDs that are directly related (same domain cluster, supersession chain, or shared concern). Only include decisions the new entry explicitly builds on, refines, or constrains. If no strong relation exists, leave as [].

  5. Convert each into a structured ADR file (see Output Format below):

    • Context
    • Decision
    • Impact
  6. Classify using the 10 canonical domains: architecture, matching, expert-system, billing, booking, infrastructure, strategy, governance, market, content. And 3 levels: strategic (WHAT/WHY), architectural (HOW), operational (PROCESS).

  7. Get next available ID from decisions/_log.md → write decisions/DEC-{N}.md

  8. Update _log.md: increment next available ID, add one-line entry for the new decision

  9. MANDATORY GATE — Update index.md: Add one row per new decision to the Decision Registry table (columns: DEC ID | domain | level | one-line description). Increment the file count in the Shared Categories table. Verify: re-read the updated index.md and confirm the new DEC-{N} entry is present before completing this skill. This step is a blocking gate — do not output success until confirmed.

  10. Summary range check: Read the Summaries section of index.md. If the new DEC ID exceeds the highest DEC covered by the latest summary file (e.g., summary covers 90–155 but new DEC is 156), append a line to decisions/_log.md: # ⚠️ PENDING: extend summary range to DEC-{new-max-id} — run memory-refresh. This signals the next memory-refresh cycle to extend the summary. Do NOT create a new summary mid-delivery.


Output Format

Each decision is an individual ADR file: decisions/DEC-{N}.md (sequential numeric ID).

yaml
---
id: DEC-{N}
domain: architecture | matching | expert-system | billing | booking | infrastructure | strategy | governance | market | content
level: strategic | architectural | operational
title: "Decision Title"
status: active
created_by: discovery
created_at: YYYY-MM-DD
last_updated_by: discovery
last_updated_at: YYYY-MM-DD
supersedes: null          # or DEC-{old-id} if replacing
superseded_by: null
tags:
  - {relevant tags}
related_to: []            # optional — max 5 DEC IDs
---

# DEC-{N} — Decision Title

## Context
...

## Decision
...

## Impact
...

Quality Checks

  • All major decisions become explicit memory
  • No repeated reasoning across sessions
  • Governance trail is traceable
  • Memory grows only with high-signal knowledge

Non-Goals

This skill must NOT:

  • Summarize entire sessions
  • Capture raw logs
  • Duplicate existing decisions
  • Store trivial steps
  • Invent interpretation without artefact support

If future agents benefit from knowing it → extract it. If not → do not store it. Memory is leverage — not history.

Expand your agent's capabilities with these related and highly-rated skills.

Fr-e-d/GAAI-framework

ci-watch-and-fix

Watch GitHub Actions CI after PR creation, detect failures, extract logs, apply minimal fixes, and re-push — keeping the delivery session alive until CI resolves or escalating after 3 cycles. Activate immediately after gh pr create and before marking the story done.

123 27
Explore
Fr-e-d/GAAI-framework

qa-review

Validate that implemented code fully satisfies Story acceptance criteria, respects rules, and introduces no regressions. This is the hard quality gate — no pass means no delivery. Activate after implementation is complete.

123 27
Explore
Fr-e-d/GAAI-framework

compose-team

Assemble the context bundles for each sub-agent based on evaluate-story output. Produces spawn-ready packages for Planning, Implementation, QA, or MicroDelivery sub-agents. Activate after evaluate-story, before spawning any sub-agent.

123 27
Explore
Fr-e-d/GAAI-framework

coordinate-handoffs

Validate sub-agent handoff artefacts, sequence phase transitions, and manage retry and escalation logic. Activate after each sub-agent terminates to determine next action.

123 27
Explore
Fr-e-d/GAAI-framework

implement

Generate correct, minimal, maintainable code that satisfies a validated Story's acceptance criteria against an execution plan. Activate when a Story is validated, a plan exists, and all prerequisites are unambiguous.

123 27
Explore
Fr-e-d/GAAI-framework

delivery-high-level-plan

Transform validated Stories into a clear, minimal, governed execution plan. Used by the Planning Sub-Agent as the first planning pass before prepare-execution-plan for Tier 2/3, or as the sole planning output for simple Stories.

123 27
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results