AgentSkillsCN

reconcile

将多项目视角与生态系统规划相融合,生成对齐报告并设置检查点,助力上下文快速恢复。

SKILL.md
--- frontmatter
name: reconcile
description: Reconcile multi-project perspectives with ecosystem planning. Creates alignment report and checkpoint for context recovery.
stage: 5

Reconcile Skill (Stage 5)

This skill aggregates project perspectives and reconciles them against ecosystem-level planning, generating alignment reports and checkpoints.

When to Use

Use this skill when:

  • Multiple projects have completed discovery/planning stages
  • Need to verify ecosystem assumptions against project reality
  • Context was lost and need structured recovery
  • Starting cross-project coordination work

Input Requirements

Per-Project Outputs (Expected Locations)

For each project in the ecosystem:

code
{project}/
├── .gt/
│   ├── memory/
│   │   └── semantic.json       # From /lisa:discover
│   ├── research.md             # From /lisa:research (optional)
│   ├── beads/                  # From /lisa:structure
│   └── convoys/                # From /lisa:structure
└── scopecraft/                 # From /lisa:plan (project-level)
    └── *.md

Ecosystem-Level Planning (Expected Location)

code
{ecosystem-root}/
└── scopecraft/
    ├── VISION_AND_STAGE_DEFINITION.md
    ├── ROADMAP.md
    ├── EPICS_AND_STORIES.md
    ├── RISKS_AND_DEPENDENCIES.md
    ├── METRICS_AND_PMF.md
    └── OPEN_QUESTIONS.md

Reconciliation Procedure

Phase 1: Aggregate Project Perspectives

For each project, extract:

FieldSourcePurpose
namesemantic.json → project.nameIdentify project
statussemantic.json → project.statusCurrent state
tech_stacksemantic.json → tech_stackTechnical reality
constraintssemantic.json → constraintsLimitations
roadmap_phasescopecraft/ROADMAP.mdWhere project thinks it is
open_work.gt/beads/Pending tasks
blockers.gt/convoys/What's blocking

Phase 2: Extract Ecosystem Assumptions

From ecosystem scopecraft/ docs, extract what the ecosystem ASSUMES about each project:

FieldSourcePurpose
assumed_statusROADMAP.md, platform tablesWhat ecosystem thinks
assumed_dependenciesRISKS_AND_DEPENDENCIES.mdExpected dependencies
assumed_featuresEPICS_AND_STORIES.mdExpected capabilities
assumed_timelineROADMAP.md phasesExpected delivery
assumed_pmfMETRICS_AND_PMF.mdExpected metrics

Phase 3: Compare and Identify Misalignments

For each project, compare:

code
Project Self-Report          vs          Ecosystem Assumption
─────────────────────────────────────────────────────────────
project.status               vs          assumed_status
project.tech_stack           vs          assumed_tech_stack
project.roadmap_phase        vs          assumed_timeline
project.open_work            vs          assumed_features
project.blockers             vs          assumed_dependencies

Phase 4: Generate Outputs

Output: ALIGNMENT_REPORT.md

markdown
# PIE3 Ecosystem Alignment Report

**Generated:** {timestamp}
**Projects Analyzed:** {count}
**Misalignments Found:** {count}

## Executive Summary

{1-3 sentence summary of alignment state}

## Project Status Matrix

| Project | Self-Reported | Ecosystem Assumed | Aligned? |
|---------|---------------|-------------------|----------|
| RRSAA   | MVP, security done | MVP, security P0 blocker | ❌ |
| NoMoreCV | Multi-tenant 60% | Multi-tenant "in progress" | ⚠️ |
| Vouch4u | Production + ZKP ready | Production, ZKP "planned" | ❌ |

## Detailed Misalignments

### Project: {name}

**Category:** {status | features | timeline | dependencies}

| Aspect | Project Says | Ecosystem Assumes | Gap |
|--------|--------------|-------------------|-----|
| ... | ... | ... | ... |

**Recommended Correction:**
- [ ] Update ecosystem doc: {specific file and section}
- [ ] Or: Verify with project owner if self-report is accurate

## Steering Questions

Questions requiring human decision:

1. **{Project}**: {Question about discrepancy}
   - Option A: Trust project self-report, update ecosystem docs
   - Option B: Verify with project owner, may need re-discovery

## Checkpoint Reference

Full machine-readable state saved to: `scopecraft/.checkpoint.json`
To restore context: `/lisa:reconcile --restore`

