codingwithagent 1.1.0 → 1.1.1

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +28 -21
  2. package/LICENSE +21 -21
  3. package/README.md +131 -112
  4. package/bin/init.js +257 -257
  5. package/package.json +56 -56
  6. package/templates/accessibility/.cursorrules +342 -342
  7. package/templates/accessibility/README.md +47 -47
  8. package/templates/antigravity/accessibility/.agent/rules/accessibility.md +501 -501
  9. package/templates/antigravity/accessibility/.agent/rules/aria-patterns.md +568 -568
  10. package/templates/antigravity/accessibility/.agent/rules/wcag-standard.md +225 -225
  11. package/templates/antigravity/accessibility/README.md +42 -42
  12. package/templates/antigravity/minimal/.agent/rules/accessibility.md +53 -53
  13. package/templates/antigravity/minimal/.agent/rules/code-quality.md +86 -86
  14. package/templates/antigravity/minimal/.agent/rules/react-components.md +164 -164
  15. package/templates/antigravity/minimal/README.md +34 -34
  16. package/templates/antigravity/standard/.agent/rules/accessibility.md +98 -98
  17. package/templates/antigravity/standard/.agent/rules/code-quality.md +166 -166
  18. package/templates/antigravity/standard/.agent/rules/pull-request-review.md +192 -192
  19. package/templates/antigravity/standard/.agent/rules/react-components.md +204 -204
  20. package/templates/antigravity/standard/.agent/rules/testing.md +197 -197
  21. package/templates/antigravity/standard/README.md +39 -39
  22. package/templates/antigravity/strict/.agent/README.md +46 -46
  23. package/templates/antigravity/strict/.agent/rules/accessibility.md +199 -199
  24. package/templates/antigravity/strict/.agent/rules/code-quality.md +268 -268
  25. package/templates/antigravity/strict/.agent/rules/pull-request-review.md +114 -114
  26. package/templates/antigravity/strict/.agent/rules/react-components.md +423 -423
  27. package/templates/antigravity/strict/.agent/rules/security.md +483 -483
  28. package/templates/antigravity/strict/.agent/rules/testing.md +280 -280
  29. package/templates/minimal/.cursorrules +48 -48
  30. package/templates/minimal/README.md +40 -40
  31. package/templates/standard/.cursorrules +184 -184
  32. package/templates/standard/README.md +43 -43
  33. package/templates/strict/.cursorrules +227 -227
  34. package/templates/strict/README.md +47 -47
