feat(okr): hook hybrid org-lese-fallback + node-test (SC6) [skip-docs]
This commit is contained in:
parent
e390a7a213
commit
9ab9ebe499
2 changed files with 92 additions and 3 deletions
|
|
@ -7,11 +7,22 @@
|
|||
|
||||
import { readFileSync, existsSync, readdirSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
|
||||
const cwd = process.cwd();
|
||||
const configPath = join(cwd, '.claude', 'okr.local.md');
|
||||
const projectConfigPath = join(cwd, '.claude', 'okr.local.md');
|
||||
const homeConfigPath = join(homedir(), '.claude', 'okr', 'org', 'profil.md');
|
||||
|
||||
if (!existsSync(configPath)) {
|
||||
// Hybrid org-profile resolution (most-specific-wins): project-local overrides
|
||||
// the machine-global home profile. The home path is the Fase 3 migration target;
|
||||
// this read is forward-compatible and stays inert until that file exists.
|
||||
// NOTE: only the org PROFILE resolves to home. The cycle/work tree scan
|
||||
// (okrDir, below) stays cwd-bound -- syklus data is always project-local.
|
||||
const configPath = existsSync(projectConfigPath)
|
||||
? projectConfigPath
|
||||
: (existsSync(homeConfigPath) ? homeConfigPath : null);
|
||||
|
||||
if (!configPath) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue