codex-arsenal 0.4.0 → 0.5.0
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/CODEX.md +5 -46
- package/README.md +18 -0
- package/lib/manifest.js +33 -0
- package/lib/obsidian-bridge.js +6 -2
- package/package.json +1 -1
- package/skills/plan-counterargument/SKILL.md +17 -0
- package/skills/token-efficient-execution/SKILL.md +18 -0
package/CODEX.md
CHANGED
|
@@ -6,23 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## Session Bootstrap
|
|
10
|
-
|
|
11
|
-
When this repository is installed into a project, read `prompts/session-bootstrap.md` immediately after `CODEX.md` if it exists.
|
|
12
|
-
|
|
13
|
-
If `configs/codex/session-config.json` exists, use it as the project-local source of truth for:
|
|
14
|
-
|
|
15
|
-
- the session initializer path;
|
|
16
|
-
- the code-style note path;
|
|
17
|
-
- the meaningful-work criteria;
|
|
18
|
-
- the Obsidian vault and inbox paths.
|
|
19
|
-
|
|
20
|
-
If the configured code-style note exists, merge it into your working style before editing files.
|
|
21
|
-
|
|
22
|
-
If the task satisfies the meaningful-work criteria, draft an Obsidian article at the end of the session.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
9
|
## 1. Think Before Coding
|
|
27
10
|
|
|
28
11
|
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
@@ -86,9 +69,9 @@ Transform tasks into verifiable goals:
|
|
|
86
69
|
For multi-step tasks, state a brief plan:
|
|
87
70
|
|
|
88
71
|
```
|
|
89
|
-
1. [Step]
|
|
90
|
-
2. [Step]
|
|
91
|
-
3. [Step]
|
|
72
|
+
1. [Step] -> verify: [check]
|
|
73
|
+
2. [Step] -> verify: [check]
|
|
74
|
+
3. [Step] -> verify: [check]
|
|
92
75
|
```
|
|
93
76
|
|
|
94
77
|
Strong success criteria let you loop independently.
|
|
@@ -108,31 +91,7 @@ Weak criteria ("make it work") require constant clarification.
|
|
|
108
91
|
|
|
109
92
|
---
|
|
110
93
|
|
|
111
|
-
## 6.
|
|
112
|
-
|
|
113
|
-
**Spend context only where it changes the decision.**
|
|
114
|
-
|
|
115
|
-
- Start with filenames, symbols, and short snippets before reading full files.
|
|
116
|
-
- Prefer `rg` and targeted search over broad recursive reads.
|
|
117
|
-
- Summarize long outputs immediately: key facts, file paths, line numbers, open questions.
|
|
118
|
-
- Do not paste large logs back to the user. Quote only the failing line or smallest useful excerpt.
|
|
119
|
-
- Reuse already-loaded context instead of re-reading the same files.
|
|
120
|
-
- When handing off, compress to: goal, changed files, commands run, verification status, next risk.
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 7. Context Awareness
|
|
125
|
-
|
|
126
|
-
**Codex has a limited context window — use it wisely.**
|
|
127
|
-
|
|
128
|
-
- Don't re-read files you've already loaded. Reference prior output instead.
|
|
129
|
-
- When summarizing large codebases, compress systematically: directory tree → key files → function signatures.
|
|
130
|
-
- If context is filling up, state it: *"I'm approaching context limits. Summarizing and continuing."*
|
|
131
|
-
- Prefer targeted grep/search over reading entire files when looking for a specific symbol.
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 8. Tool Use Discipline
|
|
94
|
+
## 6. Tool Use Discipline
|
|
136
95
|
|
|
137
96
|
**Every tool call has a cost. Make them count.**
|
|
138
97
|
|
|
@@ -143,7 +102,7 @@ Weak criteria ("make it work") require constant clarification.
|
|
|
143
102
|
|
|
144
103
|
---
|
|
145
104
|
|
|
146
|
-
##
|
|
105
|
+
## These guidelines are working if:
|
|
147
106
|
|
|
148
107
|
- Diffs contain fewer unnecessary changes
|
|
149
108
|
- Fewer rewrites due to overcomplication
|
package/README.md
CHANGED
|
@@ -24,6 +24,14 @@ Install specific items:
|
|
|
24
24
|
npx codex-arsenal get codex-md skill-publishing-npm-packages
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
Install optional planning, token-efficiency, or Obsidian support:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx codex-arsenal get option-plan-counterargument
|
|
31
|
+
npx codex-arsenal get option-token-efficient-execution
|
|
32
|
+
npx codex-arsenal get option-obsidian-session-loop
|
|
33
|
+
```
|
|
34
|
+
|
|
27
35
|
Install into another directory:
|
|
28
36
|
|
|
29
37
|
```bash
|
|
@@ -71,6 +79,16 @@ The package is published on npm as [`codex-arsenal`](https://www.npmjs.com/packa
|
|
|
71
79
|
| `config-session-bootstrap` | `.codex/session-config.json` | Session bootstrap and Obsidian bridge settings. |
|
|
72
80
|
| `config-vscode` | `.vscode/settings.json` | VS Code settings for agent-assisted development. |
|
|
73
81
|
|
|
82
|
+
### Add-ons
|
|
83
|
+
|
|
84
|
+
These are opt-in: `init --yes` installs only the default `codex-md` guidance. Select an add-on in the interactive `init` prompt or pass its ID to `get`.
|
|
85
|
+
|
|
86
|
+
| ID | Installs | Purpose |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `option-plan-counterargument` | `skills/plan-counterargument/SKILL.md` | Challenge a proposed plan and revise it when the evidence falsifies it. |
|
|
89
|
+
| `option-token-efficient-execution` | `skills/token-efficient-execution/SKILL.md` | Conserve context and tool-output budget without skipping verification. |
|
|
90
|
+
| `option-obsidian-session-loop` | Obsidian config, prompts, skill, and bridge sketch | Add session-note sync and meaningful-work article drafting in Obsidian. |
|
|
91
|
+
|
|
74
92
|
### Prompts
|
|
75
93
|
|
|
76
94
|
| ID | Installs | Purpose |
|
package/lib/manifest.js
CHANGED
|
@@ -32,6 +32,39 @@ export const MANIFEST = [
|
|
|
32
32
|
description: "VS Code settings for AI-assisted development.",
|
|
33
33
|
files: [{ src: "configs/vscode/settings.json", dest: ".vscode/settings.json" }]
|
|
34
34
|
},
|
|
35
|
+
{
|
|
36
|
+
id: "option-plan-counterargument",
|
|
37
|
+
category: "Add-ons",
|
|
38
|
+
label: "plan-counterargument",
|
|
39
|
+
description: "Challenge and falsify a proposed plan before implementation.",
|
|
40
|
+
files: [
|
|
41
|
+
{ src: "skills/plan-counterargument/SKILL.md", dest: "skills/plan-counterargument/SKILL.md" }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "option-token-efficient-execution",
|
|
46
|
+
category: "Add-ons",
|
|
47
|
+
label: "token-efficient-execution",
|
|
48
|
+
description: "Use focused context and tool output while preserving verification quality.",
|
|
49
|
+
files: [
|
|
50
|
+
{ src: "skills/token-efficient-execution/SKILL.md", dest: "skills/token-efficient-execution/SKILL.md" }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "option-obsidian-session-loop",
|
|
55
|
+
category: "Add-ons",
|
|
56
|
+
label: "obsidian-session-loop",
|
|
57
|
+
description: "Install the optional Obsidian session settings, notes, skill, and bridge sketch.",
|
|
58
|
+
files: [
|
|
59
|
+
{ src: "configs/codex/session-config.json", dest: ".codex/session-config.json" },
|
|
60
|
+
{ src: "prompts/session-bootstrap.md", dest: "prompts/session-bootstrap.md" },
|
|
61
|
+
{ src: "prompts/code-style.md", dest: "prompts/code-style.md" },
|
|
62
|
+
{ src: "prompts/meaningful-work.md", dest: "prompts/meaningful-work.md" },
|
|
63
|
+
{ src: "skills/obsidian-session-loop/SKILL.md", dest: "skills/obsidian-session-loop/SKILL.md" },
|
|
64
|
+
{ src: "plugins/obsidian-codex-bridge/README.md", dest: "plugins/obsidian-codex-bridge/README.md" },
|
|
65
|
+
{ src: "plugins/obsidian-codex-bridge/plugin.json", dest: "plugins/obsidian-codex-bridge/plugin.json" }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
35
68
|
{
|
|
36
69
|
id: "prompt-session-bootstrap",
|
|
37
70
|
category: "Prompts",
|
package/lib/obsidian-bridge.js
CHANGED
|
@@ -106,6 +106,10 @@ export function resolveObsidianLaunchSpec({
|
|
|
106
106
|
throw new Error(`Obsidian note must be inside the vault: ${notePath}`);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
// Obsidian CLI arguments and obsidian:// URIs use vault-relative POSIX paths,
|
|
110
|
+
// even when this bridge runs on Windows.
|
|
111
|
+
const vaultRelativeFilePath = relativeFilePath.split(path.sep).join("/");
|
|
112
|
+
|
|
109
113
|
const templates = {
|
|
110
114
|
...defaultLaunchTemplates(),
|
|
111
115
|
...(obsidian.launch || {})
|
|
@@ -119,7 +123,7 @@ export function resolveObsidianLaunchSpec({
|
|
|
119
123
|
args: normalizeTemplateValue(template.args || [], {
|
|
120
124
|
vaultName,
|
|
121
125
|
vaultRoot,
|
|
122
|
-
filePath:
|
|
126
|
+
filePath: vaultRelativeFilePath,
|
|
123
127
|
mode
|
|
124
128
|
}),
|
|
125
129
|
cwd: vaultRoot
|
|
@@ -128,7 +132,7 @@ export function resolveObsidianLaunchSpec({
|
|
|
128
132
|
|
|
129
133
|
return {
|
|
130
134
|
type: "uri",
|
|
131
|
-
uri: `obsidian://open?vault=${encodeURIComponent(vaultName)}&file=${encodeURIComponent(
|
|
135
|
+
uri: `obsidian://open?vault=${encodeURIComponent(vaultName)}&file=${encodeURIComponent(vaultRelativeFilePath)}`
|
|
132
136
|
};
|
|
133
137
|
}
|
|
134
138
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-counterargument
|
|
3
|
+
description: Use when planning a Codex task and the project wants each proposed plan challenged before implementation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Counterargument
|
|
7
|
+
|
|
8
|
+
Before presenting or executing a multi-step plan, add a concise counterargument pass.
|
|
9
|
+
|
|
10
|
+
1. State the intended outcome and the plan's key assumptions.
|
|
11
|
+
2. Identify the strongest plausible reason the plan could be wrong, incomplete, too broad, or unnecessarily complex.
|
|
12
|
+
3. Check the repository or task evidence that would falsify the plan.
|
|
13
|
+
4. Revise the plan when the counterargument holds; otherwise, record why it does not.
|
|
14
|
+
|
|
15
|
+
Keep this proportional: one focused challenge is enough for routine changes. For high-risk work, challenge scope, dependencies, failure modes, and verification separately.
|
|
16
|
+
|
|
17
|
+
Do not use counterarguments to stall. The purpose is to improve the next action, not to manufacture uncertainty.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: token-efficient-execution
|
|
3
|
+
description: Use when a Codex task should conserve context and tool-output budget without reducing verification quality.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Token-Efficient Execution
|
|
7
|
+
|
|
8
|
+
Spend context only where it changes the decision.
|
|
9
|
+
|
|
10
|
+
- Start with filenames, symbols, and short snippets before reading full files.
|
|
11
|
+
- Prefer `rg` and targeted searches over broad recursive reads.
|
|
12
|
+
- Summarize long output immediately: key facts, paths, line numbers, open questions.
|
|
13
|
+
- Quote only the smallest useful error excerpt; do not return large logs.
|
|
14
|
+
- Reuse already-loaded context instead of reading the same files again.
|
|
15
|
+
- Batch related read-only checks when their results are needed together.
|
|
16
|
+
- For handoffs, compress to goal, changed files, commands run, verification, and next risk.
|
|
17
|
+
|
|
18
|
+
Context conservation never replaces verification. Read the full source when a narrow excerpt cannot establish correctness.
|