bigbang-skills 1.0.0 → 1.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/README.md CHANGED
@@ -1,52 +1,49 @@
1
1
  # BigBang — Pre-Project Rules Initializer
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/bigbang-skills)](https://www.npmjs.com/package/bigbang-skills)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
3
6
  Agent-agnostic skill that generates `AGENTS.md` with 23 maintainability rules before starting any project. Works with **opencode**, **Gemini**, **Cline**, **Cursor**, **Copilot**, and any AI agent that reads `AGENTS.md`.
4
7
 
5
- ## Rules Included
6
-
7
- | # | Rule | Description |
8
- |---|------|-------------|
9
- | 1 | SOLID Principles | Verifiable against SOLID before writing |
10
- | 2 | YAGNI | No code until needed |
11
- | 3 | Design Patterns | Use established patterns where they solve real problems |
12
- | 4 | File Size Limit | Max 150 lines per file |
13
- | 5 | Folder Structure | Max 3 files per directory |
14
- | 6 | Naming Conventions | kebab-case, PascalCase, camelCase, UPPER_SNAKE_CASE |
15
- | 7 | Documentation | Doc comments on all public APIs |
16
- | 8 | Shareability | No secrets, no absolute paths, no team-specific config |
17
- | 9 | Single Responsibility | One thing per function/file/module |
18
- | 10 | Conventional Commits | feat:, fix:, chore:, etc. |
19
- | 11 | Testing Standards | 80% coverage, unit + integration |
20
- | 12 | Security Rules | No secrets, input validation, audit deps |
21
- | 13 | Error Handling | Typed errors, no empty catches, structured responses |
22
- | 14 | Performance Rules | No N+1, lazy loading, bundle budgets |
23
- | 15 | Dependency Rules | Minimize deps, pin versions, prefer stdlib |
24
- | 16 | Git Workflow | Branch naming, PR size, squash merge |
25
- | 17 | Changelog & Versioning | SemVer + Keep a Changelog |
26
- | 18 | API Design | RESTful, versioned, documented |
27
- | 19 | Database Rules | Migrations, naming, parameterized queries |
28
- | 20 | Logging & Observability | Structured JSON logs, health checks |
29
- | 21 | Docker Rules | Multi-stage builds, pinned versions, non-root |
30
- | 22 | Type Safety | Strict mode, no any, explicit return types |
31
- | 23 | Code Review Checklist | Checks, reviews, tests, docs, size |
32
-
33
- Also generates: linter config, CHANGELOG.md, Dockerfile, CI workflow, .env.example, and more.
8
+ ## Features
9
+
10
+ - **Configurable presets** strict (enterprise), prototype (fast/loose), library (public package), or fully custom
11
+ - **Language-aware** — Python gets PEP 8 + mypy, Go gets gofmt, Rust gets clippy, JS/TS gets ESLint + strict TypeScript
12
+ - **23 rules** SOLID, YAGNI, design patterns, naming, testing, security, error handling, performance, deps, git, API design, database, logging, Docker, type safety, code review, and more
13
+ - **Version-stamped** generated AGENTS.md includes a BigBang version and date
14
+ - **Before/after examples** concrete snippets per rule
15
+ - **Agent-agnostic** generates AGENTS.md + agent-specific files (.cursorrules, .clinerules, etc.)
16
+
17
+ ## Rules
18
+
19
+ | # | Rule | strict | prototype | library |
20
+ |---|------|--------|-----------|---------|
21
+ | 1–9 | Architecture + Style | | | |
22
+ | 10 | Conventional Commits | | | |
23
+ | 11 | Testing (≥90% cov) | | | |
24
+ | 12–16 | Security + Process | | | |
25
+ | 17 | Changelog + SemVer | | | |
26
+ | 18 | API Design | | | |
27
+ | 19 | Database | | | |
28
+ | 20 | Logging | | | |
29
+ | 21 | Docker | | | |
30
+ | 22 | Type Safety | | | |
31
+ | 23 | Code Review | | | |
32
+
33
+ Also generates: linter config, CHANGELOG.md, bigbang.config.json, Dockerfile, CI workflow, .env.example, and more.
34
34
 
35
35
  ## Installation
36
36
 
37
37
  ```bash
38
- # via npm (recommended)
39
- npx bigbang-skills
40
-
41
- # or manually — clone the repo and symlink/copy to your skills directory
42
- git clone https://github.com/luckyman147/BigBang.git
38
+ npm install bigbang-skills
43
39
  ```
44
40
 
45
- ### For opencode
46
- Copy the `bigbang` folder to `~/.claude/skills/` or `$env:USERPROFILE\.claude\skills\`.
41
+ Or clone the repo and copy to your skills directory:
47
42
 
48
- ### For other agents
49
- Run the skill or manually generate `AGENTS.md` with the rules above — it's agent-agnostic.
43
+ ```bash
44
+ git clone https://github.com/luckyman147/BigBang.git
45
+ cp -r BigBang ~/.claude/skills/bigbang
46
+ ```
50
47
 
51
48
  ## Usage
52
49
 
@@ -56,7 +53,34 @@ When you start a new project, simply say:
56
53
  - "setup rules"
57
54
  - "initialize rules"
58
55
 
59
- The agent will ask about your project, then generate `AGENTS.md` + config files.
56
+ Then choose a preset (strict/prototype/library) or customize each rule. The agent generates `AGENTS.md` + config files matching your stack.
57
+
58
+ ## Presets
59
+
60
+ | Preset | File limit | Coverage | Docker/DB rules | Best for |
61
+ |--------|-----------|----------|-----------------|----------|
62
+ | **strict** | 150 lines | 90% | ✓ | Enterprise, production services |
63
+ | **prototype** | 300 lines | off | ✗ | MVPs, hackathons, experiments |
64
+ | **library** | 200 lines | 90% | ✗ | npm/PyPI/crates.io packages |
65
+
66
+ ## Customizing
67
+
68
+ Copy `configs/bigbang.config.json` to your project root and toggle any rule:
69
+
70
+ ```json
71
+ {
72
+ "rules": {
73
+ "file-size-limit": {
74
+ "enabled": true,
75
+ "maxLines": 200
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ## Topics
82
+
83
+ `ai-agents` `agent-skills` `coding-standards` `agents-md` `developer-tools` `project-initializer` `solid-principles` `yagni` `clean-code` `opencode` `cursor` `cline` `copilot`
60
84
 
61
85
  ## Author
62
86
 
package/SKILL.md CHANGED
@@ -9,6 +9,18 @@ Before writing any code for a new project, create an `AGENTS.md` file in the pro
9
9
 
10
10
  The `AGENTS.md` file is the universal standard supported by most AI coding agents. If an agent uses a different filename (e.g., `.cursorrules`, `.clinerules`), also generate that equivalent file.
11
11
 
12
+ ## Included in this package
13
+
14
+ | Path | Purpose |
15
+ |------|---------|
16
+ | `configs/bigbang.config.json` | Master config template — toggle rules, set thresholds |
17
+ | `configs/strict.json` | Enterprise preset (all rules enforced, high bar) |
18
+ | `configs/prototype.json` | Fast/loose preset (code quality only, skip process) |
19
+ | `configs/library.json` | Public package preset (API surface, docs, backward compat) |
20
+ | `configs/languages/*.json` | Language-specific rule overrides (Python, Go, Rust, JS/TS) |
21
+ | `examples/*.md` | Before/after snippets for key rules |
22
+ | `rules/*.md` | Individual rule files (contribution path) |
23
+
12
24
  ## Instructions
13
25
 
14
26
  ### Step 1: Detect the trigger
@@ -17,14 +29,44 @@ Trigger on any of:
17
29
  - "setup rules", "initialize rules", "set standards"
18
30
  - Any request that involves starting something new from scratch
19
31
 
20
- ### Step 2: Ask project context (if not already provided)
32
+ ### Step 2: Ask project context
21
33
  Ask the user:
22
34
  - What does the project do? (brief description)
23
- - What language / framework?
35
+ - What language / framework? (critical — determines language-specific rules)
24
36
  - Which AI agents will work on this project? (determines which rule files to generate)
25
37
 
26
- ### Step 3: Generate AGENTS.md (and agent-specific files if needed)
27
- Create an `AGENTS.md` file in the root of the new project. This is the universal file that opencode, Gemini, Cline, and others read.
38
+ ### Step 3: Select config preset or customize
39
+ Ask the user which preset they want, or offer to customize:
40
+
41
+ 1. **strict** (enterprise) — all 23 rules, 150-line file limit, 90% coverage, full process
42
+ 2. **prototype** (fast/loose) — essential quality rules only, relaxed limits, no process overhead
43
+ 3. **library** (public package) — API surface, docs, backward compat; skip infra/deploy rules
44
+ 4. **custom** — hand-pick each rule
45
+
46
+ The presets are at `configs/{preset}.json`. For custom, load `configs/bigbang.config.json` and toggle rules interactively.
47
+
48
+ ### Step 4: Load language-specific rules
49
+ Based on the language/framework detected in Step 2, load the corresponding config from `configs/languages/{language}.json`. This overrides generic rules with stack-appropriate ones:
50
+
51
+ - **JavaScript/TypeScript** — ESLint + Prettier, strict TypeScript, vitest/jest
52
+ - **Python** — Ruff, mypy/pyright, pytest, PEP 8 naming
53
+ - **Go** — gofmt/gofumpt, golangci-lint, go test, idiomatic Go naming
54
+ - **Rust** — rustfmt, clippy, cargo-test, built-in type safety
55
+ - **Unknown** — fall back to generic rules + EditorConfig
56
+
57
+ Adjust rules per language:
58
+ - Python gets `snake_case` naming, type hints via mypy, `pyproject.toml` linting
59
+ - Go skips generic "type safety" prose (compiler handles it), uses `gofmt`
60
+ - Rust skips "type safety" and "dependency audit" (Cargo handles it), uses `cargo clippy`
61
+
62
+ ### Step 5: Generate AGENTS.md (and agent-specific files)
63
+ Create an `AGENTS.md` file with a version stamp header:
64
+
65
+ ```markdown
66
+ <!-- Generated by BigBang v1.1.0 on 2026-07-26 -->
67
+ ```
68
+
69
+ Then include only the rules that are enabled in the selected config. Use language-specific wording where available.
28
70
 
29
71
  If the user specifies additional agents, also create their config files:
30
72
  - Cursor → also create `.cursorrules`
@@ -32,62 +74,34 @@ If the user specifies additional agents, also create their config files:
32
74
  - Copilot → also create `.github/copilot-instructions.md`
33
75
  - Windsurf → also create `.windsurfrules`
34
76
 
35
- All files contain the same rules (adapted to each format if needed). Write in plain markdown — no XML/angle brackets.
36
-
37
- #### Required sections:
38
-
39
- 1. **SOLID Principles** — Each new class/function must be verifiable against SOLID before being written.
40
- 2. **YAGNI** — Do not add code, abstractions, or dependencies until they are actually needed.
41
- 3. **Design Patterns** — Use established design patterns (Factory, Strategy, Observer, etc.) where they solve a real problem, never for their own sake.
42
- 4. **File Size Limit** — Every file must stay under 150 lines. If a file exceeds 120 lines during development, refactor before continuing.
43
- 5. **Folder Structure** — Maximum 3 files per directory. If a directory would have a 4th file, create a subdirectory with a cohesive name.
44
- 6. **Naming Conventions** — Enforce consistent naming across the project:
45
- - Files: `kebab-case` for config/docs, `PascalCase` for components/classes, `camelCase` for utilities
46
- - Folders: `kebab-case`
47
- - Variables/Functions: `camelCase`
48
- - Classes/Components: `PascalCase`
49
- - Constants: `UPPER_SNAKE_CASE`
50
- - Booleans: prefix with `is`, `has`, `should`, `can`
51
- 7. **Documentation** — Every public function, class, and module must have a doc comment explaining what it does, its parameters, and its return value.
52
- 8. **Shareability** — No hardcoded secrets, no absolute paths, no team-specific config. All configuration must be environment-based or in `.env.example`.
53
- 9. **Single Responsibility** — A function does one thing. A file has one primary export. A module covers one domain.
54
- 10. **Conventional Commits** — All commits must follow the Conventional Commits format:
55
- - `feat:` new feature
56
- - `fix:` bug fix
57
- - `chore:` maintenance
58
- - `refactor:` code change with no behavior change
59
- - `docs:` documentation only
60
- - `test:` adding/fixing tests
61
- - `style:` formatting, linting
62
- - `perf:` performance improvement
63
- - Use scope when relevant: `feat(api):`, `fix(auth):`
64
- 11. **Testing Standards** — Every feature must have tests:
65
- - Unit tests for all pure functions and utilities
66
- - Integration tests for API endpoints and data flows
67
- - Test files mirror source structure under `tests/`
68
- - Coverage threshold: minimum 80%
69
- - Test naming: `describe('feature')` / `it('should ...')` pattern
70
- - No test without an assertion
71
- 12. **Security Rules** — No secrets in code. No hardcoded tokens, passwords, or API keys — always use environment variables. Validate all user input. Sanitize all output. Run `npm audit` (or equivalent) before shipping. No `eval()` or dynamic code execution.
72
- 13. **Error Handling** — Every fallible operation must handle errors explicitly:
73
- - No empty `catch` blocks
74
- - Use typed errors / custom error classes
75
- - Log errors with context (never log secrets)
76
- - Return structured error responses in APIs
77
- - Fail fast for programmer errors; handle gracefully for runtime errors
78
- 14. **Performance Rules** — Avoid N+1 queries (use batching/eager loading). No expensive computations in hot paths. Lazy-load heavy modules. Set bundle size budgets for frontend projects. Profile before optimizing.
79
- 15. **Dependency Rules** — Minimize external dependencies (every dep is a risk). Pin major versions. Audit dependencies regularly (`npm audit`, `go mod verify`, etc.). Prefer built-in / standard library solutions over npm packages. Remove unused deps.
80
- 16. **Git Workflow Rules** — Branch naming: `feat/description`, `fix/description`, `chore/description`. Keep PRs under 300 lines. Squash merge to main. No direct pushes to main branch. Keep commits atomic (one concern per commit). Rebase instead of merge for feature branches.
81
- 17. **Changelog & Versioning** — Maintain a `CHANGELOG.md` following Keep a Changelog format. Use Strict SemVer (MAJOR.MINOR.PATCH). Every release must bump the version and update the changelog. Breaking changes = MAJOR bump. New features = MINOR bump. Bug fixes = PATCH bump.
82
- 18. **API Design Rules** — RESTful URL conventions (plural nouns, `/api/v1/` prefix). Consistent error response shape `{ error: string, code: number }`. Pagination with `?page&limit` or cursor-based. Version your APIs (URL or header). Document all endpoints (OpenAPI/Swagger). No breaking changes without a deprecation cycle.
83
- 19. **Database Rules** — Use migrations for all schema changes (never raw SQL in code). Table names: `snake_case`, plural. Column names: `snake_case`. Always have `id` (PK), `created_at`, `updated_at` on every table. Index foreign keys and frequent query columns. Never use `SELECT *`. Use parameterized queries only (no raw string interpolation).
84
- 20. **Logging & Observability** — Use structured logging (JSON format). Define log levels: DEBUG, INFO, WARN, ERROR, FATAL. Always include `request_id` and `correlation_id` in request-scoped logs. No `console.log` in production. Add health check endpoints (`/health`, `/ready`). Expose Prometheus metrics for key operations.
85
- 21. **Docker Rules** — Use multi-stage builds to minimize image size. Pin base image versions (no `:latest`). Add `.dockerignore` (exclude `node_modules`, `.git`, etc.). Keep one process per container. Use non-root user. Scan images for vulnerabilities before shipping.
86
- 22. **Type Safety Rules** — Enable strict mode in TypeScript (or equivalent). No `any` types. No type assertions (`as`) unless unavoidable. Prefer `unknown` over `any`. All function signatures must have explicit return types. Use branded types for IDs and primitives.
87
- 23. **Code Review Checklist** — Every PR must: (a) pass all checks, (b) have at least one reviewer, (c) include tests for new code, (d) update docs if API changed, (e) be rebased on latest main, (f) have no unresolved comments, (g) be under 300 lines total.
88
-
89
- ### Step 4: Generate linter / formatter config
90
- Based on the language/framework the user specified, generate the appropriate config file:
77
+ #### Available rules (enabled/disabled by config):
78
+
79
+ 1. **SOLID Principles** — Each class/function verifiable against SOLID
80
+ 2. **YAGNI** — No speculative code
81
+ 3. **Design Patterns** — Use established patterns where they solve real problems
82
+ 4. **File Size Limit** — Configurable max lines (default 150, warn at 120)
83
+ 5. **Folder Structure** — Configurable max files per directory (default 3)
84
+ 6. **Naming Conventions** — Language-aware naming
85
+ 7. **Documentation** — Doc comments on all public APIs
86
+ 8. **Shareability** — No secrets, no absolute paths, no team-specific config
87
+ 9. **Single Responsibility** One thing per function/file/module
88
+ 10. **Conventional Commits** — `feat:`, `fix:`, `chore:`, etc.
89
+ 11. **Testing Standards** — Configurable coverage threshold
90
+ 12. **Security Rules** — No secrets, input validation, audit deps
91
+ 13. **Error Handling** — Typed errors, no empty catches, structured responses
92
+ 14. **Performance Rules** No N+1, lazy loading, bundle budgets
93
+ 15. **Dependency Rules** — Minimize deps, pin versions, prefer stdlib
94
+ 16. **Git Workflow** — Branch naming, PR size, squash merge
95
+ 17. **Changelog & Versioning** — SemVer + Keep a Changelog
96
+ 18. **API Design** — RESTful, versioned, documented
97
+ 19. **Database Rules** — Migrations, naming, parameterized queries
98
+ 20. **Logging & Observability** — Structured JSON logs, health checks
99
+ 21. **Docker Rules** — Multi-stage builds, pinned versions, non-root
100
+ 22. **Type Safety** Language-aware (strict TS, mypy, etc.)
101
+ 23. **Code Review Checklist** — Checks, reviews, tests, docs, size
102
+
103
+ ### Step 6: Generate linter / formatter config
104
+ Based on the language/framework, generate the appropriate config file:
91
105
 
92
106
  | Language/Framework | Config file | Tool |
93
107
  |---|---|---|
@@ -101,22 +115,21 @@ Based on the language/framework the user specified, generate the appropriate con
101
115
 
102
116
  Place the config in the project root. Also add a `lint` section to AGENTS.md referencing the tool and its rules.
103
117
 
104
- ### Step 5: Generate supplementary config files
118
+ ### Step 7: Generate supplementary config files
105
119
  Based on the project type, generate these files where relevant:
106
120
 
107
121
  | File | When to create |
108
122
  |---|---|
109
- | `CHANGELOG.md` | Always — with Unreleased section |
123
+ | `CHANGELOG.md` | Always — with Unreleased section + version header |
110
124
  | `.dockerignore` | If Docker is used or user plans to containerize |
111
125
  | `Dockerfile` | If the project is a web service or backend |
112
- | `.github/workflows/ci.yml` | If the project is hosted on GitHub |
126
+ | `.github/workflows/ci.yml` | If the project is hosted on GitHub (include lint + test steps) |
113
127
  | `openapi.yaml` or `swagger.yaml` | If the project exposes an API |
114
128
  | `.env.example` | Always — with placeholder values |
115
129
  | `docker-compose.yml` | If the project needs local services (DB, cache, etc.) |
130
+ | `bigbang.config.json` | Always — copy from configs/ with current preset applied |
116
131
 
117
- Place each file in the project root (or `.github/workflows/` for CI). Generate minimal, correct defaults — the user can expand later.
118
-
119
- ### Step 6: Create folder skeleton (optional)
132
+ ### Step 8: Create folder skeleton (optional)
120
133
  If the user agrees, create the initial folder structure following the max-3-files-per-folder rule:
121
134
 
122
135
  ```
@@ -132,5 +145,12 @@ project-root/
132
145
 
133
146
  Each folder starts empty. New subdirectories are created as the 4th file would be needed.
134
147
 
135
- ### Step 7: Confirm and proceed
136
- Show the user a summary of everything created (AGENTS.md, agent-specific files, linter config, supplementary files) and ask if they want to adjust anything before proceeding with the project.
148
+ ### Step 9: Confirm and proceed
149
+ Show the user a summary:
150
+ - Which preset was used (strict/prototype/library/custom)
151
+ - Language detected
152
+ - How many rules enabled
153
+ - Files created (AGENTS.md, linter config, supplementary files)
154
+ - AGENTS.md version stamp
155
+
156
+ Ask if they want to adjust anything before proceeding.
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "bigbang.config.schema.json",
3
+ "version": "1.1.0",
4
+ "preset": "strict",
5
+ "language": "auto",
6
+ "rules": {
7
+ "solid-principles": true,
8
+ "yagni": true,
9
+ "design-patterns": true,
10
+ "file-size-limit": {
11
+ "enabled": true,
12
+ "maxLines": 150,
13
+ "warnAt": 120
14
+ },
15
+ "folder-structure": {
16
+ "enabled": true,
17
+ "maxFilesPerDir": 3
18
+ },
19
+ "naming-conventions": true,
20
+ "documentation": true,
21
+ "shareability": true,
22
+ "single-responsibility": true,
23
+ "conventional-commits": true,
24
+ "testing": {
25
+ "enabled": true,
26
+ "coverageThreshold": 80,
27
+ "requireUnitTests": true,
28
+ "requireIntegrationTests": false
29
+ },
30
+ "security": true,
31
+ "error-handling": true,
32
+ "performance": true,
33
+ "dependency-rules": true,
34
+ "git-workflow": {
35
+ "enabled": true,
36
+ "maxPrLines": 300,
37
+ "branchNaming": "feat|fix|chore/description"
38
+ },
39
+ "changelog": true,
40
+ "api-design": true,
41
+ "database": true,
42
+ "logging-observability": true,
43
+ "docker": false,
44
+ "type-safety": true,
45
+ "code-review": true
46
+ }
47
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "language": "go",
3
+ "label": "Go",
4
+ "formatter": "gofmt or gofumpt",
5
+ "linter": "golangci-lint",
6
+ "typeSystem": "built-in",
7
+ "naming": {
8
+ "files": "snake_case.go",
9
+ "variables": "camelCase (exported = PascalCase)",
10
+ "functions": "PascalCase for exported, camelCase for private",
11
+ "classes": "struct PascalCase",
12
+ "constants": "PascalCase (idiomatic Go)",
13
+ "booleans": "is|has|should|can prefix"
14
+ },
15
+ "testing": {
16
+ "framework": "go test + testify",
17
+ "filePattern": "*_test.go",
18
+ "coverageTool": "go test -cover"
19
+ },
20
+ "typeSafety": {
21
+ "strictMode": "built-in",
22
+ "noAny": "avoid interface{}",
23
+ "noTypeAssertions": "use type switches when possible",
24
+ "preferUnknown": "not applicable",
25
+ "explicitReturnTypes": "required by compiler"
26
+ },
27
+ "formatting": {
28
+ "gofmt": true,
29
+ "lineLength": "no explicit limit (gofmt standard)",
30
+ "tabIndent": true
31
+ },
32
+ "filterRules": ["type-safety", "docker"]
33
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "language": "javascript",
3
+ "label": "JavaScript / TypeScript",
4
+ "formatter": "prettier",
5
+ "linter": "eslint",
6
+ "typeSystem": "typescript",
7
+ "naming": {
8
+ "files": "kebab-case for config, PascalCase for components, camelCase for utilities",
9
+ "variables": "camelCase",
10
+ "functions": "camelCase",
11
+ "classes": "PascalCase",
12
+ "constants": "UPPER_SNAKE_CASE",
13
+ "booleans": "is|has|should|can prefix"
14
+ },
15
+ "testing": {
16
+ "framework": "vitest or jest",
17
+ "filePattern": "*.test.ts or *.spec.ts",
18
+ "coverageTool": "vitest --coverage or jest --coverage"
19
+ },
20
+ "typeSafety": {
21
+ "strictMode": true,
22
+ "noAny": true,
23
+ "noTypeAssertions": true,
24
+ "preferUnknown": true,
25
+ "explicitReturnTypes": true
26
+ },
27
+ "formatting": {
28
+ "semicolons": true,
29
+ "singleQuotes": true,
30
+ "trailingComma": "all",
31
+ "printWidth": 100
32
+ },
33
+ "filterRules": ["docker", "database"]
34
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "language": "python",
3
+ "label": "Python",
4
+ "formatter": "ruff format",
5
+ "linter": "ruff check",
6
+ "typeSystem": "mypy or pyright",
7
+ "naming": {
8
+ "files": "snake_case.py",
9
+ "variables": "snake_case",
10
+ "functions": "snake_case",
11
+ "classes": "PascalCase",
12
+ "constants": "UPPER_SNAKE_CASE",
13
+ "booleans": "is|has|should|can prefix"
14
+ },
15
+ "testing": {
16
+ "framework": "pytest",
17
+ "filePattern": "test_*.py or *_test.py",
18
+ "coverageTool": "pytest --cov"
19
+ },
20
+ "typeSafety": {
21
+ "strictMode": true,
22
+ "noAny": "use type hints everywhere",
23
+ "noImplicitAny": true,
24
+ "preferUnknown": "use Any only when truly untyped",
25
+ "explicitReturnTypes": "function return annotations required"
26
+ },
27
+ "formatting": {
28
+ "lineLength": 88,
29
+ "quoteStyle": "double",
30
+ "sortImports": true
31
+ },
32
+ "filterRules": ["docker", "database", "api-design"]
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "language": "rust",
3
+ "label": "Rust",
4
+ "formatter": "rustfmt",
5
+ "linter": "clippy",
6
+ "typeSystem": "built-in (strict by default)",
7
+ "naming": {
8
+ "files": "snake_case.rs",
9
+ "variables": "snake_case",
10
+ "functions": "snake_case",
11
+ "classes": "PascalCase (structs/enums)",
12
+ "constants": "SCREAMING_SNAKE_CASE",
13
+ "booleans": "is|has|should|can prefix"
14
+ },
15
+ "testing": {
16
+ "framework": "built-in #[test]",
17
+ "filePattern": "test modules inside source files or tests/",
18
+ "coverageTool": "cargo-tarpaulin or cargo-llvm-cov"
19
+ },
20
+ "typeSafety": {
21
+ "strictMode": "built-in (compiler enforces)",
22
+ "noUnsafe": "avoid unsafe blocks unless absolutely necessary",
23
+ "noAny": "not applicable (no any type)",
24
+ "preferUnknown": "not applicable",
25
+ "explicitReturnTypes": "required for all function signatures"
26
+ },
27
+ "formatting": {
28
+ "maxWidth": 100,
29
+ "tabSpaces": 4,
30
+ "importGranularity": "crate"
31
+ },
32
+ "filterRules": ["type-safety", "docker"]
33
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "bigbang.config.schema.json",
3
+ "version": "1.1.0",
4
+ "preset": "library",
5
+ "description": "Public package: focus on API surface, docs, backward compat, skip infra/deploy rules",
6
+ "rules": {
7
+ "solid-principles": true,
8
+ "yagni": true,
9
+ "design-patterns": true,
10
+ "file-size-limit": { "enabled": true, "maxLines": 200, "warnAt": 170 },
11
+ "folder-structure": { "enabled": true, "maxFilesPerDir": 4 },
12
+ "naming-conventions": true,
13
+ "documentation": true,
14
+ "shareability": true,
15
+ "single-responsibility": true,
16
+ "conventional-commits": true,
17
+ "testing": { "enabled": true, "coverageThreshold": 90, "requireUnitTests": true, "requireIntegrationTests": false },
18
+ "security": true,
19
+ "error-handling": true,
20
+ "performance": true,
21
+ "dependency-rules": true,
22
+ "git-workflow": { "enabled": true, "maxPrLines": 300, "branchNaming": "feat|fix|chore/description" },
23
+ "changelog": true,
24
+ "api-design": true,
25
+ "database": false,
26
+ "logging-observability": false,
27
+ "docker": false,
28
+ "type-safety": true,
29
+ "code-review": true
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "bigbang.config.schema.json",
3
+ "version": "1.1.0",
4
+ "preset": "prototype",
5
+ "description": "Fast/loose: skip heavy process rules, focus on code quality essentials",
6
+ "rules": {
7
+ "solid-principles": true,
8
+ "yagni": true,
9
+ "design-patterns": false,
10
+ "file-size-limit": { "enabled": true, "maxLines": 300, "warnAt": 250 },
11
+ "folder-structure": { "enabled": false, "maxFilesPerDir": 5 },
12
+ "naming-conventions": true,
13
+ "documentation": false,
14
+ "shareability": true,
15
+ "single-responsibility": true,
16
+ "conventional-commits": false,
17
+ "testing": { "enabled": false, "coverageThreshold": 0, "requireUnitTests": false, "requireIntegrationTests": false },
18
+ "security": true,
19
+ "error-handling": true,
20
+ "performance": false,
21
+ "dependency-rules": true,
22
+ "git-workflow": { "enabled": false, "maxPrLines": 500, "branchNaming": "any" },
23
+ "changelog": false,
24
+ "api-design": false,
25
+ "database": false,
26
+ "logging-observability": false,
27
+ "docker": false,
28
+ "type-safety": true,
29
+ "code-review": false
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "bigbang.config.schema.json",
3
+ "version": "1.1.0",
4
+ "preset": "strict",
5
+ "description": "Enterprise-grade: all rules enforced, strict limits, full process",
6
+ "rules": {
7
+ "solid-principles": true,
8
+ "yagni": true,
9
+ "design-patterns": true,
10
+ "file-size-limit": { "enabled": true, "maxLines": 150, "warnAt": 120 },
11
+ "folder-structure": { "enabled": true, "maxFilesPerDir": 3 },
12
+ "naming-conventions": true,
13
+ "documentation": true,
14
+ "shareability": true,
15
+ "single-responsibility": true,
16
+ "conventional-commits": true,
17
+ "testing": { "enabled": true, "coverageThreshold": 90, "requireUnitTests": true, "requireIntegrationTests": true },
18
+ "security": true,
19
+ "error-handling": true,
20
+ "performance": true,
21
+ "dependency-rules": true,
22
+ "git-workflow": { "enabled": true, "maxPrLines": 200, "branchNaming": "feat|fix|chore/description" },
23
+ "changelog": true,
24
+ "api-design": true,
25
+ "database": true,
26
+ "logging-observability": true,
27
+ "docker": true,
28
+ "type-safety": true,
29
+ "code-review": true
30
+ }
31
+ }
@@ -0,0 +1,125 @@
1
+ # SOLID Principles — Before / After
2
+
3
+ ## Single Responsibility (S)
4
+
5
+ **Before** — One class does too much:
6
+ ```typescript
7
+ class ReportManager {
8
+ generateReport(data: any) { /* ... */ }
9
+ formatAsPDF(report: any) { /* ... */ }
10
+ sendEmail(report: any, to: string) { /* ... */ }
11
+ saveToDatabase(report: any) { /* ... */ }
12
+ }
13
+ ```
14
+
15
+ **After** — Each class owns one concern:
16
+ ```typescript
17
+ class ReportGenerator {
18
+ generate(data: ReportData): Report { /* ... */ }
19
+ }
20
+ class ReportFormatter {
21
+ toPDF(report: Report): PDF { /* ... */ }
22
+ }
23
+ class EmailService {
24
+ send(to: string, attachment: PDF): void { /* ... */ }
25
+ }
26
+ class ReportRepository {
27
+ save(report: Report): void { /* ... */ }
28
+ }
29
+ ```
30
+
31
+ ## Open/Closed (O)
32
+
33
+ **Before** — Modifying existing code to add behavior:
34
+ ```typescript
35
+ function calculateDiscount(order: Order, type: string) {
36
+ if (type === "gold") return order.total * 0.2;
37
+ if (type === "silver") return order.total * 0.1;
38
+ return 0;
39
+ }
40
+ ```
41
+
42
+ **After** — Extend without modifying:
43
+ ```typescript
44
+ interface DiscountStrategy {
45
+ apply(total: number): number;
46
+ }
47
+ class GoldDiscount implements DiscountStrategy {
48
+ apply(total: number): number { return total * 0.2; }
49
+ }
50
+ class SilverDiscount implements DiscountStrategy {
51
+ apply(total: number): number { return total * 0.1; }
52
+ }
53
+ ```
54
+
55
+ ## Liskov Substitution (L)
56
+
57
+ **Before** — Subclass breaks parent contract:
58
+ ```typescript
59
+ class Rectangle {
60
+ setWidth(w: number) { this.width = w; }
61
+ setHeight(h: number) { this.height = h; }
62
+ }
63
+ class Square extends Rectangle {
64
+ setWidth(w: number) { this.width = w; this.height = w; } // breaks expectation
65
+ }
66
+ ```
67
+
68
+ **After** — Separate abstractions:
69
+ ```typescript
70
+ interface Shape { area(): number; }
71
+ class Rectangle implements Shape {
72
+ constructor(private width: number, private height: number) {}
73
+ area(): number { return this.width * this.height; }
74
+ }
75
+ class Square implements Shape {
76
+ constructor(private side: number) {}
77
+ area(): number { return this.side * this.side; }
78
+ }
79
+ ```
80
+
81
+ ## Interface Segregation (I)
82
+
83
+ **Before** — Fat interface forces useless implementations:
84
+ ```typescript
85
+ interface Worker {
86
+ work(): void;
87
+ eat(): void;
88
+ sleep(): void;
89
+ }
90
+ class Robot implements Worker {
91
+ work() { /* ok */ }
92
+ eat() { throw new Error("does not eat"); }
93
+ sleep() { throw new Error("does not sleep"); }
94
+ }
95
+ ```
96
+
97
+ **After** — Focused interfaces:
98
+ ```typescript
99
+ interface Workable { work(): void; }
100
+ interface Eatable { eat(): void; }
101
+ interface Sleepable { sleep(): void; }
102
+ class Robot implements Workable {
103
+ work() { /* ok */ }
104
+ }
105
+ ```
106
+
107
+ ## Dependency Inversion (D)
108
+
109
+ **Before** — High-level depends on low-level concrete:
110
+ ```typescript
111
+ class OrderService {
112
+ private db = new MySQLDatabase(); // tightly coupled
113
+ }
114
+ ```
115
+
116
+ **After** — Both depend on abstractions:
117
+ ```typescript
118
+ interface Database { save(order: Order): void; }
119
+ class OrderService {
120
+ constructor(private db: Database) {} // any DB impl
121
+ }
122
+ class MySQLDatabase implements Database {
123
+ save(order: Order): void { /* ... */ }
124
+ }
125
+ ```
@@ -0,0 +1,42 @@
1
+ # YAGNI — Before / After
2
+
3
+ **Before** — Building for hypothetical future needs:
4
+ ```typescript
5
+ // 3 interfaces, 2 abstract classes, 1 factory — for a 5-line function
6
+ interface PaymentGateway {}
7
+ interface PaymentValidator {}
8
+ abstract class BasePayment {}
9
+ class StripePayment extends BasePayment {}
10
+ class PaymentFactory {
11
+ static create(type: string): BasePayment { /* ... */ }
12
+ }
13
+
14
+ function chargeUser(amount: number) {
15
+ const payment = PaymentFactory.create("stripe");
16
+ // ... 3 lines of actual logic
17
+ }
18
+ ```
19
+
20
+ **After** — Just the code you need right now:
21
+ ```typescript
22
+ function chargeUser(amount: number) {
23
+ // call stripe API directly
24
+ }
25
+ ```
26
+
27
+ **Before** — Premature config system:
28
+ ```typescript
29
+ // "what if we need XML, JSON, YAML, and TOML later?"
30
+ interface ConfigParser { parse(raw: string): Config; }
31
+ class JSONParser implements ConfigParser { /* ... */ }
32
+ class XMLParser implements ConfigParser { /* ... */ }
33
+ class ConfigParserFactory { /* ... */ }
34
+ ```
35
+
36
+ **After** — Parse what you actually use:
37
+ ```typescript
38
+ const config = JSON.parse(readFileSync("config.json"));
39
+ ```
40
+
41
+ ## Rule of thumb
42
+ Write the simplest thing that works **today**. You'll know the right abstraction when you see the third repetition — not before.
@@ -0,0 +1,40 @@
1
+ # Naming Conventions — Before / After
2
+
3
+ **Before** — Inconsistent, cryptic:
4
+ ```typescript
5
+ const x = 5;
6
+ const user_info = getData();
7
+ class data_manager {}
8
+ function GetUser(id: number) { /* ... */ }
9
+ const MY_VAR = "hello";
10
+ const tmp = true;
11
+ ```
12
+
13
+ **After** — Consistent, self-documenting:
14
+ ```typescript
15
+ const pageSize = 5;
16
+ const userInfo = fetchUserProfile();
17
+ class DataManager {}
18
+ function getUser(id: number): User { /* ... */ }
19
+ const MY_VAR = "hello";
20
+ const isActive = true;
21
+ ```
22
+
23
+ ## Quick reference
24
+
25
+ | Element | Convention | Example |
26
+ |---------|-----------|---------|
27
+ | Variable | camelCase | `userName` |
28
+ | Function | camelCase | `getUser()` |
29
+ | Class | PascalCase | `UserService` |
30
+ | Constant (primitive) | UPPER_SNAKE_CASE | `MAX_RETRIES` |
31
+ | Constant (object) | camelCase | `defaultConfig` |
32
+ | Boolean | is/has/should/can prefix | `isLoading` |
33
+ | Private field | _prefix or #prefix | `_cache` or `#cache` |
34
+ | File (class) | PascalCase | `UserService.ts` |
35
+ | File (utility) | camelCase | `formatDate.ts` |
36
+ | File (config) | kebab-case | `eslint.config.js` |
37
+ | Folder | kebab-case | `user-profile/` |
38
+ | Enum | PascalCase | `PaymentStatus` |
39
+ | Enum member | PascalCase | `PaymentStatus.Pending` |
40
+ | Type/Interface | PascalCase | `UserPayload` |
package/install.sh CHANGED
@@ -12,5 +12,5 @@ if [ -d "$SKILL_DIR" ]; then
12
12
  fi
13
13
 
14
14
  mkdir -p "$SKILL_DIR"
15
- cp -r "${REPO_DIR}"/SKILL.md "${SKILL_DIR}/"
15
+ cp -r "${REPO_DIR}"/SKILL.md "${REPO_DIR}"/configs "${REPO_DIR}"/examples "${REPO_DIR}"/rules "${SKILL_DIR}/"
16
16
  echo "Installed bigbang skill to ${SKILL_DIR}"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bigbang-skills",
3
- "version": "1.0.0",
4
- "description": "Pre-project rules initializer for AI coding agents (opencode, Gemini, Cline, Cursor, Copilot). Generates AGENTS.md with SOLID, YAGNI, design patterns, naming conventions, testing, security, and 20+ maintainability rules.",
3
+ "version": "1.1.0",
4
+ "description": "Pre-project rules initializer for AI coding agents (opencode, Gemini, Cline, Cursor, Copilot). Generates AGENTS.md with configurable presets, language-aware rules, and 23 maintainability standards.",
5
5
  "keywords": [
6
6
  "opencode",
7
7
  "claude",
@@ -12,7 +12,12 @@
12
12
  "project-initializer",
13
13
  "solid",
14
14
  "yagni",
15
- "clean-code"
15
+ "clean-code",
16
+ "agent-skills",
17
+ "developer-tools",
18
+ "cursor",
19
+ "cline",
20
+ "copilot"
16
21
  ],
17
22
  "author": "luckyman147",
18
23
  "license": "MIT",
@@ -27,6 +32,9 @@
27
32
  "files": [
28
33
  "SKILL.md",
29
34
  "install.ps1",
30
- "install.sh"
35
+ "install.sh",
36
+ "configs/",
37
+ "examples/",
38
+ "rules/"
31
39
  ]
32
40
  }
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: solid-principles
3
+ description: Each class/function must be verifiable against SOLID before being written.
4
+ appliesTo: all
5
+ examples:
6
+ - examples/01-solid-principles.md
7
+ category: architecture
8
+ ---
9
+
10
+ - **S**ingle Responsibility: A class/function has exactly one reason to change.
11
+ - **O**pen/Closed: Open for extension, closed for modification.
12
+ - **L**iskov Substitution: Subtypes must be substitutable for their base types.
13
+ - **I**nterface Segregation: Many specific interfaces > one general interface.
14
+ - **D**ependency Inversion: Depend on abstractions, not concretions.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: yagni
3
+ description: Don't add code, abstractions, or dependencies until they're actually needed.
4
+ appliesTo: all
5
+ examples:
6
+ - examples/02-yagni.md
7
+ category: architecture
8
+ ---
9
+
10
+ - No speculative abstractions (interfaces, factories, base classes "just in case").
11
+ - No unused imports, parameters, or variables.
12
+ - No dead code paths.
13
+ - Refactor to a pattern only when you see the third repetition.
14
+ - Delete unused code immediately.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: naming-conventions
3
+ description: Consistent naming across the project improves readability and shareability.
4
+ appliesTo: all
5
+ examples:
6
+ - examples/06-naming-conventions.md
7
+ category: style
8
+ ---
9
+
10
+ - **Files**: kebab-case for config/docs, PascalCase for components/classes, camelCase for utilities
11
+ - **Folders**: kebab-case
12
+ - **Variables/Functions**: camelCase
13
+ - **Classes/Components**: PascalCase
14
+ - **Constants**: UPPER_SNAKE_CASE
15
+ - **Booleans**: prefix with is/has/should/can
16
+ - **Private fields**: underscore prefix or JS # prefix
17
+ - **Enums**: PascalCase type + PascalCase members
@@ -0,0 +1,11 @@
1
+ # Contributing Rules
2
+
3
+ Each rule is a `.md` file with:
4
+ - `name` — unique identifier (kebab-case)
5
+ - `description` — one-liner
6
+ - `appliesTo` — language/stack filter (or `all`)
7
+ - `body` — the rule text to include in AGENTS.md
8
+ - `examples` — optional references to `examples/`
9
+ - `config` — optional default config values
10
+
11
+ To propose a new rule, open a PR adding a file here. See existing rules for format.