qore-meta-log-decision

Record major engineering decisions into the QoreLogic meta-ledger with rationale, risk grading, and auditable evidence.

16 stars

Best use case

qore-meta-log-decision is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Record major engineering decisions into the QoreLogic meta-ledger with rationale, risk grading, and auditable evidence.

Teams using qore-meta-log-decision should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/qore-meta-log-decision/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/devops/qore-meta-log-decision/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/qore-meta-log-decision/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How qore-meta-log-decision Compares

Feature / Agentqore-meta-log-decisionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Record major engineering decisions into the QoreLogic meta-ledger with rationale, risk grading, and auditable evidence.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Log Decision Skill
## Implement Meta-Ledger for Auditable Decision Tracking

**Skill Name:** qore-meta-log-decision
**Version:** 1.0
**Purpose:** Implement QoreLogic SOA Ledger for development decisions

---

## Usage

```
/qore-meta-log-decision <decision_type> <decision> <rationale> [risk_grade]
```

Or invoke in conversation:
> "Let's log this architecture decision to the meta-ledger..."

---

## What This Skill Does

Implements QoreLogic's **SOA Ledger** principle for meta-governance: maintaining a Merkle-chained,
cryptographically signed audit trail of all major development decisions. Enables traceability,
accountability, and rollback capability.

---

## Skill Instructions

When this skill is invoked:

### 1. Gather Decision Details

Collect comprehensive information:

**Required Fields:**
- **decision_type:** Category from taxonomy below
- **decision:** What was decided (concise)
- **rationale:** Why this decision was made
- **evidence:** Supporting data/citations
- **approver:** Who approved (Lead Reviewer, User, etc.)
- **risk_grade:** L1/L2/L3 classification

**Optional Fields:**
- **alternatives_considered:** What else was evaluated
- **trade_offs:** What we're sacrificing
- **reversibility:** Can this be undone? How easily?
- **dependencies:** What depends on this decision
- **timeline_impact:** How does this affect schedule

### 2. Classify Decision Type

Use standardized taxonomy:

| Decision Type | Description | Risk Grade | Examples |
|---------------|-------------|------------|----------|
| **ARCHITECTURE** | System design, component structure | L2/L3 | "Use SQLite not PostgreSQL" |
| **SECURITY** | Cryptography, auth, key management | L3 | "Migrate to platform keystore" |
| **SCOPE_CHANGE** | Add/remove features | L2/L3 | "Defer PyVeritas to Phase 3" |
| **TECH_STACK** | Languages, frameworks, dependencies | L2 | "Add pytest-cov for coverage" |
| **TIMELINE** | Schedule adjustments | L1/L2 | "Extend Week 2 by 3 days" |
| **QUALITY_GATE** | Standards, thresholds, criteria | L2 | "Require 80% test coverage" |
| **PROCESS** | Development workflow changes | L1/L2 | "Weekly drift audits every Friday" |
| **VENDOR** | Third-party service selection | L2/L3 | "Use GitHub Actions for CI/CD" |
| **DEPLOYMENT** | Infrastructure, hosting decisions | L3 | "Deploy to AWS Lambda" |
| **BUDGET** | Resource allocation, costs | L2 | "Allocate 2 engineers full-time" |

### 3. Validate Risk Grade

Ensure correct L1/L2/L3 classification:

**L3 CRITICAL (Requires User Approval):**
- Security/cryptographic changes
- Data schema modifications
- Authentication/authorization
- Production deployment architecture
- Budget >$10K
- Timeline slips >2 weeks

**L2 FUNCTIONAL (Requires Lead Reviewer Approval):**
- Architecture changes
- Tech stack additions
- Scope changes
- Quality gate definitions
- Timeline slips 1-2 weeks
- Budget $1K-$10K

**L1 ROUTINE (Lead Reviewer Decision):**
- Process improvements
- Documentation updates
- Minor timeline adjustments (<1 week)
- Budget <$1K

### 4. Load Current Ledger State

Read `docs/META_LEDGER.md` to get:
- Last entry ID
- Previous entry hash
- Current chain status

### 5. Create New Entry

Generate ledger entry:

