waitsec 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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "waitsec",
3
+ "displayName": "waitsec",
4
+ "description": "Practical guardrails for AI coding agents. Hold on, think first, code less.",
5
+ "version": "0.1.0"
6
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 waitsec contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # waitsec
2
+
3
+ > **Hold on. Think first. Code less.**
4
+
5
+ `waitsec` gives your AI coding agent practical guardrails. It prevents AI from writing hundreds of unneeded lines, inventing imaginary requirements, or over-complicating simple tasks.
6
+
7
+ ---
8
+
9
+ ## Why waitsec?
10
+
11
+ Most AI coding assistants do not fail because they lack knowledge. They fail because they move too fast and assume too much:
12
+
13
+ 1. **They code before asking.** You ask for a photo upload feature, and the AI starts writing database migrations, thumbnail generators, and cloud bucket scripts before even asking where files should be stored.
14
+ 2. **They over-engineer.** You ask for a simple login check, and the AI creates twelve new files with DTOs, factories, and repository interfaces.
15
+ 3. **They touch too many files.** You ask to fix button alignment, and the AI reformats your router, updates project dependencies, and rewrites global styles.
16
+ 4. **They guess when errors happen.** A test fails on one line, and the AI changes five unrelated files hoping something sticks.
17
+
18
+ `waitsec` acts as a brake: pause, verify, keep the change small, and fix the root problem.
19
+
20
+ ---
21
+
22
+ ## The 4 Core Guardrails
23
+
24
+ ### 1. `ask-first`
25
+ If the prompt is missing essential decisions (schemas, storage locations, permissions), the AI must pause and ask 1 to 3 direct questions instead of guessing.
26
+
27
+ ### 2. `anti-overengineering`
28
+ The AI must use existing patterns in your codebase and pick the simplest working solution. No speculative abstractions for hypothetical future needs.
29
+
30
+ ### 3. `small-diff`
31
+ Modifications stay strictly scoped to what solves the prompt. No cleaning up surrounding files, no global formatting passes, and no unnecessary dependency changes.
32
+
33
+ ### 4. `debug-first`
34
+ When something breaks, the AI must read the complete error message and stack trace. Never guess fixes or hide errors behind empty try/catch blocks.
35
+
36
+ ---
37
+
38
+ ## Quick Install
39
+
40
+ ### 1. In Any Project (Recommended)
41
+ Run this in your project terminal:
42
+
43
+ ```bash
44
+ npx waitsec
45
+ ```
46
+
47
+ Pick your editor (Kilo Code, Cline, Cursor, or Antigravity), and the installer places the rules file directly in your workspace.
48
+
49
+ ### 2. Kilo Code or Cline (VS Code)
50
+ Copy [rules/waitsec.md](rules/waitsec.md) to your project root as `.kilorules` (or `.clinerules`):
51
+
52
+ ```bash
53
+ curl -o .kilorules https://raw.githubusercontent.com/your-username/waitsec/main/rules/waitsec.md
54
+ ```
55
+
56
+ You can also paste the contents of `rules/waitsec.md` into the **Custom Instructions** field in your Kilo Code extension settings.
57
+
58
+ ### 3. Google Antigravity
59
+ Install the plugin using the Antigravity CLI:
60
+
61
+ ```bash
62
+ agy plugin install https://github.com/your-username/waitsec
63
+ ```
64
+
65
+ ### 4. Claude Code
66
+ Add the marketplace and install:
67
+
68
+ ```text
69
+ /plugin marketplace add https://github.com/your-username/waitsec
70
+ /plugin install waitsec@waitsec
71
+ ```
72
+
73
+ ### 5. Cursor
74
+ Copy [rules/waitsec.md](rules/waitsec.md) to `.cursorrules` in your project root, or add this repository as a plugin under `.cursor-plugin/`.
75
+
76
+ ### 6. Laravel / PHP (Composer)
77
+ Install into your project development dependencies:
78
+
79
+ ```bash
80
+ composer require --dev waitsec/waitsec
81
+ ```
82
+
83
+ The post-install script automatically adds `.kilorules` to your root directory.
84
+
85
+ ---
86
+
87
+ ## Structure
88
+
89
+ ```text
90
+ waitsec/
91
+ ├── skills/
92
+ │ ├── ask-first/ # Clarify ambiguous requirements first
93
+ │ │ └── SKILL.md
94
+ │ ├── anti-overengineering/ # Stop bloat and unnecessary abstractions
95
+ │ │ └── SKILL.md
96
+ │ ├── small-diff/ # Keep changes surgical and small
97
+ │ │ └── SKILL.md
98
+ │ └── debug-first/ # Trace real root causes before editing
99
+ │ └── SKILL.md
100
+ ├── rules/
101
+ │ ├── AGENTS.md # Universal rule pointer
102
+ │ └── waitsec.md # All-in-one bundled rules
103
+ ├── bin/
104
+ │ └── cli.js # Interactive terminal installer
105
+ ├── plugin.json # Antigravity plugin manifest
106
+ ├── package.json # npm / npx manifest
107
+ └── composer.json # Composer / Laravel manifest
108
+ ```
109
+
110
+ ---
111
+
112
+ ## License
113
+
114
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const readline = require('readline');
6
+
7
+ const rl = readline.createInterface({
8
+ input: process.stdin,
9
+ output: process.stdout
10
+ });
11
+
12
+ const sourceRulePath = path.join(__dirname, '..', 'rules', 'waitsec.md');
13
+
14
+ console.log(`
15
+ =========================================
16
+ waitsec: AI Coding Guardrails Installer
17
+ "Hold on. Think first. Code less."
18
+ =========================================
19
+ `);
20
+
21
+ console.log('Select your editor / coding agent:\n');
22
+ console.log(' 1) Kilo Code (.kilorules)');
23
+ console.log(' 2) Cline / Roo Code (.clinerules)');
24
+ console.log(' 3) Cursor (.cursorrules)');
25
+ console.log(' 4) Antigravity / Universal (AGENTS.md)');
26
+ console.log(' 5) All of the above\n');
27
+
28
+ rl.question('Enter number [1-5] (default: 1): ', (answer) => {
29
+ const choice = (answer || '1').trim();
30
+ const cwd = process.cwd();
31
+
32
+ if (!fs.existsSync(sourceRulePath)) {
33
+ console.error(`Error: Rule template not found at ${sourceRulePath}`);
34
+ rl.close();
35
+ process.exit(1);
36
+ }
37
+
38
+ const ruleContent = fs.readFileSync(sourceRulePath, 'utf8');
39
+
40
+ const targets = [];
41
+ if (choice === '1') targets.push('.kilorules');
42
+ else if (choice === '2') targets.push('.clinerules');
43
+ else if (choice === '3') targets.push('.cursorrules');
44
+ else if (choice === '4') targets.push('AGENTS.md');
45
+ else if (choice === '5') targets.push('.kilorules', '.clinerules', '.cursorrules', 'AGENTS.md');
46
+ else {
47
+ console.log('Unknown choice, defaulting to .kilorules');
48
+ targets.push('.kilorules');
49
+ }
50
+
51
+ targets.forEach((filename) => {
52
+ const destPath = path.join(cwd, filename);
53
+ if (fs.existsSync(destPath)) {
54
+ console.log(`[!] ${filename} already exists. Appending waitsec rules...`);
55
+ fs.appendFileSync(destPath, `\n\n${ruleContent}`);
56
+ } else {
57
+ fs.writeFileSync(destPath, ruleContent, 'utf8');
58
+ console.log(`[+] Created ${filename}`);
59
+ }
60
+ });
61
+
62
+ console.log('\nSuccess! waitsec rules are now active in this project.');
63
+ console.log('Your AI assistant will now pause, check requirements, and avoid bloated code.\n');
64
+
65
+ rl.close();
66
+ });
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "waitsec",
3
+ "version": "0.1.0",
4
+ "description": "Practical guardrails for AI coding agents. Hold on, think first, code less.",
5
+ "main": "rules/waitsec.md",
6
+ "bin": {
7
+ "waitsec": "./bin/cli.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node ./bin/cli.js"
11
+ },
12
+ "keywords": [
13
+ "ai",
14
+ "coding-agent",
15
+ "guardrails",
16
+ "anti-slop",
17
+ "cursor",
18
+ "cline",
19
+ "kilo-code",
20
+ "antigravity",
21
+ "claude-code",
22
+ "developer-tools"
23
+ ],
24
+ "author": "",
25
+ "license": "MIT",
26
+ "files": [
27
+ "bin/",
28
+ "rules/",
29
+ "skills/",
30
+ ".cursor-plugin/",
31
+ "plugin.json",
32
+ "README.md",
33
+ "LICENSE"
34
+ ]
35
+ }
package/plugin.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "waitsec",
3
+ "description": "Practical guardrails for AI coding agents. Hold on, think first, code less.",
4
+ "version": "0.1.0"
5
+ }
@@ -0,0 +1,8 @@
1
+ # waitsec
2
+
3
+ Wait a second before coding. Follow these four core guardrails:
4
+
5
+ 1. **Ask First**: If requirements or key parameters are missing, ask the user before writing code. Do not invent requirements.
6
+ 2. **Anti-Overengineering**: Prefer simple solutions over complex abstractions. Use patterns already in the codebase.
7
+ 3. **Small Diff**: Modify only the lines and files strictly required to solve the task. Do not touch unrelated code.
8
+ 4. **Debug First**: Inspect error logs and find the root cause before editing code. Never guess.
@@ -0,0 +1,26 @@
1
+ # waitsec: AI Coding Guardrails
2
+
3
+ You follow the waitsec discipline: hold on, think first, and keep changes minimal.
4
+
5
+ ## 1. Ask First (Clarify Ambiguity)
6
+ - Before writing code, check whether the request is clear.
7
+ - If essential choices are missing (data schemas, file locations, permissions, storage limits), pause and ask the user 1 to 3 direct questions.
8
+ - If details are minor, pick the simplest reasonable default and proceed without cluttering the chat.
9
+ - Never invent product requirements out of nowhere.
10
+
11
+ ## 2. Anti-Overengineering (Keep It Simple)
12
+ - Solve the problem at hand with the fewest new files and abstractions.
13
+ - Use existing patterns in the project. Do not introduce new design patterns (DTOs, repositories, event systems) unless explicitly requested.
14
+ - Avoid adding new packages or dependencies if existing code or standard language features can do the job.
15
+ - Do not write code for speculative future needs.
16
+
17
+ ## 3. Small Diff (Proportional Edits)
18
+ - Only modify files that directly relate to the prompt.
19
+ - Never refactor neighboring functions, reformat whitespace globally, or alter working code outside the task scope.
20
+ - Respect the existing code style, naming conventions, and file structure.
21
+
22
+ ## 4. Debug First (Root Cause Analysis)
23
+ - When an error occurs, read the complete stack trace and inspect the failing line before editing anything.
24
+ - Never guess the fix or edit files blindly.
25
+ - Do not silence errors with empty try/catch blocks or artificial fallbacks.
26
+ - Make the smallest targeted fix at the actual root cause, then verify that it resolves the issue.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: anti-overengineering
3
+ description: Stop creating unnecessary files, design patterns, abstractions, or libraries for simple tasks.
4
+ ---
5
+
6
+ # Anti-Overengineering: Build What Is Needed Today
7
+
8
+ Do not turn a 10-line fix into a 10-file enterprise architecture. Solve today's problem with the simplest working solution.
9
+
10
+ ## The Rules
11
+
12
+ 1. **Follow existing project patterns.** If the project puts logic in controllers, do not suddenly introduce CQRS or repositories unless asked.
13
+ 2. **Never build for imaginary future needs.** Do not add interfaces, adapters, or factories "just in case" someone might need them next year.
14
+ 3. **No empty abstractions.** If a class or function only wraps a single line of standard code, delete the wrapper and write the line directly.
15
+ 4. **Use built-in tools first.** Avoid installing new npm packages, pip packages, or composer packages for problems that existing project dependencies or standard libraries already solve.
16
+ 5. **Keep file count down.** Prefer modifying or extending an existing file over creating a dozen micro-files.
17
+
18
+ ## Bad vs Good
19
+
20
+ Bad:
21
+ ```text
22
+ User: "Add a basic contact form."
23
+ Agent creates:
24
+ - ContactController.php
25
+ - ContactRepositoryInterface.php
26
+ - EloquentContactRepository.php
27
+ - SendContactNotificationEvent.php
28
+ - SendContactNotificationListener.php
29
+ - ContactDTO.php
30
+ ```
31
+
32
+ Good:
33
+ ```text
34
+ Agent creates:
35
+ - ContactController.php (stores message and sends email directly or queues existing mailer)
36
+ - ContactRequest.php (input validation)
37
+ ```
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: ask-first
3
+ description: Pause before coding when requirements are unclear. Ask clarifying questions instead of guessing.
4
+ ---
5
+
6
+ # Ask First: Confirm Before You Code
7
+
8
+ Most AI coding mistakes happen because the agent starts coding before knowing what the user actually wants.
9
+
10
+ When requirements are vague, do not invent answers. Stop and ask.
11
+
12
+ ## When to Pause and Ask
13
+
14
+ Ask before writing code if:
15
+ - Key decisions are missing (e.g. file formats, storage location, size limits, user permissions).
16
+ - You are unsure whether to overwrite an existing feature or build alongside it.
17
+ - There are multiple valid approaches with significantly different trade-offs.
18
+
19
+ ## When NOT to Ask (Pick Sensible Defaults)
20
+
21
+ Do not bug the user with tiny technical trivia. Pick the simplest default and proceed if:
22
+ - The question is about basic implementation details (variable names, internal helper functions).
23
+ - The existing codebase already has a clear pattern for this.
24
+ - The choice has no impact on user experience or architecture.
25
+
26
+ ## How to Ask
27
+
28
+ - Ask 1 to 3 short, direct questions.
29
+ - Present concrete options (A or B) whenever possible.
30
+ - Briefly explain why the choice matters so the user can answer easily.
31
+ - Wait for the user's answer before creating files or running heavy generation.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: debug-first
3
+ description: Inspect error logs, stack traces, and root causes before guessing or modifying code.
4
+ ---
5
+
6
+ # Debug First: Inspect Evidence Before Touching Code
7
+
8
+ Never guess the cause of an error when real evidence is available. Do not spray random code changes hoping the error goes away.
9
+
10
+ ## The Debug Sequence
11
+
12
+ When an error happens:
13
+
14
+ 1. **Read the full error message and stack trace.** Do not just skim the first sentence. Look for the exact file path and line number where execution failed.
15
+ 2. **Inspect the failing line and surrounding context.** Check what variables were passed and why that specific line crashed.
16
+ 3. **Verify the root cause.** Understand whether this is a null value, missing dependency, syntax error, or permission issue before editing.
17
+ 4. **Make one surgical fix.** Change only what is broken.
18
+ 5. **Verify the outcome.** Run the test or reproduction command again to confirm the fix works without creating side effects.
19
+
20
+ ## Anti-Patterns to Avoid
21
+
22
+ - Do not wrap the failing code in a generic try/catch block just to silence the error without fixing the underlying problem.
23
+ - Do not edit 5 different files simultaneously when an error is reported on one line.
24
+ - Do not add random fallback defaults that hide broken states.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: small-diff
3
+ description: Keep edits small and focused. Only change the files and lines necessary to solve the prompt.
4
+ ---
5
+
6
+ # Small Diff: Keep Code Changes Proportional
7
+
8
+ Do not rewrite an entire file or touch neighboring modules when fixing a specific bug or adding a small tweak.
9
+
10
+ ## The Rules
11
+
12
+ 1. **Only touch relevant files.** If the task is fixing a button margin, do not touch routing, config files, package dependencies, or unrelated styles.
13
+ 2. **No unsolicited refactoring.** Do not reformat indentation, rename variables, or rearrange code outside the area you were asked to change.
14
+ 3. **No vanity cleanups.** Do not remove existing comments or replace working code with your preferred coding style unless the prompt asked for a refactor.
15
+ 4. **Preserve existing style.** Match the quoting style, indentations, and naming conventions of the surrounding file.
16
+
17
+ ## Why This Matters
18
+
19
+ Unnecessary edits create noisy git diffs, increase merge conflicts, and accidentally break working features. Make the smallest surgical change that gets the job done.