@grunnverk/kodrdriv 1.3.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/application.js +3 -3
- package/dist/application.js.map +1 -1
- package/dist/arguments.js +3 -4
- package/dist/arguments.js.map +1 -1
- package/dist/constants.js +3 -5
- package/dist/constants.js.map +1 -1
- package/dist/mcp/prompts/check_development.md +123 -147
- package/dist/mcp/prompts/dependency_update.md +53 -40
- package/dist/mcp/prompts/fix_and_commit.md +17 -6
- package/dist/mcp/prompts/publish.md +22 -6
- package/dist/mcp/prompts/tree_fix_and_commit.md +16 -7
- package/dist/mcp/prompts/tree_publish.md +23 -6
- package/dist/mcp-server.js +4855 -227
- package/dist/mcp-server.js.map +4 -4
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -1
- package/guide/index.md +1 -0
- package/guide/mcp-configuration.md +649 -0
- package/package.json +15 -15
- package/.claude/settings.local.json +0 -12
- package/.gitignore~ +0 -23
- package/BUG_TREE_PUBLISH_CONFIG_DIR.md +0 -79
- package/input/250509-kodrdriv-library-rules.m4a +0 -0
- package/processed/250705-kodrdriv-confirm-editor-for-commit-and-release.m4a +0 -0
- package/processed/250705-kodrdriv-confirm-flag-release.m4a +0 -0
- package/processed/250705-kodrdriv-context-for-review.m4a +0 -0
- package/processed/250705-kodrdriv-feedback-on-publish-pipeline.m4a +0 -0
- package/processed/250705-kodrdriv-intelligent-eslint-style.m4a +0 -0
- package/processed/250705-kodrdriv-make-review-less-strict.m4a +0 -0
- package/processed/250705-kodrdriv-multilevel-transcription.m4a +0 -0
- package/processed/250705-kodrdriv-opinionated-review.m4a +0 -0
- package/processed/250705-kodrdriv-publish-next-version.m4a +0 -0
- package/processed/250705-kodrdriv-release-branches-and-milestones.m4a +0 -0
- package/processed/250705-kodrdriv-scope-check-fix-or-ignore.m4a +0 -0
- package/processed/250705-kodrdriv-scope-checker.m4a +0 -0
- package/processed/250705-kodrdriv-specify-a-release-note-for-publish.m4a +0 -0
- package/temp-dist/arguments.js +0 -817
- package/temp-dist/constants.js +0 -202
- package/temp-dist/logging.js +0 -130
- package/temp-dist/types.js +0 -112
- package/temp-dist/util/stdin.js +0 -132
- package/temp-dist/util/storage.js +0 -149
- package/temp-dist/util/validation.js +0 -110
package/dist/constants.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
|
-
const VERSION = '1.
|
|
5
|
-
const
|
|
6
|
-
const BUILD_TIMESTAMP = '2026-01-22T15:30:23.373Z';
|
|
7
|
-
const PROGRAM_NAME = 'kodrdriv';
|
|
4
|
+
/** Version string populated at build time with git and system information */ const VERSION = '1.5.1 (HEAD/5728d3e T:v1.5.1 2026-01-27 23:31:39 -0800) linux x64 v24.13.0';
|
|
5
|
+
/** The program name used in CLI help and error messages */ const PROGRAM_NAME = 'kodrdriv';
|
|
8
6
|
const DEFAULT_OVERRIDES = false;
|
|
9
7
|
const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS = 'YYYY-MM-DD-HHmmss.SSS';
|
|
10
8
|
const DEFAULT_VERBOSE = false;
|
|
@@ -251,5 +249,5 @@ const KODRDRIV_DEFAULTS = {
|
|
|
251
249
|
}
|
|
252
250
|
};
|
|
253
251
|
|
|
254
|
-
export { ALLOWED_COMMANDS,
|
|
252
|
+
export { ALLOWED_COMMANDS, COMMAND_AUDIO_COMMIT, COMMAND_AUDIO_REVIEW, COMMAND_CHECK_CONFIG, COMMAND_CLEAN, COMMAND_COMMIT, COMMAND_DEVELOPMENT, COMMAND_INIT_CONFIG, COMMAND_LINK, COMMAND_PRECOMMIT, COMMAND_PUBLISH, COMMAND_PULL, COMMAND_RELEASE, COMMAND_REVIEW, COMMAND_SELECT_AUDIO, COMMAND_TREE, COMMAND_UNLINK, COMMAND_UPDATES, COMMAND_VERSIONS, DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS, DEFAULT_ADD, DEFAULT_AMEND_MODE, DEFAULT_CACHED, DEFAULT_COMMAND, DEFAULT_CONFIG_DIR, DEFAULT_CONTEXT_DIRECTORIES, DEFAULT_DEBUG, DEFAULT_DRY_RUN, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_FROM_COMMIT_ALIAS, DEFAULT_INTERACTIVE_MODE, DEFAULT_MAX_DIFF_BYTES, DEFAULT_MERGE_METHOD, DEFAULT_MESSAGE_LIMIT, DEFAULT_MODEL, DEFAULT_OPENAI_MAX_OUTPUT_TOKENS, DEFAULT_OPENAI_REASONING, DEFAULT_OUTPUT_DIRECTORY, DEFAULT_OVERRIDES, DEFAULT_PREFERENCES_DIRECTORY, DEFAULT_SENDIT_MODE, DEFAULT_TO_COMMIT_ALIAS, DEFAULT_VERBOSE, KODRDRIV_DEFAULTS, PROGRAM_NAME, VERSION };
|
|
255
253
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["import { MergeMethod } from './types';\nimport os from 'os';\nimport path from 'path';\n\nexport const VERSION = '__VERSION__ (__GIT_BRANCH__/__GIT_COMMIT__ __GIT_TAGS__ __GIT_COMMIT_DATE__) __SYSTEM_INFO__';\nexport const BUILD_HOSTNAME = '__BUILD_HOSTNAME__';\nexport const BUILD_TIMESTAMP = '__BUILD_TIMESTAMP__';\nexport const PROGRAM_NAME = 'kodrdriv';\nexport const DEFAULT_CHARACTER_ENCODING = 'utf-8';\nexport const DEFAULT_BINARY_TO_TEXT_ENCODING = 'base64';\nexport const DEFAULT_DIFF = true;\nexport const DEFAULT_LOG = false;\nexport const DEFAULT_OVERRIDES = false;\nexport const DATE_FORMAT_MONTH_DAY = 'MM-DD';\nexport const DATE_FORMAT_YEAR = 'YYYY';\nexport const DATE_FORMAT_YEAR_MONTH = 'YYYY-MM';\nexport const DATE_FORMAT_YEAR_MONTH_DAY = 'YYYY-MM-DD';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_SLASH = 'YYYY/MM/DD';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES = 'YYYY-MM-DD-HHmm';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS = 'YYYY-MM-DD-HHmmss';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS = 'YYYY-MM-DD-HHmmss.SSS';\nexport const DATE_FORMAT_SHORT_TIMESTAMP = 'YYMMdd-HHmm';\nexport const DATE_FORMAT_MONTH = 'MM';\nexport const DATE_FORMAT_DAY = 'DD';\nexport const DATE_FORMAT_HOURS = 'HHmm';\nexport const DATE_FORMAT_MINUTES = 'mm';\nexport const DATE_FORMAT_SECONDS = 'ss';\nexport const DATE_FORMAT_MILLISECONDS = 'SSS';\nexport const DEFAULT_VERBOSE = false;\nexport const DEFAULT_DRY_RUN = false;\nexport const DEFAULT_DEBUG = false;\nexport const DEFAULT_MODEL = 'gpt-4o-mini';\nexport const DEFAULT_MODEL_STRONG = 'gpt-4o';\nexport const DEFAULT_OPENAI_REASONING = 'low';\nexport const DEFAULT_OPENAI_MAX_OUTPUT_TOKENS = 10000;\nexport const DEFAULT_OUTPUT_DIRECTORY = 'output/kodrdriv';\n\n// Buffer size for git commands that may produce large output (like git log)\nexport const DEFAULT_GIT_COMMAND_MAX_BUFFER = 50 * 1024 * 1024; // 50MB\n\nexport const DEFAULT_CONTEXT_DIRECTORIES: string[] = [];\n\nexport const DEFAULT_CONFIG_DIR = '.kodrdriv';\nexport const DEFAULT_PREFERENCES_DIRECTORY = path.join(os.homedir(), '.kodrdriv');\n\nexport const DEFAULT_FROM_COMMIT_ALIAS = 'main';\nexport const DEFAULT_TO_COMMIT_ALIAS = 'HEAD';\n\nexport const DEFAULT_ADD = false;\nexport const DEFAULT_CACHED = false;\nexport const DEFAULT_SENDIT_MODE = false;\nexport const DEFAULT_INTERACTIVE_MODE = false;\nexport const DEFAULT_AMEND_MODE = false;\n// CRITICAL: Keep this low (3-5) to prevent log context contamination.\n// The LLM tends to pattern-match against recent commits instead of describing\n// the actual diff when it sees too much commit history. Set to 0 to disable.\nexport const DEFAULT_MESSAGE_LIMIT = 3;\nexport const DEFAULT_MAX_DIFF_BYTES = 20480; // 20KB limit per file\n\nexport const DEFAULT_MERGE_METHOD: MergeMethod = 'squash';\n\nexport const DEFAULT_EXCLUDED_PATTERNS = [\n 'node_modules', 'package-lock.json', 'yarn.lock', 'bun.lockb',\n 'composer.lock', 'Cargo.lock', 'Gemfile.lock',\n 'dist', 'build', 'out', '.next', '.nuxt', 'coverage',\n '.vscode', '.idea', '.DS_Store', '.git', '.gitignore',\n 'logs', 'tmp', '.cache', '*.log', '.env', '.env.*',\n '*.pem', '*.crt', '*.key', '*.sqlite', '*.db',\n '*.zip', '*.tar', '*.gz', '*.exe', '*.bin'\n];\n\nexport const COMMAND_COMMIT = 'commit';\nexport const COMMAND_AUDIO_COMMIT = 'audio-commit';\nexport const COMMAND_SELECT_AUDIO = 'select-audio';\nexport const COMMAND_RELEASE = 'release';\nexport const COMMAND_REVIEW = 'review';\nexport const COMMAND_AUDIO_REVIEW = 'audio-review';\nexport const COMMAND_PUBLISH = 'publish';\nexport const COMMAND_TREE = 'tree';\nexport const COMMAND_LINK = 'link';\nexport const COMMAND_UNLINK = 'unlink';\nexport const COMMAND_CLEAN = 'clean';\nexport const COMMAND_PULL = 'pull';\nexport const COMMAND_PRECOMMIT = 'precommit';\nexport const COMMAND_DEVELOPMENT = 'development';\nexport const COMMAND_VERSIONS = 'versions';\nexport const COMMAND_UPDATES = 'updates';\nexport const COMMAND_CHECK_CONFIG = 'check-config';\nexport const COMMAND_INIT_CONFIG = 'init-config';\n\nexport const ALLOWED_COMMANDS = [\n COMMAND_COMMIT,\n COMMAND_AUDIO_COMMIT,\n COMMAND_SELECT_AUDIO,\n COMMAND_RELEASE,\n COMMAND_REVIEW,\n COMMAND_AUDIO_REVIEW,\n COMMAND_PUBLISH,\n COMMAND_TREE,\n COMMAND_LINK,\n COMMAND_UNLINK,\n COMMAND_CLEAN,\n COMMAND_PULL,\n COMMAND_PRECOMMIT,\n COMMAND_DEVELOPMENT,\n COMMAND_VERSIONS,\n COMMAND_UPDATES\n];\n\nexport const DEFAULT_COMMAND = COMMAND_COMMIT;\n\nexport const DEFAULT_INSTRUCTIONS_DIR = `instructions`;\n\nexport const DEFAULT_PERSONA_DIR = `personas`;\n\nexport const DEFAULT_INSTRUCTIONS_COMMIT_FILE = `${DEFAULT_INSTRUCTIONS_DIR}/commit.md`;\nexport const DEFAULT_INSTRUCTIONS_RELEASE_FILE = `${DEFAULT_INSTRUCTIONS_DIR}/release.md`;\nexport const DEFAULT_INSTRUCTIONS_REVIEW_FILE = `${DEFAULT_INSTRUCTIONS_DIR}/review.md`;\n\nexport const DEFAULT_PERSONA_RELEASER_FILE = `${DEFAULT_PERSONA_DIR}/releaser.md`;\nexport const DEFAULT_PERSONA_YOU_FILE = `${DEFAULT_PERSONA_DIR}/you.md`;\n\n// Default instructions for each persona\nexport const DEFAULT_INSTRUCTIONS_MAP = {\n [COMMAND_COMMIT]: DEFAULT_INSTRUCTIONS_COMMIT_FILE,\n [COMMAND_AUDIO_COMMIT]: DEFAULT_INSTRUCTIONS_COMMIT_FILE, // Reuse commit instructions\n [COMMAND_RELEASE]: DEFAULT_INSTRUCTIONS_RELEASE_FILE,\n [COMMAND_REVIEW]: DEFAULT_INSTRUCTIONS_REVIEW_FILE, // Reuse audio-review instructions for now\n [COMMAND_AUDIO_REVIEW]: DEFAULT_INSTRUCTIONS_REVIEW_FILE,\n};\n\n// Default personas for each command\nexport const DEFAULT_PERSONA_MAP = {\n [COMMAND_COMMIT]: DEFAULT_PERSONA_YOU_FILE,\n [COMMAND_AUDIO_COMMIT]: DEFAULT_PERSONA_YOU_FILE, // Use You persona\n [COMMAND_RELEASE]: DEFAULT_PERSONA_RELEASER_FILE,\n [COMMAND_REVIEW]: DEFAULT_PERSONA_YOU_FILE, // Use You persona\n [COMMAND_AUDIO_REVIEW]: DEFAULT_PERSONA_YOU_FILE,\n};\n\n// Used by child process to create paths\nexport const DEFAULT_PATH_SEPARATOR = '/';\n\n// Used by util/general for file filtering\nexport const DEFAULT_IGNORE_PATTERNS = [\n 'node_modules/**',\n '**/*.log',\n '.git/**',\n 'dist/**',\n 'build/**',\n 'coverage/**',\n 'output/**',\n '.DS_Store',\n '*.tmp',\n '*.cache',\n '**/.kodrdriv-*.json', // Internal kodrdriv cache and state files\n];\n\n// Used by util/storage for directory names\nexport const DEFAULT_DIRECTORY_PREFIX = '.kodrdriv';\n\n// Used by other commands but not exposed in CLI\nexport const INTERNAL_DEFAULT_OUTPUT_FILE = 'output.txt';\n\nexport const INTERNAL_DATETIME_FORMAT = 'YYYY-MM-DD_HH-mm-ss';\n\n// Define defaults in one place\nexport const KODRDRIV_DEFAULTS = {\n dryRun: DEFAULT_DRY_RUN,\n verbose: DEFAULT_VERBOSE,\n debug: DEFAULT_DEBUG,\n overrides: DEFAULT_OVERRIDES,\n model: DEFAULT_MODEL,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n contextDirectories: DEFAULT_CONTEXT_DIRECTORIES,\n commandName: DEFAULT_COMMAND,\n configDirectory: DEFAULT_CONFIG_DIR,\n outputDirectory: DEFAULT_OUTPUT_DIRECTORY,\n preferencesDirectory: DEFAULT_PREFERENCES_DIRECTORY,\n commit: {\n add: DEFAULT_ADD,\n cached: DEFAULT_CACHED,\n sendit: DEFAULT_SENDIT_MODE,\n interactive: DEFAULT_INTERACTIVE_MODE,\n amend: DEFAULT_AMEND_MODE,\n messageLimit: DEFAULT_MESSAGE_LIMIT,\n skipFileCheck: false,\n maxDiffBytes: DEFAULT_MAX_DIFF_BYTES,\n contextFiles: undefined,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n release: {\n from: DEFAULT_FROM_COMMIT_ALIAS,\n to: DEFAULT_TO_COMMIT_ALIAS,\n messageLimit: DEFAULT_MESSAGE_LIMIT,\n interactive: DEFAULT_INTERACTIVE_MODE,\n maxDiffBytes: DEFAULT_MAX_DIFF_BYTES,\n contextFiles: undefined,\n noMilestones: false,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n audioCommit: {\n maxRecordingTime: 300, // 5 minutes default\n audioDevice: undefined, // Auto-detect by default\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n review: {\n includeCommitHistory: true,\n includeRecentDiffs: true,\n includeReleaseNotes: false,\n includeGithubIssues: true,\n commitHistoryLimit: 10,\n diffHistoryLimit: 5,\n releaseNotesLimit: 3,\n githubIssuesLimit: 20,\n sendit: DEFAULT_SENDIT_MODE,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n audioReview: {\n includeCommitHistory: true,\n includeRecentDiffs: true,\n includeReleaseNotes: false,\n includeGithubIssues: true,\n commitHistoryLimit: 10,\n diffHistoryLimit: 5,\n releaseNotesLimit: 3,\n githubIssuesLimit: 20,\n sendit: DEFAULT_SENDIT_MODE,\n maxRecordingTime: 300, // 5 minutes default\n audioDevice: undefined, // Auto-detect by default\n directory: undefined, // No default directory\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n publish: {\n mergeMethod: DEFAULT_MERGE_METHOD,\n from: DEFAULT_FROM_COMMIT_ALIAS,\n targetVersion: 'patch',\n interactive: DEFAULT_INTERACTIVE_MODE,\n requiredEnvVars: ['GITHUB_TOKEN', 'OPENAI_API_KEY'],\n linkWorkspacePackages: true,\n unlinkWorkspacePackages: true,\n sendit: DEFAULT_SENDIT_MODE,\n targetBranch: 'main',\n noMilestones: false,\n checksTimeout: 3600000, // 1 hour default for PR checks\n releaseWorkflowsTimeout: 1800000, // 30 minutes default for release workflows\n },\n link: {\n scopeRoots: {},\n dryRun: false,\n packageArgument: undefined,\n externals: [],\n },\n unlink: {\n scopeRoots: {},\n workspaceFile: undefined,\n dryRun: false,\n cleanNodeModules: false,\n packageArgument: undefined,\n externals: [],\n },\n tree: {\n directories: undefined,\n exclude: undefined,\n startFrom: undefined,\n stopAt: undefined,\n cmd: undefined,\n\n builtInCommand: undefined,\n continue: false,\n packageArgument: undefined,\n cleanNodeModules: false,\n externals: [],\n },\n development: {\n targetVersion: 'patch',\n noMilestones: false,\n },\n versions: {\n subcommand: undefined,\n directories: undefined,\n },\n updates: {\n scope: undefined,\n directories: undefined,\n },\n excludedPatterns: DEFAULT_EXCLUDED_PATTERNS,\n branches: {\n working: {\n targetBranch: 'main',\n developmentBranch: true,\n version: {\n type: 'prerelease' as const,\n increment: true,\n incrementLevel: 'patch' as const,\n tag: 'dev'\n }\n },\n main: {\n version: {\n type: 'release' as const\n }\n }\n }\n};\n"],"names":["VERSION","BUILD_HOSTNAME","BUILD_TIMESTAMP","PROGRAM_NAME","DEFAULT_OVERRIDES","DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS","DEFAULT_VERBOSE","DEFAULT_DRY_RUN","DEFAULT_DEBUG","DEFAULT_MODEL","DEFAULT_OPENAI_REASONING","DEFAULT_OPENAI_MAX_OUTPUT_TOKENS","DEFAULT_OUTPUT_DIRECTORY","DEFAULT_CONTEXT_DIRECTORIES","DEFAULT_CONFIG_DIR","DEFAULT_PREFERENCES_DIRECTORY","path","join","os","homedir","DEFAULT_FROM_COMMIT_ALIAS","DEFAULT_TO_COMMIT_ALIAS","DEFAULT_ADD","DEFAULT_CACHED","DEFAULT_SENDIT_MODE","DEFAULT_INTERACTIVE_MODE","DEFAULT_AMEND_MODE","DEFAULT_MESSAGE_LIMIT","DEFAULT_MAX_DIFF_BYTES","DEFAULT_MERGE_METHOD","DEFAULT_EXCLUDED_PATTERNS","COMMAND_COMMIT","COMMAND_AUDIO_COMMIT","COMMAND_SELECT_AUDIO","COMMAND_RELEASE","COMMAND_REVIEW","COMMAND_AUDIO_REVIEW","COMMAND_PUBLISH","COMMAND_TREE","COMMAND_LINK","COMMAND_UNLINK","COMMAND_CLEAN","COMMAND_PULL","COMMAND_PRECOMMIT","COMMAND_DEVELOPMENT","COMMAND_VERSIONS","COMMAND_UPDATES","COMMAND_CHECK_CONFIG","COMMAND_INIT_CONFIG","ALLOWED_COMMANDS","DEFAULT_COMMAND","KODRDRIV_DEFAULTS","dryRun","verbose","debug","overrides","model","openaiReasoning","openaiMaxOutputTokens","contextDirectories","commandName","configDirectory","outputDirectory","preferencesDirectory","commit","add","cached","sendit","interactive","amend","messageLimit","skipFileCheck","maxDiffBytes","contextFiles","undefined","release","from","to","noMilestones","audioCommit","maxRecordingTime","audioDevice","review","includeCommitHistory","includeRecentDiffs","includeReleaseNotes","includeGithubIssues","commitHistoryLimit","diffHistoryLimit","releaseNotesLimit","githubIssuesLimit","audioReview","directory","publish","mergeMethod","targetVersion","requiredEnvVars","linkWorkspacePackages","unlinkWorkspacePackages","targetBranch","checksTimeout","releaseWorkflowsTimeout","link","scopeRoots","packageArgument","externals","unlink","workspaceFile","cleanNodeModules","tree","directories","exclude","startFrom","stopAt","cmd","builtInCommand","continue","development","versions","subcommand","updates","scope","excludedPatterns","branches","working","developmentBranch","version","type","increment","incrementLevel","tag","main"],"mappings":";;;AAIO,MAAMA,UAAU;AAChB,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ASrC,SAAAA;QACTsC,SAAAA,EAAWtC,SAAAA;QACXuC,MAAAA,EAAQvC,SAAAA;QACRwC,GAAAA,EAAKxC,SAAAA;QAELyC,cAAAA,EAAgBzC,SAAAA;QAChB0C,QAAAA,EAAU,KAAA;QACVZ,eAAAA,EAAiB9B,SAAAA;QACjBkC,gBAAAA,EAAkB,KAAA;AAClBH,QAAAA,SAAAA,EAAW;AACf,KAAA;IACAY,WAAAA,EAAa;QACTtB,aAAAA,EAAe,OAAA;QACfjB,YAAAA,EAAc;AAClB,KAAA;IACAwC,QAAAA,EAAU;QACNC,UAAAA,EAAY7C,SAAAA;QACZoC,WAAAA,EAAapC;AACjB,KAAA;IACA8C,OAAAA,EAAS;QACLC,KAAAA,EAAO/C,SAAAA;QACPoC,WAAAA,EAAapC;AACjB,KAAA;IACAgD,gBAAAA,EAAkB5F,yBAAAA;IAClB6F,QAAAA,EAAU;QACNC,OAAAA,EAAS;YACLzB,YAAAA,EAAc,MAAA;YACd0B,iBAAAA,EAAmB,IAAA;YACnBC,OAAAA,EAAS;gBACLC,IAAAA,EAAM,YAAA;gBACNC,SAAAA,EAAW,IAAA;gBACXC,cAAAA,EAAgB,OAAA;gBAChBC,GAAAA,EAAK;AACT;AACJ,SAAA;QACAC,IAAAA,EAAM;YACFL,OAAAA,EAAS;gBACLC,IAAAA,EAAM;AACV;AACJ;AACJ;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["import { MergeMethod } from './types';\nimport os from 'os';\nimport path from 'path';\n\n/** Version string populated at build time with git and system information */\nexport const VERSION = '__VERSION__ (__GIT_BRANCH__/__GIT_COMMIT__ __GIT_TAGS__ __GIT_COMMIT_DATE__) __SYSTEM_INFO__';\n\n/** The program name used in CLI help and error messages */\nexport const PROGRAM_NAME = 'kodrdriv';\nexport const DEFAULT_CHARACTER_ENCODING = 'utf-8';\nexport const DEFAULT_BINARY_TO_TEXT_ENCODING = 'base64';\nexport const DEFAULT_DIFF = true;\nexport const DEFAULT_LOG = false;\nexport const DEFAULT_OVERRIDES = false;\nexport const DATE_FORMAT_MONTH_DAY = 'MM-DD';\nexport const DATE_FORMAT_YEAR = 'YYYY';\nexport const DATE_FORMAT_YEAR_MONTH = 'YYYY-MM';\nexport const DATE_FORMAT_YEAR_MONTH_DAY = 'YYYY-MM-DD';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_SLASH = 'YYYY/MM/DD';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES = 'YYYY-MM-DD-HHmm';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS = 'YYYY-MM-DD-HHmmss';\nexport const DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS = 'YYYY-MM-DD-HHmmss.SSS';\nexport const DATE_FORMAT_SHORT_TIMESTAMP = 'YYMMdd-HHmm';\nexport const DATE_FORMAT_MONTH = 'MM';\nexport const DATE_FORMAT_DAY = 'DD';\nexport const DATE_FORMAT_HOURS = 'HHmm';\nexport const DATE_FORMAT_MINUTES = 'mm';\nexport const DATE_FORMAT_SECONDS = 'ss';\nexport const DATE_FORMAT_MILLISECONDS = 'SSS';\nexport const DEFAULT_VERBOSE = false;\nexport const DEFAULT_DRY_RUN = false;\nexport const DEFAULT_DEBUG = false;\nexport const DEFAULT_MODEL = 'gpt-4o-mini';\nexport const DEFAULT_MODEL_STRONG = 'gpt-4o';\nexport const DEFAULT_OPENAI_REASONING = 'low';\nexport const DEFAULT_OPENAI_MAX_OUTPUT_TOKENS = 10000;\nexport const DEFAULT_OUTPUT_DIRECTORY = 'output/kodrdriv';\n\n// Buffer size for git commands that may produce large output (like git log)\nexport const DEFAULT_GIT_COMMAND_MAX_BUFFER = 50 * 1024 * 1024; // 50MB\n\nexport const DEFAULT_CONTEXT_DIRECTORIES: string[] = [];\n\nexport const DEFAULT_CONFIG_DIR = '.kodrdriv';\nexport const DEFAULT_PREFERENCES_DIRECTORY = path.join(os.homedir(), '.kodrdriv');\n\nexport const DEFAULT_FROM_COMMIT_ALIAS = 'main';\nexport const DEFAULT_TO_COMMIT_ALIAS = 'HEAD';\n\nexport const DEFAULT_ADD = false;\nexport const DEFAULT_CACHED = false;\nexport const DEFAULT_SENDIT_MODE = false;\nexport const DEFAULT_INTERACTIVE_MODE = false;\nexport const DEFAULT_AMEND_MODE = false;\n// CRITICAL: Keep this low (3-5) to prevent log context contamination.\n// The LLM tends to pattern-match against recent commits instead of describing\n// the actual diff when it sees too much commit history. Set to 0 to disable.\nexport const DEFAULT_MESSAGE_LIMIT = 3;\nexport const DEFAULT_MAX_DIFF_BYTES = 20480; // 20KB limit per file\n\nexport const DEFAULT_MERGE_METHOD: MergeMethod = 'squash';\n\nexport const DEFAULT_EXCLUDED_PATTERNS = [\n 'node_modules', 'package-lock.json', 'yarn.lock', 'bun.lockb',\n 'composer.lock', 'Cargo.lock', 'Gemfile.lock',\n 'dist', 'build', 'out', '.next', '.nuxt', 'coverage',\n '.vscode', '.idea', '.DS_Store', '.git', '.gitignore',\n 'logs', 'tmp', '.cache', '*.log', '.env', '.env.*',\n '*.pem', '*.crt', '*.key', '*.sqlite', '*.db',\n '*.zip', '*.tar', '*.gz', '*.exe', '*.bin'\n];\n\nexport const COMMAND_COMMIT = 'commit';\nexport const COMMAND_AUDIO_COMMIT = 'audio-commit';\nexport const COMMAND_SELECT_AUDIO = 'select-audio';\nexport const COMMAND_RELEASE = 'release';\nexport const COMMAND_REVIEW = 'review';\nexport const COMMAND_AUDIO_REVIEW = 'audio-review';\nexport const COMMAND_PUBLISH = 'publish';\nexport const COMMAND_TREE = 'tree';\nexport const COMMAND_LINK = 'link';\nexport const COMMAND_UNLINK = 'unlink';\nexport const COMMAND_CLEAN = 'clean';\nexport const COMMAND_PULL = 'pull';\nexport const COMMAND_PRECOMMIT = 'precommit';\nexport const COMMAND_DEVELOPMENT = 'development';\nexport const COMMAND_VERSIONS = 'versions';\nexport const COMMAND_UPDATES = 'updates';\nexport const COMMAND_CHECK_CONFIG = 'check-config';\nexport const COMMAND_INIT_CONFIG = 'init-config';\n\nexport const ALLOWED_COMMANDS = [\n COMMAND_COMMIT,\n COMMAND_AUDIO_COMMIT,\n COMMAND_SELECT_AUDIO,\n COMMAND_RELEASE,\n COMMAND_REVIEW,\n COMMAND_AUDIO_REVIEW,\n COMMAND_PUBLISH,\n COMMAND_TREE,\n COMMAND_LINK,\n COMMAND_UNLINK,\n COMMAND_CLEAN,\n COMMAND_PULL,\n COMMAND_PRECOMMIT,\n COMMAND_DEVELOPMENT,\n COMMAND_VERSIONS,\n COMMAND_UPDATES\n];\n\nexport const DEFAULT_COMMAND = COMMAND_COMMIT;\n\nexport const DEFAULT_INSTRUCTIONS_DIR = `instructions`;\n\nexport const DEFAULT_PERSONA_DIR = `personas`;\n\nexport const DEFAULT_INSTRUCTIONS_COMMIT_FILE = `${DEFAULT_INSTRUCTIONS_DIR}/commit.md`;\nexport const DEFAULT_INSTRUCTIONS_RELEASE_FILE = `${DEFAULT_INSTRUCTIONS_DIR}/release.md`;\nexport const DEFAULT_INSTRUCTIONS_REVIEW_FILE = `${DEFAULT_INSTRUCTIONS_DIR}/review.md`;\n\nexport const DEFAULT_PERSONA_RELEASER_FILE = `${DEFAULT_PERSONA_DIR}/releaser.md`;\nexport const DEFAULT_PERSONA_YOU_FILE = `${DEFAULT_PERSONA_DIR}/you.md`;\n\n// Default instructions for each persona\nexport const DEFAULT_INSTRUCTIONS_MAP = {\n [COMMAND_COMMIT]: DEFAULT_INSTRUCTIONS_COMMIT_FILE,\n [COMMAND_AUDIO_COMMIT]: DEFAULT_INSTRUCTIONS_COMMIT_FILE, // Reuse commit instructions\n [COMMAND_RELEASE]: DEFAULT_INSTRUCTIONS_RELEASE_FILE,\n [COMMAND_REVIEW]: DEFAULT_INSTRUCTIONS_REVIEW_FILE, // Reuse audio-review instructions for now\n [COMMAND_AUDIO_REVIEW]: DEFAULT_INSTRUCTIONS_REVIEW_FILE,\n};\n\n// Default personas for each command\nexport const DEFAULT_PERSONA_MAP = {\n [COMMAND_COMMIT]: DEFAULT_PERSONA_YOU_FILE,\n [COMMAND_AUDIO_COMMIT]: DEFAULT_PERSONA_YOU_FILE, // Use You persona\n [COMMAND_RELEASE]: DEFAULT_PERSONA_RELEASER_FILE,\n [COMMAND_REVIEW]: DEFAULT_PERSONA_YOU_FILE, // Use You persona\n [COMMAND_AUDIO_REVIEW]: DEFAULT_PERSONA_YOU_FILE,\n};\n\n// Used by child process to create paths\nexport const DEFAULT_PATH_SEPARATOR = '/';\n\n// Used by util/general for file filtering\nexport const DEFAULT_IGNORE_PATTERNS = [\n 'node_modules/**',\n '**/*.log',\n '.git/**',\n 'dist/**',\n 'build/**',\n 'coverage/**',\n 'output/**',\n '.DS_Store',\n '*.tmp',\n '*.cache',\n '**/.kodrdriv-*.json', // Internal kodrdriv cache and state files\n];\n\n// Used by util/storage for directory names\nexport const DEFAULT_DIRECTORY_PREFIX = '.kodrdriv';\n\n// Used by other commands but not exposed in CLI\nexport const INTERNAL_DEFAULT_OUTPUT_FILE = 'output.txt';\n\nexport const INTERNAL_DATETIME_FORMAT = 'YYYY-MM-DD_HH-mm-ss';\n\n// Define defaults in one place\nexport const KODRDRIV_DEFAULTS = {\n dryRun: DEFAULT_DRY_RUN,\n verbose: DEFAULT_VERBOSE,\n debug: DEFAULT_DEBUG,\n overrides: DEFAULT_OVERRIDES,\n model: DEFAULT_MODEL,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n contextDirectories: DEFAULT_CONTEXT_DIRECTORIES,\n commandName: DEFAULT_COMMAND,\n configDirectory: DEFAULT_CONFIG_DIR,\n outputDirectory: DEFAULT_OUTPUT_DIRECTORY,\n preferencesDirectory: DEFAULT_PREFERENCES_DIRECTORY,\n commit: {\n add: DEFAULT_ADD,\n cached: DEFAULT_CACHED,\n sendit: DEFAULT_SENDIT_MODE,\n interactive: DEFAULT_INTERACTIVE_MODE,\n amend: DEFAULT_AMEND_MODE,\n messageLimit: DEFAULT_MESSAGE_LIMIT,\n skipFileCheck: false,\n maxDiffBytes: DEFAULT_MAX_DIFF_BYTES,\n contextFiles: undefined,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n release: {\n from: DEFAULT_FROM_COMMIT_ALIAS,\n to: DEFAULT_TO_COMMIT_ALIAS,\n messageLimit: DEFAULT_MESSAGE_LIMIT,\n interactive: DEFAULT_INTERACTIVE_MODE,\n maxDiffBytes: DEFAULT_MAX_DIFF_BYTES,\n contextFiles: undefined,\n noMilestones: false,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n audioCommit: {\n maxRecordingTime: 300, // 5 minutes default\n audioDevice: undefined, // Auto-detect by default\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n review: {\n includeCommitHistory: true,\n includeRecentDiffs: true,\n includeReleaseNotes: false,\n includeGithubIssues: true,\n commitHistoryLimit: 10,\n diffHistoryLimit: 5,\n releaseNotesLimit: 3,\n githubIssuesLimit: 20,\n sendit: DEFAULT_SENDIT_MODE,\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n audioReview: {\n includeCommitHistory: true,\n includeRecentDiffs: true,\n includeReleaseNotes: false,\n includeGithubIssues: true,\n commitHistoryLimit: 10,\n diffHistoryLimit: 5,\n releaseNotesLimit: 3,\n githubIssuesLimit: 20,\n sendit: DEFAULT_SENDIT_MODE,\n maxRecordingTime: 300, // 5 minutes default\n audioDevice: undefined, // Auto-detect by default\n directory: undefined, // No default directory\n openaiReasoning: DEFAULT_OPENAI_REASONING as 'low' | 'medium' | 'high',\n openaiMaxOutputTokens: DEFAULT_OPENAI_MAX_OUTPUT_TOKENS,\n },\n publish: {\n mergeMethod: DEFAULT_MERGE_METHOD,\n from: DEFAULT_FROM_COMMIT_ALIAS,\n targetVersion: 'patch',\n interactive: DEFAULT_INTERACTIVE_MODE,\n requiredEnvVars: ['GITHUB_TOKEN', 'OPENAI_API_KEY'],\n linkWorkspacePackages: true,\n unlinkWorkspacePackages: true,\n sendit: DEFAULT_SENDIT_MODE,\n targetBranch: 'main',\n noMilestones: false,\n checksTimeout: 3600000, // 1 hour default for PR checks\n releaseWorkflowsTimeout: 1800000, // 30 minutes default for release workflows\n },\n link: {\n scopeRoots: {},\n dryRun: false,\n packageArgument: undefined,\n externals: [],\n },\n unlink: {\n scopeRoots: {},\n workspaceFile: undefined,\n dryRun: false,\n cleanNodeModules: false,\n packageArgument: undefined,\n externals: [],\n },\n tree: {\n directories: undefined,\n exclude: undefined,\n startFrom: undefined,\n stopAt: undefined,\n cmd: undefined,\n\n builtInCommand: undefined,\n continue: false,\n packageArgument: undefined,\n cleanNodeModules: false,\n externals: [],\n },\n development: {\n targetVersion: 'patch',\n noMilestones: false,\n },\n versions: {\n subcommand: undefined,\n directories: undefined,\n },\n updates: {\n scope: undefined,\n directories: undefined,\n },\n excludedPatterns: DEFAULT_EXCLUDED_PATTERNS,\n branches: {\n working: {\n targetBranch: 'main',\n developmentBranch: true,\n version: {\n type: 'prerelease' as const,\n increment: true,\n incrementLevel: 'patch' as const,\n tag: 'dev'\n }\n },\n main: {\n version: {\n type: 'release' as const\n }\n }\n }\n};\n"],"names":["VERSION","PROGRAM_NAME","DEFAULT_OVERRIDES","DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS_MILLISECONDS","DEFAULT_VERBOSE","DEFAULT_DRY_RUN","DEFAULT_DEBUG","DEFAULT_MODEL","DEFAULT_OPENAI_REASONING","DEFAULT_OPENAI_MAX_OUTPUT_TOKENS","DEFAULT_OUTPUT_DIRECTORY","DEFAULT_CONTEXT_DIRECTORIES","DEFAULT_CONFIG_DIR","DEFAULT_PREFERENCES_DIRECTORY","path","join","os","homedir","DEFAULT_FROM_COMMIT_ALIAS","DEFAULT_TO_COMMIT_ALIAS","DEFAULT_ADD","DEFAULT_CACHED","DEFAULT_SENDIT_MODE","DEFAULT_INTERACTIVE_MODE","DEFAULT_AMEND_MODE","DEFAULT_MESSAGE_LIMIT","DEFAULT_MAX_DIFF_BYTES","DEFAULT_MERGE_METHOD","DEFAULT_EXCLUDED_PATTERNS","COMMAND_COMMIT","COMMAND_AUDIO_COMMIT","COMMAND_SELECT_AUDIO","COMMAND_RELEASE","COMMAND_REVIEW","COMMAND_AUDIO_REVIEW","COMMAND_PUBLISH","COMMAND_TREE","COMMAND_LINK","COMMAND_UNLINK","COMMAND_CLEAN","COMMAND_PULL","COMMAND_PRECOMMIT","COMMAND_DEVELOPMENT","COMMAND_VERSIONS","COMMAND_UPDATES","COMMAND_CHECK_CONFIG","COMMAND_INIT_CONFIG","ALLOWED_COMMANDS","DEFAULT_COMMAND","KODRDRIV_DEFAULTS","dryRun","verbose","debug","overrides","model","openaiReasoning","openaiMaxOutputTokens","contextDirectories","commandName","configDirectory","outputDirectory","preferencesDirectory","commit","add","cached","sendit","interactive","amend","messageLimit","skipFileCheck","maxDiffBytes","contextFiles","undefined","release","from","to","noMilestones","audioCommit","maxRecordingTime","audioDevice","review","includeCommitHistory","includeRecentDiffs","includeReleaseNotes","includeGithubIssues","commitHistoryLimit","diffHistoryLimit","releaseNotesLimit","githubIssuesLimit","audioReview","directory","publish","mergeMethod","targetVersion","requiredEnvVars","linkWorkspacePackages","unlinkWorkspacePackages","targetBranch","checksTimeout","releaseWorkflowsTimeout","link","scopeRoots","packageArgument","externals","unlink","workspaceFile","cleanNodeModules","tree","directories","exclude","startFrom","stopAt","cmd","builtInCommand","continue","development","versions","subcommand","updates","scope","excludedPatterns","branches","working","developmentBranch","version","type","increment","incrementLevel","tag","main"],"mappings":";;;AAIA,8EACO,MAAMA,OAAAA,GAAU;AAEvB,4DACO,MAAMC,YAAAA,GAAe;AAKrB,MAAMC,oBAAoB;AAQ1B,MAAMC,gEAAgE;AAQtE,MAAMC,kBAAkB;AACxB,MAAMC,kBAAkB;AACxB,MAAMC,gBAAgB;AACtB,MAAMC,gBAAgB;AAEtB,MAAMC,2BAA2B;AACjC,MAAMC,mCAAmC;AACzC,MAAMC,2BAA2B;AAKjC,MAAMC,2BAAAA,GAAwC;AAE9C,MAAMC,qBAAqB;AAC3B,MAAMC,gCAAgCC,IAAAA,CAAKC,IAAI,CAACC,EAAAA,CAAGC,OAAO,IAAI,WAAA;AAE9D,MAAMC,4BAA4B;AAClC,MAAMC,0BAA0B;AAEhC,MAAMC,cAAc;AACpB,MAAMC,iBAAiB;AACvB,MAAMC,sBAAsB;AAC5B,MAAMC,2BAA2B;AACjC,MAAMC,qBAAqB;AAClC;AACA;AACA;AACO,MAAMC,wBAAwB;AAC9B,MAAMC,sBAAAA,GAAyB,MAAM;AAErC,MAAMC,uBAAoC;MAEpCC,yBAAAA,GAA4B;AACrC,IAAA,cAAA;AAAgB,IAAA,mBAAA;AAAqB,IAAA,WAAA;AAAa,IAAA,WAAA;AAClD,IAAA,eAAA;AAAiB,IAAA,YAAA;AAAc,IAAA,cAAA;AAC/B,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,OAAA;AAAS,IAAA,UAAA;AAC1C,IAAA,SAAA;AAAW,IAAA,OAAA;AAAS,IAAA,WAAA;AAAa,IAAA,MAAA;AAAQ,IAAA,YAAA;AACzC,IAAA,MAAA;AAAQ,IAAA,KAAA;AAAO,IAAA,QAAA;AAAU,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,QAAA;AAC1C,IA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B,SAAAA;AACjB+B,QAAAA,SAAAA,EAAW;AACf,KAAA;IACAI,IAAAA,EAAM;QACFC,WAAAA,EAAapC,SAAAA;QACbqC,OAAAA,EAASrC,SAAAA;QACTsC,SAAAA,EAAWtC,SAAAA;QACXuC,MAAAA,EAAQvC,SAAAA;QACRwC,GAAAA,EAAKxC,SAAAA;QAELyC,cAAAA,EAAgBzC,SAAAA;QAChB0C,QAAAA,EAAU,KAAA;QACVZ,eAAAA,EAAiB9B,SAAAA;QACjBkC,gBAAAA,EAAkB,KAAA;AAClBH,QAAAA,SAAAA,EAAW;AACf,KAAA;IACAY,WAAAA,EAAa;QACTtB,aAAAA,EAAe,OAAA;QACfjB,YAAAA,EAAc;AAClB,KAAA;IACAwC,QAAAA,EAAU;QACNC,UAAAA,EAAY7C,SAAAA;QACZoC,WAAAA,EAAapC;AACjB,KAAA;IACA8C,OAAAA,EAAS;QACLC,KAAAA,EAAO/C,SAAAA;QACPoC,WAAAA,EAAapC;AACjB,KAAA;IACAgD,gBAAAA,EAAkB5F,yBAAAA;IAClB6F,QAAAA,EAAU;QACNC,OAAAA,EAAS;YACLzB,YAAAA,EAAc,MAAA;YACd0B,iBAAAA,EAAmB,IAAA;YACnBC,OAAAA,EAAS;gBACLC,IAAAA,EAAM,YAAA;gBACNC,SAAAA,EAAW,IAAA;gBACXC,cAAAA,EAAgB,OAAA;gBAChBC,GAAAA,EAAK;AACT;AACJ,SAAA;QACAC,IAAAA,EAAM;YACFL,OAAAA,EAAS;gBACLC,IAAAA,EAAM;AACV;AACJ;AACJ;AACJ;;;;"}
|
|
@@ -2,168 +2,144 @@
|
|
|
2
2
|
|
|
3
3
|
## Objective
|
|
4
4
|
|
|
5
|
-
Verify that projects are ready for development work
|
|
6
|
-
1.
|
|
7
|
-
2.
|
|
8
|
-
3.
|
|
9
|
-
4.
|
|
10
|
-
|
|
11
|
-
This is a quick verification step before starting development work to ensure you're working with the latest code and proper local dependencies.
|
|
12
|
-
|
|
13
|
-
## Determining Tree vs Single-Package Operation
|
|
14
|
-
|
|
15
|
-
**Important**: Before proceeding, determine if this is a tree operation or a single-package operation:
|
|
16
|
-
|
|
17
|
-
- **Tree Operation**: If the directory (${directory}) contains subdirectories with `package.json` files, this is a monorepo/tree operation. Check all packages in the tree.
|
|
18
|
-
- **Single-Package Operation**: If the directory is a leaf project (single package without subdirectories containing `package.json`), check only this single package.
|
|
19
|
-
|
|
20
|
-
## Workflow Steps
|
|
21
|
-
|
|
22
|
-
### For Tree Operations (Monorepo)
|
|
23
|
-
|
|
24
|
-
1. **Check Branch Status**
|
|
25
|
-
- For each package in the tree, check the current git branch
|
|
26
|
-
- Use `git branch --show-current` or `getGitStatusSummary()` from `@grunnverk/git-tools` to get the current branch
|
|
27
|
-
- **Fail if any package is on `main` or `master` branch** - these should be on `working` or a feature branch
|
|
28
|
-
- Report which packages are on the wrong branch
|
|
29
|
-
|
|
30
|
-
2. **Check Remote Sync Status**
|
|
31
|
-
- For each package, check if the local branch is up to date with remote
|
|
32
|
-
- Use `git fetch` first to update remote refs
|
|
33
|
-
- Compare local branch with `origin/{branch}` using `git rev-parse` or `git status`
|
|
34
|
-
- **Fail if any package is behind remote** - run `kodrdriv_tree_pull` to sync
|
|
35
|
-
- Report which packages need to pull changes
|
|
36
|
-
|
|
37
|
-
3. **Check Dev Version Status**
|
|
38
|
-
- For each package, read `package.json` and check the version field
|
|
39
|
-
- Verify that versions contain a dev tag (e.g., `1.2.3-dev.0`, `0.5.1-dev.2`)
|
|
40
|
-
- Use `isDevelopmentVersion()` from `@grunnverk/core` if available, or check for patterns like `-dev.`, `-alpha`, `-beta`, `-rc`
|
|
41
|
-
- **Fail if any package has a non-dev version** (e.g., `1.2.3` without `-dev.0`) - this suggests the package needs `kodrdriv development` run
|
|
42
|
-
- Report which packages have incorrect version formats
|
|
43
|
-
|
|
44
|
-
4. **Check Link Status**
|
|
45
|
-
- For each package, check if local dependencies are properly linked
|
|
46
|
-
- Use `getGloballyLinkedPackages()` and `getLinkedDependencies()` from `@grunnverk/git-tools` to check link status
|
|
47
|
-
- Alternatively, check `node_modules` for symlinks pointing to local packages
|
|
48
|
-
- Check `package.json` dependencies - if they reference scoped packages (e.g., `@grunnverk/*`), verify they're linked, not using registry versions
|
|
49
|
-
- **Fail if local dependencies are not linked** - run `kodrdriv_tree_link` to set up local links
|
|
50
|
-
- Report which packages need linking
|
|
51
|
-
|
|
52
|
-
5. **Summary Report**
|
|
53
|
-
- Provide a clear summary of all checks
|
|
54
|
-
- List any failures with specific packages and what needs to be fixed
|
|
55
|
-
- If all checks pass, confirm that the project is ready for development
|
|
56
|
-
|
|
57
|
-
### For Single-Package Operations (Leaf Project)
|
|
58
|
-
|
|
59
|
-
1. **Check Branch Status**
|
|
60
|
-
- Check the current git branch using `git branch --show-current` or `getGitStatusSummary()`
|
|
61
|
-
- **Fail if on `main` or `master` branch** - should be on `working` or a feature branch
|
|
62
|
-
- Report the current branch
|
|
63
|
-
|
|
64
|
-
2. **Check Remote Sync Status**
|
|
65
|
-
- Run `git fetch` to update remote refs
|
|
66
|
-
- Compare local branch with `origin/{branch}` using `git rev-parse` or `git status`
|
|
67
|
-
- **Fail if behind remote** - run `kodrdriv_pull` to sync
|
|
68
|
-
- Report sync status
|
|
69
|
-
|
|
70
|
-
3. **Check Dev Version Status**
|
|
71
|
-
- Read `package.json` and check the version field
|
|
72
|
-
- Verify that version contains a dev tag (e.g., `1.2.3-dev.0`)
|
|
73
|
-
- **Fail if version is not a dev version** - run `kodrdriv development` to update
|
|
74
|
-
- Report the current version
|
|
75
|
-
|
|
76
|
-
4. **Check Link Status**
|
|
77
|
-
- Check if local dependencies are properly linked
|
|
78
|
-
- Use `getLinkedDependencies()` from `@grunnverk/git-tools` to check link status
|
|
79
|
-
- Check `node_modules` for symlinks pointing to local packages
|
|
80
|
-
- Check `package.json` dependencies - if they reference scoped packages, verify they're linked
|
|
81
|
-
- **Fail if local dependencies are not linked** - run `kodrdriv link` to set up local links
|
|
82
|
-
- Report link status
|
|
83
|
-
|
|
84
|
-
5. **Summary Report**
|
|
85
|
-
- Provide a clear summary of all checks
|
|
86
|
-
- List any failures and what needs to be fixed
|
|
87
|
-
- If all checks pass, confirm that the project is ready for development
|
|
88
|
-
|
|
89
|
-
## Common Issues and Fixes
|
|
90
|
-
|
|
91
|
-
### Issue: Package on main branch
|
|
92
|
-
**Fix**: Switch to working branch or create a feature branch
|
|
93
|
-
```bash
|
|
94
|
-
git checkout working
|
|
95
|
-
# or
|
|
96
|
-
git checkout -b feature/my-feature
|
|
97
|
-
```
|
|
5
|
+
Verify that projects are ready for development work before starting coding. This ensures you're working with:
|
|
6
|
+
1. The correct branch (not `main` or `master`)
|
|
7
|
+
2. The latest code from remote
|
|
8
|
+
3. Proper development versions
|
|
9
|
+
4. Linked local dependencies
|
|
98
10
|
|
|
99
|
-
|
|
100
|
-
**Fix**: Pull latest changes
|
|
101
|
-
```bash
|
|
102
|
-
# For tree operations
|
|
103
|
-
kodrdriv tree pull
|
|
11
|
+
## Prerequisites
|
|
104
12
|
|
|
105
|
-
|
|
106
|
-
kodrdriv pull
|
|
107
|
-
```
|
|
13
|
+
Before running checks, fetch these resources to understand the project:
|
|
108
14
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
kodrdriv development
|
|
15
|
+
1. **Workspace Resource**: `kodrdriv://workspace[/path/to/directory]`
|
|
16
|
+
- Determines if this is a tree (monorepo) or single-package operation
|
|
17
|
+
- If `packages.length > 1`, this is a tree operation
|
|
18
|
+
- If `packages.length === 1`, this is a single-package operation
|
|
114
19
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
20
|
+
2. **Status Resource**: `kodrdriv://status[/path/to/directory]`
|
|
21
|
+
- Provides current git status including branch, staged/modified files, and sync status
|
|
22
|
+
- Use this to understand the current state before running checks
|
|
118
23
|
|
|
119
|
-
|
|
120
|
-
**Fix**: Run link command
|
|
121
|
-
```bash
|
|
122
|
-
# For tree operations
|
|
123
|
-
kodrdriv tree link
|
|
24
|
+
## Usage
|
|
124
25
|
|
|
125
|
-
|
|
126
|
-
|
|
26
|
+
Use the `kodrdriv_check_development` tool to perform comprehensive checks. The tool automatically detects whether you're working with a single package or a monorepo tree based on the workspace structure.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
kodrdriv_check_development --directory <path>
|
|
127
30
|
```
|
|
128
31
|
|
|
129
|
-
##
|
|
32
|
+
## What Gets Checked
|
|
130
33
|
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
- All local dependencies properly linked via `kodrdriv link`
|
|
34
|
+
### 1. Branch Status
|
|
35
|
+
- Verifies packages are not on `main` or `master` branches
|
|
36
|
+
- Development should happen on `working` or feature branches
|
|
37
|
+
- **Why**: Prevents accidental commits to protected branches
|
|
136
38
|
|
|
137
|
-
|
|
39
|
+
### 2. Remote Sync Status
|
|
40
|
+
- Checks if local branches are up to date with remote
|
|
41
|
+
- Detects if you're behind the remote branch
|
|
42
|
+
- **Why**: Ensures you have the latest changes before starting work
|
|
138
43
|
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- **
|
|
143
|
-
- **Efficiency**: For large monorepos, checks can be done in parallel where possible
|
|
44
|
+
### 3. Development Version Status
|
|
45
|
+
- Verifies packages have dev version tags (e.g., `1.2.3-dev.0`)
|
|
46
|
+
- Checks if base versions conflict with published npm packages
|
|
47
|
+
- **Why**: Distinguishes development versions from releases and prevents version conflicts
|
|
144
48
|
|
|
145
|
-
|
|
49
|
+
### 4. Link Status
|
|
50
|
+
- Checks if local scoped dependencies are properly linked
|
|
51
|
+
- Verifies symlinks for cross-package development
|
|
52
|
+
- **Why**: Ensures changes in one package are immediately reflected in dependent packages
|
|
146
53
|
|
|
147
|
-
|
|
148
|
-
✅ Branch Check: All packages on working branch
|
|
149
|
-
✅ Remote Sync: All packages up to date with remote
|
|
150
|
-
✅ Dev Versions: All packages have dev versions (e.g., 1.2.3-dev.0)
|
|
151
|
-
✅ Link Status: All local dependencies properly linked
|
|
54
|
+
## Interpreting Results
|
|
152
55
|
|
|
153
|
-
|
|
154
|
-
|
|
56
|
+
The tool returns a structured result with:
|
|
57
|
+
- `ready`: Boolean indicating if all checks passed
|
|
58
|
+
- `isTree`: Whether this is a monorepo or single package
|
|
59
|
+
- `packagesChecked`: Number of packages examined
|
|
60
|
+
- `checks`: Detailed results for each check category
|
|
61
|
+
|
|
62
|
+
Each check category includes:
|
|
63
|
+
- `passed`: Boolean indicating if the check passed
|
|
64
|
+
- `issues`: Array of specific problems found
|
|
65
|
+
|
|
66
|
+
## Fixing Issues
|
|
155
67
|
|
|
156
|
-
|
|
68
|
+
When issues are found, the tool output will indicate which checks failed. Here's how to address them:
|
|
157
69
|
|
|
70
|
+
### Branch Issues
|
|
71
|
+
If packages are on `main` or `master`:
|
|
72
|
+
- Switch to `working` branch: `git checkout working`
|
|
73
|
+
- Or create a feature branch: `git checkout -b feature/my-feature`
|
|
74
|
+
|
|
75
|
+
### Remote Sync Issues
|
|
76
|
+
If packages are behind remote:
|
|
77
|
+
- Fetch `kodrdriv://workspace[/path]` to determine operation type
|
|
78
|
+
- Single package: Use `kodrdriv_pull`
|
|
79
|
+
- Tree: Use `kodrdriv_tree_pull`
|
|
80
|
+
|
|
81
|
+
### Dev Version Issues
|
|
82
|
+
If packages lack dev versions or have conflicts:
|
|
83
|
+
- Run `kodrdriv_development` to transition to development mode
|
|
84
|
+
- This tags the current version and bumps to the next dev version
|
|
85
|
+
|
|
86
|
+
### Link Issues
|
|
87
|
+
If local dependencies aren't linked:
|
|
88
|
+
- Fetch `kodrdriv://workspace[/path]` to determine operation type
|
|
89
|
+
- Single package: Use `kodrdriv_link` (not yet implemented as MCP tool)
|
|
90
|
+
- Tree: Use `kodrdriv_tree_link`
|
|
91
|
+
|
|
92
|
+
## When to Use This
|
|
93
|
+
|
|
94
|
+
Run this check:
|
|
95
|
+
- **Before starting new development work** - ensures clean starting state
|
|
96
|
+
- **After switching branches** - verifies branch setup
|
|
97
|
+
- **After pulling changes** - confirms everything is in sync
|
|
98
|
+
- **When debugging dependency issues** - checks link status
|
|
99
|
+
|
|
100
|
+
## Example Output
|
|
101
|
+
|
|
102
|
+
### All Checks Passed
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"ready": true,
|
|
106
|
+
"isTree": true,
|
|
107
|
+
"packagesChecked": 5,
|
|
108
|
+
"checks": {
|
|
109
|
+
"branch": { "passed": true, "issues": [] },
|
|
110
|
+
"remoteSync": { "passed": true, "issues": [] },
|
|
111
|
+
"devVersion": { "passed": true, "issues": [] },
|
|
112
|
+
"linkStatus": { "passed": true, "issues": [] }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
158
115
|
```
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
116
|
+
|
|
117
|
+
### Issues Found
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"ready": false,
|
|
121
|
+
"isTree": true,
|
|
122
|
+
"packagesChecked": 5,
|
|
123
|
+
"checks": {
|
|
124
|
+
"branch": {
|
|
125
|
+
"passed": false,
|
|
126
|
+
"issues": ["@grunnverk/core is on main branch"]
|
|
127
|
+
},
|
|
128
|
+
"remoteSync": {
|
|
129
|
+
"passed": false,
|
|
130
|
+
"issues": ["@grunnverk/git-tools is 3 commits behind remote"]
|
|
131
|
+
},
|
|
132
|
+
"devVersion": {
|
|
133
|
+
"passed": false,
|
|
134
|
+
"issues": [
|
|
135
|
+
"@grunnverk/core has non-dev version: 1.2.3",
|
|
136
|
+
"@grunnverk/audio-tools: Base version 1.0.4 already published (current: 1.0.4-dev.0)"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"linkStatus": {
|
|
140
|
+
"passed": false,
|
|
141
|
+
"issues": ["@grunnverk/commands-git: Scoped dependencies not linked: @grunnverk/core"]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
169
145
|
```
|
|
@@ -5,58 +5,71 @@ Update dependencies to the latest published versions from npmjs for configured s
|
|
|
5
5
|
- Projects should NEVER depend on dev versions - they should use `kodrdriv link` for local development
|
|
6
6
|
- Only update to stable, published versions available on npmjs
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Prerequisites
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Before proceeding, fetch these resources to understand the project structure and configuration:
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
12
|
+
1. **Workspace Resource**: `kodrdriv://workspace[/path/to/directory]`
|
|
13
|
+
- Determines if this is a tree (monorepo) or single-package operation
|
|
14
|
+
- If `packages.length > 1`, use tree commands
|
|
15
|
+
- If `packages.length === 1`, use single-package commands
|
|
14
16
|
|
|
15
|
-
**
|
|
17
|
+
2. **Config Resource**: `kodrdriv://config[/path/to/directory]`
|
|
18
|
+
- Provides `updates.scopes` or `publish.scopedDependencyUpdates` configuration
|
|
19
|
+
- Determines which scopes to update
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
## Workflow
|
|
18
22
|
|
|
19
|
-
1
|
|
20
|
-
- Check configuration for `updates.scopes` or `publish.scopedDependencyUpdates`
|
|
21
|
-
- If the current package has a scope (e.g., `@grunnverk/my-package`), include that scope
|
|
22
|
-
- Use all configured scopes plus the package's own scope
|
|
23
|
+
### Step 1: Determine Operation Type and Scopes
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Updates dependencies, devDependencies, and peerDependencies sections
|
|
25
|
+
Fetch the workspace and config resources:
|
|
26
|
+
- `kodrdriv://workspace[/path/to/directory]` → Check `packages.length`
|
|
27
|
+
- `kodrdriv://config[/path/to/directory]` → Check `config.updates.scopes` or `config.publish.scopedDependencyUpdates`
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
- Run `npm install` in each updated package to update package-lock.json
|
|
31
|
-
- Review changes to ensure no dev versions were introduced
|
|
32
|
-
- Run `kodrdriv_tree_precommit` to verify everything still works across the tree
|
|
33
|
-
- **Note**: If precommit fails due to coverage threshold issues and the project uses lcov format, consider using the `brennpunkt` MCP server tools to analyze coverage gaps and prioritize test improvements. Install brennpunkt as an MCP server with: `npx -y -p @redaksjon/brennpunkt brennpunkt-mcp`
|
|
34
|
-
- Commit the changes with `kodrdriv_tree_commit`
|
|
29
|
+
If the current package has a scope (e.g., `@grunnverk/my-package`), include that scope along with configured scopes.
|
|
35
30
|
|
|
36
|
-
###
|
|
31
|
+
### Step 2: Run Updates
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
**For Tree Operations** (packages.length > 1):
|
|
34
|
+
- Run `kodrdriv_tree_updates`:
|
|
35
|
+
- Pass the scopes from config: `{"directory": "/path/to/monorepo", "scopes": [<scopes from config>]}`
|
|
36
|
+
- Or single scope: `{"directory": "/path/to/monorepo", "scope": "<scope from config>"}`
|
|
37
|
+
- Updates all packages in the tree using npm-check-updates
|
|
38
|
+
- Updates only packages published on npmjs (not dev versions)
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
**For Single-Package Operations** (packages.length === 1):
|
|
41
|
+
- Run `kodrdriv_updates`:
|
|
42
|
+
- Pass the scopes from config: `{"directory": "/path/to/package", "scopes": [<scopes from config>]}`
|
|
43
|
+
- Or single scope: `{"directory": "/path/to/package", "scope": "<scope from config>"}`
|
|
44
|
+
- Updates the single package using npm-check-updates
|
|
45
|
+
- Updates only packages published on npmjs (not dev versions)
|
|
47
46
|
|
|
48
|
-
3
|
|
49
|
-
- Run `npm install` to update package-lock.json
|
|
50
|
-
- Review changes to ensure no dev versions were introduced
|
|
51
|
-
- Run `kodrdriv_precommit` to verify everything still works
|
|
52
|
-
- **Note**: If precommit fails due to coverage threshold issues and the project uses lcov format, consider using the `brennpunkt` MCP server tools to analyze coverage gaps and prioritize test improvements. Install brennpunkt as an MCP server with: `npx -y -p @redaksjon/brennpunkt brennpunkt-mcp`
|
|
53
|
-
- Commit the changes with `kodrdriv_commit`
|
|
47
|
+
### Step 3: Post-Update Actions
|
|
54
48
|
|
|
55
|
-
**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
**For Tree Operations:**
|
|
50
|
+
1. Run `npm install` in each updated package to update package-lock.json
|
|
51
|
+
2. Review changes to ensure no dev versions were introduced
|
|
52
|
+
3. Run `kodrdriv_tree_precommit` to verify everything still works across the tree
|
|
53
|
+
- **Note**: If precommit fails due to coverage threshold issues and the project uses lcov format, consider using the `brennpunkt` MCP server tools to analyze coverage gaps and prioritize test improvements. Install brennpunkt as an MCP server with: `npx -y -p @redaksjon/brennpunkt brennpunkt-mcp`
|
|
54
|
+
4. Commit the changes with `kodrdriv_tree_commit`
|
|
55
|
+
|
|
56
|
+
**For Single-Package Operations:**
|
|
57
|
+
1. Run `npm install` to update package-lock.json
|
|
58
|
+
2. Review changes to ensure no dev versions were introduced
|
|
59
|
+
3. Run `kodrdriv_precommit` to verify everything still works
|
|
60
|
+
- **Note**: If precommit fails due to coverage threshold issues and the project uses lcov format, consider using the `brennpunkt` MCP server tools to analyze coverage gaps and prioritize test improvements. Install brennpunkt as an MCP server with: `npx -y -p @redaksjon/brennpunkt brennpunkt-mcp`
|
|
61
|
+
4. Commit the changes with `kodrdriv_commit`
|
|
62
|
+
|
|
63
|
+
## Example
|
|
64
|
+
|
|
65
|
+
If package is `@myorg/my-package` and config has `scopedDependencyUpdates: ["@external-scope"]`:
|
|
66
|
+
|
|
67
|
+
1. Fetch `kodrdriv://workspace/path/to/package` → `{ packages: [{ name: "@myorg/my-package", ... }] }`
|
|
68
|
+
2. Fetch `kodrdriv://config/path/to/package` → `{ config: { publish: { scopedDependencyUpdates: ["@external-scope"] } } }`
|
|
69
|
+
3. Update scopes: `["@myorg", "@external-scope"]` (package's own scope + configured scopes)
|
|
70
|
+
4. Since `packages.length === 1`, run `kodrdriv_updates` with these scopes
|
|
71
|
+
|
|
72
|
+
## Verification
|
|
59
73
|
|
|
60
|
-
**Verification:**
|
|
61
74
|
- Check that no dependencies were updated to versions containing `-dev`, `-alpha`, `-beta`, or `-rc`
|
|
62
75
|
- If any dev versions are found, they should be removed and replaced with `kodrdriv link` workflow instead
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Ensure that precommit checks pass successfully for a single package. When failures occur, understand the root cause, fix the issues, and iterate until all checks pass.
|
|
6
6
|
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
Before proceeding, fetch the workspace resource to confirm this is a single-package operation:
|
|
10
|
+
|
|
11
|
+
**Workspace Resource**: `kodrdriv://workspace[/path/to/directory]`
|
|
12
|
+
- Confirms this is a single-package operation (`packages.length === 1`)
|
|
13
|
+
- Provides package information (name, version, path)
|
|
14
|
+
|
|
7
15
|
## Workflow Steps
|
|
8
16
|
|
|
9
17
|
1. **Run Precommit Check**
|
|
@@ -34,20 +42,23 @@ Ensure that precommit checks pass successfully for a single package. When failur
|
|
|
34
42
|
## Example Flow
|
|
35
43
|
|
|
36
44
|
```
|
|
37
|
-
1.
|
|
45
|
+
1. Fetch kodrdriv://workspace/path/to/package
|
|
46
|
+
→ Confirms this is a single package
|
|
47
|
+
|
|
48
|
+
2. kodrdriv_precommit({ directory: "/path/to/package", fix: true })
|
|
38
49
|
→ Fails: TypeScript type error in src/index.ts:42
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
3. Analyze error: TypeScript type error in src/index.ts:42
|
|
41
52
|
→ Fix the type error
|
|
42
53
|
|
|
43
|
-
|
|
54
|
+
4. kodrdriv_precommit({ directory: "/path/to/package", fix: true })
|
|
44
55
|
→ Fails: Linting error in src/utils.ts:15
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
5. Fix linting error
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
6. kodrdriv_precommit({ directory: "/path/to/package", fix: true })
|
|
49
60
|
→ All checks pass
|
|
50
61
|
|
|
51
|
-
|
|
62
|
+
7. kodrdriv_commit({ directory: "/path/to/package", sendit: true })
|
|
52
63
|
→ Commits all fixes
|
|
53
64
|
```
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Execute a complete publishing workflow for a single package. Handle errors gracefully, fix issues as they arise, and resume appropriately.
|
|
6
6
|
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
Before proceeding, fetch the workspace resource to confirm this is a single-package operation:
|
|
10
|
+
|
|
11
|
+
**Workspace Resource**: `kodrdriv://workspace[/path/to/directory]`
|
|
12
|
+
- Confirms this is a single-package operation (`packages.length === 1`)
|
|
13
|
+
- Provides package information (name, version, path)
|
|
14
|
+
|
|
7
15
|
## Pre-Publish Verification
|
|
8
16
|
|
|
9
17
|
Before running `kodrdriv_publish`, verify that `kodrdriv_precommit` works successfully.
|
|
@@ -88,13 +96,21 @@ After a successful publish workflow, the project should end up in a "working" br
|
|
|
88
96
|
## Example Flow
|
|
89
97
|
|
|
90
98
|
```
|
|
91
|
-
1.
|
|
92
|
-
|
|
99
|
+
1. Fetch kodrdriv://workspace/path/to/package
|
|
100
|
+
→ Confirms this is a single package
|
|
101
|
+
|
|
102
|
+
2. Run kodrdriv_precommit (unless fix_and_commit was just run)
|
|
103
|
+
|
|
104
|
+
3. Run kodrdriv_publish
|
|
93
105
|
→ Error: PR validation failed
|
|
94
106
|
→ Link provided: https://github.com/org/repo/pull/456
|
|
95
|
-
|
|
96
|
-
4.
|
|
97
|
-
|
|
107
|
+
|
|
108
|
+
4. Investigate PR #456 → Find linting error
|
|
109
|
+
|
|
110
|
+
5. Fix the linting error → Commit and push
|
|
111
|
+
|
|
112
|
+
6. Run kodrdriv_publish again
|
|
98
113
|
→ System detects existing PR and resumes appropriately
|
|
99
|
-
|
|
114
|
+
|
|
115
|
+
7. Monitor for completion
|
|
100
116
|
```
|