Output: .checkpoint.json

json
{
  "$schema": "reconcile-checkpoint-v1",
  "generated": "2026-01-30T12:00:00Z",
  "ecosystem": {
    "root": "/path/to/pie3-com",
    "scopecraft_hash": "abc123",
    "projects_analyzed": ["rrsaa", "nomorecv", "vouch4u"]
  },
  "projects": {
    "rrsaa": {
      "path": "/path/to/rrsaa",
      "semantic_hash": "def456",
      "self_reported_status": "MVP",
      "self_reported_features": ["auth", "marketplace", "shopping-cart"],
      "self_reported_blockers": [],
      "open_beads": 12,
      "open_convoys": 3
    }
  },
  "assumptions": {
    "rrsaa": {
      "assumed_status": "MVP, security blocker",
      "assumed_features": ["auth", "marketplace"],
      "source_docs": ["ROADMAP.md:L45", "RISKS.md:L128"]
    }
  },
  "misalignments": [
    {
      "project": "rrsaa",
      "category": "status",
      "project_says": "security resolved",
      "ecosystem_assumes": "security P0 blocker",
      "severity": "high",
      "correction": "Update RISKS_AND_DEPENDENCIES.md R3"
    }
  ],
  "steering_questions": [
    {
      "id": "sq-001",
      "project": "rrsaa",
      "question": "Confirm security vulnerabilities are resolved?",
      "options": ["Trust project", "Verify with owner"],
      "status": "pending"
    }
  ],
  "recovery_instructions": {
    "quick": "Read this file to restore context",
    "full": "Re-run /lisa:reconcile to rebuild from sources"
  }
}

Output: PERSPECTIVES.md

markdown
# PIE3 Project Perspectives

**Generated:** {timestamp}
**Source:** Aggregated from project .gt/ outputs

## Project: RRSAA

**Self-Reported Status:** MVP
**Tech Stack:** React, Cloudflare Workers, Neon, pgvector
**Current Phase:** Core marketplace functional

### What's Built
- Authentication (httpOnly cookies, OAuth)
- Marketplace browsing
- Profile management
- Shopping cart (no checkout)

### What's In Progress
- Semantic search (DB ready, no frontend)
- AI agents (UI only, no automation)

### Blockers
- None reported

---

## Project: NoMoreCV

{...similar structure...}

Checkpoint Recovery Procedure

Quick Recovery (--restore flag)

  1. Read .checkpoint.json
  2. Validate hashes haven't changed (warn if stale)
  3. Load misalignments and steering_questions
  4. Present current alignment state without re-scanning

Full Recovery (no flag)

  1. Re-scan all project .gt/ directories
  2. Re-read ecosystem scopecraft/ docs
  3. Regenerate comparison matrix
  4. Update checkpoint with new state

Drift Detection

Both methods should produce same understanding. If they differ:

  • Checkpoint is stale (projects changed)
  • Prompt user to run full reconcile
  • Log drift for debugging

Quality Gates

GateRequirement
projects_foundAt least 1 project .gt/ directory found
ecosystem_docs_foundscopecraft/ directory exists with docs
checkpoint_valid.checkpoint.json is valid JSON
alignment_generatedALIGNMENT_REPORT.md created
no_critical_driftQuick and full recovery produce same result

Error Handling

If project .gt/ not found:

  • Add to missing_projects list in report
  • Recommend running /lisa:discover on that project
  • Continue with available projects

If ecosystem docs outdated:

  • Note last-modified dates in report
  • Recommend review before trusting assumptions

Integration with Lisa Pipeline

code
Stage 0: /lisa:research   → .gt/research.md (optional)
Stage 1: /lisa:discover   → .gt/memory/semantic.json
Stage 2: /lisa:plan       → scopecraft/*.md (per-project)
Stage 3: /lisa:structure  → .gt/beads/, .gt/convoys/
                              ↓
              [Run on each project]
                              ↓
Stage 5: /lisa:reconcile  → ecosystem ALIGNMENT_REPORT.md
                              ↓
              [Human steering / corrections]
                              ↓
Stage 6: Ecosystem planning with verified assumptions

Next Steps

After reconcile completes:

  1. Review ALIGNMENT_REPORT.md for misalignments
  2. Answer steering questions
  3. Update ecosystem docs OR re-run project discovery
  4. Proceed to ecosystem-level planning with confidence