docs(agent-note): flip the regrouping note to implemented

Move the triplet to implemented/architecture/, rewrite Proposal into a
present-tense Decision, fold Acceptance criteria and Risks into
Consequences (recording what pins the result), retitle the migration
section to what the move actually touched, and repoint the seven
inbound FIXME/README links.
This commit is contained in:
Tianyi Cui
2026-07-30 03:48:07 +08:00
parent 2a40cbf8ef
commit 36cf4f32f4
105 changed files with 1089 additions and 1112 deletions

View File

@@ -1,8 +1,8 @@
/**
* Find stale root-relative `packages/...` references in repo-authored prose and
* TypeScript. A missing path is reported only when it names a real package leaf;
* globs, placeholders, hypothetical packages, and unbuilt `lib/` output are
* outside the check.
* TypeScript. A missing path is reported only when it names a real package leaf
* outside its own explaining group directory; globs, placeholders, hypothetical
* packages, and unbuilt `lib/` output are outside the check.
*/
import { existsSync, globSync } from 'node:fs'
@@ -66,7 +66,15 @@ function isDriftedPackageReference(ref: string): boolean {
const libAt = parts.indexOf('lib')
if (libAt === 3 && existsSync(resolve(root, parts.slice(0, 3).join('/')))) return false
// A missing reference is drift only when a path segment names a live package.
return ref.split('/').slice(1).some(segment => packageNames.has(segment))
// A leading segment that is itself an existing group directory is explained by
// the group, not by a relocated leaf sharing its name (`client` is both the
// client-modules group and the scaffold leaf), so only later segments count.
const segments = ref.split('/').slice(1)
const [group] = segments
const scanned = group !== undefined && segments.length > 1 && existsSync(resolve(root, 'packages', group))
? segments.slice(1)
: segments
return scanned.some(segment => packageNames.has(segment))
}
/** Find missing package references whose path names a live package; bare paths, typos, and illustrative skeletons do not count. */