Prune stale docs and update .hermes content
Delete a large set of outdated documentation (many files under docs/ and .hermes/plans/, including audits, design, prd, technical, planning, assets, and todos). Update and consolidate .hermes content: refresh shared-memory pages (decision-log, development-workflow, document-map, pitfalls, project-overview, team-conventions) and several skills/references under .hermes/skills. Also modify AGENTS.md, README.md, UI_CODING_STANDARD.md, docs/README.md and .encoding-check-ignore. Purpose: clean up stale planning/audit material and keep current hermes documentation and related top-level docs in sync.
This commit is contained in:
@@ -10,6 +10,10 @@ const MATCH3D_TRAY_SLOT_COUNT = 7;
|
||||
const MATCH3D_LOCAL_DURATION_MS = 600_000;
|
||||
const MATCH3D_MAX_ITEM_TYPE_COUNT = 25;
|
||||
const MATCH3D_LOCAL_BASE_RADIUS = 0.072;
|
||||
const MATCH3D_LOCAL_BOARD_CENTER = 0.5;
|
||||
const MATCH3D_LOCAL_BOARD_RADIUS = 0.5;
|
||||
const MATCH3D_LOCAL_BOARD_SAFE_MARGIN = 0.035;
|
||||
const MATCH3D_LOCAL_CONTAINER_MOUTH_RATIO = 0.78;
|
||||
|
||||
type Match3DSizeTier = 'XL' | 'L' | 'M' | 'XS' | 'S';
|
||||
|
||||
@@ -260,6 +264,45 @@ function createEmptyTray(): Match3DTraySlot[] {
|
||||
}));
|
||||
}
|
||||
|
||||
function resolveLocalMatch3DSpawnPoint(
|
||||
index: number,
|
||||
totalItemCount: number,
|
||||
radius: number,
|
||||
) {
|
||||
const safeRadius = Math.max(
|
||||
0,
|
||||
MATCH3D_LOCAL_BOARD_RADIUS - MATCH3D_LOCAL_BOARD_SAFE_MARGIN - radius,
|
||||
);
|
||||
const mouthRadius = safeRadius * MATCH3D_LOCAL_CONTAINER_MOUTH_RATIO;
|
||||
const normalizedIndex = Math.max(0, index);
|
||||
const normalizedTotal = Math.max(1, totalItemCount);
|
||||
const goldenAngle = Math.PI * (3 - Math.sqrt(5));
|
||||
const distance =
|
||||
Math.sqrt((normalizedIndex + 0.5) / normalizedTotal) * mouthRadius;
|
||||
const angle = normalizedIndex * goldenAngle;
|
||||
const jitterRadius = Math.min(0.012, mouthRadius * 0.035);
|
||||
const jitterAngle = angle * 1.7 + 0.9;
|
||||
const x =
|
||||
MATCH3D_LOCAL_BOARD_CENTER +
|
||||
Math.cos(angle) * distance +
|
||||
Math.cos(jitterAngle) * jitterRadius;
|
||||
const y =
|
||||
MATCH3D_LOCAL_BOARD_CENTER +
|
||||
Math.sin(angle) * distance +
|
||||
Math.sin(jitterAngle) * jitterRadius;
|
||||
const dx = x - MATCH3D_LOCAL_BOARD_CENTER;
|
||||
const dy = y - MATCH3D_LOCAL_BOARD_CENTER;
|
||||
const currentDistance = Math.hypot(dx, dy);
|
||||
if (currentDistance <= safeRadius || currentDistance <= 0) {
|
||||
return { x, y };
|
||||
}
|
||||
const ratio = safeRadius / currentDistance;
|
||||
return {
|
||||
x: MATCH3D_LOCAL_BOARD_CENTER + dx * ratio,
|
||||
y: MATCH3D_LOCAL_BOARD_CENTER + dy * ratio,
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeRemainingMs(run: Match3DRunSnapshot, nowMs = Date.now()) {
|
||||
if (run.status !== 'Running') {
|
||||
return run;
|
||||
@@ -287,20 +330,16 @@ function buildItem(
|
||||
seed: Match3DSelectedVisualSeed,
|
||||
index: number,
|
||||
copyIndex: number,
|
||||
totalItemCount: number,
|
||||
): Match3DItemSnapshot {
|
||||
const ring = Math.floor(index / 6);
|
||||
const angle = index * 0.86 + copyIndex * 0.22;
|
||||
const spread = 0.16 + (ring % 4) * 0.085;
|
||||
const x = 0.5 + Math.cos(angle) * spread + ((index % 3) - 1) * 0.026;
|
||||
const y =
|
||||
0.5 + Math.sin(angle * 1.13) * spread + ((copyIndex % 3) - 1) * 0.02;
|
||||
const radius = MATCH3D_LOCAL_BASE_RADIUS * seed.radiusScale;
|
||||
const point = resolveLocalMatch3DSpawnPoint(index, totalItemCount, radius);
|
||||
return {
|
||||
itemInstanceId: `${seed.itemTypeId}-${copyIndex + 1}`,
|
||||
itemTypeId: seed.itemTypeId,
|
||||
visualKey: seed.visualKey,
|
||||
x: Math.max(0.18, Math.min(0.82, x)),
|
||||
y: Math.max(0.18, Math.min(0.82, y)),
|
||||
x: point.x,
|
||||
y: point.y,
|
||||
radius,
|
||||
layer: index + 1,
|
||||
state: 'InBoard',
|
||||
@@ -425,17 +464,19 @@ function settleMatchedTrayItems(run: Match3DRunSnapshot) {
|
||||
}
|
||||
|
||||
export function startLocalMatch3DRun(clearCount = 12): Match3DRunSnapshot {
|
||||
const normalizedClearCount = normalizeLocalMatch3DRuntimeClearCount(clearCount);
|
||||
const normalizedClearCount =
|
||||
normalizeLocalMatch3DRuntimeClearCount(clearCount);
|
||||
const selectedSeeds = selectVisualSeeds(normalizedClearCount);
|
||||
const totalItemCount = normalizedClearCount * 3;
|
||||
const items = Array.from({ length: normalizedClearCount }, (_, clearIndex) =>
|
||||
Array.from({ length: 3 }, (_, copyOffset) => {
|
||||
const seed =
|
||||
selectedSeeds[clearIndex % selectedSeeds.length] ??
|
||||
selectedSeeds[0]!;
|
||||
selectedSeeds[clearIndex % selectedSeeds.length] ?? selectedSeeds[0]!;
|
||||
return buildItem(
|
||||
seed,
|
||||
clearIndex * 3 + copyOffset,
|
||||
clearIndex * 3 + copyOffset,
|
||||
totalItemCount,
|
||||
);
|
||||
}),
|
||||
).flat();
|
||||
|
||||
Reference in New Issue
Block a user