Skip to content

fixes: doc sync, AGENTS.md#44

Merged
mvoutov merged 2 commits into
mainfrom
release/v0.7.3
Apr 25, 2026
Merged

fixes: doc sync, AGENTS.md#44
mvoutov merged 2 commits into
mainfrom
release/v0.7.3

Conversation

@mvoutov
Copy link
Copy Markdown
Contributor

@mvoutov mvoutov commented Apr 25, 2026

What

Why

Closes #

How I tested

  • npm test passes
  • Tested against a real repo:
  • --dry-run output looks correct (if applicable)

Checklist

  • Changes are focused on a single feature or fix
  • Tests added or updated for any logic changes
  • No new dependencies added (or justified in the PR description)

Summary by CodeRabbit

  • Bug Fixes

    • doc sync now handles incomplete LLM responses gracefully instead of failing
    • Codex transform for AGENTS.md now automatically loads missing dependencies from disk, fixing incomplete outputs from doc init --strategy skip-existing
  • Documentation

    • Updated README with streamlined installation and usage instructions for aspens workflows

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Warning

Rate limit exceeded

@mvoutov has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 39 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 88617501-e4ca-4abc-b933-65ba4bce1be7

📥 Commits

Reviewing files that changed from the base of the PR and between 23e6d07 and 057f4f8.

📒 Files selected for processing (7)
  • .agents/skills/architecture/references/code-map.md
  • .agents/skills/codex-support/SKILL.md
  • .agents/skills/doc-sync/SKILL.md
  • .claude/skills/codex-support/skill.md
  • .claude/skills/doc-sync/skill.md
  • AGENTS.md
  • src/lib/target-transform.js

Walkthrough

Release 0.7.3 includes fixes for LLM output handling without expected <file> tags and file loading resolution, threading repository context (repoPath) through transform functions to enable disk-based instruction file loading as a fallback. Documentation and version updated accordingly.

Changes

Cohort / File(s) Summary
Release & Documentation
CHANGELOG.md, README.md, package.json
Version bumped to 0.7.3. README updated with global installation flow (npm install -g aspens) and npx alternative. Changelog documents two fixes: doc sync graceful handling of LLM responses lacking <file> tags and Codex transform disk-loading of CLAUDE.md.
Transform Context Threading
src/commands/doc-init.js, src/commands/doc-sync.js, src/lib/target-transform.js
repoPath parameter threaded through transform pipeline. doc-sync.js replaces hard-failing parse validation with non-fatal warning when LLM output lacks file tags. target-transform.js conditionally loads instructions file from disk when not pre-provided in memory.
Prompt Tightening
src/prompts/doc-sync.md
"Nothing needs updating" case now explicitly requires empty response (zero characters) rather than "output nothing," preventing explanatory text.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely empty template boilerplate with no content filled in. Required sections (What, Why, testing steps) lack any substantive information. Fill in all template sections: describe the fixes (doc sync LLM parsing and AGENTS.md/CLAUDE.md handling), explain the motivation, confirm testing steps, and check off completed items.
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fixes: doc sync, AGENTS.md' is vague and generic. It lacks specificity about what was fixed and uses a list-like format that doesn't clearly convey the main change. Replace with a specific, single-sentence title describing the primary fix, e.g., 'Fix doc sync to handle missing CLAUDE.md and LLM responses without file tags'.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/v0.7.3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
package.json (1)

26-26: ⚠️ Potential issue | 🟡 Minor

Stale version in postinstall message.

The postinstall script still prints aspens v0.7.2 even though version was bumped to 0.7.3. Users installing this release will see a misleading version string.

🔧 Proposed fix
-    "postinstall": "echo '\n  📌 aspens v0.7.2: Nested-project layouts (e.g. `.NET ~/apps/MyApp/MyApp/MyApp.csproj`) now yield first-class domains instead of a single wrapper domain. Pretty-printed `scan` also shows domains for C#/Java/Swift/PHP/Elixir projects.\n     Re-run `aspens doc init` if a prior scan came up empty or under-detailed.\n\n  🌲 aspens is in active development — please keep it up to date.\n     Run into issues? Let us know: https://github.com/aspenkit/aspens/issues\n'"
+    "postinstall": "echo '\n  📌 aspens v0.7.3: Fixes `doc sync` handling of LLM replies without `<file>` tags, and the Codex `AGENTS.md` transform now loads `CLAUDE.md` from disk when missing from canonical input.\n\n  🌲 aspens is in active development — please keep it up to date.\n     Run into issues? Let us know: https://github.com/aspenkit/aspens/issues\n'"

Or, longer-term, source this string from package.json version to keep them in sync automatically.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 26, The postinstall message hardcodes "aspens v0.7.2"
which is now stale after bumping package.json version to 0.7.3; update the
string in the "postinstall" script inside package.json to reflect the current
version (or replace the hardcoded version with a template that reads the
package.json "version" value) so the printed version matches the package.json
"version" field; target the "postinstall" script entry in package.json to make
the change.
🧹 Nitpick comments (1)
src/commands/doc-sync.js (1)

312-316: Consider surfacing the "no <file> tags" signal even without --verbose.

Without --verbose, a non-empty unstructured LLM reply now silently maps to Docs are up to date. That's the intended fix, but it can also mask genuine model regressions. A non-fatal p.log.info (always shown) instead of a verbose-only warn would let users notice when the LLM is "talking" instead of emitting tags.

-  if (baseFiles.length === 0 && result.text.trim().length > 0 && !/<file\s+path=/i.test(result.text)) {
-    if (verbose) {
-      p.log.warn('LLM responded without <file> tags — treating as no updates needed.');
-    }
-  }
+  const unstructuredReply =
+    baseFiles.length === 0 &&
+    result.text.trim().length > 0 &&
+    !/<file\s+path=/i.test(result.text);
+  if (unstructuredReply) {
+    p.log.info(
+      verbose
+        ? 'LLM responded without <file> tags — treating as no updates needed.'
+        : 'No file updates emitted by LLM (run with --verbose for details).'
+    );
+  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/doc-sync.js` around lines 312 - 316, The code currently only
warns when verbose is true if the LLM returned non-empty text without <file>
tags (baseFiles.length === 0 && result.text.trim().length > 0 &&
!/<file\s+path=/i.test(result.text)) using p.log.warn inside an if (verbose)
block; change this to always emit a non-fatal informational message so users see
the signal: remove the verbose guard and call p.log.info (or p.log.info with the
same or slightly clearer message) instead of p.log.warn, referencing the same
condition and the symbols baseFiles, result.text, p.log.warn/p.log.info.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/target-transform.js`:
- Around line 55-60: The code currently checks existsSync then calls
readFileSync which can still throw; replace that pattern by attempting to read
the file inside a try/catch: compute diskPath as join(repoPath,
sourceTarget.instructionsFile) and then wrap readFileSync(diskPath, 'utf8') in a
try/catch, on success set instructionsFile = { path:
sourceTarget.instructionsFile, content: <data> } and on failure leave
instructionsFile as null (or undefined) so the transform doesn't throw; remove
the redundant existsSync check (and its import if unused) and ensure the catch
swallows the error consistent with other helpers in src/lib/*.js.

---

Outside diff comments:
In `@package.json`:
- Line 26: The postinstall message hardcodes "aspens v0.7.2" which is now stale
after bumping package.json version to 0.7.3; update the string in the
"postinstall" script inside package.json to reflect the current version (or
replace the hardcoded version with a template that reads the package.json
"version" value) so the printed version matches the package.json "version"
field; target the "postinstall" script entry in package.json to make the change.

---

Nitpick comments:
In `@src/commands/doc-sync.js`:
- Around line 312-316: The code currently only warns when verbose is true if the
LLM returned non-empty text without <file> tags (baseFiles.length === 0 &&
result.text.trim().length > 0 && !/<file\s+path=/i.test(result.text)) using
p.log.warn inside an if (verbose) block; change this to always emit a non-fatal
informational message so users see the signal: remove the verbose guard and call
p.log.info (or p.log.info with the same or slightly clearer message) instead of
p.log.warn, referencing the same condition and the symbols baseFiles,
result.text, p.log.warn/p.log.info.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ac978311-5095-44a7-8083-7c93edc5b126

📥 Commits

Reviewing files that changed from the base of the PR and between 3599b5f and 23e6d07.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • package.json
  • src/commands/doc-init.js
  • src/commands/doc-sync.js
  • src/lib/target-transform.js
  • src/prompts/doc-sync.md

Comment thread src/lib/target-transform.js
@mvoutov mvoutov merged commit 0d214a6 into main Apr 25, 2026
3 checks passed
@mvoutov mvoutov deleted the release/v0.7.3 branch April 25, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant