@codeyam/codeyam-cli 0.1.5 → 0.1.7

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.
Files changed (113) hide show
  1. package/analyzer-template/.build-info.json +7 -7
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +2 -2
  4. package/analyzer-template/packages/ai/package.json +1 -1
  5. package/analyzer-template/packages/ai/src/lib/completionCall.ts +102 -113
  6. package/analyzer-template/packages/aws/package.json +1 -1
  7. package/codeyam-cli/src/cli.js +5 -11
  8. package/codeyam-cli/src/cli.js.map +1 -1
  9. package/codeyam-cli/src/commands/memory.js +26 -2
  10. package/codeyam-cli/src/commands/memory.js.map +1 -1
  11. package/codeyam-cli/src/utils/install-skills.js +4 -4
  12. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  13. package/codeyam-cli/src/utils/requireSimulations.js +1 -1
  14. package/codeyam-cli/src/utils/requireSimulations.js.map +1 -1
  15. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +5 -6
  16. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -1
  17. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +2 -5
  18. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -1
  19. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
  20. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
  21. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +11 -18
  22. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -1
  23. package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
  24. package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
  25. package/codeyam-cli/src/utils/rules/sourceFiles.js +2 -6
  26. package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -1
  27. package/codeyam-cli/src/utils/simulationGateMiddleware.js +63 -42
  28. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
  29. package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
  30. package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
  31. package/codeyam-cli/src/webserver/backgroundServer.js +10 -0
  32. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  33. package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-jNYXRRNI.js → CopyButton-CtmbP4Gl.js} +1 -1
  34. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-bwuHPyTa.js → EntityItem-DlMph_Hm.js} +1 -1
  35. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CvzqMxcu.js → EntityTypeBadge-B-0PjGOU.js} +1 -1
  36. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-BH0XDim7.js → EntityTypeIcon-DN9eiJAO.js} +1 -1
  37. package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-EhOseatT.js → InlineSpinner-C1rIyZdV.js} +1 -1
  38. package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-yjIHlOGa.js → InteractivePreview-rE_fI2h2.js} +2 -2
  39. package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-Cq5o8jL4.js → LibraryFunctionPreview-CnatsCw2.js} +1 -1
  40. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BvMu2i-g.js → LoadingDots-CSP6DZrh.js} +1 -1
  41. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-kgBTLoJD.js → LogViewer-CMK8Q7yk.js} +1 -1
  42. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-BzPgx-xO.js → ReportIssueModal-TCV_HBjy.js} +1 -1
  43. package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CwZrv-Ok.js → SafeScreenshot-CG2uh31y.js} +1 -1
  44. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-BX2Ny2Qj.js → ScenarioViewer-CU_TDYd8.js} +1 -1
  45. package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-CDpEprKa.js → TruncatedFilePath-D7IoaWUW.js} +1 -1
  46. package/codeyam-cli/src/webserver/build/client/assets/{_index-BRx8ZGZo.js → _index-B8z7mjR-.js} +1 -1
  47. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-4S4yPfFw.js → activity.(_tab)-DZu78RI1.js} +1 -1
  48. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-Dm5RS9il.js +22 -0
  49. package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
  50. package/codeyam-cli/src/webserver/build/client/assets/{book-open-D4IPYH_y.js → book-open-Bp5FLkd4.js} +1 -1
  51. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-CG65viiV.js → chevron-down-DQJA9f4o.js} +1 -1
  52. package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-DB3aFuEO.js → chunk-JZWAC4HX-7VptmeIr.js} +1 -1
  53. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-igfMr5DY.js → circle-check-B6C4LY9o.js} +1 -1
  54. package/codeyam-cli/src/webserver/build/client/assets/{copy-Coc4o_8c.js → copy-6nzYCu0G.js} +1 -1
  55. package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-D1zB-pYc.js → createLucideIcon-D-QUFOwe.js} +1 -1
  56. package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-JTAjQ54M.js → dev.empty-DmzSmblj.js} +1 -1
  57. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-B0h9AqE6.js → entity._sha._-C6PQhwY5.js} +9 -9
  58. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-DjLxr2JB.js → entity._sha.scenarios._scenarioId.fullscreen-DVTcUnur.js} +1 -1
  59. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-CtYowLOt.js → entity._sha_.create-scenario-BVgNO76F.js} +1 -1
  60. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-PePWg17F.js → entity._sha_.edit._scenarioId-C7ysA4Jq.js} +1 -1
  61. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-I-Wo99C_.js → entry.client-CU6EUArK.js} +1 -1
  62. package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-9sMMAiWJ.js → fileTableUtils-EWpfFU4X.js} +1 -1
  63. package/codeyam-cli/src/webserver/build/client/assets/{files-Co65J0s3.js → files-CrxAoWIL.js} +1 -1
  64. package/codeyam-cli/src/webserver/build/client/assets/{git-BdHOxVfg.js → git-BldHtKeW.js} +1 -1
  65. package/codeyam-cli/src/webserver/build/client/assets/globals-CLmFdUae.css +1 -0
  66. package/codeyam-cli/src/webserver/build/client/assets/{index-CUM5iXwc.js → index-7-1FmlHo.js} +1 -1
  67. package/codeyam-cli/src/webserver/build/client/assets/{index-_417gcQW.js → index-DuYcwYp_.js} +1 -1
  68. package/codeyam-cli/src/webserver/build/client/assets/{labs-DAvt-sy-.js → labs-CPPVOSWB.js} +1 -1
  69. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-TzRHMVog.js → loader-circle-BnDcD54R.js} +1 -1
  70. package/codeyam-cli/src/webserver/build/client/assets/manifest-717e346a.js +1 -0
  71. package/codeyam-cli/src/webserver/build/client/assets/memory-0wMU4KXe.js +93 -0
  72. package/codeyam-cli/src/webserver/build/client/assets/{pause-hjzB7t2z.js → pause-DhQX2g22.js} +1 -1
  73. package/codeyam-cli/src/webserver/build/client/assets/{root-DoB3B10-.js → root-DqfSDjyQ.js} +13 -13
  74. package/codeyam-cli/src/webserver/build/client/assets/{search-DcAwD_Ln.js → search-DborVoKD.js} +1 -1
  75. package/codeyam-cli/src/webserver/build/client/assets/settings-BWunYSXt.js +1 -0
  76. package/codeyam-cli/src/webserver/build/client/assets/{simulations-DVNJVQgD.js → simulations-BtrtCYJg.js} +1 -1
  77. package/codeyam-cli/src/webserver/build/client/assets/{terminal-DbEAHMbA.js → terminal-Bs4NC-VZ.js} +1 -1
  78. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CAD5b1o_.js → triangle-alert-DTf3Jojp.js} +1 -1
  79. package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-BqgrAzs3.js → useCustomSizes-D_bDZyDU.js} +1 -1
  80. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-DAFqfEDH.js → useLastLogLine-DZp6rrQD.js} +1 -1
  81. package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DZlYx2c4.js → useReportContext-BsQb6rFd.js} +1 -1
  82. package/codeyam-cli/src/webserver/build/client/assets/{useToast-ihdMtlf6.js → useToast-BOur3mUv.js} +1 -1
  83. package/codeyam-cli/src/webserver/build/server/assets/{index-C_nP9_jr.js → index-B8jmgmn2.js} +1 -1
  84. package/codeyam-cli/src/webserver/build/server/assets/server-build-9OU4lmvL.js +285 -0
  85. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  86. package/codeyam-cli/src/webserver/build-info.json +5 -5
  87. package/codeyam-cli/templates/codeyam-new-rule.md +0 -2
  88. package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
  89. package/codeyam-cli/templates/prompts/conversation-guidance.txt +44 -0
  90. package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
  91. package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
  92. package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
  93. package/codeyam-cli/templates/rule-notification-hook.py +44 -17
  94. package/codeyam-cli/templates/rule-reflection-hook.py +24 -4
  95. package/codeyam-cli/templates/rules-instructions.md +34 -88
  96. package/package.json +1 -1
  97. package/packages/ai/src/lib/completionCall.js +0 -5
  98. package/packages/ai/src/lib/completionCall.js.map +1 -1
  99. package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -120
  100. package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
  101. package/codeyam-cli/src/commands/list.js +0 -31
  102. package/codeyam-cli/src/commands/list.js.map +0 -1
  103. package/codeyam-cli/src/commands/webapp-info.js +0 -146
  104. package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
  105. package/codeyam-cli/src/utils/universal-mocks.js +0 -152
  106. package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
  107. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DHKuQSmR.js +0 -17
  108. package/codeyam-cli/src/webserver/build/client/assets/globals-B4MPiL7S.css +0 -1
  109. package/codeyam-cli/src/webserver/build/client/assets/manifest-e24d6600.js +0 -1
  110. package/codeyam-cli/src/webserver/build/client/assets/memory-bAp4y2hv.js +0 -92
  111. package/codeyam-cli/src/webserver/build/client/assets/settings-CclxrcPK.js +0 -1
  112. package/codeyam-cli/src/webserver/build/server/assets/server-build-BEaMCeTu.js +0 -273
  113. package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
