Skip to content

refactor: P1 code cleanup + canonical migration in mem-init#19

Merged
tlconde merged 1 commit into
mainfrom
refactor/p1-code-cleanup
Mar 17, 2026
Merged

refactor: P1 code cleanup + canonical migration in mem-init#19
tlconde merged 1 commit into
mainfrom
refactor/p1-code-cleanup

Conversation

@tlconde
Copy link
Copy Markdown
Owner

@tlconde tlconde commented Mar 17, 2026

Summary

Code cleanup from /simplify audit (zero behavior change):

  • Remove duplicate safeRead() — import from utils/fs.ts
  • Extract resolveAiDir() + requireAiDir() — 16 patterns consolidated
  • Extract getProjectRoot() — 3 patterns in tools/index.ts
  • Add AI_PATHS constants for canonical paths

mem-init skill:

  • Add canonical migration step for AGENTS.md, CLAUDE.md, .cursorrules, copilot-instructions.md

Test plan

  • npx tsc passes
  • All replaced patterns produce identical behavior

…migration

Code cleanup (zero behavior change):
- Remove duplicate safeRead() in evals/index.ts, import from utils/fs.ts
- Extract resolveAiDir() and requireAiDir() in cli/index.ts (10+6 patterns)
- Extract getProjectRoot() in shared.ts (3 patterns in tools/index.ts)
- Add AI_PATHS constants for canonical .ai/ paths (collaboration, memory, governance)

mem-init skill:
- Add Step 6b: canonical migration for competing context files (AGENTS.md,
  CLAUDE.md, .cursorrules, copilot-instructions.md) — proposes splitting
  content into .ai/ canonical files and replacing originals with stubs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tlconde tlconde merged commit 484b9dd into main Mar 17, 2026
2 checks passed
@tlconde tlconde deleted the refactor/p1-code-cleanup branch March 17, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant