Imported from alphazede/bearing-lite (
skills/architectural-alignment/SKILL.md). Install upstream withnpx skills add alphazede/bearing-lite --skill architectural-alignment. Copyright stays with the author.
Architectural Alignment
Fresh planning node. The Orchestrator owns and writes workspace.md and repository-map.md in the confirmed plan directory.
The Orchestrator announces Aligning architecture in <repo>.
Inputs and match
- Inputs: confirmed repository root, owner-confirmed plan directory, Lifecycle title, visible existing artifacts, repository rules, and return schema.
- Match: the workspace, repository map, or architecture extract is missing or stale.
- Non-match: both are current and usable by Scope Definition or Planning and Design. Completed alignment is not repeated unless relevant source changes invalidate its map.
Algorithm
- Re-read the exact confirmed root and plan directory; never derive a different root, slug, suffix, or sibling workspace.
- If
workspace.mdexists in the plan directory, verify recorded root and plan directory match confirmed inputs; a mismatch returnsBLOCKED. Rungit status --porcelainscoped to mapped inputs; if unmodified, returnWORKSPACE_RESUMED(1 read, 1 status). - Bound discovery: depth 2, max 40 paths, max 64 KiB, read-only. Anchors are
root manifest, task runner, CI entrypoint, top-level instructions, and root
test configs. Strictly prohibit discovery traversal into repo-relative
src/,lib/,vendor/, anddocs/. - Map existing architecture covering the affected scope and hand off. If none exists or evidence does not cover it, record that gap and activate Systems Modeler; do not design missing architecture.
- If bounds are exhausted before required anchors are found, return
NEEDS_EVIDENCEnaming the missing anchor. Never compose unobserved commands. - Create missing plan directory or update
workspace.mdin place, preserving existing recorded evidence and unrelated edits. Initialize a missing file fromtemplates/workspace.md. Quote validation commands with source and mark[observed, not run]. Drop detail before Constraints and Unknowns. - Verify written paths remain inside authority and return
WORKSPACE_READY.
Return and recovery
Return WORKSPACE_READY, WORKSPACE_RESUMED, NEEDS_EVIDENCE, or BLOCKED
with paths, map freshness, evidence, blocker, and next planning stage. Retry only
from corrected evidence, at most three attempts.
Never ask planning questions, write risk choices, design, implement, create hidden runtime state, or delete plan content.