@@ -1 +1 @@
1
- import{Y as H,Z as I,M as J,N as K,W as L,O as _,R as $,T as rr,V as tr,U as or,X as ir,Q as pr}from"./assets/server-build-BEaMCeTu.js";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"fetch-retry";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"typescript";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"url";import"util";import"dotenv";import"events";import"uuid";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"v8";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"minimatch";import"react-markdown";import"remark-gfm";import"react-diff-viewer-continued";export{H as allowedActionOrigins,I as assets,J as assetsBuildDirectory,K as basename,L as entry,_ as future,$ as isSpaMode,rr as prerender,tr as publicPath,or as routeDiscovery,ir as routes,pr as ssr};
1
+ import{Y as H,Z as I,M as J,N as K,W as L,O as _,R as $,T as rr,V as tr,U as or,X as ir,Q as pr}from"./assets/server-build-9OU4lmvL.js";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"fetch-retry";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"typescript";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"url";import"util";import"dotenv";import"events";import"uuid";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"v8";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"minimatch";import"react-markdown";import"remark-gfm";import"react-diff-viewer-continued";export{H as allowedActionOrigins,I as assets,J as assetsBuildDirectory,K as basename,L as entry,_ as future,$ as isSpaMode,rr as prerender,tr as publicPath,or as routeDiscovery,ir as routes,pr as ssr};
@@ -1,7 +1,7 @@
1
1
  {
2
- "buildTimestamp": "2026-02-23T19:25:14.609Z",
3
- "buildTime": 1771874714609,
4
- "buildNumber": 667,
5
- "semanticVersion": "0.1.667",
6
- "version": "0.1.667 (2026-02-23T19:25)"
2
+ "buildTimestamp": "2026-02-25T00:13:21.654Z",
3
+ "buildTime": 1771978401654,
4
+ "buildNumber": 724,
5
+ "semanticVersion": "0.1.724",
6
+ "version": "0.1.724 (2026-02-25T00:13)"
7
7
  }
@@ -9,5 +9,3 @@ description: |
9
9
  # Create New Claude Rule
10
10
 
11
11
  Read `.codeyam/rules/instructions.md` for detailed guidance on structure and formatting.
12
-
13
- If the instructions file doesn't exist, copy it from `codeyam-cli/templates/rules-instructions.md`.
@@ -0,0 +1,43 @@
1
+ #!/bin/bash
2
+ # Staleness check hook - runs after file edits to check if related rules need review
3
+ # Receives JSON input via stdin with tool info
4
+
5
+ set -e
6
+
7
+ # Read the input JSON
8
+ INPUT=$(cat)
9
+
10
+ # Extract the file path that was edited
11
+ FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // empty' 2>/dev/null)
12
+
13
+ if [ -z "$FILE_PATH" ]; then
14
+ exit 0 # No file path, nothing to check
15
+ fi
16
+
17
+ # Find rules that match this file path
18
+ RULES_DIR="${CLAUDE_PROJECT_DIR}/.claude/rules"
19
+
20
+ if [ ! -d "$RULES_DIR" ]; then
21
+ exit 0 # No rules directory
22
+ fi
23
+
24
+ # Search for rules whose paths might match the edited file
25
+ MATCHING_RULES=""
26
+ while IFS= read -r -d '' rule_file; do
27
+ # Extract paths from frontmatter
28
+ PATHS=$(sed -n '/^---$/,/^---$/p' "$rule_file" | grep -E "^\s*-\s*'" | sed "s/.*'\(.*\)'.*/\1/")
29
+
30
+ for pattern in $PATHS; do
31
+ # Simple check if the file might match the pattern
32
+ if [[ "$FILE_PATH" == *"${pattern%%\**}"* ]]; then
33
+ MATCHING_RULES="$MATCHING_RULES\n- $(basename "$rule_file")"
34
+ break
35
+ fi
36
+ done
37
+ done < <(find "$RULES_DIR" -name "*.md" -print0 2>/dev/null)
38
+
39
+ if [ -n "$MATCHING_RULES" ]; then
40
+ echo "📋 Modified file may have related rules that need review:$MATCHING_RULES"
41
+ fi
42
+
43
+ exit 0
@@ -0,0 +1,44 @@
1
+ ### What to look for
2
+
3
+ Read the full transcript for these signals:
4
+
5
+ **User corrections or redirections**
6
+ - "no", "actually", "that's not right", "you need to also...", "you missed..."
7
+ - User provides information Claude didn't know or couldn't infer from code
8
+ - User reminds Claude of a step, pattern, or relationship
9
+ - A correction about something other than current task requirements is ALWAYS rule-worthy
10
+
11
+ **Investigation and debugging**
12
+ - Claude tried multiple approaches, read logs, or tested hypotheses
13
+ - Investigation revealed non-obvious behavior or root causes
14
+ - Debugging strategies that worked (or didn't) for specific areas
15
+
16
+ **Architecture not evident in code**
17
+ - Files that must change together (templates + installation, routes + registration)
18
+ - Complex files, data flows, pipelines, or system interactions that would benefit from an overview
19
+
20
+ **Commands and workflows**
21
+ - Specific commands or flags needed for this area
22
+ - Order of operations that matters ("must run X before Y")
23
+
24
+ **Ignore:**
25
+ - Corrections to requirements for the current feature or bug
26
+ - Confusion isolated to the current work session (won't recur)
27
+
28
+ ### Before creating a rule
29
+
30
+ **Critical check:** Read the actual source files that were modified. If the code already contains comments, guard patterns, or tests that explain the insight, the code is the documentation — skip the rule unless the file is complex and you've made a mistake or the user had to interrupt and correct you.
31
+
32
+ Show your thinking before proceeding with creating or updating rules.
33
+
34
+ ### How to write rules
35
+
36
+ **Rules must be forward-looking, not historical.** You are reading a session transcript where bugs were found and fixed, but the rule should describe the *current* codebase, not tell the story of what went wrong, what was fixed, etc. The code has already been updated — past bugs are no longer relevant.
37
+
38
+ - **DO**: State constraints and requirements ("this script MUST copy directories recursively, not just files")
39
+ - **DO**: Explain *why* something matters ("errors in prompt copying are silently caught, so missing directories won't surface as errors")
40
+ - **DON'T**: Describe what old code did ("the old version only copied files, causing X to be missing")
41
+ - **DON'T**: Narrate the debugging journey ("we discovered that the catch block was swallowing errors")
42
+ - **DON'T**: Note issues or known gaps if they are actively being worked on!
43
+
44
+ Think of the reader as a developer about to modify these files. They need to know what constraints to preserve and what pitfalls to watch for — not what happened in the past if it is no longer relevant.
@@ -0,0 +1,28 @@
1
+ FIRST: Read `.codeyam/rules/instructions.md` — it contains the required format, rule placement via the rule-path API, and an example rule. You MUST follow this format exactly when creating or editing rules.
2
+
3
+ THEN: Read the file {{CONTEXT_FILE}} and follow the instructions inside.
4
+
5
+ Analyze the conversation transcript for rule-worthy learnings:
6
+ - User corrections, redirections, or information Claude didn't know
7
+ - Investigation results and debugging knowledge
8
+ - Architecture and relationships not obvious from code
9
+ - Commands, workflows, and processes
10
+
11
+ Access and read files in the repo or in the .claude folder as needed.
12
+
13
+ Create new rules only when the learnings meet the guidelines in the context file.
14
+
15
+ IMPORTANT: If you create ANY rule files, write a short summary to `{{NOTIFICATION_FILE}}`. The summary should list each rule change, e.g.:
16
+ ```
17
+ The background rule-reflection agent created the following rules:
18
+ - Created `.claude/rules/tooling/new-pattern.md` — documents X pattern
19
+ ```
20
+ Only write the notification file when rules are created.
21
+
22
+ The project root is {{PROJECT_DIR}}
23
+
24
+ CRITICAL: All rule files MUST be written to {{PROJECT_DIR}}/.claude/rules/ (the project directory). Always use the full absolute path when writing rule files.
25
+
26
+ CRITICAL: Before writing any rule file, you MUST run the rule-path command to determine the correct subdirectory:
27
+ codeyam memory rule-path path/one path/two
28
+ Pass all paths from your frontmatter. The command returns the correct .claude/rules/ subdirectory as JSON. Do NOT guess the placement from the first path — rules with paths spanning multiple directories belong at their common ancestor.
@@ -0,0 +1,31 @@
1
+ FIRST: Read `.codeyam/rules/instructions.md` — it contains the required format, rule placement via the rule-path API, and an example rule. You MUST follow this format exactly when creating or editing rules.
2
+
3
+ THEN: Read the file {{CONTEXT_FILE}} and follow the instructions inside.
4
+
5
+ The user interrupted Claude mid-response — a strong signal of confusion or misunderstanding.
6
+ Analyze both Claude's interrupted output and the user's follow-up to determine what went wrong.
7
+
8
+ Look for:
9
+ - Claude heading in a wrong direction that the user had to correct
10
+ - Misunderstanding of project conventions, architecture, or dependencies
11
+ - Missing context that caused Claude to make incorrect assumptions
12
+ - Patterns that would recur in future sessions without a rule
13
+
14
+ Access and read files in the repo or in the .claude folder as needed.
15
+
16
+ Create new rules only when the learnings meet the guidelines in the context file.
17
+
18
+ IMPORTANT: If you create ANY rule files, write a short summary to `{{NOTIFICATION_FILE}}`. The summary should list each rule change, e.g.:
19
+ ```
20
+ The background rule-reflection agent created the following rules:
21
+ - Created `.claude/rules/tooling/new-pattern.md` — documents X pattern
22
+ ```
23
+ Only write the notification file when rules are created.
24
+
25
+ The project root is {{PROJECT_DIR}}
26
+
27
+ CRITICAL: All rule files MUST be written to {{PROJECT_DIR}}/.claude/rules/ (the project directory). Always use the full absolute path when writing rule files.
28
+
29
+ CRITICAL: Before writing any rule file, you MUST run the rule-path command to determine the correct subdirectory:
30
+ codeyam memory rule-path path/one path/two
31
+ Pass all paths from your frontmatter. The command returns the correct .claude/rules/ subdirectory as JSON. Do NOT guess the placement from the first path — rules with paths spanning multiple directories belong at their common ancestor.
@@ -0,0 +1,24 @@
1
+ FIRST: Read `.codeyam/rules/instructions.md` — it contains the required format, rule placement via the rule-path API, and an example rule. You MUST follow this format exactly when creating or editing rules.
2
+
3
+ THEN: Read the file {{CONTEXT_FILE}} and follow the instructions inside.
4
+
5
+ For each stale rule:
6
+ 1. Review the inline rule content and the diff to determine if the rule needs updating
7
+ 2. If it needs updating, edit the rule file in .claude/rules/ — also trim prose and unnecessary headers (most rules should be a few bullets)
8
+ 3. Run `codeyam memory touch <rule-path1> <rule-path2> ...` with the SPECIFIC rule paths you reviewed to mark them as audited in .claude/codeyam-rule-state.json
9
+ Example: `codeyam memory touch tooling/cli-build.md packages/ai/execution-flow-prioritization.md`
10
+
11
+ Write a summary to `{{NOTIFICATION_FILE}}` listing each action taken, even if you only ran `codeyam memory touch` without content changes. Example:
12
+ ```
13
+ The background rule-reflection agent updated the following rules:
14
+ - Reviewed `.claude/rules/example.md` — no content changes, ran `codeyam memory touch`
15
+ - Created `.claude/rules/tooling/new-pattern.md` — documents X pattern
16
+ ```
17
+
18
+ The project root is {{PROJECT_DIR}}
19
+
20
+ CRITICAL: All rule files MUST be written to {{PROJECT_DIR}}/.claude/rules/ (the project directory), NOT ~/.claude/rules/ (the user home directory). Always use the full absolute path when writing rule files.
21
+
22
+ CRITICAL: Before writing any rule file, you MUST run the rule-path command to determine the correct subdirectory:
23
+ codeyam memory rule-path path/one path/two
24
+ Pass all paths from your frontmatter. The command returns the correct .claude/rules/ subdirectory as JSON. Do NOT guess the placement from the first path — rules with paths spanning multiple directories belong at their common ancestor.
@@ -14,6 +14,7 @@ Supports four notification files (legacy combined + split agents):
14
14
  - rule-notification-interruption.md (interruption review agent)
15
15
  """
16
16
 
17
+ import json
17
18
  import os
18
19
  import sys
19
20
 
@@ -26,27 +27,53 @@ NOTIFICATION_FILES = [
26
27
  ]
27
28
 
28
29
 
30
+ def get_project_slug():
31
+ """
32
+ Derive project slug from .codeyam/config.json (matching getProjectSlug() on the TS side).
33
+ Falls back to os.path.basename(project_dir) if config is absent or malformed.
34
+ """
35
+ project_dir = os.environ.get('CLAUDE_PROJECT_DIR', os.getcwd())
36
+ try:
37
+ config_path = os.path.join(project_dir, '.codeyam', 'config.json')
38
+ with open(config_path, 'r') as f:
39
+ config = json.load(f)
40
+ slug = config.get('projectSlug', '')
41
+ if slug:
42
+ return slug
43
+ except (IOError, json.JSONDecodeError, KeyError):
44
+ pass
45
+ return os.path.basename(project_dir)
46
+
47
+
29
48
  def main():
30
49
  collected = []
50
+ slug = get_project_slug()
51
+
52
+ # Check slug subdirectory first, then fall back to flat directory
53
+ dirs_to_check = [os.path.join(MARKER_DIR, slug), MARKER_DIR]
31
54
 
32
55
  for filename in NOTIFICATION_FILES:
33
- filepath = os.path.join(MARKER_DIR, filename)
34
- if not os.path.exists(filepath):
35
- continue
36
-
37
- try:
38
- with open(filepath, 'r') as f:
39
- content = f.read().strip()
40
- except IOError:
41
- continue
42
-
43
- if content:
44
- collected.append(content)
45
-
46
- try:
47
- os.remove(filepath)
48
- except OSError:
49
- pass
56
+ for check_dir in dirs_to_check:
57
+ filepath = os.path.join(check_dir, filename)
58
+ if not os.path.exists(filepath):
59
+ continue
60
+
61
+ try:
62
+ with open(filepath, 'r') as f:
63
+ content = f.read().strip()
64
+ except IOError:
65
+ continue
66
+
67
+ if content:
68
+ collected.append(content)
69
+
70
+ try:
71
+ os.remove(filepath)
72
+ except OSError:
73
+ pass
74
+
75
+ # Found in this directory — don't check the fallback
76
+ break
50
77
 
51
78
  if collected:
52
79
  print('\n\n'.join(collected))
@@ -120,6 +120,24 @@ def read_rule_content(rule_name):
120
120
  return text
121
121
 
122
122
 
123
+ def get_project_slug():
124
+ """
125
+ Derive project slug from .codeyam/config.json (matching getProjectSlug() on the TS side).
126
+ Falls back to os.path.basename(project_dir) if config is absent or malformed.
127
+ """
128
+ project_dir = os.environ.get('CLAUDE_PROJECT_DIR', os.getcwd())
129
+ try:
130
+ config_path = os.path.join(project_dir, '.codeyam', 'config.json')
131
+ with open(config_path, 'r') as f:
132
+ config = json.load(f)
133
+ slug = config.get('projectSlug', '')
134
+ if slug:
135
+ return slug
136
+ except (IOError, json.JSONDecodeError, KeyError):
137
+ pass
138
+ return os.path.basename(project_dir)
139
+
140
+
123
141
  def load_memory_settings():
124
142
  """
125
143
  Load memory settings from .codeyam/config.json.
@@ -463,8 +481,9 @@ def handle_stop(hook_input):
463
481
  if not session_id or not transcript_path:
464
482
  return
465
483
 
466
- marker_dir = Path('/tmp/claude-rule-markers')
467
- marker_dir.mkdir(exist_ok=True)
484
+ slug = get_project_slug()
485
+ marker_dir = Path('/tmp/claude-rule-markers') / slug
486
+ marker_dir.mkdir(parents=True, exist_ok=True)
468
487
  marker_file = marker_dir / f'{session_id}.marker'
469
488
 
470
489
  last_line, _ = read_marker(marker_file)
@@ -539,8 +558,9 @@ def handle_user_prompt_submit(hook_input):
539
558
  if not session_id or not transcript_path:
540
559
  return
541
560
 
542
- marker_dir = Path('/tmp/claude-rule-markers')
543
- marker_dir.mkdir(exist_ok=True)
561
+ slug = get_project_slug()
562
+ marker_dir = Path('/tmp/claude-rule-markers') / slug
563
+ marker_dir.mkdir(parents=True, exist_ok=True)
544
564
  marker_file = marker_dir / f'{session_id}.marker'
545
565
 
546
566
  last_line, was_stop = read_marker(marker_file)
@@ -4,13 +4,11 @@ Rules provide context-specific guidance when working in files matching their `pa
4
4
 
5
5
  ## Core Principles
6
6
 
7
- 1. **One concept per rule** - Each rule should cover a single topic. If you're documenting two unrelated things, create two rules.
8
- 2. **Paths must match content scope** - A rule about one specific file should have that file in `paths`, not a broad `**/*.ts` pattern.
9
- 3. **Keep rules SHORT** - Most rules should be **1-4 bullets**. Only complex multi-file architectural overviews should exceed ~10 lines. Every word costs context.
7
+ 1. **One concept per rule** If you're documenting two unrelated things, create two rules.
8
+ 2. **Paths must match content scope** A rule about one file should have that file in `paths`, not a broad `**/*.ts` pattern.
9
+ 3. **Keep rules SHORT** Most rules should be **1-4 bullets**. Only complex multi-file architectures should exceed ~10 lines.
10
10
 
11
- ### Good vs Bad Rule Length
12
-
13
- **Good** — a typical rule (4 bullets):
11
+ **Example** a typical rule:
14
12
 
15
13
  ```markdown
16
14
  ---
@@ -26,68 +24,21 @@ paths:
26
24
  - Test with exact ordering from database, not just same entries
27
25
  ```
28
26
 
29
- **Bad** same info bloated to 40+ lines with unnecessary headers, restating what the code says, and paragraphs instead of bullets.
30
-
31
- ## When to Create a New Rule
32
-
33
- Create a new rule when:
34
-
35
- - You learn something non-obvious about the codebase
36
- - You make a mistake and want to prevent it in the future
37
- - The user explains something that isn't clear from the code
38
- - An existing rule is covering multiple unrelated topics (split it)
39
-
40
- ## Before Creating: What Makes a Rule Valuable?
41
-
42
- A rule earns its place when it meets these criteria:
43
-
44
- 1. **Beyond the code** — It captures knowledge that reading the source alone wouldn't reveal (historical context, non-obvious interactions, gotchas).
45
- 2. **Explains "why" over "what"** — Gotchas, non-obvious behavior, architectural decisions. (Function signatures, bug fixes, and limitations are already visible in code.)
46
- 3. **Prevents real mistakes** — It would have saved someone from a past confusion or bug, not just a "nice to know."
27
+ ## When to Create a Rule
47
28
 
48
- ### Examples
29
+ Create a rule when you learn something that **reading the code alone wouldn't reveal**:
49
30
 
50
- **✅ Worth documenting:**
31
+ - Non-obvious gotchas or behavior that caused real confusion or bugs
32
+ - Architecture, file relationships, or data flows that take time to piece together
33
+ - Debugging strategies for a tricky area of the codebase
34
+ - Preferred commands or workflows when multiple options exist (e.g. "Use `pnpm test` to run tests")
35
+ - User corrections or explanations that aren't captured in the code itself
51
36
 
52
- - Where to add new functionality
53
- - An overview of all files, classes, functions, etc used in a particular part of the repo
54
- - Debugging strategies for a particular area of the repo
55
- - "Use `pnpm test` to run tests" (if there is more than one way to run tests and this way is preferred)
56
-
57
- Skip things like "The auth module handles authentication" or "This function takes X and returns Y" unless creating an overview of a complex area of the app — For individual files Claude can read the code and infer these insights.
58
-
59
- ## Path Specificity
60
-
61
- The `paths` field controls when the rule is shown. Match the scope of your content:
62
-
63
- | Content Scope | Path Pattern | Example |
64
- | ------------- | ----------------------- | ------------------------------------------------------ |
65
- | Single file | `'path/to/file.ts'` | Rule about `processExpression.ts` specifically |
66
- | Related files | `'path/to/feature*.ts'` | Rule about `generateExecutionFlows*.ts` files |
67
- | Directory | `'path/to/dir/**/*.ts'` | Rule about the queue system in `utils/queue/` |
68
- | Cross-cutting | Multiple specific paths | Testing rule with paths to test configs and test files |
69
-
70
- Match path specificity to content scope — use `'path/to/feature.ts'` for a single-feature rule, not `'**/*.ts'`.
71
-
72
- ## File Placement
37
+ **Skip** rules that restate what the code says — function signatures, type definitions, "this module handles X." Claude can read the code.
73
38
 
74
- Place each rule at the **deepest common directory** shared by all its `paths` entries:
39
+ ## Frontmatter & Paths
75
40
 
76
- 1. Take all paths from the rule's frontmatter
77
- 2. Strip filenames — keep only the directory portions
78
- 3. Find the longest shared directory prefix
79
- 4. Place the rule `.md` file in `.claude/rules/<that-prefix>/`
80
-
81
- | Paths in frontmatter | Deepest common dir | Rule location |
82
- | ---------------------------------------------------------- | ---------------------- | ---------------------------------------------- |
83
- | `packages/ai/src/lib/foo.ts`, `packages/ai/src/lib/bar.ts` | `packages/ai/src/lib/` | `.claude/rules/packages/ai/src/lib/foo-bar.md` |
84
- | `packages/ai/src/lib/a.ts`, `packages/ai/src/utils/b.ts` | `packages/ai/src/` | `.claude/rules/packages/ai/src/a-and-b.md` |
85
- | `packages/ai/**`, `packages/types/**` | `packages/` | `.claude/rules/packages/ai-types.md` |
86
- | `src/api/auth.ts` (single file) | `src/api/` | `.claude/rules/src/api/auth.md` |
87
-
88
- Reserve the top level of `.claude/rules/` for rules whose paths genuinely span the entire repo.
89
-
90
- ## Required Frontmatter
41
+ Every rule needs a `paths` frontmatter field. Be specific to avoid loading rules unnecessarily:
91
42
 
92
43
  ```yaml
93
44
  ---
@@ -97,36 +48,31 @@ paths:
97
48
  ---
98
49
  ```
99
50
 
100
- | Field | Purpose |
101
- | ------- | ---------------------------------------------------------------- |
102
- | `paths` | Glob patterns - be specific to avoid loading rules unnecessarily |
103
-
104
- **Note:** Audit dates live in `.claude/codeyam-rule-state.json` (managed by `codeyam memory touch`). Keep rule frontmatter limited to `paths`.
105
-
106
- ## Content Guidelines
107
-
108
- ### Be Actionable
51
+ | Content Scope | Path Pattern | Example |
52
+ | ------------- | ----------------------- | ---------------------------------------------- |
53
+ | Single file | `'path/to/file.ts'` | Rule about `processExpression.ts` specifically |
54
+ | Related files | `'path/to/feature*.ts'` | Rule about `generateExecutionFlows*.ts` files |
55
+ | Directory | `'path/to/dir/**/*.ts'` | Rule about the queue system in `utils/queue/` |
56
+ | Cross-cutting | Multiple specific paths | Testing rule spanning test configs and tests |
109
57
 
110
- - Good: "Run `pnpm test:api` for API tests"
111
- - Bad: "Make sure to run the appropriate tests"
58
+ Audit dates live in `.claude/codeyam-rule-state.json` (managed by `codeyam memory touch`). Keep frontmatter limited to `paths`.
112
59
 
113
- ### Focus on What to Do
114
-
115
- - "Auth tokens are stored in httpOnly cookies via `src/auth/cookies.ts`" tells the reader exactly where to look and what pattern to follow.
116
-
117
- ## Categories
60
+ ## File Placement
118
61
 
119
- **architecture** - Design decisions, file relationships, data flow
62
+ Rules must be written to `.claude/rules/`, NOT `.codeyam/rules/`. The instructions file lives in `.codeyam/` but actual rule files go in `.claude/rules/`.
120
63
 
121
- - "These three files must change together because..."
122
- - "Data flows from X → Y → Z"
64
+ Use `codeyam memory rule-path` to compute the correct directory from your frontmatter paths:
123
65
 
124
- **testing** - Test commands, mock patterns, fixtures
66
+ ```
67
+ $ codeyam memory rule-path packages/ai/src/lib/foo.ts packages/ai/src/utils/bar.ts
68
+ {"result":".claude/rules/packages/ai/src/"}
69
+ ```
125
70
 
126
- - "Run tests with: `pnpm test path/to/test.ts`"
127
- - "Must run `pnpm pretest` first because..."
71
+ The command computes the deepest common directory shared by all paths and returns the `.claude/rules/` subdirectory where the rule file should live. Reserve the top level of `.claude/rules/` for rules whose paths genuinely span the entire repo.
128
72
 
129
- **faq** - Gotchas, workarounds, common questions
73
+ ## Content Guidelines
130
74
 
131
- - "If you see error X, it means Y"
132
- - "This looks wrong but is intentional because..."
75
+ - **Be actionable** — "Run `pnpm test:api` for API tests" not "Make sure to run the appropriate tests"
76
+ - **Focus on why, not what** Gotchas, non-obvious behavior, architectural decisions. The code already shows "what."
77
+ - **Point to specifics** — "Auth tokens are stored in httpOnly cookies via `src/auth/cookies.ts`" beats a vague description.
78
+ - **Be short!** - Context window space is precious! Do not ramble, use bullets, focus on providing clear actionable information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeyam/codeyam-cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Local development CLI for CodeYam analysis",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,7 +14,6 @@ const RETRIES_DISABLED = false;
14
14
  const queue = new PQueue({
15
15
  concurrency: 100,
16
16
  timeout: 20 * 60 * 1000, // 20 minutes
17
- throwOnTimeout: true,
18
17
  autoStart: true,
19
18
  });
20
19
  const defaultRetryOptions = {
@@ -119,8 +118,6 @@ export default async function completionCall({ type, systemMessage, prompt, json
119
118
  });
120
119
  },
121
120
  });
122
- }, {
123
- throwOnTimeout: true,
124
121
  });
125
122
  const endTime = Date.now();
126
123
  const llmCallStats = getLLMCallStats({
@@ -255,8 +252,6 @@ Please provide a corrected version with valid JSON only. Do not include any expl
255
252
  });
256
253
  },
257
254
  });
258
- }, {
259
- throwOnTimeout: true,
260
255
  });
261
256
  const correctedRawCompletion = correctionChatCompletion.choices?.[0]?.message?.content;
262
257
  // Remove <think> tags from correction response too
@@ -1 +1 @@
1
- {"version":3,"file":"completionCall.js","sourceR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