gaslighting-engine 0.1.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/prompts/gaslighting.md +30 -0
- package/.codex/skills/gaslighting/SKILL.md +96 -0
- package/.codex/skills/gaslighting/agents/openai.yaml +8 -0
- package/.codex/skills/gaslighting/references/GASLIGHTING_TEMPLATE.md +425 -0
- package/.codex/skills/gaslighting/references/HARDCORE_DISCIPLINE_TEMPLATE.md +425 -0
- package/.codex/skills/gaslighting/references/HOSPITAL_HOMEPAGE_EXAMPLE.md +119 -0
- package/.codex/skills/gaslighting/references/STACK_POLICY_TEMPLATE.md +64 -0
- package/.codex/skills/gaslighting/scripts/generate-gaslighting-docs.ts +3 -0
- package/LICENSE +21 -0
- package/README.md +200 -0
- package/dist/cli.js +118 -0
- package/dist/commands/agents.js +10 -0
- package/dist/commands/codexInstall.js +60 -0
- package/dist/commands/doctor.js +42 -0
- package/dist/commands/generate.js +4 -0
- package/dist/commands/init.js +27 -0
- package/dist/commands/skill.js +10 -0
- package/dist/commands/update.js +35 -0
- package/dist/core/analyze.js +132 -0
- package/dist/core/classifyProjectType.js +66 -0
- package/dist/core/content.js +125 -0
- package/dist/core/detectStackHints.js +34 -0
- package/dist/core/generateDocs.js +58 -0
- package/dist/core/generateGaslightingMarkdown.js +420 -0
- package/dist/core/generateOtherMarkdown.js +529 -0
- package/dist/core/generatePrdMarkdown.js +125 -0
- package/dist/index.js +3 -0
- package/dist/types.js +1 -0
- package/dist/utils/banner.js +49 -0
- package/dist/utils/date.js +6 -0
- package/dist/utils/file.js +24 -0
- package/dist/utils/logger.js +27 -0
- package/dist/utils/markdown.js +6 -0
- package/docs/codex-usage.md +58 -0
- package/docs/examples.md +22 -0
- package/docs/philosophy.md +17 -0
- package/docs/research.md +54 -0
- package/examples/ecommerce/.codex/prompts/gaslighting.md +30 -0
- package/examples/ecommerce/.codex/skills/gaslighting/SKILL.md +96 -0
- package/examples/ecommerce/.codex/skills/gaslighting/agents/openai.yaml +8 -0
- package/examples/ecommerce/.codex/skills/gaslighting/references/GASLIGHTING_TEMPLATE.md +425 -0
- package/examples/ecommerce/.codex/skills/gaslighting/references/HARDCORE_DISCIPLINE_TEMPLATE.md +425 -0
- package/examples/ecommerce/.codex/skills/gaslighting/references/HOSPITAL_HOMEPAGE_EXAMPLE.md +119 -0
- package/examples/ecommerce/.codex/skills/gaslighting/references/STACK_POLICY_TEMPLATE.md +64 -0
- package/examples/ecommerce/.codex/skills/gaslighting/scripts/generate-gaslighting-docs.ts +3 -0
- package/examples/ecommerce/AGENTS.md +47 -0
- package/examples/ecommerce/ASSUMPTIONS.md +146 -0
- package/examples/ecommerce/CODEX_PROMPT.md +34 -0
- package/examples/ecommerce/DECISION_LOG.md +95 -0
- package/examples/ecommerce/GASLIGHTING.md +429 -0
- package/examples/ecommerce/MEMORY.md +63 -0
- package/examples/ecommerce/MISSING_INFO.md +13 -0
- package/examples/ecommerce/PRD.md +115 -0
- package/examples/ecommerce/STACK_POLICY.md +64 -0
- package/examples/hospital-homepage/.codex/prompts/gaslighting.md +30 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/SKILL.md +96 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/agents/openai.yaml +8 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/references/GASLIGHTING_TEMPLATE.md +425 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/references/HARDCORE_DISCIPLINE_TEMPLATE.md +425 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/references/HOSPITAL_HOMEPAGE_EXAMPLE.md +119 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/references/STACK_POLICY_TEMPLATE.md +64 -0
- package/examples/hospital-homepage/.codex/skills/gaslighting/scripts/generate-gaslighting-docs.ts +3 -0
- package/examples/hospital-homepage/AGENTS.md +47 -0
- package/examples/hospital-homepage/ASSUMPTIONS.md +218 -0
- package/examples/hospital-homepage/CODEX_PROMPT.md +34 -0
- package/examples/hospital-homepage/DECISION_LOG.md +95 -0
- package/examples/hospital-homepage/GASLIGHTING.md +432 -0
- package/examples/hospital-homepage/MEMORY.md +66 -0
- package/examples/hospital-homepage/MISSING_INFO.md +13 -0
- package/examples/hospital-homepage/PRD.md +119 -0
- package/examples/hospital-homepage/STACK_POLICY.md +64 -0
- package/examples/landing-page/.codex/prompts/gaslighting.md +30 -0
- package/examples/landing-page/.codex/skills/gaslighting/SKILL.md +96 -0
- package/examples/landing-page/.codex/skills/gaslighting/agents/openai.yaml +8 -0
- package/examples/landing-page/.codex/skills/gaslighting/references/GASLIGHTING_TEMPLATE.md +425 -0
- package/examples/landing-page/.codex/skills/gaslighting/references/HARDCORE_DISCIPLINE_TEMPLATE.md +425 -0
- package/examples/landing-page/.codex/skills/gaslighting/references/HOSPITAL_HOMEPAGE_EXAMPLE.md +119 -0
- package/examples/landing-page/.codex/skills/gaslighting/references/STACK_POLICY_TEMPLATE.md +64 -0
- package/examples/landing-page/.codex/skills/gaslighting/scripts/generate-gaslighting-docs.ts +3 -0
- package/examples/landing-page/AGENTS.md +47 -0
- package/examples/landing-page/ASSUMPTIONS.md +146 -0
- package/examples/landing-page/CODEX_PROMPT.md +34 -0
- package/examples/landing-page/DECISION_LOG.md +95 -0
- package/examples/landing-page/GASLIGHTING.md +424 -0
- package/examples/landing-page/MEMORY.md +63 -0
- package/examples/landing-page/MISSING_INFO.md +13 -0
- package/examples/landing-page/PRD.md +103 -0
- package/examples/landing-page/STACK_POLICY.md +64 -0
- package/package.json +37 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# MEMORY.md
|
|
2
|
+
|
|
3
|
+
This is the local project memory for Gaslighting-engine.
|
|
4
|
+
|
|
5
|
+
It is inspired by agent memory systems, but it is not a vague diary.
|
|
6
|
+
|
|
7
|
+
It records stable project facts, recurring workflow rules, known failure patterns, and decisions that future AI-agent sessions must not forget.
|
|
8
|
+
|
|
9
|
+
Keep required rules in `AGENTS.md`, `GASLIGHTING.md`, and checked-in documents. Treat this file as a compact recall layer, not the only source of truth.
|
|
10
|
+
|
|
11
|
+
## Stable Project Facts
|
|
12
|
+
|
|
13
|
+
- Original request: Build a landing page for a new service that captures leads.
|
|
14
|
+
- Project type: landing_page
|
|
15
|
+
- Classification confidence: high
|
|
16
|
+
- Stack hints: none
|
|
17
|
+
|
|
18
|
+
## Working Preferences
|
|
19
|
+
|
|
20
|
+
- Prefer the shortest useful command: `gaslighting "project request"`.
|
|
21
|
+
- Default discipline mode is hardcore.
|
|
22
|
+
- Full-scope enforcement is default.
|
|
23
|
+
- No-TODO escape prevention is default.
|
|
24
|
+
- No-shortcut enforcement is default.
|
|
25
|
+
- Missing information should be assumed, documented, and carried forward unless truly blocking.
|
|
26
|
+
|
|
27
|
+
## Known Agent Failure Patterns
|
|
28
|
+
|
|
29
|
+
- Summarizing remaining work instead of doing it.
|
|
30
|
+
- Treating representative examples as full implementation.
|
|
31
|
+
- Using TODO comments as a substitute for requested work.
|
|
32
|
+
- Creating placeholders and calling them structure.
|
|
33
|
+
- Forgetting the project purpose after the first implementation pass.
|
|
34
|
+
- Over-engineering instead of delivering the concrete MVP.
|
|
35
|
+
|
|
36
|
+
## Hades-Style Audit Rules
|
|
37
|
+
|
|
38
|
+
These are cleanup and verification rules:
|
|
39
|
+
|
|
40
|
+
- Zero fake completion.
|
|
41
|
+
- Zero TODO escape.
|
|
42
|
+
- Zero dead placeholder files pretending to be implementation.
|
|
43
|
+
- Zero unexplained scope reductions.
|
|
44
|
+
- Zero unverified success claims.
|
|
45
|
+
- Every destructive cleanup must be intentional and explainable.
|
|
46
|
+
- If code or files are removed, record why in `DECISION_LOG.md`.
|
|
47
|
+
|
|
48
|
+
## Memory Write Rules
|
|
49
|
+
|
|
50
|
+
Add to this file only when a fact is stable and useful across future sessions.
|
|
51
|
+
|
|
52
|
+
Do not store secrets, API keys, credentials, private tokens, or sensitive personal data.
|
|
53
|
+
|
|
54
|
+
When a memory becomes wrong, do not silently delete it. Mark it outdated and append the corrected fact.
|
|
55
|
+
|
|
56
|
+
## Current Assumptions To Remember
|
|
57
|
+
|
|
58
|
+
- The page has one primary conversion goal.
|
|
59
|
+
- Offer details are temporary and must be replaced by the owner.
|
|
60
|
+
- A lead form and repeated CTA path are required.
|
|
61
|
+
- Use the default practical web stack unless the user later specifies otherwise.
|
|
62
|
+
- Build an MVP that can be implemented locally without a SaaS backend for this generator.
|
|
63
|
+
- Treat unspecified brand/content details as temporary copy that must be human-reviewed before production.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# MISSING_INFO.md
|
|
2
|
+
|
|
3
|
+
Missing information must be classified honestly.
|
|
4
|
+
|
|
5
|
+
Most missing information is not blocking.
|
|
6
|
+
|
|
7
|
+
If information is missing but implementation can proceed with a practical assumption, document it and continue.
|
|
8
|
+
|
|
9
|
+
| Item | Current Status | Temporary Assumption | Impact | Blocking? | Recommended Action |
|
|
10
|
+
|---|---|---|---|---|---|
|
|
11
|
+
| Exact offer and conversion goal | Missing but non-blocking | Use one primary lead capture CTA. | high | risky but workable | Confirm the offer, target audience, ad source, CTA, and lead destination. |
|
|
12
|
+
| Final brand identity and production copy | Missing but non-blocking | Use clear temporary copy and document it as replaceable. | medium | blocking before production | Collect final brand name, tone, assets, and legally approved copy before launch. |
|
|
13
|
+
| Exact deployment credentials and accounts | Missing but non-blocking | Prepare the app for Vercel-style deployment without requiring credentials during implementation. | medium | blocking before production | Add project-specific env vars and provider accounts before production deployment. |
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# PRD.md
|
|
2
|
+
|
|
3
|
+
## 1. Product Overview
|
|
4
|
+
|
|
5
|
+
Build an MVP for this request:
|
|
6
|
+
|
|
7
|
+
> Build a landing page for a new service that captures leads.
|
|
8
|
+
|
|
9
|
+
Classified project type: `landing_page`
|
|
10
|
+
|
|
11
|
+
The product must preserve the user's actual scope and must not become a decorative shell.
|
|
12
|
+
|
|
13
|
+
## 2. Business Purpose
|
|
14
|
+
|
|
15
|
+
- make the offer clear within 5 seconds
|
|
16
|
+
- drive CTA clicks
|
|
17
|
+
- capture leads
|
|
18
|
+
- support ad traffic
|
|
19
|
+
- reduce bounce
|
|
20
|
+
- communicate value clearly
|
|
21
|
+
- load fast on mobile
|
|
22
|
+
|
|
23
|
+
## 3. Target Users
|
|
24
|
+
|
|
25
|
+
- Ad traffic visitors
|
|
26
|
+
- Qualified leads
|
|
27
|
+
- Operators reviewing submitted leads
|
|
28
|
+
|
|
29
|
+
## 4. User Flows
|
|
30
|
+
|
|
31
|
+
- Visitor -> understand offer -> compare benefits -> submit lead form
|
|
32
|
+
- Visitor -> FAQ/social proof -> final CTA
|
|
33
|
+
|
|
34
|
+
## 5. Page List
|
|
35
|
+
|
|
36
|
+
- Single landing page with Hero, Problem, Solution, Benefits, Social Proof, Process, Offer, FAQ, Final CTA, Lead Form
|
|
37
|
+
|
|
38
|
+
## 6. Feature List
|
|
39
|
+
|
|
40
|
+
- responsive design
|
|
41
|
+
- CTA buttons
|
|
42
|
+
- lead form
|
|
43
|
+
- conversion-oriented copy
|
|
44
|
+
- SEO metadata
|
|
45
|
+
- fast loading
|
|
46
|
+
- analytics-ready structure
|
|
47
|
+
|
|
48
|
+
## 7. Data Model Draft
|
|
49
|
+
|
|
50
|
+
- Lead: name, emailOrPhone, source, message, consent, createdAt
|
|
51
|
+
- Offer: headline, benefits, proof, CTA
|
|
52
|
+
|
|
53
|
+
## 8. MVP Scope
|
|
54
|
+
|
|
55
|
+
- Implement all pages, flows, and features listed above.
|
|
56
|
+
- Include responsive behavior.
|
|
57
|
+
- Include useful empty, loading, success, and error states where applicable.
|
|
58
|
+
- Include SEO metadata where public pages exist.
|
|
59
|
+
- Include analytics-ready structure where conversion matters.
|
|
60
|
+
- Document every assumption that affects implementation.
|
|
61
|
+
|
|
62
|
+
## 9. Out of Scope
|
|
63
|
+
|
|
64
|
+
- LLM API integration unless explicitly requested
|
|
65
|
+
- complex infrastructure
|
|
66
|
+
- unrequested authentication
|
|
67
|
+
- unrequested payments
|
|
68
|
+
- native mobile apps
|
|
69
|
+
|
|
70
|
+
## 10. Non-Functional Requirements
|
|
71
|
+
|
|
72
|
+
- Mobile-first where users are likely to arrive from search or ads.
|
|
73
|
+
- Accessible semantic HTML.
|
|
74
|
+
- Fast initial load for public pages.
|
|
75
|
+
- Safe form validation and clear error messages.
|
|
76
|
+
- Maintainable TypeScript structure.
|
|
77
|
+
- No unnecessary distributed systems.
|
|
78
|
+
|
|
79
|
+
## 11. Tech Stack
|
|
80
|
+
|
|
81
|
+
No stack hints were provided. Use the default practical web stack unless the user later changes it.
|
|
82
|
+
|
|
83
|
+
See `STACK_POLICY.md` for defaults and forbidden-by-default technology.
|
|
84
|
+
|
|
85
|
+
## 12. Risks
|
|
86
|
+
|
|
87
|
+
- Vague source requirements can cause wrong vertical assumptions.
|
|
88
|
+
- Placeholder copy can look real if not reviewed.
|
|
89
|
+
- Missing production credentials can block deployment.
|
|
90
|
+
- AI agents may reduce scope unless `GASLIGHTING.md` is enforced.
|
|
91
|
+
|
|
92
|
+
## 13. Missing Information
|
|
93
|
+
|
|
94
|
+
See `MISSING_INFO.md`.
|
|
95
|
+
|
|
96
|
+
## 14. Success Criteria
|
|
97
|
+
|
|
98
|
+
- The project purpose is visible in the implemented product.
|
|
99
|
+
- The core pages and features are implemented, not merely described.
|
|
100
|
+
- No required scope is replaced by representative examples.
|
|
101
|
+
- No TODO is used as a substitute for implementation.
|
|
102
|
+
- Assumptions and decisions remain documented.
|
|
103
|
+
- The output can actually be used for the MVP purpose.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# STACK_POLICY.md
|
|
2
|
+
|
|
3
|
+
## Detected Stack Hints
|
|
4
|
+
|
|
5
|
+
- No stack hints detected.
|
|
6
|
+
|
|
7
|
+
If detected stack hints conflict with the project purpose, the project purpose wins.
|
|
8
|
+
|
|
9
|
+
## Default Web Stack
|
|
10
|
+
|
|
11
|
+
- Framework: Next.js latest stable version
|
|
12
|
+
- Language: TypeScript
|
|
13
|
+
- Styling: Tailwind CSS
|
|
14
|
+
- UI: shadcn/ui
|
|
15
|
+
- Database: PostgreSQL
|
|
16
|
+
- DB Provider: NeonDB first, Supabase alternative
|
|
17
|
+
- Hosting: Vercel
|
|
18
|
+
- File Storage: Vercel Blob or Cloudflare R2
|
|
19
|
+
- Analytics: GA4 + Google Tag Manager
|
|
20
|
+
- Email: Resend or equivalent
|
|
21
|
+
- ORM: Prisma or Drizzle
|
|
22
|
+
|
|
23
|
+
## Stack Selection Rules
|
|
24
|
+
|
|
25
|
+
### Choose NeonDB when
|
|
26
|
+
|
|
27
|
+
- The project needs PostgreSQL.
|
|
28
|
+
- The project is deployed on Vercel.
|
|
29
|
+
- Serverless-friendly PostgreSQL is useful.
|
|
30
|
+
- A clean MVP database is enough.
|
|
31
|
+
|
|
32
|
+
### Choose Supabase when
|
|
33
|
+
|
|
34
|
+
- Auth, DB, and storage should be bundled.
|
|
35
|
+
- Admin/user accounts are likely.
|
|
36
|
+
- The project benefits from Supabase dashboard operations.
|
|
37
|
+
- Storage and database need to live together.
|
|
38
|
+
|
|
39
|
+
### Choose Vercel Blob when
|
|
40
|
+
|
|
41
|
+
- The project is Vercel-centered.
|
|
42
|
+
- File uploads are simple.
|
|
43
|
+
- Operational simplicity matters.
|
|
44
|
+
|
|
45
|
+
### Choose Cloudflare R2 when
|
|
46
|
+
|
|
47
|
+
- Storage volume may grow.
|
|
48
|
+
- CDN/cost strategy matters.
|
|
49
|
+
- Cloudflare DNS/cache is already part of the plan.
|
|
50
|
+
|
|
51
|
+
## Forbidden by Default
|
|
52
|
+
|
|
53
|
+
Do not introduce the following unless explicitly required:
|
|
54
|
+
|
|
55
|
+
- Kubernetes
|
|
56
|
+
- Kafka
|
|
57
|
+
- RabbitMQ
|
|
58
|
+
- Microservices
|
|
59
|
+
- GraphQL Federation
|
|
60
|
+
- Redis Cluster
|
|
61
|
+
- Terraform-heavy infrastructure
|
|
62
|
+
- Event sourcing
|
|
63
|
+
- Multi-region deployment
|
|
64
|
+
- Complex distributed systems
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gaslighting-engine",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "LUDGI Gaslighting-engine: a hardcore project-discipline generator for AI coding agents.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"gaslighting-engine": "dist/index.js",
|
|
9
|
+
"gaslighting": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"docs",
|
|
14
|
+
"examples",
|
|
15
|
+
".codex",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"start": "node dist/index.js",
|
|
22
|
+
"dev": "tsx src/index.ts",
|
|
23
|
+
"test": "npm run build && node dist/index.js doctor --path examples/hospital-homepage"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"commander": "^14.0.2"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.10.1",
|
|
30
|
+
"tsx": "^4.20.6",
|
|
31
|
+
"typescript": "^5.9.3"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=20"
|
|
35
|
+
},
|
|
36
|
+
"packageManager": "pnpm@10.22.0"
|
|
37
|
+
}
|