ai-policy-pack-cli 0.1.1 → 0.1.2
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
CHANGED
|
@@ -26,7 +26,7 @@ npx ai-policy-pack-cli install --targets cursor,copilot,antigravity,claude --yes
|
|
|
26
26
|
### Install
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
npx ai-policy-pack-cli install [--targets cursor,copilot,antigravity,claude] [--preset
|
|
29
|
+
npx ai-policy-pack-cli install [--targets cursor,copilot,antigravity,claude] [--preset anhtdq] [--yes] [--dry-run]
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
- Generates target files from preset
|
|
@@ -45,7 +45,7 @@ npx ai-policy-pack-cli verify
|
|
|
45
45
|
### Update
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
npx ai-policy-pack-cli update [--preset
|
|
48
|
+
npx ai-policy-pack-cli update [--preset anhtdq] [--yes] [--dry-run]
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
- Re-applies current targets from manifest
|
|
@@ -55,7 +55,7 @@ npx ai-policy-pack-cli update [--preset karpathy] [--yes] [--dry-run]
|
|
|
55
55
|
|
|
56
56
|
Current default preset:
|
|
57
57
|
|
|
58
|
-
- `presets/
|
|
58
|
+
- `presets/anhtdq/policy.yml`
|
|
59
59
|
|
|
60
60
|
Preset layout:
|
|
61
61
|
|
|
@@ -6,7 +6,7 @@ import { renderForTargets } from "../core/render.js";
|
|
|
6
6
|
import { CliError } from "../core/errors.js";
|
|
7
7
|
export async function runInstallCommand(args, deps) {
|
|
8
8
|
const targets = await resolveTargets(args);
|
|
9
|
-
const presetName = args.preset ?? "
|
|
9
|
+
const presetName = args.preset ?? "anhtdq";
|
|
10
10
|
const policy = await loadPolicyPreset(deps.cwd, presetName, deps.packageRoot);
|
|
11
11
|
const files = renderForTargets(policy, targets);
|
|
12
12
|
deps.logger.info(`Preset: ${policy.name}`);
|
|
@@ -4,7 +4,7 @@ import { renderForTargets } from "../src/core/render.js";
|
|
|
4
4
|
const CWD = "d:/ATS/Project/AI/rulecusor";
|
|
5
5
|
describe("adapters render", () => {
|
|
6
6
|
it("renders target-specific files", async () => {
|
|
7
|
-
const policy = await loadPolicyPreset(CWD, "
|
|
7
|
+
const policy = await loadPolicyPreset(CWD, "anhtdq", CWD);
|
|
8
8
|
const files = renderForTargets(policy, ["cursor", "copilot", "antigravity", "claude"]);
|
|
9
9
|
const paths = files.map((item) => item.path).sort();
|
|
10
10
|
expect(paths).toContain(".cursor/rules/global-policy.mdc");
|
package/dist/test/args.spec.js
CHANGED
|
@@ -8,7 +8,7 @@ describe("parseArgs", () => {
|
|
|
8
8
|
"--targets",
|
|
9
9
|
"cursor,copilot",
|
|
10
10
|
"--preset",
|
|
11
|
-
"
|
|
11
|
+
"anhtdq",
|
|
12
12
|
"--yes",
|
|
13
13
|
"--dry-run",
|
|
14
14
|
"--force"
|
|
@@ -16,7 +16,7 @@ describe("parseArgs", () => {
|
|
|
16
16
|
expect(parsed).toEqual({
|
|
17
17
|
command: "install",
|
|
18
18
|
targets: ["cursor", "copilot"],
|
|
19
|
-
preset: "
|
|
19
|
+
preset: "anhtdq",
|
|
20
20
|
yes: true,
|
|
21
21
|
dryRun: true,
|
|
22
22
|
force: true
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: anhtdq
|
|
2
|
+
description: Behavioral guardrails to reduce common LLM coding mistakes across all code
|
|
3
|
+
globalRules:
|
|
4
|
+
- Before implementing, state assumptions explicitly. If uncertain, ask instead of guessing.
|
|
5
|
+
- If multiple interpretations exist, surface them and confirm direction before coding.
|
|
6
|
+
- If a simpler approach exists, recommend it and explain the tradeoff.
|
|
7
|
+
- If requirements are unclear or contradictory, stop and ask a focused clarification question.
|
|
8
|
+
- Implement the minimum code that solves the requested problem.
|
|
9
|
+
- Do not add speculative features or future-proof abstractions unless explicitly requested.
|
|
10
|
+
- Do not add configurability that is not required by the task.
|
|
11
|
+
- Do not add error handling for impossible scenarios.
|
|
12
|
+
- If implementation feels overcomplicated, simplify until it is easy to reason about.
|
|
13
|
+
- Touch only lines required by the requested change.
|
|
14
|
+
- Do not refactor unrelated modules or formatting during focused tasks.
|
|
15
|
+
- Match existing project patterns and style unless user asks to change conventions.
|
|
16
|
+
- If unrelated dead code is discovered, mention it but do not delete it automatically.
|
|
17
|
+
- Remove only orphaned code introduced by your own change.
|
|
18
|
+
- Define clear success criteria before implementation.
|
|
19
|
+
- Convert requests into verifiable goals with checks or tests.
|
|
20
|
+
- For bug fixes, reproduce with a failing test/check first, then fix, then verify pass.
|
|
21
|
+
- For refactors, verify behavior before and after with stable checks.
|
|
22
|
+
- For multi-step work, provide a short step plan with explicit verification at each step.
|
|
23
|
+
- Do not claim completion until verification actually passes.
|
|
24
|
+
fileRules:
|
|
25
|
+
- name: universal-code-rules
|
|
26
|
+
patterns:
|
|
27
|
+
- "**/*"
|
|
28
|
+
rules:
|
|
29
|
+
- Apply these standards to all code and configuration files unless the user explicitly narrows scope.
|
|
30
|
+
- Prefer readable, straightforward code and avoid hidden magic.
|
|
31
|
+
- Keep changes cohesive, easy to review, and directly traceable to the request.
|
|
32
|
+
targetOverrides:
|
|
33
|
+
antigravity:
|
|
34
|
+
geminiRules:
|
|
35
|
+
- Keep AGENTS.md as shared cross-tool policy and use GEMINI.md only for Antigravity-specific overrides.
|
|
36
|
+
copilot:
|
|
37
|
+
repoIntro:
|
|
38
|
+
- Follow repository build, test, and lint commands from project documentation before submitting changes.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: karpathy
|
|
2
|
-
description: Karpathy-inspired guardrails adapted for multi-IDE agents
|
|
3
|
-
globalRules:
|
|
4
|
-
- State assumptions and ask clarifying questions before coding when requirements are ambiguous.
|
|
5
|
-
- Prefer the simplest implementation that solves the user's request; avoid speculative abstractions.
|
|
6
|
-
- Keep changes surgical and scoped to the requested task; avoid unrelated refactors.
|
|
7
|
-
- Define explicit success criteria and verify changes with tests or commands before claiming completion.
|
|
8
|
-
- Remove dead code created by your own change but do not clean unrelated legacy code unless asked.
|
|
9
|
-
fileRules:
|
|
10
|
-
- name: typescript-standards
|
|
11
|
-
patterns:
|
|
12
|
-
- "**/*.ts"
|
|
13
|
-
- "**/*.tsx"
|
|
14
|
-
rules:
|
|
15
|
-
- Favor strict typing and avoid any unless there is a documented reason.
|
|
16
|
-
- Keep functions focused and small; split logic when a function mixes responsibilities.
|
|
17
|
-
- Add concise comments only when code intent is not obvious.
|
|
18
|
-
- name: python-standards
|
|
19
|
-
patterns:
|
|
20
|
-
- "**/*.py"
|
|
21
|
-
rules:
|
|
22
|
-
- Prefer explicit names over abbreviations and keep functions single-purpose.
|
|
23
|
-
- Handle expected exceptions explicitly and include actionable error messages.
|
|
24
|
-
targetOverrides:
|
|
25
|
-
antigravity:
|
|
26
|
-
geminiRules:
|
|
27
|
-
- Use GEMINI.md for tool-specific overrides and AGENTS.md for shared team policy.
|
|
28
|
-
copilot:
|
|
29
|
-
repoIntro:
|
|
30
|
-
- Follow repository build, test, and lint commands from project docs before submitting changes.
|