gaslighting-engine 0.2.1 → 0.2.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/.agents/prompts/gaslighting.md +2 -0
- package/.agents/skills/gaslighting/SKILL.md +8 -0
- package/.codex/prompts/gaslighting.md +2 -0
- package/.codex/skills/gaslighting/SKILL.md +8 -0
- package/README.md +10 -2
- package/dist/cli.js +11 -1
- package/dist/commands/codexInstall.js +3 -2
- package/dist/commands/upgrade.js +27 -0
- package/dist/core/generateOtherMarkdown.js +16 -0
- package/dist/utils/updateCheck.js +1 -2
- package/dist/version.js +1 -1
- package/docs/codex-usage.md +8 -0
- package/docs/examples.md +1 -0
- package/examples/ecommerce/.codex/prompts/gaslighting.md +2 -0
- package/examples/ecommerce/.codex/skills/gaslighting/SKILL.md +8 -0
- package/examples/ecommerce/.gaslighting/CODEX_PROMPT.md +6 -0
- package/examples/hospital-homepage/.codex/prompts/gaslighting.md +2 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/SKILL.md +8 -0
- package/examples/hospital-homepage/.gaslighting/CODEX_PROMPT.md +6 -0
- package/examples/landing-page/.codex/prompts/gaslighting.md +2 -0
- package/examples/landing-page/.codex/skills/gaslighting/SKILL.md +8 -0
- package/examples/landing-page/.gaslighting/CODEX_PROMPT.md +6 -0
- package/package.json +1 -1
|
@@ -99,3 +99,11 @@ Do not produce a plan without files.
|
|
|
99
99
|
Do not say what should be done.
|
|
100
100
|
|
|
101
101
|
Generate the actual project discipline documents.
|
|
102
|
+
|
|
103
|
+
## Update Rule
|
|
104
|
+
|
|
105
|
+
When the user asks how to update this Gaslighting Codex install, give the simple command:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx gaslighting-engine@latest upgrade
|
|
109
|
+
```
|
|
@@ -99,3 +99,11 @@ Do not produce a plan without files.
|
|
|
99
99
|
Do not say what should be done.
|
|
100
100
|
|
|
101
101
|
Generate the actual project discipline documents.
|
|
102
|
+
|
|
103
|
+
## Update Rule
|
|
104
|
+
|
|
105
|
+
When the user asks how to update this Gaslighting Codex install, give the simple command:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx gaslighting-engine@latest upgrade
|
|
109
|
+
```
|
package/README.md
CHANGED
|
@@ -84,6 +84,7 @@ gaslighting init "I want to build a hospital website."
|
|
|
84
84
|
gaslighting-engine generate "Build an ecommerce MVP."
|
|
85
85
|
gaslighting-engine update "The hospital is actually an OB-GYN clinic, not dermatology."
|
|
86
86
|
gaslighting-engine doctor
|
|
87
|
+
gaslighting-engine upgrade
|
|
87
88
|
gaslighting-engine codex-install
|
|
88
89
|
gaslighting-engine codex-doctor
|
|
89
90
|
gaslighting-engine skill
|
|
@@ -126,14 +127,21 @@ This initializes Git when needed and connects `origin`. If `origin` already exis
|
|
|
126
127
|
|
|
127
128
|
Gaslighting-engine checks npm for a newer version when you run normal commands.
|
|
128
129
|
|
|
130
|
+
The simple update command is:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npx gaslighting-engine@latest upgrade
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This updates the Codex skill and prompt files in the current project. No `--force` is needed.
|
|
137
|
+
|
|
129
138
|
If an update exists, it prints a short notice like:
|
|
130
139
|
|
|
131
140
|
```txt
|
|
132
141
|
Gaslighting-engine update available:
|
|
133
142
|
- current: 0.1.0
|
|
134
143
|
- latest: 0.1.1
|
|
135
|
-
- update:
|
|
136
|
-
- npx: npx gaslighting-engine@latest
|
|
144
|
+
- update: npx gaslighting-engine@latest upgrade
|
|
137
145
|
```
|
|
138
146
|
|
|
139
147
|
The update check is best-effort and never blocks the command. Disable it with:
|
package/dist/cli.js
CHANGED
|
@@ -7,6 +7,7 @@ import { runGenerate } from "./commands/generate.js";
|
|
|
7
7
|
import { runInit } from "./commands/init.js";
|
|
8
8
|
import { runSkill } from "./commands/skill.js";
|
|
9
9
|
import { runUpdate } from "./commands/update.js";
|
|
10
|
+
import { runUpgrade } from "./commands/upgrade.js";
|
|
10
11
|
import { packageVersion } from "./version.js";
|
|
11
12
|
const projectTypes = [
|
|
12
13
|
"hospital_homepage",
|
|
@@ -59,6 +60,7 @@ Examples:
|
|
|
59
60
|
$ gaslighting-engine init "Build a landing page" --dry-run
|
|
60
61
|
$ gaslighting-engine doctor
|
|
61
62
|
$ gaslighting-engine care --github-url https://github.com/user/repo.git
|
|
63
|
+
$ gaslighting-engine upgrade
|
|
62
64
|
$ gaslighting-engine codex-install --force
|
|
63
65
|
|
|
64
66
|
Defaults:
|
|
@@ -102,6 +104,14 @@ Defaults:
|
|
|
102
104
|
.option("--github-url <url>", "initialize git if needed and connect origin to this GitHub URL")
|
|
103
105
|
.option("--force-remote", "replace an existing origin remote when used with --github-url")
|
|
104
106
|
.action(runCare);
|
|
107
|
+
program
|
|
108
|
+
.command("upgrade")
|
|
109
|
+
.description("Update the local Codex Gaslighting install with one simple command")
|
|
110
|
+
.option("--no-force", "preserve existing files and create .new variants instead")
|
|
111
|
+
.option("--dry-run", "print files without writing")
|
|
112
|
+
.option("--path <path>", "target directory")
|
|
113
|
+
.option("--scope <scope>", "project or user", "project")
|
|
114
|
+
.action(runUpgrade);
|
|
105
115
|
program
|
|
106
116
|
.command("codex-install")
|
|
107
117
|
.description("Install Gaslighting as a Codex-optimized project or user skill")
|
|
@@ -124,7 +134,7 @@ export function normalizeDefaultInitArgv(argv) {
|
|
|
124
134
|
return argv;
|
|
125
135
|
if (args.some((arg) => ["--help", "-h", "--version", "-V"].includes(arg)))
|
|
126
136
|
return argv;
|
|
127
|
-
const commands = new Set(["init", "generate", "update", "doctor", "skill", "agents", "care", "codex-install", "codex-doctor"]);
|
|
137
|
+
const commands = new Set(["init", "generate", "update", "doctor", "skill", "agents", "care", "upgrade", "codex-install", "codex-doctor"]);
|
|
128
138
|
const firstMeaningful = args.find((arg) => !arg.startsWith("-"));
|
|
129
139
|
if (firstMeaningful && commands.has(firstMeaningful))
|
|
130
140
|
return argv;
|
|
@@ -26,6 +26,7 @@ export function runCodexInstall(options) {
|
|
|
26
26
|
console.log('- If Codex exposes enabled skills in slash commands, use: /gaslighting');
|
|
27
27
|
console.log("- If neither appears immediately, restart Codex and reopen this project.");
|
|
28
28
|
console.log("- Fallback prompt file: .gaslighting/CODEX_GASLIGHTING.md");
|
|
29
|
+
console.log("- Update later with: npx gaslighting-engine@latest upgrade");
|
|
29
30
|
}
|
|
30
31
|
export function runCodexDoctor(options) {
|
|
31
32
|
const target = resolveTargetPath(options);
|
|
@@ -46,12 +47,12 @@ export function runCodexDoctor(options) {
|
|
|
46
47
|
const hasSkill = checks.some((check) => check.ok && check.file.endsWith("skills/gaslighting/SKILL.md"));
|
|
47
48
|
if (!hasSkill) {
|
|
48
49
|
process.exitCode = 1;
|
|
49
|
-
console.log("\nNo gaslighting skill was found. Run: gaslighting
|
|
50
|
+
console.log("\nNo gaslighting skill was found. Run: npx gaslighting-engine@latest upgrade");
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
52
53
|
console.log("\nCodex install looks usable. Restart Codex if the skill does not appear yet.");
|
|
53
54
|
}
|
|
54
|
-
function resolveTargetPath(options) {
|
|
55
|
+
export function resolveTargetPath(options) {
|
|
55
56
|
if (options.path)
|
|
56
57
|
return resolve(options.path);
|
|
57
58
|
if (options.scope === "user")
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { generateCodexInstallDocs } from "../core/generateDocs.js";
|
|
2
|
+
import { printBanner } from "../utils/banner.js";
|
|
3
|
+
import { writeDocs } from "../utils/file.js";
|
|
4
|
+
import { packageVersion } from "../version.js";
|
|
5
|
+
import { resolveTargetPath } from "./codexInstall.js";
|
|
6
|
+
export function runUpgrade(options) {
|
|
7
|
+
const target = resolveTargetPath(options);
|
|
8
|
+
const force = options.force ?? true;
|
|
9
|
+
const results = writeDocs(target, generateCodexInstallDocs(), force, options.dryRun);
|
|
10
|
+
printBanner("UPGRADE");
|
|
11
|
+
console.log(`Version: ${packageVersion}`);
|
|
12
|
+
console.log(`Target: ${target}\n`);
|
|
13
|
+
console.log("Updated Codex files:");
|
|
14
|
+
for (const result of results) {
|
|
15
|
+
const suffix = result.status === "created_variant"
|
|
16
|
+
? " (existing file preserved)"
|
|
17
|
+
: result.status === "overwritten"
|
|
18
|
+
? " (overwritten)"
|
|
19
|
+
: result.status === "dry_run"
|
|
20
|
+
? " (dry run)"
|
|
21
|
+
: "";
|
|
22
|
+
console.log(`- ${result.filename}${suffix}`);
|
|
23
|
+
}
|
|
24
|
+
console.log("\nDone.");
|
|
25
|
+
console.log("Restart Codex or reopen this project if the old skill is still visible.");
|
|
26
|
+
console.log('Use: /gaslighting, "$gaslighting", or say "Use the gaslighting skill."');
|
|
27
|
+
}
|
|
@@ -424,6 +424,14 @@ Do not produce a plan without files.
|
|
|
424
424
|
Do not say what should be done.
|
|
425
425
|
|
|
426
426
|
Generate the actual project discipline documents.
|
|
427
|
+
|
|
428
|
+
## Update Rule
|
|
429
|
+
|
|
430
|
+
When the user asks how to update this Gaslighting Codex install, give the simple command:
|
|
431
|
+
|
|
432
|
+
\`\`\`bash
|
|
433
|
+
npx gaslighting-engine@latest upgrade
|
|
434
|
+
\`\`\`
|
|
427
435
|
`;
|
|
428
436
|
}
|
|
429
437
|
export function generateSkillOpenAiYaml() {
|
|
@@ -472,6 +480,12 @@ Rules:
|
|
|
472
480
|
|
|
473
481
|
Before claiming completion, perform the self-audit in \`.gaslighting/GASLIGHTING.md\`.
|
|
474
482
|
|
|
483
|
+
To refresh the Codex skill files later, run:
|
|
484
|
+
|
|
485
|
+
\`\`\`bash
|
|
486
|
+
npx gaslighting-engine@latest upgrade
|
|
487
|
+
\`\`\`
|
|
488
|
+
|
|
475
489
|
Proceed.
|
|
476
490
|
`;
|
|
477
491
|
}
|
|
@@ -508,6 +522,8 @@ Rules:
|
|
|
508
522
|
- If something is incomplete, declare it explicitly.
|
|
509
523
|
|
|
510
524
|
Before claiming completion, perform the self-audit in \`.gaslighting/GASLIGHTING.md\`.
|
|
525
|
+
|
|
526
|
+
To refresh this Gaslighting Codex install later, run \`npx gaslighting-engine@latest upgrade\`.
|
|
511
527
|
`;
|
|
512
528
|
}
|
|
513
529
|
export function generateSkillReferenceDocs() {
|
|
@@ -11,8 +11,7 @@ export async function notifyIfUpdateAvailable(argv) {
|
|
|
11
11
|
console.error("Gaslighting-engine update available:");
|
|
12
12
|
console.error(`- current: ${packageVersion}`);
|
|
13
13
|
console.error(`- latest: ${latestVersion}`);
|
|
14
|
-
console.error(`- update:
|
|
15
|
-
console.error(`- npx: npx ${packageName}@latest`);
|
|
14
|
+
console.error(`- update: npx ${packageName}@latest upgrade`);
|
|
16
15
|
console.error("");
|
|
17
16
|
}
|
|
18
17
|
catch {
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const packageName = "gaslighting-engine";
|
|
2
|
-
export const packageVersion = "0.2.
|
|
2
|
+
export const packageVersion = "0.2.2";
|
package/docs/codex-usage.md
CHANGED
|
@@ -38,6 +38,14 @@ Check the install:
|
|
|
38
38
|
npx gaslighting-engine codex-doctor
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
Update the Codex skill later:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx gaslighting-engine@latest upgrade
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This is the recommended update flow. It overwrites the local Codex skill and prompt files with the latest package version.
|
|
48
|
+
|
|
41
49
|
## Generate Discipline Docs
|
|
42
50
|
|
|
43
51
|
Generate documents:
|
package/docs/examples.md
CHANGED
|
@@ -99,3 +99,11 @@ Do not produce a plan without files.
|
|
|
99
99
|
Do not say what should be done.
|
|
100
100
|
|
|
101
101
|
Generate the actual project discipline documents.
|
|
102
|
+
|
|
103
|
+
## Update Rule
|
|
104
|
+
|
|
105
|
+
When the user asks how to update this Gaslighting Codex install, give the simple command:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx gaslighting-engine@latest upgrade
|
|
109
|
+
```
|
|
@@ -99,3 +99,11 @@ Do not produce a plan without files.
|
|
|
99
99
|
Do not say what should be done.
|
|
100
100
|
|
|
101
101
|
Generate the actual project discipline documents.
|
|
102
|
+
|
|
103
|
+
## Update Rule
|
|
104
|
+
|
|
105
|
+
When the user asks how to update this Gaslighting Codex install, give the simple command:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx gaslighting-engine@latest upgrade
|
|
109
|
+
```
|
|
@@ -99,3 +99,11 @@ Do not produce a plan without files.
|
|
|
99
99
|
Do not say what should be done.
|
|
100
100
|
|
|
101
101
|
Generate the actual project discipline documents.
|
|
102
|
+
|
|
103
|
+
## Update Rule
|
|
104
|
+
|
|
105
|
+
When the user asks how to update this Gaslighting Codex install, give the simple command:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx gaslighting-engine@latest upgrade
|
|
109
|
+
```
|