@@ -87,3 +87,6 @@ # /spec | ||
| 1. Pick a short, path-safe spec slug (lowercase, hyphenated), e.g. `oauth-login` or `csv-import`. | ||
| 1. Choose the spec slug: | ||
| - **If the request references a tracked work item** (Jira/Linear/GitHub issue, etc.), prefer the issue key as the slug, e.g. `JT-222` or `PROJ-1043`. Match keys like `ABC-123` from the argument, a pasted URL, or a branch name. Preserve the key's original case. | ||
| - **Otherwise**, pick a short, path-safe description slug (lowercase, hyphenated), e.g. `oauth-login` or `csv-import`. | ||
| - When both are present, prefer the issue key only `JT-222`. | ||
| 2. Create: `docs/execution/<spec-slug>/` | ||
@@ -90,0 +93,0 @@ 3. Write the spec to: |
@@ -6,3 +6,3 @@ { | ||
| "description": "Shared Claude Code baseline structure and conventions for every repository.", | ||
| "version": "1.3.0" | ||
| "version": "1.3.1" | ||
| } | ||
@@ -9,0 +9,0 @@ }, |
+6
-0
@@ -6,2 +6,8 @@ # Changelog | ||
| ## [1.3.1] - 2026-06-18 | ||
| ### Changed | ||
| - docs(spec): prefer tracked issue key as spec slug when present | ||
| - fix(config): make user config portable via repo-root kyos.json | ||
| - test: avoid incomplete regex escape in stale-version assertion | ||
| ## [1.3.0] - 2026-06-13 | ||
@@ -8,0 +14,0 @@ ### Changed |
+1
-1
| { | ||
| "name": "kyos-cli", | ||
| "version": "1.3.0", | ||
| "version": "1.3.1", | ||
| "description": "Bootstrap and safely evolve a shared Claude Code repo structure.", | ||
@@ -5,0 +5,0 @@ "author": "Eugene", |
+12
-4
@@ -0,1 +1,2 @@ | ||
| const fs = require("fs"); | ||
| const path = require("path"); | ||
@@ -6,6 +7,7 @@ const { | ||
| HOOK_MARKER_PREFIX, | ||
| LEGACY_USER_CONFIG_FILE, | ||
| MCP_CONFIG_FILE, | ||
| USER_CONFIG_FILE, | ||
| } = require("./constants"); | ||
| const { readJsonIfExists, writeRepoTextFile } = require("./fs"); | ||
| const { readJsonIfExists, resolveRepoPath, writeRepoTextFile } = require("./fs"); | ||
| const { stableStringify } = require("./json"); | ||
@@ -37,5 +39,8 @@ | ||
| function loadUserConfig(cwd, repoName) { | ||
| const configPath = path.resolve(cwd, USER_CONFIG_FILE); | ||
| const config = readJsonIfExists(configPath); | ||
| return config || getDefaultConfig(repoName); | ||
| const config = readJsonIfExists(path.resolve(cwd, USER_CONFIG_FILE)); | ||
| if (config) return config; | ||
| // Fall back to the pre-1.4 location so existing repos keep working until they | ||
| // migrate (via --doctor --fix or any write of the new config). | ||
| const legacy = readJsonIfExists(path.resolve(cwd, LEGACY_USER_CONFIG_FILE)); | ||
| return legacy || getDefaultConfig(repoName); | ||
| } | ||
@@ -45,2 +50,5 @@ | ||
| writeRepoTextFile(cwd, USER_CONFIG_FILE, stableStringify(config)); | ||
| // Any write migrates a pre-1.4 repo: drop the gitignored legacy copy so it can't | ||
| // drift from the committable kyos.json. No-op when the legacy file is absent. | ||
| fs.rmSync(resolveRepoPath(cwd, LEGACY_USER_CONFIG_FILE), { force: true }); | ||
| } | ||
@@ -47,0 +55,0 @@ |
@@ -12,3 +12,6 @@ const path = require("path"); | ||
| const VERSION_FILE = path.posix.join(STATE_ROOT, "version.json"); | ||
| const USER_CONFIG_FILE = path.posix.join(STATE_ROOT, "config.json"); | ||
| const USER_CONFIG_FILE = "kyos.json"; | ||
| // Pre-1.4 location of the user config, inside the gitignored state dir. Kept for | ||
| // read fallback and for --doctor --fix migration to USER_CONFIG_FILE at repo root. | ||
| const LEGACY_USER_CONFIG_FILE = path.posix.join(STATE_ROOT, "config.json"); | ||
| const MCP_CONFIG_FILE = path.posix.join(CLAUDE_ROOT, "settings.json"); | ||
@@ -28,2 +31,3 @@ const CATALOG_DIR = path.resolve(__dirname, "../../catalog"); | ||
| HOOK_MARKER_PREFIX, | ||
| LEGACY_USER_CONFIG_FILE, | ||
| LOCK_FILE, | ||
@@ -30,0 +34,0 @@ MANAGED_ROOT, |
@@ -10,2 +10,3 @@ const fs = require("fs"); | ||
| FRAMEWORK_VERSION, | ||
| LEGACY_USER_CONFIG_FILE, | ||
| LOCK_FILE, | ||
@@ -81,3 +82,3 @@ MANAGED_ROOT, | ||
| const rootReal = fs.realpathSync.native(cwd); | ||
| const targets = [CLAUDE_ROOT, ".kyos", CLAUDE_MD_FILE]; | ||
| const targets = [CLAUDE_ROOT, ".kyos", CLAUDE_MD_FILE, USER_CONFIG_FILE]; | ||
@@ -435,2 +436,14 @@ for (const relativePath of targets) { | ||
| const config = loadUserConfig(cwd, repoName); | ||
| // Heal a pre-1.4 layout as part of the upgrade: move the gitignored | ||
| // .kyos/config.json to the committable repo-root kyos.json. saveUserConfig drops | ||
| // the legacy copy. Done here so users never run an extra migration command. | ||
| const configLines = []; | ||
| const hasNewConfig = Boolean(readJsonIfExists(resolveRepoPath(cwd, USER_CONFIG_FILE))); | ||
| const hasLegacyConfig = Boolean(readJsonIfExists(resolveRepoPath(cwd, LEGACY_USER_CONFIG_FILE))); | ||
| if (!hasNewConfig && hasLegacyConfig) { | ||
| saveUserConfig(cwd, config); | ||
| configLines.push(`~ config migrated ${LEGACY_USER_CONFIG_FILE} -> ${USER_CONFIG_FILE}`); | ||
| } | ||
| const desiredFiles = renderManagedFiles({ cwd, config }); | ||
@@ -466,2 +479,3 @@ const kyosOnlyFiles = Object.fromEntries( | ||
| }); | ||
| lines.push(...configLines); | ||
| lines.push(...hookLines); | ||
@@ -500,4 +514,12 @@ | ||
| if (!readJsonIfExists(resolveRepoPath(cwd, USER_CONFIG_FILE))) { | ||
| const hasNewConfig = Boolean(readJsonIfExists(resolveRepoPath(cwd, USER_CONFIG_FILE))); | ||
| const hasLegacyConfig = Boolean(readJsonIfExists(resolveRepoPath(cwd, LEGACY_USER_CONFIG_FILE))); | ||
| if (!hasNewConfig && !hasLegacyConfig) { | ||
| warnings.push(`${USER_CONFIG_FILE} is missing. Run 'npx kyos-cli --init' to create it.`); | ||
| } else if (!hasNewConfig && hasLegacyConfig) { | ||
| // Read-only report; the migration itself happens automatically during --update. | ||
| warnings.push( | ||
| `${LEGACY_USER_CONFIG_FILE} is gitignored and won't travel to other machines; run --update to migrate it to ${USER_CONFIG_FILE}.` | ||
| ); | ||
| } | ||
@@ -504,0 +526,0 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
127785
2.03%1924
1.64%8
14.29%