refactor: restructure workspace file organization (#121) (#122)

## Path Changes
- audit.log: memory/audit.log → log/audit.log
- projects.json: memory/projects.json → projects/projects.json
- prompts: roles/<project>/<role>.md → projects/prompts/<project>/<role>.md

## Files Updated
- lib/audit.ts - new audit log path
- lib/projects.ts - new projects.json path
- lib/dispatch.ts - new prompt instructions path
- lib/tools/project-register.ts - prompt scaffolding path
- lib/setup/workspace.ts - workspace scaffolding paths
- lib/context-guard.ts - projects.json path
- lib/tools/setup.ts - tool description
- lib/templates.ts - AGENTS.md template path references

## Documentation Updated
- README.md
- docs/ARCHITECTURE.md
- docs/ONBOARDING.md
- docs/QA_WORKFLOW.md
- docs/ROADMAP.md
- docs/TESTING.md

Addresses issue #121
This commit is contained in:
Lauren ten Hoor
2026-02-11 01:55:26 +08:00
committed by GitHub
parent 2450181482
commit 862813e6d3
14 changed files with 58 additions and 96 deletions

View File

@@ -140,7 +140,7 @@ You're in a **Telegram/WhatsApp group** bound to ${context.projectName ? `projec
}
/**
* Find project name by matching groupId in memory/projects.json.
* Find project name by matching groupId in projects/projects.json.
* The groupId (Telegram or WhatsApp) is the KEY in the projects Record.
*/
async function findProjectByGroupId(
@@ -150,7 +150,7 @@ async function findProjectByGroupId(
if (!workspaceDir) return undefined;
try {
const projectsPath = path.join(workspaceDir, "memory", "projects.json");
const projectsPath = path.join(workspaceDir, "projects", "projects.json");
const raw = await fs.readFile(projectsPath, "utf-8");
const data = JSON.parse(raw) as {
projects: Record<string, { name: string }>;