compose-agentsmd 3.2.0 → 3.2.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 +1 -0
- package/dist/compose-agents.js +4 -1
- package/package.json +1 -1
- package/tools/tool-rules.md +3 -1
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ compose-agentsmd
|
|
|
33
33
|
The tool reads `agent-ruleset.json` from the given root directory (default: current working directory), and writes the output file specified by the ruleset. If `output` is omitted, it defaults to `AGENTS.md`.
|
|
34
34
|
|
|
35
35
|
The tool prepends a small "Tool Rules" block to every generated `AGENTS.md` so agents know how to regenerate or update rules.
|
|
36
|
+
Each composed rule section is also prefixed with the source file path that produced it.
|
|
36
37
|
|
|
37
38
|
## Setup (init)
|
|
38
39
|
|
package/dist/compose-agents.js
CHANGED
|
@@ -527,7 +527,10 @@ const composeRuleset = (rulesetPath, rootDir, options) => {
|
|
|
527
527
|
const extraRules = Array.isArray(projectRuleset.extra) ? projectRuleset.extra : [];
|
|
528
528
|
const directRulePaths = extraRules.map((rulePath) => resolveFrom(rulesetDir, rulePath));
|
|
529
529
|
addRulePaths(directRulePaths, resolvedRules, seenRules);
|
|
530
|
-
const parts = resolvedRules.map((rulePath) =>
|
|
530
|
+
const parts = resolvedRules.map((rulePath) => {
|
|
531
|
+
const body = normalizeTrailingWhitespace(fs.readFileSync(rulePath, "utf8"));
|
|
532
|
+
return `Source: ${normalizePath(rulePath)}\n\n${body}`;
|
|
533
|
+
});
|
|
531
534
|
const lintHeader = "<!-- markdownlint-disable MD025 -->";
|
|
532
535
|
const toolRules = normalizeTrailingWhitespace(TOOL_RULES);
|
|
533
536
|
const output = `${lintHeader}\n${[toolRules, ...parts].join("\n\n")}\n`;
|
package/package.json
CHANGED
package/tools/tool-rules.md
CHANGED
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
- Before starting any work, run `compose-agentsmd` from the project root.
|
|
3
3
|
- To update shared rules, run `compose-agentsmd edit-rules`, edit the workspace rules, then run `compose-agentsmd apply-rules`.
|
|
4
4
|
- Do not edit `AGENTS.md` directly; update the source rules and regenerate.
|
|
5
|
-
- When updating rules, include a
|
|
5
|
+
- When updating rules, include a colorized diff-style summary in the final response. Use `git diff --stat` first, then include the raw ANSI-colored output of `git diff --color=always` (no sanitizing or reformatting), and limit the output to the rule files that changed.
|
|
6
|
+
- Also provide a short, copy-pasteable command the user can run to view the diff in the same format. Use absolute paths so it works regardless of the current working directory, and scope it to the changed rule files.
|
|
7
|
+
- If a diff is provided, a separate detailed summary is not required. If a diff is not possible, include a detailed summary of what changed (added/removed/modified items).
|