```json
{
  "entry_id": 5,
  "timestamp": "2025-12-24T16:00:00Z",
  "decision_type": "ARCHITECTURE",
  "decision": "Use SQLite for Phases 1-2, defer PostgreSQL until 100+ agent scale",
  "rationale": "KISS principle - no proven bottleneck yet. Database audit shows <100 TPS sufficient for pilot. SQLite simpler, zero ops overhead, suitable for single-node deployment.",
  "evidence": [
    "Database audit: current load <10 TPS",
    "SQLite supports <100 TPS per documentation",
    "PostgreSQL adds deployment complexity without current benefit"
  ],
  "alternatives_considered": [
    "PostgreSQL: Rejected - no proven scalability need",
    "MongoDB: Rejected - relational data better fit",
    "MySQL: Rejected - no advantages over SQLite for this scale"
  ],
  "trade_offs": {
    "accepting": "Single-writer limit (~100 TPS), migration cost if scale exceeds",
    "gaining": "Simplicity, zero-ops deployment, file-based backups"
  },
  "approver": "Lead Reviewer",
  "risk_grade": "L2",
  "reversibility": "Medium - migration to PostgreSQL possible but requires schema export/import",
  "dependencies": [
    "Database hardening plan (Week 2)",
    "Backup strategy (requires file-based approach)"
  ],
  "timeline_impact": "Saves 1 week setup time vs PostgreSQL deployment",
  "related_decisions": [3, 4],
  "previous_hash": "b4a1f2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1",
  "entry_hash": "c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
}
```

### 6. Calculate Hash

Generate Merkle chain link:

```python
import hashlib
import json

def calculate_entry_hash(entry, previous_hash):
    # Create canonical representation
    hash_payload = {
        "entry_id": entry["entry_id"],
        "timestamp": entry["timestamp"],
        "decision_type": entry["decision_type"],
        "decision": entry["decision"],
        "rationale": entry["rationale"],
        "approver": entry["approver"],
        "risk_grade": entry["risk_grade"],
        "previous_hash": previous_hash
    }

    # Sort keys for deterministic hashing
    canonical = json.dumps(hash_payload, sort_keys=True)

    # SHA-256 hash
    return hashlib.sha256(canonical.encode()).hexdigest()
```

### 7. Append to Ledger

Update `docs/META_LEDGER.md`:

```markdown
## Entry #5: SQLite vs PostgreSQL Decision

**Type:** ARCHITECTURE (L2)
**Date:** 2025-12-24 16:00:00 UTC
**Approver:** Lead Reviewer

### Decision
Use SQLite for Phases 1-2, defer PostgreSQL migration until 100+ agent scale proven necessary.

### Rationale
KISS principle - no proven bottleneck. Database audit shows current load <10 TPS, SQLite supports <100 TPS. PostgreSQL adds deployment complexity without current benefit.

### Evidence
- Database audit: current load <10 TPS
- SQLite documentation: supports <100 TPS single-writer
- PostgreSQL deployment: requires containerization, ops overhead

### Alternatives Considered
1. **PostgreSQL** - Rejected: No proven scalability need, adds complexity
2. **MongoDB** - Rejected: Relational data better fit for ledger structure
3. **MySQL** - Rejected: No advantages over SQLite at this scale

### Trade-offs
**Accepting:**
- Single-writer limit (~100 TPS)
- Migration cost if scale exceeds assumptions

**Gaining:**
- Simplicity (zero-ops, file-based)
- Faster setup (saves 1 week)
- File-based backups (easier disaster recovery)

### Reversibility
**Medium** - Migration to PostgreSQL possible via schema export/import. Estimated 1 week effort if needed.

### Dependencies
- Database hardening plan (Week 2) - must use file-based backup strategy
- Performance testing (Week 7) - validates TPS assumptions

### Timeline Impact
Saves 1 week setup time vs PostgreSQL deployment in Week 1.

### Related Decisions
- #3: Database backup strategy
- #4: Multi-tenant isolation approach

### Hash Chain
```
Previous: b4a1f2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1
Current:  c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
```

---
```

### 8. Validate Chain Integrity

After appending, verify:

```python
def validate_ledger_integrity(ledger_file):
    """Verify entire Merkle chain integrity"""
    entries = load_ledger_entries(ledger_file)

    previous_hash = "0" * 64  # Genesis hash

    for entry in entries:
        # Recalculate hash
        expected_hash = calculate_entry_hash(entry, previous_hash)

        if entry["entry_hash"] != expected_hash:
            return False, f"Chain broken at entry {entry['entry_id']}"

        previous_hash = entry["entry_hash"]

    return True, "Chain integrity verified"
```

### 9. Check L3 Approval Requirements

If risk_grade is L3:

```markdown
## ⚠️ L3 APPROVAL REQUIRED

This decision requires explicit user approval before implementation.

**Decision:** {decision}
**Risk Grade:** L3 CRITICAL
**Impact:** {impact description}

**Approval Status:** PENDING
**Approval Deadline:** {24 hours from now}

**To approve, user must:**
1. Review decision, rationale, and evidence
2. Confirm understanding of trade-offs
3. Provide written approval: "APPROVED: Entry #{entry_id}"
4. Sign approval (optional but recommended)

**Until approved:**
- Implementation blocked
- Related work can proceed if not dependent
- Decision remains in CONDITIONAL status
```

---

## Examples

### Example 1: Architecture Decision (L2)

**Command:**
```
/qore-meta-log-decision ARCHITECTURE "Use SQLite for Phases 1-2" "KISS - no proven bottleneck" L2
```

**Output:**
```markdown
✅ Meta-Ledger Updated: Entry #5

**Decision Type:** ARCHITECTURE (L2)
**Decision:** Use SQLite for Phases 1-2
**Approver:** Lead Reviewer
**Status:** APPROVED (L2 - Lead Reviewer authority)

**Hash Chain:** ✅ Integrity verified
**File Updated:** docs/META_LEDGER.md

**Next Steps:**
- Implementation can proceed
- No user approval required (L2)
```

### Example 2: Security Decision (L3)

**Command:**
```
/qore-meta-log-decision SECURITY "Migrate passphrase to platform keystore" "Fix CRITICAL vulnerability" L3
```

**Output:**
```markdown
⚠️ Meta-Ledger Updated: Entry #6 (PENDING APPROVAL)

**Decision Type:** SECURITY (L3 CRITICAL)
**Decision:** Migrate passphrase storage to platform keystore
**Impact:** Fixes CRITICAL security vulnerability (plaintext master passphrase)

**Status:** CONDITIONAL - Awaiting user approval
**Approval Required By:** 2025-12-25 16:00:00 UTC (24 hours)

**Rationale:**
Current plaintext storage at ~/.qorelogic/security/identity.secret creates single point of compromise. Platform keystore (Windows Credential Manager, macOS Keychain, Linux Secret Service) provides OS-level encryption and access control.

**Trade-offs:**
- **Accepting:** Platform dependency, different implementation per OS
- **Gaining:** Hardware-backed encryption, audit trail, no plaintext secrets

**Reversibility:** Low - migration one-way, manual keystore deletion needed to rollback

**User Action Required:**
Please review and respond with:
- "APPROVED: Entry #6" to proceed with implementation
- "CONDITIONAL: Entry #6 - {concerns}" to request changes
- "REJECTED: Entry #6 - {rationale}" to block implementation

**File Updated:** docs/META_LEDGER.md (entry marked CONDITIONAL)
```

### Example 3: Scope Change (L2)

**Command:**
```
/qore-meta-log-decision SCOPE_CHANGE "Defer PyVeritas to Phase 3" "Focus on validated features first" L2
```

**Output:**
```markdown
✅ Meta-Ledger Updated: Entry #7

**Decision Type:** SCOPE_CHANGE (L2)
**Decision:** Defer PyVeritas implementation to Phase 3 (Week 9+)
**Approver:** Lead Reviewer
**Status:** APPROVED

**Rationale:**
PyVeritas is aspirational (80% accuracy per research, not validated). Focus Phases 1-2 on working features (CBMC wrapper, Z3 integration) with proven ROI. Re-evaluate PyVeritas after baseline comparison in Week 5.

**Impact:**
- Phase 1-2: Tier 3 verification uses CBMC + Z3 (proven tools)
- Phase 3: Evaluate PyVeritas based on validation data
- Documentation: Update to reflect current vs. planned status

**Timeline Impact:** None - removes unproven work from critical path

**Hash Chain:** ✅ Integrity verified
**File Updated:** docs/META_LEDGER.md
```

---

## Meta-Ledger File Structure

Located at: `docs/META_LEDGER.md`

```markdown
# Q-DNA Development Meta-Ledger
## Auditable Decision Trail

**Version:** 1.0
**Created:** 2025-12-24
**Purpose:** Merkle-chained audit trail of development decisions
**Chain Status:** ✅ VALID (7 entries)

---

## Ledger Statistics

- **Total Entries:** 7
- **L3 Decisions:** 2 (1 approved, 1 pending)
- **L2 Decisions:** 4
- **L1 Decisions:** 1
- **Chain Breaks:** 0
- **Last Validation:** 2025-12-24 16:30:00 UTC

---

## Entry #0: Genesis (Ledger Initialization)

**Type:** GENESIS
**Date:** 2025-12-24 12:00:00 UTC
**Approver:** System

### Decision
Initialize Meta-Ledger for Q-DNA development governance.

### Hash Chain
```
Previous: 0000000000000000000000000000000000000000000000000000000000000000
Current:  a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2
```

---

## Entry #1: ...

[Continue with entries as shown in examples]

---

## Pending Approvals

### Entry #6: Keystore Migration (L3)
**Status:** CONDITIONAL - Awaiting user approval
**Submitted:** 2025-12-24 15:00:00 UTC
**Deadline:** 2025-12-25 15:00:00 UTC (23 hours remaining)
**Action Required:** User review and approval

---

## Chain Validation Log

| Date | Validator | Status | Notes |
|------|-----------|--------|-------|
| 2025-12-24 16:30 | System | ✅ VALID | 7 entries verified |
| 2025-12-24 15:00 | System | ✅ VALID | 6 entries verified |
```

---

## Success Criteria

This skill succeeds when:

1. ✅ **Complete Audit Trail:** All major decisions logged, zero gaps
2. ✅ **Chain Integrity:** 100% hash chain validation passes
3. ✅ **L3 Compliance:** All L3 decisions have user approval before implementation
4. ✅ **Traceability:** Can trace any implementation back to decision rationale
5. ✅ **Accountability:** Clear approver for every decision
6. ✅ **Reversibility Analysis:** Know cost/risk of undoing any decision

---

## Integration with QoreLogic

This skill implements:

- **SOA Ledger:** Merkle-chained audit trail
- **Risk Grading:** L1/L2/L3 classification with approval workflows
- **Progressive Formalization:** Decision → Evidence → Hash → Signature
- **Divergence Doctrine:** Transparent decision-making, no hidden choices

---

## When to Use

Invoke this skill for:

- ✅ Architecture decisions (component structure, database choice, etc.)
- ✅ Security changes (cryptography, auth, key management)
- ✅ Scope changes (add/remove features, timeline adjustments)
- ✅ Tech stack changes (new dependencies, frameworks, languages)
- ✅ Quality gates (coverage thresholds, performance SLAs)
- ✅ Deployment architecture
- ✅ Budget allocations
- ✅ Any decision that affects multiple developers or phases

**Don't use for:**
- ❌ Trivial choices (variable names, code formatting)
- ❌ Implementation details (which loop type to use)
- ❌ Personal preferences without technical impact

---

## Output

This skill will:

1. Create/update `docs/META_LEDGER.md`
2. Add new entry with hash chain link
3. Validate entire chain integrity
4. Flag L3 items for user approval
5. Generate approval request if needed
6. Update ledger statistics

**Validation Output:**

```markdown
## Chain Integrity Validation

**Timestamp:** 2025-12-24 16:30:00 UTC
**Entries Validated:** 7
**Result:** ✅ PASS

**Hash Verification:**
- Entry #0 (Genesis): ✅ Valid
- Entry #1: ✅ Valid (links to #0)
- Entry #2: ✅ Valid (links to #1)
- Entry #3: ✅ Valid (links to #2)
- Entry #4: ✅ Valid (links to #3)
- Entry #5: ✅ Valid (links to #4)
- Entry #6: ✅ Valid (links to #5)

**Chain Head:** c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
```

---

## Notes

- Meta-Ledger is **append-only** - never delete or edit entries
- L3 decisions **block implementation** until approved
- Hash chain enables **tamper detection** - any modification breaks chain
- Decisions are **reversible** but reversals must also be logged
- **Future decisions** can reference past entries by ID
- **Quarterly audits** should validate chain integrity

---

**Remember:** The meta-ledger isn't bureaucracy - it's institutional memory. When someone asks "why did we choose X?", the answer is in the ledger with full context and rationale.

Related Skills

developing-claude-code-meta

16
from diegosouzapw/awesome-omni-skill

MUST be loaded when setting up, installing, migrating, reviewing, auditing, or checking CLAUDE.md files in projects. Covers installing the standard CLAUDE.md into new projects, migrating existing CLAUDE.md content to READMEs (progressive disclosure), and auditing projects for conformance. Invoke PROACTIVELY when user mentions CLAUDE.md, project setup, agent configuration, or code meta files.

session-decisions

16
from diegosouzapw/awesome-omni-skill

Use when user wants to extract technical decisions and deliberations from Claude Code session history for resume writing or documentation. Triggers on "의사결정 정리", "세션 결정", "이력서 소재", "resume decisions", "session decisions", "기술 의사결정", "decision log".

ctx-add-decision

16
from diegosouzapw/awesome-omni-skill

Record architectural decision. Use when a trade-off is resolved or a non-obvious design choice is made that future sessions need to know.

architecture-decision-records

16
from diegosouzapw/awesome-omni-skill

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

architecture-decision-record

16
from diegosouzapw/awesome-omni-skill

ADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences. Use when making or documenting architectural decisions.

5w1h-decision

16
from diegosouzapw/awesome-omni-skill

5W1H Decision Framework Tool. Use for: (1) Systematic decision-making before creating todos, (2) Preventing duplicate implementation, (3) Detecting avoidance behavior, (4) Ensuring agile refactor compliance with executor/dispatcher separation

Tech Stack & Architecture Decision

16
from diegosouzapw/awesome-omni-skill

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies", "architecture decisions", "what stack should we use", or any request to select and document frontend, backend, database, auth, hosting, and infrastructure choices for a project.

seo-meta-tags

16
from diegosouzapw/awesome-omni-skill

Comprehensive SEO and social metadata implementation for HTML, Next.js App Router, and Vite (React & Vue) projects. Use when: (1) Creating, editing, or reviewing meta tags, Open Graph, Twitter Cards, canonical/hreflang links, JSON-LD structured data, theme-color, or favicon/manifest config; (2) Working with html/index.html, nextjs/metadata.ts, nextjs/dynamic-metadata-example.tsx, vite/index.html, vite/SEO.tsx, or vite/SEO.vue; (3) Adding SEO to a new page or route; (4) Migrating from react-helmet, vue-meta, or next-seo; (5) Generating dynamic metadata for content-driven pages; (6) Auditing metadata for completeness or best-practice compliance.

rn-meta

16
from diegosouzapw/awesome-omni-skill

Primary entry point for React Native/Expo development. Use FIRST for any React Native work—new projects, UI, styling, navigation, state, lists, storage, forms, auth, or ANY library decision. Enforces an opinionated stack (Expo Router, TypeScript, Uniwind) with library rules that ALWAYS override suggestions from other React Native skills.

metasploit-framework

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "use Metasploit for penetration testing", "exploit vulnerabilities with msfconsole", "create payloads with msfvenom", "perform post-exp...

metalsmith-website-skills

16
from diegosouzapw/awesome-omni-skill

Build static websites using Metalsmith's component-based architecture. Triggers on phrases like "build me a website", "create a landing page", "help me make a site". Includes JavaScript and CSS development standards.

Meta Dispatcher & Task Orchestrator

16
from diegosouzapw/awesome-omni-skill

PRD 驱动的任务调度与技能管理专家。接收完整 PRD/需求文档,负责拆解业务、选择技术栈、路由到合适的专业 Skill,并维护从方案到落地的全流程。