package/CHANGELOG.md CHANGED
@@ -1,21 +1,28 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [1.1.0] - 2025-12-31
6
-
7
- ### Changed
8
-
9
- - **Rebranding**: Project name updated from "Agentic Code Standards" to "**CodingWithAgent**" across all documentation, CLI outputs, and templates.
10
- - **Documentation**: Enhanced README with visual CLI examples, detailed profile descriptions, and explicit support for Cursor, Windsurf, Antigravity, and Copilot.
11
- - **CLI**: Updated initialization prompts to reflect new branding.
12
-
13
- ### Fixed
14
-
15
- - Standardized branding headers in all template files (`minimal`, `standard`, `strict`, `accessibility`).
16
-
17
- ## [1.0.0] - 2025-12-30
18
-
19
- - Initial release of CodingWithAgent.
20
- - Support for Minimal, Standard, Strict, and Accessibility profiles.
21
- - Automatic configuration for Cursor, Windsurf, and Copilot.
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [1.1.1] - 2026-01-03
6
+
7
+ ### Fixed
8
+
9
+ - **Troubleshooting**: Added documentation for `InvalidStateError` related to restricted webview environments in VS Code.
10
+ - **Ignore Rules**: Updated `.gitignore` to include `.agent`, `.cursorrules`, `.windsurfrules`, and `.github/copilot-instructions.md`.
11
+
12
+ ## [1.1.0] - 2025-12-31
13
+
14
+ ### Changed
15
+
16
+ - **Rebranding**: Project name updated from "Agentic Code Standards" to "**CodingWithAgent**" across all documentation, CLI outputs, and templates.
17
+ - **Documentation**: Enhanced README with visual CLI examples, detailed profile descriptions, and explicit support for Cursor, Windsurf, Antigravity, and Copilot.
18
+ - **CLI**: Updated initialization prompts to reflect new branding.
19
+
20
+ ### Fixed
21
+
22
+ - Standardized branding headers in all template files (`minimal`, `standard`, `strict`, `accessibility`).
23
+
24
+ ## [1.0.0] - 2025-12-30
25
+
26
+ - Initial release of CodingWithAgent.
27
+ - Support for Minimal, Standard, Strict, and Accessibility profiles.
28
+ - Automatic configuration for Cursor, Windsurf, and Copilot.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Nitish Kafle
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Nitish Kafle
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 CHANGED
@@ -1,112 +1,131 @@
1
- # 🤖 CodingWithAgent
2
-
3
- **Production-ready coding standards and best practices for AI coding agents.**
4
-
5
- [![npm version](https://img.shields.io/npm/v/codingwithagent.svg)](https://www.npmjs.com/package/codingwithagent)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
-
8
- Stop fighting with inconsistent AI code output. Get enterprise-grade standards that work across **all major AI coding tools**—Cursor, Windsurf, Google Antigravity, GitHub Copilot, and more.
9
-
10
- Turn your AI assistant into a senior engineer that knows your team's rules.
11
-
12
- ---
13
-
14
- ## 🚀 Quick Start
15
-
16
- Initialize standardized rules in your project with a single command. **No installation required.**
17
-
18
- ```bash
19
- npx codingwithagent init
20
- ```
21
-
22
- The interactive CLI will guide you through the setup:
23
-
24
- ```
25
- 🤖 CodingWithAgent
26
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27
- Production-ready standards for AI coding agents
28
-
29
- 📋 Choose your profile:
30
-
31
- 1. Minimal Essential rules only (great for getting started)
32
- 2. Standard Recommended baseline ⭐ (most popular)
33
- 3. Strict All rules enforced (maximum code quality)
34
- 4. Accessibility WCAG 2.1+ focused (a11y priority)
35
-
36
- Enter number (1-4) [default: 2]: 2
37
-
38
- 🛠️ Select your AI coding tool:
39
-
40
- 1. Cursor (.cursorrules)
41
- 2. Windsurf (.windsurfrules)
42
- 3. Antigravity (.agent/rules/)
43
- 4. GitHub Copilot (.github/copilot-instructions.md)
44
- 5. Universal Works with most tools
45
-
46
- Enter number (1-5) [default: 5]: 1
47
-
48
- ⚙️ Installing...
49
-
50
- Created .cursorrules with standard profile
51
- 🎉 Setup complete!
52
- ```
53
-
54
- ## 📦 Profiles
55
-
56
- Choose the level of enforcement that fits your project maturity.
57
-
58
- | Profile | Description | Best For |
59
- | :------------------- | :---------------------------------------------------------------------------------------- | :------------------------------------------- |
60
- | **1. Minimal** | Essential rules only. Focuses on readability and basic modern patterns. | Prototyping, Hackathons, Personal Projects |
61
- | **2. Standard** ⭐ | **Recommended.** Balanced set of best practices for React, Testing, and Security. | Most Production Applications |
62
- | **3. Strict** | Maximum enforcement. TypeScript required, 90% test coverage, strict accessible standards. | Enterprise, Fintech, Healthcare, Large Teams |
63
- | **4. Accessibility** | Heavy focus on WCAG 2.1 AA compliance, accessible patterns, and ARIA usage. | Government, Public Sector, Inclusive Apps |
64
-
65
- ## 🛠️ Supported Agents
66
-
67
- We standardize instructions across the entire AI ecosystem.
68
-
69
- ### 1. Cursor (`.cursorrules`)
70
-
71
- Generates a comprehensive system prompt file in your project root. Cursor reads this to understand your tech stack, testing requirements, and styling preferences before it writes a single line of code.
72
-
73
- ### 2. Windsurf (`.windsurfrules`)
74
-
75
- Creates a rule file compatible with the Windsurf editor, ensuring your Cascade flows follow your engineering standards.
76
-
77
- ### 3. Google Antigravity (`.agent/rules/`)
78
-
79
- Installs a modular rule set in the `.agent` directory. Antigravity acts as a "Universal" agent and can ingest these specific markdown files (e.g., `accessibility.md`, `testing.md`) to contextually apply rules based on the user's task.
80
-
81
- ### 4. GitHub Copilot (`.github/copilot-instructions.md`)
82
-
83
- Sets up project-specific instructions for GitHub Copilot Chat. This ensures Copilot suggests code that aligns with your specific architectural patterns.
84
-
85
- ### 5. Universal
86
-
87
- A general-format rules file that works with most LLM-based tools that verify context files.
88
-
89
- ## 🎯 What's Included?
90
-
91
- Depending on the profile, your rules will cover:
92
-
93
- - **⚡ Tech Stack**: React, TypeScript, Node.js, Next.js patterns.
94
- - **♿ Accessibility**: WCAG 2.1 AA+ compliance, correct ARIA usage, semantic HTML.
95
- - **🧪 Testing**: Unit (Jest/Vitest), Integration, and E2E testing standards.
96
- - **🔒 Security**: Input validation, output sanitization, secret management (OpenSSF aligned).
97
- - **🧠 Anti-Hallucinations**: Instructions to prevent AI from inventing libraries or APIs.
98
- - **📁 File Structure**: component/container architecture, proper folder organization.
99
-
100
- ## 🤝 Contributing
101
-
102
- We welcome community contributions to improve these standards!
103
-
104
- 1. Fork the repository.
105
- 2. Add your improvements to the `templates` directory.
106
- 3. Submit a Pull Request.
107
-
108
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
109
-
110
- ## 📄 License
111
-
112
- This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
1
+ # 🤖 CodingWithAgent
2
+
3
+ **Production-ready coding standards and best practices for AI coding agents.**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/codingwithagent.svg)](https://www.npmjs.com/package/codingwithagent)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ Stop fighting with inconsistent AI code output. Get enterprise-grade standards that work across **all major AI coding tools**—Cursor, Windsurf, Google Antigravity, GitHub Copilot, and more.
9
+
10
+ Turn your AI assistant into a senior engineer that knows your team's rules.
11
+
12
+ ---
13
+
14
+ ## 🚀 Quick Start
15
+
16
+ Initialize standardized rules in your project with a single command. **No installation required.**
17
+
18
+ ### Using bash
19
+
20
+ ```bash
21
+ npx codingwithagent init
22
+ ```
23
+
24
+ ### Using yarn
25
+
26
+ ```bash
27
+ yarn dlx codingwithagent init
28
+ ```
29
+
30
+ The interactive CLI will guide you through the setup:
31
+
32
+ ```
33
+ 🤖 CodingWithAgent
34
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
35
+ Production-ready standards for AI coding agents
36
+
37
+ 📋 Choose your profile:
38
+
39
+ 1. Minimal Essential rules only (great for getting started)
40
+ 2. Standard Recommended baseline ⭐ (most popular)
41
+ 3. Strict All rules enforced (maximum code quality)
42
+ 4. Accessibility WCAG 2.1+ focused (a11y priority)
43
+
44
+ Enter number (1-4) [default: 2]: 2
45
+
46
+ 🛠️ Select your AI coding tool:
47
+
48
+ 1. Cursor (.cursorrules)
49
+ 2. Windsurf (.windsurfrules)
50
+ 3. Antigravity (.agent/rules/)
51
+ 4. GitHub Copilot (.github/copilot-instructions.md)
52
+ 5. Universal Works with most tools ⭐
53
+
54
+ Enter number (1-5) [default: 5]: 1
55
+
56
+ ⚙️ Installing...
57
+
58
+ Created .cursorrules with standard profile
59
+ 🎉 Setup complete!
60
+ ```
61
+
62
+ ## 📦 Profiles
63
+
64
+ Choose the level of enforcement that fits your project maturity.
65
+
66
+ | Profile | Description | Best For |
67
+ | :------------------- | :---------------------------------------------------------------------------------------- | :------------------------------------------- |
68
+ | **1. Minimal** | Essential rules only. Focuses on readability and basic modern patterns. | Prototyping, Hackathons, Personal Projects |
69
+ | **2. Standard** ⭐ | **Recommended.** Balanced set of best practices for React, Testing, and Security. | Most Production Applications |
70
+ | **3. Strict** | Maximum enforcement. TypeScript required, 90% test coverage, strict accessible standards. | Enterprise, Fintech, Healthcare, Large Teams |
71
+ | **4. Accessibility** | Heavy focus on WCAG 2.1 AA compliance, accessible patterns, and ARIA usage. | Government, Public Sector, Inclusive Apps |
72
+
73
+ ## 🛠️ Supported Agents
74
+
75
+ We standardize instructions across the entire AI ecosystem.
76
+
77
+ ### 1. Cursor (`.cursorrules`)
78
+
79
+ Generates a comprehensive system prompt file in your project root. Cursor reads this to understand your tech stack, testing requirements, and styling preferences before it writes a single line of code.
80
+
81
+ ### 2. Windsurf (`.windsurfrules`)
82
+
83
+ Creates a rule file compatible with the Windsurf editor, ensuring your Cascade flows follow your engineering standards.
84
+
85
+ ### 3. Google Antigravity (`.agent/rules/`)
86
+
87
+ Installs a modular rule set in the `.agent` directory. Antigravity acts as a "Universal" agent and can ingest these specific markdown files (e.g., `accessibility.md`, `testing.md`) to contextually apply rules based on the user's task.
88
+
89
+ ### 4. GitHub Copilot (`.github/copilot-instructions.md`)
90
+
91
+ Sets up project-specific instructions for GitHub Copilot Chat. This ensures Copilot suggests code that aligns with your specific architectural patterns.
92
+
93
+ ### 5. Universal
94
+
95
+ A general-format rules file that works with most LLM-based tools that verify context files.
96
+
97
+ ## 🎯 What's Included?
98
+
99
+ Depending on the profile, your rules will cover:
100
+
101
+ - **⚡ Tech Stack**: React, TypeScript, Node.js, Next.js patterns.
102
+ - **♿ Accessibility**: WCAG 2.1 AA+ compliance, correct ARIA usage, semantic HTML.
103
+ - **🧪 Testing**: Unit (Jest/Vitest), Integration, and E2E testing standards.
104
+ - **🔒 Security**: Input validation, output sanitization, secret management (OpenSSF aligned).
105
+ - **🧠 Anti-Hallucinations**: Instructions to prevent AI from inventing libraries or APIs.
106
+ - **📁 File Structure**: component/container architecture, proper folder organization.
107
+
108
+ ## Troubleshooting
109
+
110
+ ### Error: "InvalidStateError: Failed to register a ServiceWorker"
111
+
112
+ If you encounter this error when opening the generated rule files in your editor (especially VS Code or strict environments), it is a known issue with the editor's Markdown previewer in restricted modes.
113
+
114
+ **Solution:**
115
+ 1. Right-click the file in your explorer.
116
+ 2. Select **"Open With..."** -> **"Text Editor"** (or similar).
117
+ 3. The file content is safe standard Markdown. The error is purely a visual bug in the previewer.
118
+
119
+ ## 🤝 Contributing
120
+
121
+ We welcome community contributions to improve these standards!
122
+
123
+ 1. Fork the repository.
124
+ 2. Add your improvements to the `templates` directory.
125
+ 3. Submit a Pull Request.
126
+
127
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
128
+
129
+ ## 📄 License
130
+
131
+ This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.