@codeledger/cli 0.1.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/LICENSE +27 -0
- package/dist/commands/activate.d.ts +18 -0
- package/dist/commands/activate.d.ts.map +1 -0
- package/dist/commands/activate.js +326 -0
- package/dist/commands/activate.js.map +1 -0
- package/dist/commands/bundle.d.ts +2 -0
- package/dist/commands/bundle.d.ts.map +1 -0
- package/dist/commands/bundle.js +144 -0
- package/dist/commands/bundle.js.map +1 -0
- package/dist/commands/clean.d.ts +2 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +28 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/compare.d.ts +2 -0
- package/dist/commands/compare.d.ts.map +1 -0
- package/dist/commands/compare.js +216 -0
- package/dist/commands/compare.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +135 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +57 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/scan.d.ts +2 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +27 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/session-cleanup.d.ts +11 -0
- package/dist/commands/session-cleanup.d.ts.map +1 -0
- package/dist/commands/session-cleanup.js +81 -0
- package/dist/commands/session-cleanup.js.map +1 -0
- package/dist/commands/session-init.d.ts +10 -0
- package/dist/commands/session-init.d.ts.map +1 -0
- package/dist/commands/session-init.js +46 -0
- package/dist/commands/session-init.js.map +1 -0
- package/dist/commands/session-progress.d.ts +12 -0
- package/dist/commands/session-progress.d.ts.map +1 -0
- package/dist/commands/session-progress.js +259 -0
- package/dist/commands/session-progress.js.map +1 -0
- package/dist/commands/session-summary.d.ts +14 -0
- package/dist/commands/session-summary.d.ts.map +1 -0
- package/dist/commands/session-summary.js +287 -0
- package/dist/commands/session-summary.js.map +1 -0
- package/dist/commands/sessions.d.ts +9 -0
- package/dist/commands/sessions.d.ts.map +1 -0
- package/dist/commands/sessions.js +60 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/share.d.ts +9 -0
- package/dist/commands/share.d.ts.map +1 -0
- package/dist/commands/share.js +275 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +150 -0
- package/dist/index.js.map +1 -0
- package/dist/session-id.d.ts +22 -0
- package/dist/session-id.d.ts.map +1 -0
- package/dist/session-id.js +49 -0
- package/dist/session-id.js.map +1 -0
- package/dist/session-paths.d.ts +23 -0
- package/dist/session-paths.d.ts.map +1 -0
- package/dist/session-paths.js +44 -0
- package/dist/session-paths.js.map +1 -0
- package/dist/session-registry.d.ts +19 -0
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/session-registry.js +180 -0
- package/dist/session-registry.js.map +1 -0
- package/dist/templates/claude-md.d.ts +10 -0
- package/dist/templates/claude-md.d.ts.map +1 -0
- package/dist/templates/claude-md.js +107 -0
- package/dist/templates/claude-md.js.map +1 -0
- package/dist/templates/config.d.ts +3 -0
- package/dist/templates/config.d.ts.map +1 -0
- package/dist/templates/config.js +82 -0
- package/dist/templates/config.js.map +1 -0
- package/dist/templates/harness-pack.d.ts +3 -0
- package/dist/templates/harness-pack.d.ts.map +1 -0
- package/dist/templates/harness-pack.js +26 -0
- package/dist/templates/harness-pack.js.map +1 -0
- package/dist/templates/hooks.d.ts +34 -0
- package/dist/templates/hooks.d.ts.map +1 -0
- package/dist/templates/hooks.js +149 -0
- package/dist/templates/hooks.js.map +1 -0
- package/dist/templates/scenarios.d.ts +3 -0
- package/dist/templates/scenarios.d.ts.map +1 -0
- package/dist/templates/scenarios.js +335 -0
- package/dist/templates/scenarios.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/templates/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE;QACL,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;QAC3B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;QACzB,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC;QAC1B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;QACzB,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;KACpB,CAAC;CACH;AAED,wBAAgB,YAAY,IAAI,WAAW,CAkI1C"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code hooks template generated by `codeledger init`.
|
|
3
|
+
*
|
|
4
|
+
* These hooks integrate CodeLedger into the Claude Code lifecycle:
|
|
5
|
+
* - SessionStart: initialize session ID, scan repo, warm index
|
|
6
|
+
* - PreToolUse: remind agent to check active bundle on edits
|
|
7
|
+
* - PostToolUse: auto-run session-summary after git commits
|
|
8
|
+
* - PreCompact: write session progress snapshot before compaction
|
|
9
|
+
* - Stop: final session recap, session cleanup
|
|
10
|
+
*
|
|
11
|
+
* Multi-session support: SessionStart generates a session ID and writes
|
|
12
|
+
* a PID-tagged marker file. Downstream hooks discover the session ID
|
|
13
|
+
* via the CODELEDGER_SESSION env var or PID marker, ensuring each
|
|
14
|
+
* Claude Code tab gets its own isolated bundle and state files.
|
|
15
|
+
*
|
|
16
|
+
* All hooks gracefully degrade: if the CLI is missing or a command fails,
|
|
17
|
+
* the hook prints a diagnostic message instead of silently breaking.
|
|
18
|
+
*/
|
|
19
|
+
export function defaultHooks() {
|
|
20
|
+
// CLI resolution preamble: checks PATH, local node_modules, then monorepo source
|
|
21
|
+
const CL_RESOLVE = [
|
|
22
|
+
'CL_CMD="";',
|
|
23
|
+
'if command -v codeledger >/dev/null 2>&1; then CL_CMD="codeledger";',
|
|
24
|
+
'elif [ -x "node_modules/.bin/codeledger" ]; then CL_CMD="node_modules/.bin/codeledger";',
|
|
25
|
+
'elif [ -f "packages/cli/dist/index.js" ]; then CL_CMD="node packages/cli/dist/index.js";',
|
|
26
|
+
'fi;',
|
|
27
|
+
];
|
|
28
|
+
return {
|
|
29
|
+
hooks: {
|
|
30
|
+
SessionStart: [
|
|
31
|
+
{
|
|
32
|
+
type: 'command',
|
|
33
|
+
command: [
|
|
34
|
+
...CL_RESOLVE,
|
|
35
|
+
'if [ -z "$CL_CMD" ]; then',
|
|
36
|
+
' echo "CodeLedger: CLI not found — install via npm or build from source.";',
|
|
37
|
+
'else',
|
|
38
|
+
' CL_SID=$($CL_CMD session-init --quiet 2>/dev/null) || true;',
|
|
39
|
+
' if [ -n "$CL_SID" ]; then',
|
|
40
|
+
' export CODELEDGER_SESSION="$CL_SID";',
|
|
41
|
+
' $CL_CMD activate --quiet --stale-after 3600 --session "$CL_SID";',
|
|
42
|
+
' else',
|
|
43
|
+
' $CL_CMD activate --quiet --stale-after 3600;',
|
|
44
|
+
' fi;',
|
|
45
|
+
'fi',
|
|
46
|
+
].join(' '),
|
|
47
|
+
timeout: 30000,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
PreToolUse: [
|
|
51
|
+
{
|
|
52
|
+
type: 'command',
|
|
53
|
+
command: [
|
|
54
|
+
'if [ "$TOOL_NAME" = "Edit" ] || [ "$TOOL_NAME" = "Write" ]; then',
|
|
55
|
+
' CL_SID="${CODELEDGER_SESSION:-}";',
|
|
56
|
+
' if [ -z "$CL_SID" ] && [ -n "$$" ]; then',
|
|
57
|
+
' CL_MARKER=".codeledger/.current-session-pid-$PPID";',
|
|
58
|
+
' [ -f "$CL_MARKER" ] && CL_SID=$(cat "$CL_MARKER" 2>/dev/null);',
|
|
59
|
+
' fi;',
|
|
60
|
+
' if [ -n "$CL_SID" ]; then',
|
|
61
|
+
' MARKER=".codeledger/sessions/$CL_SID/.hook-reminded";',
|
|
62
|
+
' BUNDLE=".codeledger/sessions/$CL_SID/active-bundle.md";',
|
|
63
|
+
' else',
|
|
64
|
+
' MARKER=".codeledger/.hook-reminded";',
|
|
65
|
+
' BUNDLE=".codeledger/active-bundle.md";',
|
|
66
|
+
' fi;',
|
|
67
|
+
' if [ ! -f "$MARKER" ]; then',
|
|
68
|
+
' mkdir -p "$(dirname "$MARKER")" && touch "$MARKER";',
|
|
69
|
+
' echo "CodeLedger: active bundle at $BUNDLE -- check it for relevant context";',
|
|
70
|
+
' fi;',
|
|
71
|
+
'fi',
|
|
72
|
+
].join(' '),
|
|
73
|
+
timeout: 5000,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
PostToolUse: [
|
|
77
|
+
{
|
|
78
|
+
type: 'command',
|
|
79
|
+
command: [
|
|
80
|
+
'if [ "$TOOL_NAME" = "Bash" ] && echo "$TOOL_INPUT" | grep -q "git commit"; then',
|
|
81
|
+
' CL_SID="${CODELEDGER_SESSION:-}";',
|
|
82
|
+
' if [ -z "$CL_SID" ] && [ -n "$$" ]; then',
|
|
83
|
+
' CL_MARKER=".codeledger/.current-session-pid-$PPID";',
|
|
84
|
+
' [ -f "$CL_MARKER" ] && CL_SID=$(cat "$CL_MARKER" 2>/dev/null);',
|
|
85
|
+
' fi;',
|
|
86
|
+
...CL_RESOLVE,
|
|
87
|
+
' if [ -n "$CL_CMD" ]; then',
|
|
88
|
+
' if [ -n "$CL_SID" ]; then',
|
|
89
|
+
' $CL_CMD session-summary --session "$CL_SID" 2>/dev/null || true;',
|
|
90
|
+
' else',
|
|
91
|
+
' $CL_CMD session-summary 2>/dev/null || true;',
|
|
92
|
+
' fi;',
|
|
93
|
+
' fi;',
|
|
94
|
+
'fi',
|
|
95
|
+
].join(' '),
|
|
96
|
+
timeout: 10000,
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
PreCompact: [
|
|
100
|
+
{
|
|
101
|
+
type: 'command',
|
|
102
|
+
command: [
|
|
103
|
+
'CL_SID="${CODELEDGER_SESSION:-}";',
|
|
104
|
+
'if [ -z "$CL_SID" ] && [ -n "$$" ]; then',
|
|
105
|
+
' CL_MARKER=".codeledger/.current-session-pid-$PPID";',
|
|
106
|
+
' [ -f "$CL_MARKER" ] && CL_SID=$(cat "$CL_MARKER" 2>/dev/null);',
|
|
107
|
+
'fi;',
|
|
108
|
+
...CL_RESOLVE,
|
|
109
|
+
'if [ -n "$CL_CMD" ]; then',
|
|
110
|
+
' if [ -n "$CL_SID" ]; then',
|
|
111
|
+
' $CL_CMD session-progress --quiet --session "$CL_SID" 2>/dev/null || true;',
|
|
112
|
+
' echo "CodeLedger: session progress snapshot written to .codeledger/sessions/$CL_SID/session-progress.md -- read it after compaction.";',
|
|
113
|
+
' else',
|
|
114
|
+
' $CL_CMD session-progress --quiet 2>/dev/null || true;',
|
|
115
|
+
' echo "CodeLedger: session progress snapshot written to .codeledger/session-progress.md -- read it after compaction.";',
|
|
116
|
+
' fi;',
|
|
117
|
+
'fi',
|
|
118
|
+
].join(' '),
|
|
119
|
+
timeout: 10000,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
Stop: [
|
|
123
|
+
{
|
|
124
|
+
type: 'command',
|
|
125
|
+
command: [
|
|
126
|
+
'CL_SID="${CODELEDGER_SESSION:-}";',
|
|
127
|
+
'if [ -z "$CL_SID" ] && [ -n "$$" ]; then',
|
|
128
|
+
' CL_MARKER=".codeledger/.current-session-pid-$PPID";',
|
|
129
|
+
' [ -f "$CL_MARKER" ] && CL_SID=$(cat "$CL_MARKER" 2>/dev/null);',
|
|
130
|
+
'fi;',
|
|
131
|
+
...CL_RESOLVE,
|
|
132
|
+
'if [ -n "$CL_CMD" ]; then',
|
|
133
|
+
' if [ -n "$CL_SID" ]; then',
|
|
134
|
+
' $CL_CMD session-summary --final --session "$CL_SID" 2>/dev/null || true;',
|
|
135
|
+
' $CL_CMD session-cleanup --session "$CL_SID" 2>/dev/null || true;',
|
|
136
|
+
' else',
|
|
137
|
+
' $CL_CMD session-summary --final 2>/dev/null || true;',
|
|
138
|
+
' rm -f .codeledger/.hook-reminded .codeledger/.session-start-ref .codeledger/.activate-ref .codeledger/session-progress.md;',
|
|
139
|
+
' fi;',
|
|
140
|
+
'fi;',
|
|
141
|
+
'echo "Tip: Run codeledger activate --task \\"your next task\\" to refresh context for the next task."',
|
|
142
|
+
].join(' '),
|
|
143
|
+
timeout: 10000,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/templates/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAkBH,MAAM,UAAU,YAAY;IAC1B,iFAAiF;IACjF,MAAM,UAAU,GAAG;QACjB,YAAY;QACZ,qEAAqE;QACrE,yFAAyF;QACzF,0FAA0F;QAC1F,KAAK;KACN,CAAC;IAEF,OAAO;QACL,KAAK,EAAE;YACL,YAAY,EAAE;gBACZ;oBACE,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,GAAG,UAAU;wBACb,2BAA2B;wBAC3B,6EAA6E;wBAC7E,MAAM;wBACN,+DAA+D;wBAC/D,6BAA6B;wBAC7B,0CAA0C;wBAC1C,sEAAsE;wBACtE,QAAQ;wBACR,kDAAkD;wBAClD,OAAO;wBACP,IAAI;qBACL,CAAC,IAAI,CAAC,GAAG,CAAC;oBACX,OAAO,EAAE,KAAK;iBACf;aACF;YACD,UAAU,EAAE;gBACV;oBACE,IA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;wBAClE,KAAK;wBACL,GAAG,UAAU;wBACb,2BAA2B;wBAC3B,6BAA6B;wBAC7B,8EAA8E;wBAC9E,sEAAsE;wBACtE,QAAQ;wBACR,0DAA0D;wBAC1D,gIAAgI;wBAChI,OAAO;wBACP,KAAK;wBACL,uGAAuG;qBACxG,CAAC,IAAI,CAAC,GAAG,CAAC;oBACX,OAAO,EAAE,KAAK;iBACf;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../../src/templates/scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,gBAAgB,IAAI,QAAQ,EAAE,CA6V7C"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
export function starterScenarios() {
|
|
2
|
+
return [
|
|
3
|
+
{
|
|
4
|
+
id: 'auth_middleware_refactor_001',
|
|
5
|
+
name: 'Refactor auth middleware',
|
|
6
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
7
|
+
task: {
|
|
8
|
+
prompt: 'Refactor auth middleware to split JWT parsing from authorization checks. ' +
|
|
9
|
+
'Preserve all existing behavior. Add or adjust tests if coverage is missing.',
|
|
10
|
+
acceptance: {
|
|
11
|
+
must_pass: ['tests', 'lint'],
|
|
12
|
+
commands: ['npm test', 'npm run lint'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
modes: [
|
|
16
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
17
|
+
{
|
|
18
|
+
name: 'with_codeledger',
|
|
19
|
+
context_injection: 'on',
|
|
20
|
+
injection_mode: 'prompt_prepend',
|
|
21
|
+
budget: { tokens: 6000, max_files: 20 },
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'bugfix_null_handling_002',
|
|
27
|
+
name: 'Fix null/undefined runtime error',
|
|
28
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
29
|
+
task: {
|
|
30
|
+
prompt: 'Find and fix the null/undefined runtime error reported in the user profile loading path. ' +
|
|
31
|
+
'Add a regression test that fails before the fix and passes after.',
|
|
32
|
+
acceptance: {
|
|
33
|
+
must_pass: ['tests'],
|
|
34
|
+
commands: ['npm test'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
modes: [
|
|
38
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
39
|
+
{
|
|
40
|
+
name: 'with_codeledger',
|
|
41
|
+
context_injection: 'on',
|
|
42
|
+
injection_mode: 'prompt_prepend',
|
|
43
|
+
budget: { tokens: 5000, max_files: 15 },
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'add_feature_flag_003',
|
|
49
|
+
name: 'Add feature flag support',
|
|
50
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
51
|
+
task: {
|
|
52
|
+
prompt: 'Introduce a feature flag for the new dashboard layout. Default to OFF. ' +
|
|
53
|
+
'Gate the relevant UI paths behind the flag. Add tests for both states.',
|
|
54
|
+
acceptance: {
|
|
55
|
+
must_pass: ['tests', 'build'],
|
|
56
|
+
commands: ['npm test', 'npm run build'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
modes: [
|
|
60
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
61
|
+
{
|
|
62
|
+
name: 'with_codeledger',
|
|
63
|
+
context_injection: 'on',
|
|
64
|
+
injection_mode: 'prompt_prepend',
|
|
65
|
+
budget: { tokens: 6000, max_files: 20 },
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'perf_hot_path_004',
|
|
71
|
+
name: 'Optimize performance hot path',
|
|
72
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
73
|
+
task: {
|
|
74
|
+
prompt: 'Optimize the hot path in the data processing pipeline. ' +
|
|
75
|
+
'Keep the public API stable. Add a benchmark or performance test if possible.',
|
|
76
|
+
acceptance: {
|
|
77
|
+
must_pass: ['tests'],
|
|
78
|
+
commands: ['npm test'],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
modes: [
|
|
82
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
83
|
+
{
|
|
84
|
+
name: 'with_codeledger',
|
|
85
|
+
context_injection: 'on',
|
|
86
|
+
injection_mode: 'prompt_prepend',
|
|
87
|
+
budget: { tokens: 7000, max_files: 20 },
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'test_fix_flaky_005',
|
|
93
|
+
name: 'Fix flaky test',
|
|
94
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
95
|
+
task: {
|
|
96
|
+
prompt: 'Identify and fix the flaky test that intermittently fails in CI. ' +
|
|
97
|
+
'Root cause the timing or state dependency and make it deterministic.',
|
|
98
|
+
acceptance: {
|
|
99
|
+
must_pass: ['tests'],
|
|
100
|
+
commands: ['npm test'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
modes: [
|
|
104
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
105
|
+
{
|
|
106
|
+
name: 'with_codeledger',
|
|
107
|
+
context_injection: 'on',
|
|
108
|
+
injection_mode: 'prompt_prepend',
|
|
109
|
+
budget: { tokens: 5000, max_files: 15 },
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'api_contract_update_006',
|
|
115
|
+
name: 'Update API contract',
|
|
116
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
117
|
+
task: {
|
|
118
|
+
prompt: 'Update the user API endpoint to include a new "preferences" field in the response. ' +
|
|
119
|
+
'Update request/response types, handlers, and tests. Maintain backward compatibility.',
|
|
120
|
+
acceptance: {
|
|
121
|
+
must_pass: ['tests', 'lint'],
|
|
122
|
+
commands: ['npm test', 'npm run lint'],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
modes: [
|
|
126
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
127
|
+
{
|
|
128
|
+
name: 'with_codeledger',
|
|
129
|
+
context_injection: 'on',
|
|
130
|
+
injection_mode: 'prompt_prepend',
|
|
131
|
+
budget: { tokens: 6000, max_files: 20 },
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'rename_module_safely_007',
|
|
137
|
+
name: 'Rename module safely',
|
|
138
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
139
|
+
task: {
|
|
140
|
+
prompt: 'Rename the "utils/helpers" module to "shared/common". ' +
|
|
141
|
+
'Update all imports across the codebase. Ensure nothing breaks.',
|
|
142
|
+
acceptance: {
|
|
143
|
+
must_pass: ['tests', 'build'],
|
|
144
|
+
commands: ['npm test', 'npm run build'],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
modes: [
|
|
148
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
149
|
+
{
|
|
150
|
+
name: 'with_codeledger',
|
|
151
|
+
context_injection: 'on',
|
|
152
|
+
injection_mode: 'prompt_prepend',
|
|
153
|
+
budget: { tokens: 5000, max_files: 25 },
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 'security_input_validation_008',
|
|
159
|
+
name: 'Add input validation',
|
|
160
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
161
|
+
task: {
|
|
162
|
+
prompt: 'Add comprehensive input validation to all public API endpoints. ' +
|
|
163
|
+
'Reject malformed input with clear error messages. Add tests for edge cases.',
|
|
164
|
+
acceptance: {
|
|
165
|
+
must_pass: ['tests', 'lint'],
|
|
166
|
+
commands: ['npm test', 'npm run lint'],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
modes: [
|
|
170
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
171
|
+
{
|
|
172
|
+
name: 'with_codeledger',
|
|
173
|
+
context_injection: 'on',
|
|
174
|
+
injection_mode: 'prompt_prepend',
|
|
175
|
+
budget: { tokens: 7000, max_files: 20 },
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'cli_arg_parsing_009',
|
|
181
|
+
name: 'Improve CLI argument handling',
|
|
182
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
183
|
+
task: {
|
|
184
|
+
prompt: 'Improve the CLI argument parsing to support named flags, validation, ' +
|
|
185
|
+
'and helpful error messages for invalid usage. Add tests.',
|
|
186
|
+
acceptance: {
|
|
187
|
+
must_pass: ['tests'],
|
|
188
|
+
commands: ['npm test'],
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
modes: [
|
|
192
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
193
|
+
{
|
|
194
|
+
name: 'with_codeledger',
|
|
195
|
+
context_injection: 'on',
|
|
196
|
+
injection_mode: 'prompt_prepend',
|
|
197
|
+
budget: { tokens: 5000, max_files: 15 },
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: 'observability_logging_010',
|
|
203
|
+
name: 'Add structured logging',
|
|
204
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
205
|
+
task: {
|
|
206
|
+
prompt: 'Add structured logging (JSON format) to the request handling pipeline. ' +
|
|
207
|
+
'Include request ID, timing, status code, and error details. Add tests.',
|
|
208
|
+
acceptance: {
|
|
209
|
+
must_pass: ['tests', 'build'],
|
|
210
|
+
commands: ['npm test', 'npm run build'],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
modes: [
|
|
214
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
215
|
+
{
|
|
216
|
+
name: 'with_codeledger',
|
|
217
|
+
context_injection: 'on',
|
|
218
|
+
injection_mode: 'prompt_prepend',
|
|
219
|
+
budget: { tokens: 6000, max_files: 20 },
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: 'db_migration_safety_011',
|
|
225
|
+
name: 'Database migration safety hardening',
|
|
226
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
227
|
+
task: {
|
|
228
|
+
prompt: 'Review the latest schema migration path for backward compatibility and rollback safety. ' +
|
|
229
|
+
'Add guards for partial-failure states and update tests for migrate + rollback flows.',
|
|
230
|
+
acceptance: {
|
|
231
|
+
must_pass: ['tests', 'build'],
|
|
232
|
+
commands: ['npm test', 'npm run build'],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
modes: [
|
|
236
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
237
|
+
{
|
|
238
|
+
name: 'with_codeledger',
|
|
239
|
+
context_injection: 'on',
|
|
240
|
+
injection_mode: 'prompt_prepend',
|
|
241
|
+
budget: { tokens: 7000, max_files: 22 },
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: 'cache_invalidation_bugfix_012',
|
|
247
|
+
name: 'Fix cache invalidation bug',
|
|
248
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
249
|
+
task: {
|
|
250
|
+
prompt: 'Fix stale cache reads after write operations in the profile and settings paths. ' +
|
|
251
|
+
'Ensure invalidation is scoped correctly and add regression tests for stale-read scenarios.',
|
|
252
|
+
acceptance: {
|
|
253
|
+
must_pass: ['tests', 'lint'],
|
|
254
|
+
commands: ['npm test', 'npm run lint'],
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
modes: [
|
|
258
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
259
|
+
{
|
|
260
|
+
name: 'with_codeledger',
|
|
261
|
+
context_injection: 'on',
|
|
262
|
+
injection_mode: 'prompt_prepend',
|
|
263
|
+
budget: { tokens: 6000, max_files: 18 },
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: 'background_job_retry_policy_013',
|
|
269
|
+
name: 'Background job retry policy upgrade',
|
|
270
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
271
|
+
task: {
|
|
272
|
+
prompt: 'Update background job retry behavior to exponential backoff with jitter and max-attempt caps. ' +
|
|
273
|
+
'Preserve idempotency and add tests for retry, dead-letter, and recovery behavior.',
|
|
274
|
+
acceptance: {
|
|
275
|
+
must_pass: ['tests'],
|
|
276
|
+
commands: ['npm test'],
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
modes: [
|
|
280
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
281
|
+
{
|
|
282
|
+
name: 'with_codeledger',
|
|
283
|
+
context_injection: 'on',
|
|
284
|
+
injection_mode: 'prompt_prepend',
|
|
285
|
+
budget: { tokens: 6500, max_files: 20 },
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
id: 'access_control_hardening_014',
|
|
291
|
+
name: 'Access control hardening',
|
|
292
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
293
|
+
task: {
|
|
294
|
+
prompt: 'Harden authorization checks for admin and tenant-scoped endpoints. ' +
|
|
295
|
+
'Close privilege escalation edge cases and add tests for deny-by-default behavior.',
|
|
296
|
+
acceptance: {
|
|
297
|
+
must_pass: ['tests', 'lint'],
|
|
298
|
+
commands: ['npm test', 'npm run lint'],
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
modes: [
|
|
302
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
303
|
+
{
|
|
304
|
+
name: 'with_codeledger',
|
|
305
|
+
context_injection: 'on',
|
|
306
|
+
injection_mode: 'prompt_prepend',
|
|
307
|
+
budget: { tokens: 7000, max_files: 22 },
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: 'monorepo_build_optimization_015',
|
|
313
|
+
name: 'Monorepo build optimization',
|
|
314
|
+
repo: { root: '.', git_ref: 'HEAD', clean_required: true },
|
|
315
|
+
task: {
|
|
316
|
+
prompt: 'Reduce monorepo CI build time by improving task graph caching and incremental boundaries. ' +
|
|
317
|
+
'Keep outputs deterministic and add benchmark or timing assertions where practical.',
|
|
318
|
+
acceptance: {
|
|
319
|
+
must_pass: ['build', 'tests'],
|
|
320
|
+
commands: ['npm run build', 'npm test'],
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
modes: [
|
|
324
|
+
{ name: 'without_codeledger', context_injection: 'off' },
|
|
325
|
+
{
|
|
326
|
+
name: 'with_codeledger',
|
|
327
|
+
context_injection: 'on',
|
|
328
|
+
injection_mode: 'prompt_prepend',
|
|
329
|
+
budget: { tokens: 7500, max_files: 25 },
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
];
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=scenarios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenarios.js","sourceRoot":"","sources":["../../src/templates/scenarios.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL;YACE,EAAE,EAAE,8BAA8B;YAClC,IAAI,EAAE,0BAA0B;YAChC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE;YAC1D,IAAI,EAAE;gBACJ,MAAM,EACJ,2EAA2E;oBAC3E,6EAA6E;gBAC/E,UAAU,EAAE;oBACV,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;oBAC5B,QAAQ,EAAE,CAAC,UAAU,EAAE,c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AAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;iBACxC;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,EAAE,MAAoB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,WAAW,GAAW,GAAG,CAAC,OAAO,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeledger/cli",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "CLI for CodeLedger — deterministic context selection for AI coding agents",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/codeledgerECF/codeledger-blackbox.git",
|
|
10
|
+
"directory": "packages/cli"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"bin": {
|
|
19
|
+
"codeledger": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@codeledger/core": "0.1.1",
|
|
31
|
+
"@codeledger/types": "0.1.1",
|
|
32
|
+
"@codeledger/repo": "0.1.1",
|
|
33
|
+
"@codeledger/instrument": "0.1.1",
|
|
34
|
+
"@codeledger/harness": "0.1.1",
|
|
35
|
+
"@codeledger/core-engine": "0.1.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"typescript": "^5.4.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"clean": "rm -rf dist"
|
|
44
|
+
}
|
|
45
|
+
}
|