incitaciones 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/distilled/agent-value-alignment/SKILL.md +63 -0
- package/content/distilled/agent-value-alignment/references/examples.md +46 -0
- package/content/distilled/agent-value-alignment/references/integration.md +73 -0
- package/content/distilled/agent-value-alignment/references/layer-1-value.md +62 -0
- package/content/distilled/agent-value-alignment/references/layer-2-governance.md +74 -0
- package/content/distilled/agent-value-alignment/references/layer-3-runtime-prompt.md +68 -0
- package/content/distilled/agent-value-alignment/references/layer-4-infrastructure.md +58 -0
- package/content/distilled/agent-value-alignment/references/report-template.md +113 -0
- package/content/distilled/codebase-cartography/SKILL.md +49 -0
- package/content/distilled/codebase-cartography/references/report-template.md +61 -0
- package/content/distilled/codebase-cartography/references/smell-signatures.md +58 -0
- package/content/distilled/codebase-cartography/references/zoom-levels.md +99 -0
- package/content/distilled/create-issues/SKILL.md +18 -8
- package/content/distilled/create-issues/references/criteria.md +5 -0
- package/content/distilled/create-issues/references/templates.md +13 -0
- package/content/distilled/issue-review/SKILL.md +1 -0
- package/content/distilled/issue-review/references/pass-0-preflight.md +34 -0
- package/content/distilled/issue-review/references/pass-5-executability.md +5 -0
- package/content/manifest.json +338 -1
- package/package.json +1 -1
- package/pi-package/prompts/agent-value-alignment.md +10 -0
- package/pi-package/prompts/codebase-cartography.md +10 -0
- package/pi-package/skills/agent-value-alignment/SKILL.md +69 -0
- package/pi-package/skills/agent-value-alignment/references/examples.md +46 -0
- package/pi-package/skills/agent-value-alignment/references/integration.md +73 -0
- package/pi-package/skills/agent-value-alignment/references/layer-1-value.md +62 -0
- package/pi-package/skills/agent-value-alignment/references/layer-2-governance.md +74 -0
- package/pi-package/skills/agent-value-alignment/references/layer-3-runtime-prompt.md +68 -0
- package/pi-package/skills/agent-value-alignment/references/layer-4-infrastructure.md +58 -0
- package/pi-package/skills/agent-value-alignment/references/report-template.md +113 -0
- package/pi-package/skills/codebase-cartography/SKILL.md +55 -0
- package/pi-package/skills/codebase-cartography/references/report-template.md +61 -0
- package/pi-package/skills/codebase-cartography/references/smell-signatures.md +58 -0
- package/pi-package/skills/codebase-cartography/references/zoom-levels.md +99 -0
- package/pi-package/skills/create-issues/SKILL.md +18 -8
- package/pi-package/skills/create-issues/references/criteria.md +5 -0
- package/pi-package/skills/create-issues/references/templates.md +13 -0
- package/pi-package/skills/issue-review/SKILL.md +1 -0
- package/pi-package/skills/issue-review/references/pass-0-preflight.md +34 -0
- package/pi-package/skills/issue-review/references/pass-5-executability.md +5 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Layer 2 — Governance: Specifying Authorized Behavior
|
|
2
|
+
|
|
3
|
+
**Question:** What behavior is authorized, prohibited, and escalated — and who reviews it?
|
|
4
|
+
|
|
5
|
+
## Why agent governance is different
|
|
6
|
+
|
|
7
|
+
In traditional software, behavior = code; correct code ⇒ correct behavior. In agent systems, behavior emerges from code × model × prompts × tools × execution context — none fully specifiable in advance. Traditional governance (code review, automated tests, deploy gates) is necessary but insufficient. You need mechanisms that detect behavioral drift *even when the code is correct*.
|
|
8
|
+
|
|
9
|
+
## Core artifacts
|
|
10
|
+
|
|
11
|
+
| Artifact | Purpose |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **Behavioral Specification Document (BSD)** | Authoritative reference for *how* the agent should behave; source of truth for prompts, evals, audits. Covers: purpose, authorized behaviors, prohibited behaviors, escalation criteria, behavioral principles, success metrics, known limitations/edge cases. |
|
|
14
|
+
| **Agent Charter** | One-page "constitution" readable by non-technical stakeholders: purpose, scope, principles, prohibitions, escalation, success/failure criteria, governance. |
|
|
15
|
+
| **Kill Criteria Document** | Pre-committed stopping conditions, signed before development (see Layer 1). |
|
|
16
|
+
| **Behavioral ADRs (BADRs)** | Record of intent for significant behavioral decisions — context, decision, options, rationale, consequences, implementation. Distinguishes bug from feature when behavior is questioned. |
|
|
17
|
+
| **Falsifiable Value Proposition** | Propagates verbatim into BSD §1, system prompt, and review agenda (see Integration). |
|
|
18
|
+
| **Pre-mortem** | Imagine failure in advance; generate mitigations with owners. |
|
|
19
|
+
|
|
20
|
+
## The "scope creep by proxy" anti-pattern
|
|
21
|
+
|
|
22
|
+
The signature governance failure for agents: capabilities expand through accumulation of *individually reasonable* changes — tool proliferation, edge-case capability expansion, behavioral drift from model updates, prompt accumulation. Each change is justified by a use case; the cumulative expansion was never approved. Hard to detect in real time.
|
|
23
|
+
|
|
24
|
+
**Countermeasure:** explicit scope gates at defined milestones — behavioral scope, tool access, data access, output scope reviews — with deviations either formally approved (via BADR) or rolled back.
|
|
25
|
+
|
|
26
|
+
## Review ceremonies (augment traditional sprints)
|
|
27
|
+
|
|
28
|
+
- **Behavioral regression testing** at each sprint boundary — checks alignment, not just functional correctness.
|
|
29
|
+
- **Red-team reviews** at regular intervals — attempt to induce goal drift, specification gaming, scope violations.
|
|
30
|
+
- **Alignment reviews** by team members *not* in the recent sprint — external perspective catches gradual drift invisible to builders.
|
|
31
|
+
- **Incident post-mortems** that classify incidents as goal drift / specification gaming / scope violation, with prevention recommendations. Treat agent behavior incidents with the rigor of security incidents.
|
|
32
|
+
|
|
33
|
+
## Open-source / distributed governance
|
|
34
|
+
|
|
35
|
+
Contributors carry different understandings of the objective; PR review is poorly suited to evaluating behavioral alignment. Best practices: versioned behavioral specs, behavioral contribution guidelines, behavioral CI/CD on every PR, designated *alignment maintainers* distinct from technical maintainers.
|
|
36
|
+
|
|
37
|
+
## Multi-agent systems
|
|
38
|
+
|
|
39
|
+
If the target is a multi-agent system (orchestrator/worker hierarchies), the
|
|
40
|
+
single-agent checklists are necessary but not sufficient — drift can occur at
|
|
41
|
+
four levels invisible to per-agent review: **orchestrator drift** (task
|
|
42
|
+
decomposition diverges from the objective), **worker drift** (a worker
|
|
43
|
+
diverges from its sub-task), **coordination drift** (orchestrator–worker
|
|
44
|
+
interaction diverges), and **emergent drift** (collective behavior diverges
|
|
45
|
+
in ways not visible at the individual level).
|
|
46
|
+
|
|
47
|
+
**Additional AUDIT checks for multi-agent targets:**
|
|
48
|
+
- [ ] Every worker sub-task has an explicit, verifiable specification (not a
|
|
49
|
+
high-level instruction) and a defined success criterion.
|
|
50
|
+
- [ ] The orchestrator verifies worker results against the sub-task spec before
|
|
51
|
+
incorporating them.
|
|
52
|
+
- [ ] Cross-agent consistency checks exist (outputs of different workers are
|
|
53
|
+
consistent with each other and the overall objective).
|
|
54
|
+
- [ ] HITL review is configured at both orchestrator (task decomposition) and
|
|
55
|
+
worker (sub-task execution) levels.
|
|
56
|
+
|
|
57
|
+
See the synthesis §5.6 for the orchestrator/worker alignment patterns and the
|
|
58
|
+
multi-agent alignment prompts.
|
|
59
|
+
|
|
60
|
+
## AUDIT checks
|
|
61
|
+
|
|
62
|
+
- [ ] BSD exists and is version-controlled with the same rigor as code.
|
|
63
|
+
- [ ] Agent Charter exists (≤1 page, readable by non-technical stakeholders).
|
|
64
|
+
- [ ] Prohibited behaviors are explicit (negation), not implicit.
|
|
65
|
+
- [ ] Escalation triggers are specific (not "when uncertain" but the 7 named triggers — see Layer 3).
|
|
66
|
+
- [ ] Scope gates exist at milestones; deviations require BADR.
|
|
67
|
+
- [ ] Behavioral regression tests run at sprint boundaries.
|
|
68
|
+
- [ ] Red-team reviews occur on a cadence.
|
|
69
|
+
- [ ] *(Multi-agent only)* Sub-task specs, result verification, and cross-agent
|
|
70
|
+
consistency checks exist (see Multi-agent systems above).
|
|
71
|
+
|
|
72
|
+
## ESTABLISH (Day 2)
|
|
73
|
+
|
|
74
|
+
- Day 2 (1h): Write the Agent Charter (≤1 page). Draft the BSD (can be expanded later, but purpose/scope/prohibitions/escalation must exist from day one).
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Layer 3 — Runtime Prompt: Enforcing Alignment at Execution Time
|
|
2
|
+
|
|
3
|
+
**Question:** Do the runtime instructions actually anchor behavior to the objective — and are they verified?
|
|
4
|
+
|
|
5
|
+
## The foundational constraint: lost in the middle
|
|
6
|
+
|
|
7
|
+
LLM performance follows a **U-shaped curve**: models attend well to the beginning (primacy) and end (recency) of context and systematically underweight the middle (Liu et al., 2023; TACL 2024). Context length *alone* degrades performance 13.9–85% even with perfect retrieval (Du et al., 2025). An objective stated once at the top of a long system prompt, after tool results accumulate, is buried in the middle and statistically underweighted. This is structural, not an intelligence failure.
|
|
8
|
+
|
|
9
|
+
## Goal-anchoring patterns
|
|
10
|
+
|
|
11
|
+
| Pattern | Mechanism | Addresses |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| **Goal Sandwich** | Primary objective verbatim at top *and* bottom of system prompt | U-shaped attention |
|
|
14
|
+
| **Objective Echo** | Agent restates objective before each major action | Active retrieval vs. passive presence |
|
|
15
|
+
| **Scope Fence** | Explicit negation of prohibited actions | Implicit-scope unreliability |
|
|
16
|
+
| **Minimal Footprint Clause** | Resource/side-effect constraints | Instrumental convergence pressure |
|
|
17
|
+
| **Constitutional self-critique** | Critique-then-revise against stated principles (Bai et al., 2022) | Goal alignment at output time |
|
|
18
|
+
| **Persistent objective store** | Objective retrieved from outside the context window | Compression/summarization drift |
|
|
19
|
+
|
|
20
|
+
**Instruction hierarchy:** primary objective in first and last 5 lines; scope fence + minimal footprint early; operational detail in the (lower-attention) middle; constitutional critique principles near the end. Any constraint that must be reliably followed appears in the first or last 20% of the prompt.
|
|
21
|
+
|
|
22
|
+
**Critical failure mode:** placing safety/scope constraints only in the middle of a long prompt.
|
|
23
|
+
|
|
24
|
+
## Drift detection and self-check loops
|
|
25
|
+
|
|
26
|
+
- **ReAct + alignment verification** — extend Thought → Action → Observation with OBJECTIVE/PROGRESS/ALIGNMENT/SCOPE checks before each action. (ReAct outperformed pure CoT by 34% on ALFWorld.) *Failure mode:* context accumulation; mitigate with observation compaction, step limits, periodic goal re-injection.
|
|
27
|
+
- **OODA self-correction** — Observe/Orient/Decide/Act as a continuous self-monitoring loop after each major action.
|
|
28
|
+
- **Uncertainty/escalation prompts** — structured decision rules forcing stop-and-ask on: ambiguity, scope uncertainty, irreversibility, unexpected state, conflicting instructions, high stakes, confidence below threshold. Implements Anthropic's Minimal Footprint Principle.
|
|
29
|
+
|
|
30
|
+
## Eval design — the most important shift
|
|
31
|
+
|
|
32
|
+
From **output correctness** ("is the answer right?") to **outcome achievement** ("did this help the user accomplish their goal?"). A value-focused eval scores 0–4 (DID NOT HELP → FULLY ENABLED) and requires a gap analysis: what would reach Level 4?
|
|
33
|
+
|
|
34
|
+
**Judges:**
|
|
35
|
+
- **LLM-as-judge** (Zheng et al., 2023) — ~80% agreement with humans, matching human-human. *Mandatory mitigations:* evaluate pairwise in both orders (position bias); instruct against verbosity bias; **never use the same model as both agent and judge** (self-enhancement bias up to 25%).
|
|
36
|
+
- **G-Eval** (Liu et al., 2023) — chain-of-thought form-filling; generates evaluation steps before scoring.
|
|
37
|
+
|
|
38
|
+
**Behavioral regression tests** detect when a model/prompt/context change breaks previously-passing behavior. Require a golden dataset with ≥30% "failure class" examples (inputs that should trigger escalation/refusal/scope denial) — happy-path-only suites cannot detect regression in failure handling.
|
|
39
|
+
|
|
40
|
+
## Meta-prompting for goal fidelity
|
|
41
|
+
|
|
42
|
+
- **Reflexion** (Shinn et al., 2023) — verbal self-reflection in an episodic buffer, prepended to retries; 91% pass@1 on HumanEval vs. GPT-4's prior 80%.
|
|
43
|
+
- **Self-consistency** (Wang et al., 2023) — sample multiple reasoning paths, select the most goal-aligned; +17.9% on GSM8K.
|
|
44
|
+
- **Checkpoint output prompts** — force the agent to emit current goal/state/confidence before each major action (auditable record).
|
|
45
|
+
- **Meta-alignment prompts** — agent generates its own task-specific checklist before beginning.
|
|
46
|
+
|
|
47
|
+
## The alignment trade-off
|
|
48
|
+
|
|
49
|
+
- **RLHF / Constitutional AI** — embeds constraints in weights; robust to drift/injection; expensive, can be gamed if reward model is imperfect.
|
|
50
|
+
- **Prompt-based** — flexible, interpretable; subject to drift, overridable.
|
|
51
|
+
|
|
52
|
+
Production uses both: RLHF/CAI for foundational constraints, prompt-based for task-specific scope. The Claude model specification (principal hierarchy: Anthropic → operators → users → agent; Minimal Footprint, corrigibility, consistency) is the current state of the art.
|
|
53
|
+
|
|
54
|
+
## AUDIT checks
|
|
55
|
+
|
|
56
|
+
- [ ] Objective appears verbatim at top *and* bottom (Goal Sandwich); identical wording.
|
|
57
|
+
- [ ] Prohibited actions are explicit negations, not implicit.
|
|
58
|
+
- [ ] Minimal Footprint clause present.
|
|
59
|
+
- [ ] Escalation triggers are the 7 named types, not "when uncertain."
|
|
60
|
+
- [ ] Eval suite measures outcome achievement, not just output correctness.
|
|
61
|
+
- [ ] Golden dataset includes ≥30% failure-class examples.
|
|
62
|
+
- [ ] LLM-as-judge uses a *different* model than the evaluated agent.
|
|
63
|
+
- [ ] Behavioral regression tests run on every prompt/model change.
|
|
64
|
+
|
|
65
|
+
## ESTABLISH (Day 3–4)
|
|
66
|
+
|
|
67
|
+
- Day 3 (2h): Implement Goal Sandwich + Scope Fence (≥5 prohibited) + Minimal Footprint + Escalation Triggers. This is the minimum viable goal-anchoring prompt.
|
|
68
|
+
- Day 4 (3h): Write 10 eval cases — 5 happy-path, 3 scope-boundary, 2 drift. Run manually; fix failures before deploy.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Layer 4 — Infrastructure: State, Memory, and Observability
|
|
2
|
+
|
|
3
|
+
**Question:** How is state preserved, memory managed, and drift observed in production?
|
|
4
|
+
|
|
5
|
+
## Checkpointing: fault tolerance vs. alignment
|
|
6
|
+
|
|
7
|
+
- **Fault-tolerant checkpointing** asks: "can we resume after a crash?"
|
|
8
|
+
- **Alignment-oriented checkpointing** asks: "is the agent still pursuing the right goal, and can we roll back to a known-good state if it has drifted?"
|
|
9
|
+
|
|
10
|
+
The latter requires **goal-state verification at each checkpoint**, not just state persistence.
|
|
11
|
+
|
|
12
|
+
**LangGraph** (1.0 GA, Oct 2025) is the most mature production option: checkpoints at every super-step, pluggable backends (`PostgresSaver` for production), first-class `interrupt()` API for HITL resumable via `Command(resume=...)`, time-travel debugging, state mutation. Powers agents at ~400 companies (LinkedIn, Uber, Replit) with 8% latency overhead. **MemGPT/Letta** provides OS-inspired tiered memory (main context / recall DB / archival vector store) with LLM-managed tier movement.
|
|
13
|
+
|
|
14
|
+
Caveat: OpenAI Agents SDK and AutoGen lack native durable execution — teams must add Temporal/DBOS. Google ADK loses in-memory session state on Cloud Run restarts. Configure persistent storage from day one; retrofitting is significantly harder.
|
|
15
|
+
|
|
16
|
+
## Memory architecture as a first-class concern
|
|
17
|
+
|
|
18
|
+
"Memory deserves the same level of engineering investment as the LLM itself" (Du, 2026). Three dimensions:
|
|
19
|
+
|
|
20
|
+
- **Temporal scope** — working (subject to lost-in-the-middle), episodic (concrete experience records), semantic (abstracted knowledge; over-generalization risk), procedural (reusable skills; Voyager without its skill library showed 15.3× slower progression).
|
|
21
|
+
- **Representational substrate** — context-resident text (compression drift), vector stores, structured stores, executable repositories.
|
|
22
|
+
- **Control policy** — heuristic, prompted self-control (MemGPT; silent orchestration failure risk), learned/RL (e.g., AgeMem, per Du 2026; most capable, requires training infra).
|
|
23
|
+
|
|
24
|
+
Empirical stakes: Generative Agents without reflection degenerated to repetitive responses within 48 simulated hours; on MemoryArena (2026), active memory agents achieved 80%+ task completion vs. ~45% for long-context-only baselines. Models near-saturating LoCoMo plummet to 40–60% on MemoryArena — a deep gap between passive recall and active, decision-relevant memory.
|
|
25
|
+
|
|
26
|
+
## Safe stopping, rollback, and HITL
|
|
27
|
+
|
|
28
|
+
Safe stopping criteria (distinct from error conditions): uncertainty threshold, scope boundary, resource limit, anomaly detection, human review trigger. LangGraph's `interrupt()` provides the mechanism; the *design* challenge is choosing when to pause, what to surface, and how to incorporate feedback: approve / modify / rollback-and-retry / abort.
|
|
29
|
+
|
|
30
|
+
**Cost calculus favors false positives:** unnecessary human reviews are far cheaper than undetected goal drift leading to irreversible actions. Configure HITL at all irreversible action boundaries.
|
|
31
|
+
|
|
32
|
+
## Observability for drift detection
|
|
33
|
+
|
|
34
|
+
**Quantitative signals:** task completion rate, goal retention score, scope violation rate, rollback rate, HITL trigger rate, token efficiency (useful work / total tokens — flags unproductive spinning).
|
|
35
|
+
|
|
36
|
+
**Qualitative signals:** execution traces, reasoning traces, state snapshots, anomaly detection.
|
|
37
|
+
|
|
38
|
+
**Decay detection dashboard** tiers these into:
|
|
39
|
+
- Behavioral health (weekly) — eval pass rate, goal achievement, scope violations, escalations, errors.
|
|
40
|
+
- Adoption health (weekly) — WAU, tasks/user, retention, satisfaction.
|
|
41
|
+
- Value health (monthly) — primary value metric, cost/task, cost/user.
|
|
42
|
+
|
|
43
|
+
**Automatic review triggers:** eval pass rate drops >10% week-over-week; any red metric persists 2+ weeks; model or prompt change deployed (re-run full eval suite).
|
|
44
|
+
|
|
45
|
+
## AUDIT checks
|
|
46
|
+
|
|
47
|
+
- [ ] Checkpointing is alignment-oriented (goal-state verification, not just resume).
|
|
48
|
+
- [ ] Persistent backend configured from day one (not in-memory in production).
|
|
49
|
+
- [ ] Memory architecture is a deliberate choice across all three dimensions, not an afterthought.
|
|
50
|
+
- [ ] HITL interrupts configured at all irreversible action boundaries.
|
|
51
|
+
- [ ] Tracing/observability deployed before production (LangSmith or equivalent).
|
|
52
|
+
- [ ] Decay detection dashboard exists with the three tiers and automatic triggers.
|
|
53
|
+
- [ ] Full eval suite re-runs on every model/prompt change.
|
|
54
|
+
|
|
55
|
+
## ESTABLISH (Day 5)
|
|
56
|
+
|
|
57
|
+
- Day 5a (30 min): Schedule the first Value Realization Review for 90 days out.
|
|
58
|
+
- Day 5b (30 min – ½ day): Stand up the decay detection dashboard. *30 min only if metrics are already instrumented; up to half a day if instrumentation must be built.* Do not skip — without it, drift cannot be detected before lagging outcome metrics confirm it.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Agent Value Alignment — Report Template
|
|
2
|
+
|
|
3
|
+
Use this for both AUDIT and ESTABLISH modes. Replace `[ ]` placeholders.
|
|
4
|
+
|
|
5
|
+
## Severity rubric
|
|
6
|
+
|
|
7
|
+
Apply consistently to every finding so two auditors rate the same gap alike:
|
|
8
|
+
|
|
9
|
+
| Severity | Definition |
|
|
10
|
+
|---|---|
|
|
11
|
+
| **CRITICAL** | Breaks the governing invariant (an unenforced decision / unverified clause / unacted eval result) **or** leaves an irreversible-action boundary unguarded (no HITL, no rollback) |
|
|
12
|
+
| **HIGH** | A Layer-1 or Layer-2 artifact is missing, unfalsifiable, or unsigned (e.g., no kill criteria, no BSD, vague VP) — the loop cannot close without it |
|
|
13
|
+
| **MEDIUM** | An AUDIT check fails but a compensating control exists (e.g., eval suite present but golden dataset lacks failure-class examples) |
|
|
14
|
+
| **LOW** | Cadence or documentation gap (e.g., Value Realization Review not yet scheduled, dashboard not yet live) |
|
|
15
|
+
|
|
16
|
+
A layer is 🔴 if it has ≥1 CRITICAL finding; 🟡 if it has ≥1 HIGH/MEDIUM but no CRITICAL; 🟢 if all AUDIT checks pass.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Agent Value Alignment Report
|
|
21
|
+
|
|
22
|
+
**Target:** [agent/tool name and version]
|
|
23
|
+
**Mode:** [AUDIT | ESTABLISH]
|
|
24
|
+
**Date:** [YYYY-MM-DD]
|
|
25
|
+
**Reviewer:** [name/role]
|
|
26
|
+
**Sources consulted:** [system prompt, BSD, eval suite, dashboard, etc.]
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### Executive Summary
|
|
31
|
+
|
|
32
|
+
[2–4 sentences. State the single most important finding: is the closed loop intact, and if not, where is it broken?]
|
|
33
|
+
|
|
34
|
+
**Overall verdict:** [ALIGNED | PARTIAL | NOT_ALIGNED]
|
|
35
|
+
|
|
36
|
+
### Layer Scores
|
|
37
|
+
|
|
38
|
+
| Layer | Status | Critical gaps |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| 1 — Value | [🟢/🟡/🔴] | [count] |
|
|
41
|
+
| 2 — Governance | [🟢/🟡/🔴] | [count] |
|
|
42
|
+
| 3 — Runtime Prompt | [🟢/🟡/🔴] | [count] |
|
|
43
|
+
| 4 — Infrastructure | [🟢/🟡/🔴] | [count] |
|
|
44
|
+
| Integration | [🟢/🟡/🔴] | [count] |
|
|
45
|
+
|
|
46
|
+
Status: 🟢 all AUDIT checks pass · 🟡 ≥1 check fails, no critical · 🔴 ≥1 critical gap.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### Findings
|
|
51
|
+
|
|
52
|
+
#### [LAYER-N-FINDING-001] [CRITICAL|HIGH|MEDIUM|LOW] — [Location]
|
|
53
|
+
- **Layer:** [1 Value | 2 Governance | 3 Runtime | 4 Infra | Integration]
|
|
54
|
+
- **What's wrong:** [specific gap, citing the artifact and location]
|
|
55
|
+
- **Why it matters:** [which root cause or failure mode this enables]
|
|
56
|
+
- **Recommendation:** [specific action — which artifact to create/change, by whom]
|
|
57
|
+
- **Invariant violated:** [enforcement | verification | action] (if applicable)
|
|
58
|
+
|
|
59
|
+
[repeat for each finding]
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Invariant Check
|
|
64
|
+
|
|
65
|
+
The governing invariant: *every governance decision → prompt clause → eval test → governance review*.
|
|
66
|
+
|
|
67
|
+
- Decisions with no prompt clause (not enforced): [list, or "none"]
|
|
68
|
+
- Prompt clauses with no eval test (not verified): [list, or "none"]
|
|
69
|
+
- Eval results not reviewed in governance (not acted upon): [list, or "none"]
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### Value Proposition (as currently stated)
|
|
74
|
+
|
|
75
|
+
> "[verbatim current VP, or 'NOT DEFINED']"
|
|
76
|
+
|
|
77
|
+
**Falsifiable?** [Yes/No — which slot is missing]
|
|
78
|
+
**Propagated verbatim across prompt + BSD + review agenda?** [Yes/No]
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Kill Criteria Status
|
|
83
|
+
|
|
84
|
+
[Cite each criterion, its threshold, the current value, and status: on-track / at-risk / triggered. Or "NOT DEFINED".]
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Recommended Actions (priority order)
|
|
89
|
+
|
|
90
|
+
1. [Action] — Owner: [role] — Layer: [N] — Due: [date]
|
|
91
|
+
2. [Action] — Owner: [role] — Layer: [N] — Due: [date]
|
|
92
|
+
3. [Action] — Owner: [role] — Layer: [N] — Due: [date]
|
|
93
|
+
|
|
94
|
+
### Next Review
|
|
95
|
+
|
|
96
|
+
**Value Realization Review scheduled:** [date, or "NOT SCHEDULED — schedule within 90 days"]
|
|
97
|
+
**Decay dashboard live:** [Yes/No]
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### For ESTABLISH mode only: Minimum Viable Artifact Set
|
|
102
|
+
|
|
103
|
+
| Artifact | Status | Location |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| Falsifiable Value Proposition | [Done/In progress/Not started] | [path] |
|
|
106
|
+
| Kill Criteria (signed) | | |
|
|
107
|
+
| Agent Charter | | |
|
|
108
|
+
| Goal Sandwich system prompt | | |
|
|
109
|
+
| 10 eval test cases | | |
|
|
110
|
+
| Value Realization Review scheduled | | |
|
|
111
|
+
| Decay detection dashboard | | |
|
|
112
|
+
|
|
113
|
+
*Do not consider the loop closed until every artifact above is "Done" AND the invariant check shows zero unenforced/unverified/unacted items.*
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-cartography
|
|
3
|
+
description: "Navigate and understand a codebase by mapping its structure as text-based architecture diagrams at three zoom levels (macro/meso/micro), with optional structural-health triage using anti-pattern signatures"
|
|
4
|
+
metadata:
|
|
5
|
+
installed-from: "incitaciones"
|
|
6
|
+
---
|
|
7
|
+
# Codebase Cartography
|
|
8
|
+
|
|
9
|
+
Map a codebase's structure as text-based architecture diagrams at three zoom levels, with optional structural-health triage.
|
|
10
|
+
|
|
11
|
+
You are a cartographer, not a critic: you document topology, dependencies, and boundaries as they exist. You do not recommend changes unless an explicit diagnostic pass was requested.
|
|
12
|
+
|
|
13
|
+
## Zoom Levels
|
|
14
|
+
|
|
15
|
+
- **macro** — whole-system topology: modules/domains, dependency direction, layering.
|
|
16
|
+
- **meso** — one module or feature: internal components, wiring, integration contracts.
|
|
17
|
+
- **micro** — one functionality: call chain, data flow, state mutation, I/O boundaries.
|
|
18
|
+
|
|
19
|
+
Pick the entry level from the request:
|
|
20
|
+
|
|
21
|
+
| Request shape | Entry level | Typical ask |
|
|
22
|
+
| :---- | :---- | :---- |
|
|
23
|
+
| "map this repo", onboarding | macro | lay of the land |
|
|
24
|
+
| "how does <module> work", wiring | meso | structure of one district |
|
|
25
|
+
| "trace <functionality>", "where does X happen" | micro | end-to-end path |
|
|
26
|
+
|
|
27
|
+
## Procedure
|
|
28
|
+
|
|
29
|
+
1. Clarify the target if ambiguous. State the entry zoom level explicitly in the output.
|
|
30
|
+
2. Gather evidence by searching — imports, entry points, directory layout, call sites. Never infer structure from names alone.
|
|
31
|
+
3. Render the entry-level map plus one adjacent level for context (parent overview when starting micro/meso; child detail when starting macro).
|
|
32
|
+
4. Run the health check only if requested.
|
|
33
|
+
5. Produce the report using the template.
|
|
34
|
+
|
|
35
|
+
**Reference loading protocol — read on demand:**
|
|
36
|
+
|
|
37
|
+
- Before gathering evidence for any map (and again before rendering), read `references/zoom-levels.md` — per-level evidence collection commands and text rendering formats.
|
|
38
|
+
- Before any health check or when the user asks about "health", "smells", or refactoring targets, read `references/smell-signatures.md` — anti-pattern proxies, evidence requirements, severity ratings.
|
|
39
|
+
- Before writing the final output, read `references/report-template.md` — output structure per mode.
|
|
40
|
+
|
|
41
|
+
## Zoom Discipline
|
|
42
|
+
|
|
43
|
+
- Offer adjacent levels as follow-ups; never dump all three maps unrequested.
|
|
44
|
+
- Every claim carries a file reference (`path`, or `path:line` for specific symbols).
|
|
45
|
+
- State dependency direction explicitly (A → B); never "related to".
|
|
46
|
+
- Distinguish observed evidence from inference; label inference explicitly.
|
|
47
|
+
- If the target is too large for one pass, map boundaries first and ask which module or area to enter.
|
|
48
|
+
|
|
49
|
+
## Rules
|
|
50
|
+
|
|
51
|
+
- Describe structure as it exists; no refactor advice outside an explicit diagnostic request.
|
|
52
|
+
- Cycles, hotspots, and boundary violations are facts to report, not flaws to fix.
|
|
53
|
+
- Prefer structural facts over narrative: dependency direction, counts, boundaries.
|
|
54
|
+
- Health-check findings follow the evidence format in `references/smell-signatures.md` (pattern, evidence, quantity, severity) — never unanchored opinions.
|
|
55
|
+
- Maps are diff-able artifacts: tables and Mermaid, not prose walls.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Report Template
|
|
2
|
+
|
|
3
|
+
Structure the final output by mode. All modes share the closing sections. Keep maps as tables/Mermaid — diff-able artifacts.
|
|
4
|
+
|
|
5
|
+
## Header (all modes)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
## Cartography — <target>
|
|
9
|
+
**Entry zoom level:** macro | meso | micro
|
|
10
|
+
**Scope covered:** <paths examined>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Mode: macro
|
|
14
|
+
|
|
15
|
+
1. **Module inventory** — table (module, path, responsibility, deps out, fan-in)
|
|
16
|
+
2. **Dependency matrix** — text DSM with ↑ marks for layer violations
|
|
17
|
+
3. **Module graph** — Mermaid, edges labeled with counts
|
|
18
|
+
4. Structural observations
|
|
19
|
+
|
|
20
|
+
## Mode: meso
|
|
21
|
+
|
|
22
|
+
1. **Parent context** — 2-3 lines: where this module sits in the macro map
|
|
23
|
+
2. **Component table** — components, paths, roles, internal links, external ports
|
|
24
|
+
3. **Wiring graph** — Mermaid with mechanism-labeled edges
|
|
25
|
+
4. Structural observations
|
|
26
|
+
|
|
27
|
+
## Mode: micro
|
|
28
|
+
|
|
29
|
+
1. **Entry point** — symbol and file:line
|
|
30
|
+
2. **Call chain** — numbered hops with file:line and purity/I-O markers
|
|
31
|
+
3. **Data flow** — transformation list from input to outputs/side effects
|
|
32
|
+
4. Structural observations
|
|
33
|
+
|
|
34
|
+
## Mode: health check (additive to any level)
|
|
35
|
+
|
|
36
|
+
One finding block per pattern (format in `smell-signatures.md`), ordered by severity. If nothing found, state the patterns checked and the evidence gathered — absence of findings without evidence of search is not a result.
|
|
37
|
+
|
|
38
|
+
## Closing sections (all modes)
|
|
39
|
+
|
|
40
|
+
**Key Relationships** — top 3-5 dependencies that explain the structure:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
- web → api (all requests funnel here; 34 call sites)
|
|
44
|
+
- ledger ← webhooks (cycle with billing; see observations)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Structural Observations** — facts only, no fixes:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
- Cycle: billing → webhooks → ledger → billing (3 modules)
|
|
51
|
+
- Hotspot: core/ledger.ts imported by 14 modules
|
|
52
|
+
- Layer skip: web/cli imports infra/db directly (5 files)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Open Questions** — what the cartographer could not resolve, for human follow-up:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
- Is the billing → ledger edge intentional or legacy? (no test covers it)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Adjacent levels offered** — one line each, e.g. "meso map of ledger available on request".
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Anti-Pattern Signatures — Agent-Computable Proxies
|
|
2
|
+
|
|
3
|
+
Structural health check. Each anti-pattern from the visual framework is reduced to evidence an agent can gather by search and counting. Report findings; do not propose fixes unless explicitly asked.
|
|
4
|
+
|
|
5
|
+
## Report Format (per finding)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
[PATTERN] severity: high|medium|low
|
|
9
|
+
Evidence: file:line list or matrix marks
|
|
10
|
+
Quantity: loop members / fan-out count / depth / ratio
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Severity scales with blast radius: fan-out count, number of affected modules, loop size.
|
|
14
|
+
|
|
15
|
+
## Signature Catalog
|
|
16
|
+
|
|
17
|
+
### Circular Dependencies
|
|
18
|
+
|
|
19
|
+
- **Proxy:** closed loops in the module or component graph. Build the dependency list (see `zoom-levels.md` macro), then trace: if A → B → … → A exists, report the full loop.
|
|
20
|
+
- **Quick scan:** mutual imports between two files (`rg` for A importing B, then B importing A); module-pair matrix marks both ways.
|
|
21
|
+
- **Severity:** loop spanning multiple top-level modules > intra-module pair.
|
|
22
|
+
|
|
23
|
+
### God Object
|
|
24
|
+
|
|
25
|
+
- **Proxy:** one file/class with extreme fan-in AND fan-out, plus size. Check: file length (`wc -l`), count of exported methods/attributes, count of distinct importers (`rg -l "from .*<module>" | wc -l`), count of its own imports.
|
|
26
|
+
- **Thresholds:** relative to the repo baseline — flag when a file is ~3× the median size AND importers are ~3× the median. State the baseline numbers used. In tiny repos (< ~10 files of the same kind), the median is meaningless — fall back to absolute judgment (e.g., one file dominating all coupling) and label the weak baseline.
|
|
27
|
+
- **Severity:** grows with importer count (every change touches all of them).
|
|
28
|
+
|
|
29
|
+
### Shotgun Surgery
|
|
30
|
+
|
|
31
|
+
- **Proxy:** one concept scattered across many modules. Pick a domain concept from the target question (e.g., "invoice", "permissions") and count modules containing references to it: `rg -l "<concept>" | cut -d/ -f1-2 | sort -u | wc -l`.
|
|
32
|
+
- **Severity:** grows with module count and with coupling between the scattered sites (do they import each other or duplicate?).
|
|
33
|
+
|
|
34
|
+
### Feature Envy
|
|
35
|
+
|
|
36
|
+
- **Proxy:** a module imports another module far more than its own internals. Count both sides and compare — imports of the foreign module: `rg -c "from .*<moduleX>" moduleA/`; imports resolving inside moduleA (relative `./` imports): `rg -c "from '\./" moduleA/`. Flag when the foreign count exceeds the local count by ~2× or more.
|
|
37
|
+
- **Severity:** medium when it is one direction; high when the envying module is otherwise nearly disconnected from its own parent.
|
|
38
|
+
|
|
39
|
+
### Deep Inheritance
|
|
40
|
+
|
|
41
|
+
- **Proxy:** chains of `extends`/subclassing beyond ~3 levels: `rg "extends "` then follow each chain. Report max depth and the chain.
|
|
42
|
+
- **Severity:** medium; flag deepest chain only, not every chain.
|
|
43
|
+
|
|
44
|
+
### Pure/Impure Entanglement (functional codebases)
|
|
45
|
+
|
|
46
|
+
- **Proxy:** business-logic functions directly performing I/O (network, DB, filesystem, clock, randomness) instead of receiving results as parameters. Verify by reading the call chain at micro level: mark the first impure hop and whether logic continues after it.
|
|
47
|
+
- **Severity:** high when the same file mixes domain rules and I/O calls repeatedly (report count).
|
|
48
|
+
|
|
49
|
+
### Broken Composition (layer-skipping)
|
|
50
|
+
|
|
51
|
+
- **Proxy:** dependencies that bypass an architectural interface layer — e.g., web module importing infra directly instead of going through the api/service layer. Visible as ↑ marks in the macro matrix (a dependency pointing against the repo's declared or evident layering).
|
|
52
|
+
- **Severity:** scales with how many files take the shortcut.
|
|
53
|
+
|
|
54
|
+
## Interpretation Rules
|
|
55
|
+
|
|
56
|
+
- One finding per pattern per target; list all instances under Evidence.
|
|
57
|
+
- If the pattern is suspected but evidence is thin, say "suspected, evidence: <what's missing>" instead of asserting.
|
|
58
|
+
- Findings are facts about structure. The user decides what to do with them.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Zoom Levels — Evidence Collection & Rendering
|
|
2
|
+
|
|
3
|
+
Per-level collection strategy and text rendering formats. Match the rendering to what the level must show; the paradigm-scale principle applies: module-level relations read best as matrices/graphs, functionality reads best as ordered chains.
|
|
4
|
+
|
|
5
|
+
## Macro — System Topology
|
|
6
|
+
|
|
7
|
+
**Collect:**
|
|
8
|
+
|
|
9
|
+
Adapt import syntax to the language (see language rule below).
|
|
10
|
+
|
|
11
|
+
0. **Language rule:** use the repo's import syntax for scans. JS/TS: `from './x'`; Python: `import x` / `from x import`; Rust: `use x::`; Go: `go list -deps`; Java: `import x.y;`. If the repo is multi-language, run the scan per language.
|
|
12
|
+
1. Top-level directory layout (`ls`, tree to depth 1–2). Identify likely module boundaries (packages, workspaces, domains). Exclude vendored/generated code (`node_modules`, `dist`, `target`, `vendor`, generated committed sources) from all counts — `rg` respects `.gitignore` by default, but generated-but-committed code must be excluded with explicit globs (`-g '!dist'`).
|
|
13
|
+
2. Inter-module imports: scan import statements crossing module boundaries. Quoting-safe scan (works in POSIX shells), e.g. JS/TS: `rg 'from ["'"'"']' --type js --type ts` or simply `rg 'import|require'`; then filter by path.
|
|
14
|
+
3. Count edges per pair of modules to get a weighted dependency list.
|
|
15
|
+
4. Determine layering for violation flags: use the repo's declared layering (README/ARCHITECTURE/docs) if present; otherwise infer it from the majority dependency direction and label that inference in the report.
|
|
16
|
+
|
|
17
|
+
**Render:**
|
|
18
|
+
|
|
19
|
+
Module inventory table:
|
|
20
|
+
|
|
21
|
+
| Module | Path | Responsibility (one line, from evidence) | Deps out → | Fan-in |
|
|
22
|
+
| :---- | :---- | :---- | :---- | :---- |
|
|
23
|
+
|
|
24
|
+
Text dependency matrix (DSM-style). Rows depend on columns; mark `↑` for a dependency that skips a layer or points "backward" against the declared — or inferred (see collect step 4) — layering:
|
|
25
|
+
|
|
26
|
+
| | core | api | web | jobs |
|
|
27
|
+
| :---- | :---- | :---- | :---- | :---- |
|
|
28
|
+
| core | — | | | |
|
|
29
|
+
| api | ✦ | — | | |
|
|
30
|
+
| web | ✦ | ✦ | — | |
|
|
31
|
+
| jobs | ✦ | | ↑ | — |
|
|
32
|
+
|
|
33
|
+
Module graph (Mermaid), one node per module, edges labeled with edge counts:
|
|
34
|
+
|
|
35
|
+
```mermaid
|
|
36
|
+
graph TD
|
|
37
|
+
web --> api
|
|
38
|
+
api --> core
|
|
39
|
+
jobs --> core
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Facts to surface:** layering violations (↑ marks), cycles, hub modules (highest fan-in/out), orphan modules (zero fan-in).
|
|
43
|
+
|
|
44
|
+
## Meso — Module / Feature Wiring
|
|
45
|
+
|
|
46
|
+
**Collect:**
|
|
47
|
+
|
|
48
|
+
1. Entry points of the module: exported symbols, route registrations, message handlers, CLI commands.
|
|
49
|
+
2. Internal components: classes/functions by responsibility; group by subdirectory.
|
|
50
|
+
3. Integration contracts: interfaces implemented, events published/consumed, external clients (HTTP, DB, queues).
|
|
51
|
+
4. Which other modules call in, and which the module calls out to.
|
|
52
|
+
|
|
53
|
+
**Render:**
|
|
54
|
+
|
|
55
|
+
Component table:
|
|
56
|
+
|
|
57
|
+
| Component | Path | Role | Talks to (internal) | External ports |
|
|
58
|
+
| :---- | :---- | :---- | :---- | :---- |
|
|
59
|
+
|
|
60
|
+
Wiring graph (Mermaid). Show direction and label edges with the mechanism (calls, publishes, reads):
|
|
61
|
+
|
|
62
|
+
```mermaid
|
|
63
|
+
graph LR
|
|
64
|
+
routes --> service
|
|
65
|
+
service --> repo
|
|
66
|
+
service -- "publishes InvoicePaid" --> bus
|
|
67
|
+
repo -- SQL --> [(db)]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Facts to surface:** single points of fan-in, components with no callers, cross-boundary calls that bypass the module's public interface.
|
|
71
|
+
|
|
72
|
+
## Micro — Functionality Trace
|
|
73
|
+
|
|
74
|
+
**Collect:**
|
|
75
|
+
|
|
76
|
+
1. Locate the entry symbol (`rg "symbolName"`); read it fully.
|
|
77
|
+
2. Follow the call chain depth-first through the request's relevant path. Record each hop: `caller → callee (path:line)`.
|
|
78
|
+
3. Mark at each hop: pure logic, state mutation, I/O side effect (network, disk, DB, clock, randomness).
|
|
79
|
+
|
|
80
|
+
**Render:**
|
|
81
|
+
|
|
82
|
+
Ordered call chain:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
1. POST /refunds routes/payments.ts:42
|
|
86
|
+
2. refundInvoice() services/refund.ts:17 [pure until step 4]
|
|
87
|
+
3. validateAmount() domain/money.ts:88 [pure]
|
|
88
|
+
4. gateway.refund() infra/stripe.ts:120 [I/O: network]
|
|
89
|
+
5. ledger.record() infra/ledger.ts:55 [I/O: DB write]
|
|
90
|
+
6. bus.publish() infra/events.ts:30 [I/O: queue]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Data flow list — what enters, how it transforms, what leaves:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
RefundRequest{invoiceId, amount} → validated Amount → gateway response → LedgerEntry → InvoicePaid event
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Facts to surface:** where purity ends (first I/O hop), total hops, state mutated, error paths encountered (report; do not evaluate their quality).
|
|
@@ -4,7 +4,7 @@ description: "Generate trackable issues from implementation plans"
|
|
|
4
4
|
metadata:
|
|
5
5
|
installed-from: "incitaciones"
|
|
6
6
|
---
|
|
7
|
-
<!-- skill: create-issues, version: 1.
|
|
7
|
+
<!-- skill: create-issues, version: 1.3.0, status: verified -->
|
|
8
8
|
# Tracer-Bullet Issue Creation from Plan
|
|
9
9
|
|
|
10
10
|
Break a reviewed plan into independently grabbable issues using tracer-bullet vertical slices.
|
|
@@ -51,6 +51,8 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
51
51
|
- end-to-end behavior description
|
|
52
52
|
- concrete file paths or subsystems when knowable
|
|
53
53
|
- binary acceptance criteria
|
|
54
|
+
- a **Verifiable Value Claim** where measurable: quantified **Must** gate (unit + number, no adjectives), a runnable **Meter** command, the measured **Baseline**, and the **regression suite** that must keep passing
|
|
55
|
+
- **anti-goals** whenever the ticket touches tests, lockfiles, or public interfaces (prohibit test-assertion edits, dependency additions, API breaks)
|
|
54
56
|
- explicit blocked-by field
|
|
55
57
|
- TDD and Tidy First mandate
|
|
56
58
|
|
|
@@ -61,15 +63,20 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
61
63
|
- Wire dependencies using actual captured identifiers or explicit body references.
|
|
62
64
|
- Verify each creation step succeeded before continuing.
|
|
63
65
|
- **After each successful creation**, extract the `**Files / Systems:**` bullet list from
|
|
64
|
-
the issue description and store it as structured metadata
|
|
66
|
+
the issue description and store it as structured metadata together with a **base
|
|
67
|
+
commit anchor** for staleness detection:
|
|
65
68
|
```bash
|
|
66
|
-
|
|
69
|
+
base_sha=$(git rev-parse HEAD)
|
|
70
|
+
bd update <id> --metadata "{\"files\": [\"path/to/file1.py\", \"path/to/file2.py\"], \"base_commit\": \"$base_sha\"}"
|
|
67
71
|
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
`base_commit` is HEAD at ticket-creation time. Reviewers and claiming agents diff
|
|
73
|
+
`base_commit..HEAD` against the ticket's `files` to detect out-of-date tickets (see
|
|
74
|
+
`issue-review` skill, Pass 0 PRE-003, and `renew` skill **Claiming work** section).
|
|
75
|
+
This enables automated file-conflict detection by concurrent agents. If the
|
|
76
|
+
Files/Systems section is empty or contains only subsystem names without concrete
|
|
77
|
+
paths, **stop and ask the user for specific file paths before publishing the ticket**
|
|
78
|
+
— a ticket without concrete paths cannot participate in conflict detection and is
|
|
79
|
+
incomplete.
|
|
73
80
|
|
|
74
81
|
7. **Final report:**
|
|
75
82
|
- Summarize the approved slice set, created issues, labels, and dependency links.
|
|
@@ -81,6 +88,9 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
81
88
|
- **Traceable:** reference the exact plan/spec section or story.
|
|
82
89
|
- **Workflow integrity:** TDD and Tidy First language is mandatory in every implementation issue.
|
|
83
90
|
- **No guessed IDs:** capture identifiers from actual command output.
|
|
91
|
+
- **Quantify the gate:** every measurable acceptance criterion is a number with a unit, backed by a runnable Meter command.
|
|
92
|
+
- **Name the cheats:** add anti-goals wherever the gate could be gamed (test edits, new deps, API breaks).
|
|
93
|
+
- **Anchor staleness:** always record `base_commit` metadata at creation; never publish a ticket anchored to nothing.
|
|
84
94
|
- **Stop and ask:** if the plan only supports horizontal decomposition, propose a vertical rewrite before publishing.
|
|
85
95
|
|
|
86
96
|
## References
|