@hivehub/rulebook 5.5.2 → 5.7.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/.claude/commands/rulebook-learn-capture.md +41 -48
- package/.claude/commands/rulebook-learn-list.md +13 -13
- package/README.md +332 -394
- package/dist/cli/commands/context-intelligence.d.ts +0 -1
- package/dist/cli/commands/context-intelligence.d.ts.map +1 -1
- package/dist/cli/commands/context-intelligence.js +12 -33
- package/dist/cli/commands/context-intelligence.js.map +1 -1
- package/dist/cli/commands/index.d.ts +4 -7
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +4 -7
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +40 -81
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts +0 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +1 -7
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/memory.d.ts +7 -1
- package/dist/cli/commands/memory.d.ts.map +1 -1
- package/dist/cli/commands/memory.js +51 -57
- package/dist/cli/commands/memory.js.map +1 -1
- package/dist/cli/commands/misc.d.ts +1 -15
- package/dist/cli/commands/misc.d.ts.map +1 -1
- package/dist/cli/commands/misc.js +36 -215
- package/dist/cli/commands/misc.js.map +1 -1
- package/dist/cli/commands/plans.d.ts +0 -6
- package/dist/cli/commands/plans.d.ts.map +1 -1
- package/dist/cli/commands/plans.js +9 -77
- package/dist/cli/commands/plans.js.map +1 -1
- package/dist/cli/commands/skills.js +6 -6
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/task.js +4 -4
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +122 -52
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +1 -78
- package/dist/cli/prompts.js.map +1 -1
- package/dist/core/claude/claude-mcp.d.ts +59 -0
- package/dist/core/claude/claude-mcp.d.ts.map +1 -0
- package/dist/core/claude/claude-mcp.js +220 -0
- package/dist/core/claude/claude-mcp.js.map +1 -0
- package/dist/core/claude/claude-md-generator.d.ts +52 -0
- package/dist/core/claude/claude-md-generator.d.ts.map +1 -0
- package/dist/core/claude/claude-md-generator.js +104 -0
- package/dist/core/claude/claude-md-generator.js.map +1 -0
- package/dist/core/claude/claude-settings-manager.d.ts +44 -0
- package/dist/core/claude/claude-settings-manager.d.ts.map +1 -0
- package/dist/core/claude/claude-settings-manager.js +194 -0
- package/dist/core/claude/claude-settings-manager.js.map +1 -0
- package/dist/core/console/cli-bridge.d.ts +113 -0
- package/dist/core/console/cli-bridge.d.ts.map +1 -0
- package/dist/core/console/cli-bridge.js +1094 -0
- package/dist/core/console/cli-bridge.js.map +1 -0
- package/dist/core/detect/detector.d.ts +35 -0
- package/dist/core/detect/detector.d.ts.map +1 -0
- package/dist/core/detect/detector.js +541 -0
- package/dist/core/detect/detector.js.map +1 -0
- package/dist/core/docs/docs-generator.d.ts +9 -0
- package/dist/core/docs/docs-generator.d.ts.map +1 -0
- package/dist/core/docs/docs-generator.js +531 -0
- package/dist/core/docs/docs-generator.js.map +1 -0
- package/dist/core/docs/mcp-reference-generator.d.ts +13 -0
- package/dist/core/docs/mcp-reference-generator.d.ts.map +1 -0
- package/dist/core/docs/mcp-reference-generator.js +66 -0
- package/dist/core/docs/mcp-reference-generator.js.map +1 -0
- package/dist/core/generators/generator.d.ts +54 -0
- package/dist/core/generators/generator.d.ts.map +1 -0
- package/dist/core/generators/generator.js +1041 -0
- package/dist/core/generators/generator.js.map +1 -0
- package/dist/core/generators/gitignore-generator.d.ts +13 -0
- package/dist/core/generators/gitignore-generator.d.ts.map +1 -0
- package/dist/core/generators/gitignore-generator.js +307 -0
- package/dist/core/generators/gitignore-generator.js.map +1 -0
- package/dist/core/generators/minimal-scaffolder.d.ts +8 -0
- package/dist/core/generators/minimal-scaffolder.d.ts.map +1 -0
- package/dist/core/generators/minimal-scaffolder.js +51 -0
- package/dist/core/generators/minimal-scaffolder.js.map +1 -0
- package/dist/core/generators/rules-generator.d.ts +73 -0
- package/dist/core/generators/rules-generator.d.ts.map +1 -0
- package/dist/core/generators/rules-generator.js +202 -0
- package/dist/core/generators/rules-generator.js.map +1 -0
- package/dist/core/generators/workflow-generator.d.ts +15 -0
- package/dist/core/generators/workflow-generator.d.ts.map +1 -0
- package/dist/core/generators/workflow-generator.js +390 -0
- package/dist/core/generators/workflow-generator.js.map +1 -0
- package/dist/core/ide/multi-tool-generator.d.ts +59 -0
- package/dist/core/ide/multi-tool-generator.d.ts.map +1 -0
- package/dist/core/ide/multi-tool-generator.js +157 -0
- package/dist/core/ide/multi-tool-generator.js.map +1 -0
- package/dist/core/ide/opencode-generator.d.ts +72 -0
- package/dist/core/ide/opencode-generator.d.ts.map +1 -0
- package/dist/core/ide/opencode-generator.js +450 -0
- package/dist/core/ide/opencode-generator.js.map +1 -0
- package/dist/core/merger.d.ts +1 -1
- package/dist/core/merger.d.ts.map +1 -1
- package/dist/core/merger.js +5 -5
- package/dist/core/merger.js.map +1 -1
- package/dist/core/migrator.d.ts +0 -1
- package/dist/core/migrator.d.ts.map +1 -1
- package/dist/core/migrator.js +4 -29
- package/dist/core/migrator.js.map +1 -1
- package/dist/core/quality/coverage-checker.d.ts +14 -0
- package/dist/core/quality/coverage-checker.d.ts.map +1 -0
- package/dist/core/quality/coverage-checker.js +176 -0
- package/dist/core/quality/coverage-checker.js.map +1 -0
- package/dist/core/quality/dependency-checker.d.ts +21 -0
- package/dist/core/quality/dependency-checker.d.ts.map +1 -0
- package/dist/core/quality/dependency-checker.js +247 -0
- package/dist/core/quality/dependency-checker.js.map +1 -0
- package/dist/core/quality/doctor.d.ts +19 -0
- package/dist/core/quality/doctor.d.ts.map +1 -0
- package/dist/core/quality/doctor.js +163 -0
- package/dist/core/quality/doctor.js.map +1 -0
- package/dist/core/quality/validator.d.ts +21 -0
- package/dist/core/quality/validator.d.ts.map +1 -0
- package/dist/core/quality/validator.js +177 -0
- package/dist/core/quality/validator.js.map +1 -0
- package/dist/core/skills/skills-manager.d.ts +126 -0
- package/dist/core/skills/skills-manager.d.ts.map +1 -0
- package/dist/core/skills/skills-manager.js +630 -0
- package/dist/core/skills/skills-manager.js.map +1 -0
- package/dist/core/state/config-manager.d.ts +86 -0
- package/dist/core/state/config-manager.d.ts.map +1 -0
- package/dist/core/state/config-manager.js +562 -0
- package/dist/core/state/config-manager.js.map +1 -0
- package/dist/core/state/override-manager.d.ts +23 -0
- package/dist/core/state/override-manager.d.ts.map +1 -0
- package/dist/core/state/override-manager.js +82 -0
- package/dist/core/state/override-manager.js.map +1 -0
- package/dist/core/state/state-writer.d.ts +34 -0
- package/dist/core/state/state-writer.d.ts.map +1 -0
- package/dist/core/state/state-writer.js +78 -0
- package/dist/core/state/state-writer.js.map +1 -0
- package/dist/core/state/version-bumper.d.ts +19 -0
- package/dist/core/state/version-bumper.d.ts.map +1 -0
- package/dist/core/state/version-bumper.js +180 -0
- package/dist/core/state/version-bumper.js.map +1 -0
- package/dist/core/tasks/decision-manager.d.ts +25 -0
- package/dist/core/tasks/decision-manager.d.ts.map +1 -0
- package/dist/core/tasks/decision-manager.js +183 -0
- package/dist/core/tasks/decision-manager.js.map +1 -0
- package/dist/core/tasks/knowledge-manager.d.ts +24 -0
- package/dist/core/tasks/knowledge-manager.d.ts.map +1 -0
- package/dist/core/tasks/knowledge-manager.js +173 -0
- package/dist/core/tasks/knowledge-manager.js.map +1 -0
- package/dist/core/tasks/learn-manager.d.ts +27 -0
- package/dist/core/tasks/learn-manager.d.ts.map +1 -0
- package/dist/core/tasks/learn-manager.js +121 -0
- package/dist/core/tasks/learn-manager.js.map +1 -0
- package/dist/core/tasks/plans-manager.d.ts +46 -0
- package/dist/core/tasks/plans-manager.d.ts.map +1 -0
- package/dist/core/tasks/plans-manager.js +158 -0
- package/dist/core/tasks/plans-manager.js.map +1 -0
- package/dist/core/tasks/task-manager.d.ts +127 -0
- package/dist/core/tasks/task-manager.d.ts.map +1 -0
- package/dist/core/tasks/task-manager.js +607 -0
- package/dist/core/tasks/task-manager.js.map +1 -0
- package/dist/core/workspace/project-worker.d.ts +6 -6
- package/dist/core/workspace/project-worker.d.ts.map +1 -1
- package/dist/core/workspace/project-worker.js +6 -6
- package/dist/core/workspace/project-worker.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -176
- package/dist/index.js.map +1 -1
- package/dist/mcp/rulebook-server.d.ts.map +1 -1
- package/dist/mcp/rulebook-server.js +16 -960
- package/dist/mcp/rulebook-server.js.map +1 -1
- package/dist/memory/file-search.d.ts +43 -0
- package/dist/memory/file-search.d.ts.map +1 -0
- package/dist/memory/file-search.js +228 -0
- package/dist/memory/file-search.js.map +1 -0
- package/dist/memory/file-store.d.ts +99 -0
- package/dist/memory/file-store.d.ts.map +1 -0
- package/dist/memory/file-store.js +615 -0
- package/dist/memory/file-store.js.map +1 -0
- package/dist/memory/legacy-migrator.d.ts +27 -0
- package/dist/memory/legacy-migrator.d.ts.map +1 -0
- package/dist/memory/legacy-migrator.js +185 -0
- package/dist/memory/legacy-migrator.js.map +1 -0
- package/dist/memory/memory-manager.d.ts +25 -24
- package/dist/memory/memory-manager.d.ts.map +1 -1
- package/dist/memory/memory-manager.js +97 -140
- package/dist/memory/memory-manager.js.map +1 -1
- package/dist/memory/memory-types.d.ts +1 -1
- package/dist/memory/memory-types.d.ts.map +1 -1
- package/dist/types.d.ts +8 -119
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -6
- package/templates/agents/context-intelligence.md +50 -52
- package/templates/cli/OPENCODE.md +85 -18
- package/templates/commands/rulebook-learn-capture.md +41 -48
- package/templates/commands/rulebook-learn-list.md +13 -13
- package/templates/core/AGENTS_LEAN.md +0 -14
- package/templates/hooks/check-context-and-handoff.sh +8 -10
- package/templates/hooks/enforce-pre-tool.sh +70 -0
- package/templates/hooks/terse-mode-tracker.sh +146 -143
- package/templates/ides/OPENCODE.md +63 -0
- package/templates/skills/cli/opencode/SKILL.md +82 -28
- package/.claude/commands/ralph-config.md +0 -112
- package/.claude/commands/ralph-history.md +0 -110
- package/.claude/commands/ralph-init.md +0 -72
- package/.claude/commands/ralph-pause-resume.md +0 -105
- package/.claude/commands/ralph-run.md +0 -101
- package/.claude/commands/ralph-status.md +0 -76
- package/templates/core/RALPH.md +0 -471
- package/templates/frameworks/ANGULAR.md +0 -36
- package/templates/frameworks/DJANGO.md +0 -83
- package/templates/frameworks/ELECTRON.md +0 -147
- package/templates/frameworks/FLASK.md +0 -38
- package/templates/frameworks/FLUTTER.md +0 -55
- package/templates/frameworks/JQUERY.md +0 -32
- package/templates/frameworks/LARAVEL.md +0 -38
- package/templates/frameworks/NESTJS.md +0 -43
- package/templates/frameworks/NEXTJS.md +0 -127
- package/templates/frameworks/NUXT.md +0 -40
- package/templates/frameworks/RAILS.md +0 -66
- package/templates/frameworks/REACT.md +0 -38
- package/templates/frameworks/REACT_NATIVE.md +0 -47
- package/templates/frameworks/SPRING.md +0 -39
- package/templates/frameworks/SYMFONY.md +0 -36
- package/templates/frameworks/VUE.md +0 -36
- package/templates/frameworks/ZEND.md +0 -35
- package/templates/hooks/enforce-mcp-for-tasks.sh +0 -31
- package/templates/hooks/enforce-no-deferred.sh +0 -21
- package/templates/hooks/enforce-no-shortcuts.sh +0 -31
- package/templates/ides/COPILOT.md +0 -37
- package/templates/ides/CURSOR.md +0 -43
- package/templates/ides/JETBRAINS_AI.md +0 -35
- package/templates/ides/REPLIT.md +0 -36
- package/templates/ides/TABNINE.md +0 -29
- package/templates/ides/VSCODE.md +0 -40
- package/templates/ides/WINDSURF.md +0 -36
- package/templates/ides/ZED.md +0 -32
- package/templates/ides/cursor-mdc/go.mdc +0 -24
- package/templates/ides/cursor-mdc/python.mdc +0 -24
- package/templates/ides/cursor-mdc/quality.mdc +0 -25
- package/templates/ides/cursor-mdc/ralph.mdc +0 -39
- package/templates/ides/cursor-mdc/rulebook.mdc +0 -38
- package/templates/ides/cursor-mdc/rust.mdc +0 -24
- package/templates/ides/cursor-mdc/typescript.mdc +0 -25
- package/templates/ralph/ralph-history.bat +0 -4
- package/templates/ralph/ralph-history.sh +0 -5
- package/templates/ralph/ralph-init.bat +0 -5
- package/templates/ralph/ralph-init.sh +0 -5
- package/templates/ralph/ralph-pause.bat +0 -5
- package/templates/ralph/ralph-pause.sh +0 -5
- package/templates/ralph/ralph-run.bat +0 -5
- package/templates/ralph/ralph-run.sh +0 -5
- package/templates/ralph/ralph-status.bat +0 -4
- package/templates/ralph/ralph-status.sh +0 -5
- package/templates/services/AZURE_BLOB.md +0 -184
- package/templates/services/CASSANDRA.md +0 -239
- package/templates/services/DATADOG.md +0 -26
- package/templates/services/DOCKER.md +0 -124
- package/templates/services/DOCKER_COMPOSE.md +0 -168
- package/templates/services/DYNAMODB.md +0 -308
- package/templates/services/ELASTICSEARCH.md +0 -347
- package/templates/services/GCS.md +0 -178
- package/templates/services/HELM.md +0 -194
- package/templates/services/INFLUXDB.md +0 -265
- package/templates/services/KAFKA.md +0 -341
- package/templates/services/KUBERNETES.md +0 -208
- package/templates/services/MARIADB.md +0 -183
- package/templates/services/MEMCACHED.md +0 -242
- package/templates/services/MINIO.md +0 -201
- package/templates/services/MONGODB.md +0 -268
- package/templates/services/MYSQL.md +0 -358
- package/templates/services/NEO4J.md +0 -247
- package/templates/services/OPENTELEMETRY.md +0 -25
- package/templates/services/ORACLE.md +0 -290
- package/templates/services/PINO.md +0 -24
- package/templates/services/POSTGRESQL.md +0 -326
- package/templates/services/PROMETHEUS.md +0 -33
- package/templates/services/RABBITMQ.md +0 -286
- package/templates/services/REDIS.md +0 -292
- package/templates/services/S3.md +0 -298
- package/templates/services/SENTRY.md +0 -23
- package/templates/services/SQLITE.md +0 -294
- package/templates/services/SQLSERVER.md +0 -294
- package/templates/services/WINSTON.md +0 -30
- package/templates/skills/frameworks/angular/SKILL.md +0 -46
- package/templates/skills/frameworks/django/SKILL.md +0 -93
- package/templates/skills/frameworks/electron/SKILL.md +0 -157
- package/templates/skills/frameworks/flask/SKILL.md +0 -48
- package/templates/skills/frameworks/flutter/SKILL.md +0 -65
- package/templates/skills/frameworks/jquery/SKILL.md +0 -42
- package/templates/skills/frameworks/laravel/SKILL.md +0 -48
- package/templates/skills/frameworks/nestjs/SKILL.md +0 -53
- package/templates/skills/frameworks/nextjs/SKILL.md +0 -137
- package/templates/skills/frameworks/nuxt/SKILL.md +0 -50
- package/templates/skills/frameworks/rails/SKILL.md +0 -76
- package/templates/skills/frameworks/react/SKILL.md +0 -48
- package/templates/skills/frameworks/react-native/SKILL.md +0 -57
- package/templates/skills/frameworks/spring/SKILL.md +0 -49
- package/templates/skills/frameworks/symfony/SKILL.md +0 -46
- package/templates/skills/frameworks/vue/SKILL.md +0 -46
- package/templates/skills/frameworks/zend/SKILL.md +0 -45
- package/templates/skills/services/azure-blob/SKILL.md +0 -194
- package/templates/skills/services/cassandra/SKILL.md +0 -249
- package/templates/skills/services/dynamodb/SKILL.md +0 -318
- package/templates/skills/services/elasticsearch/SKILL.md +0 -357
- package/templates/skills/services/gcs/SKILL.md +0 -188
- package/templates/skills/services/influxdb/SKILL.md +0 -275
- package/templates/skills/services/kafka/SKILL.md +0 -351
- package/templates/skills/services/mariadb/SKILL.md +0 -193
- package/templates/skills/services/memcached/SKILL.md +0 -252
- package/templates/skills/services/minio/SKILL.md +0 -211
- package/templates/skills/services/mongodb/SKILL.md +0 -278
- package/templates/skills/services/mysql/SKILL.md +0 -368
- package/templates/skills/services/neo4j/SKILL.md +0 -257
- package/templates/skills/services/oracle/SKILL.md +0 -300
- package/templates/skills/services/postgresql/SKILL.md +0 -336
- package/templates/skills/services/rabbitmq/SKILL.md +0 -296
- package/templates/skills/services/redis/SKILL.md +0 -302
- package/templates/skills/services/s3/SKILL.md +0 -308
- package/templates/skills/services/sqlite/SKILL.md +0 -304
- package/templates/skills/services/sqlserver/SKILL.md +0 -304
- package/templates/skills/workflows/ralph/SETUP.md +0 -228
- package/templates/skills/workflows/ralph/SKILL.md +0 -309
- package/templates/skills/workflows/ralph/install.sh +0 -87
- package/templates/skills/workflows/ralph/manifest.json +0 -158
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<!-- SPRING:START -->
|
|
2
|
-
# Spring Boot Framework Rules
|
|
3
|
-
|
|
4
|
-
**CRITICAL**: Every Spring service must satisfy these quality gates before merge.
|
|
5
|
-
|
|
6
|
-
## Build & Quality Commands
|
|
7
|
-
- Lint/format: `./gradlew checkstyleMain` or `mvn verify`
|
|
8
|
-
- Unit tests: `./gradlew test` or `mvn test`
|
|
9
|
-
- Integration tests: `./gradlew integrationTest` (if module exists)
|
|
10
|
-
- Static analysis: `./gradlew jacocoTestReport` to ensure 80%+ coverage
|
|
11
|
-
|
|
12
|
-
## Project Structure
|
|
13
|
-
- Keep domain logic in `src/main/java/.../service`
|
|
14
|
-
- Expose REST controllers in `controller` packages
|
|
15
|
-
- Isolate configuration classes under `config`
|
|
16
|
-
- Share DTOs via `dto` package and map with MapStruct where applicable
|
|
17
|
-
|
|
18
|
-
## Implementation Guidelines
|
|
19
|
-
- Manage configuration with `application.yml` profiles (dev/test/prod)
|
|
20
|
-
- Prefer constructor injection, avoid `@Autowired` field injection
|
|
21
|
-
- Wrap transactional operations with `@Transactional`
|
|
22
|
-
- Use `ResponseEntity` for explicit HTTP semantics
|
|
23
|
-
- Validate inputs using `javax.validation` annotations and `@Valid`
|
|
24
|
-
|
|
25
|
-
## Build Matrix
|
|
26
|
-
```bash
|
|
27
|
-
# Gradle
|
|
28
|
-
./gradlew clean check
|
|
29
|
-
|
|
30
|
-
# Maven
|
|
31
|
-
mvn -B clean verify
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Additional Checks
|
|
35
|
-
- Ensure `application.yml` contains defaults for new properties
|
|
36
|
-
- Update Flyway/Liquibase migrations when schema changes
|
|
37
|
-
- Keep `README` and `/docs/architecture.md` synced with new services
|
|
38
|
-
|
|
39
|
-
<!-- SPRING:END -->
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!-- SYMFONY:START -->
|
|
2
|
-
# Symfony Framework Rules
|
|
3
|
-
|
|
4
|
-
**Language**: PHP
|
|
5
|
-
**Version**: Symfony 6.0+ or 7.0+
|
|
6
|
-
|
|
7
|
-
## Setup
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
# config/packages/framework.yaml
|
|
11
|
-
framework:
|
|
12
|
-
secret: '%env(APP_SECRET)%'
|
|
13
|
-
csrf_protection: true
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Quality Gates
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
php bin/console lint:twig templates/
|
|
20
|
-
php bin/console lint:yaml config/
|
|
21
|
-
vendor/bin/phpstan analyze src tests
|
|
22
|
-
vendor/bin/phpunit
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Best Practices
|
|
26
|
-
|
|
27
|
-
✅ Use dependency injection
|
|
28
|
-
✅ Follow PSR standards
|
|
29
|
-
✅ Use Doctrine ORM
|
|
30
|
-
✅ Implement security voters
|
|
31
|
-
|
|
32
|
-
❌ Don't bypass security
|
|
33
|
-
❌ Don't hardcode routes
|
|
34
|
-
|
|
35
|
-
<!-- SYMFONY:END -->
|
|
36
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!-- VUE:START -->
|
|
2
|
-
# Vue Framework Rules
|
|
3
|
-
|
|
4
|
-
**CRITICAL**: Vue 3 projects should follow these guardrails.
|
|
5
|
-
|
|
6
|
-
## Quality Commands
|
|
7
|
-
- Lint: `npm run lint`
|
|
8
|
-
- Unit tests: `npm run test:unit`
|
|
9
|
-
- e2e tests (Cypress/Playwright): `npm run test:e2e`
|
|
10
|
-
- Build: `npm run build`
|
|
11
|
-
|
|
12
|
-
## Project Structure
|
|
13
|
-
- Place feature modules in `src/modules/<feature>/`
|
|
14
|
-
- Keep reusable components in `src/components`
|
|
15
|
-
- Shared composables go in `src/composables`
|
|
16
|
-
- Centralize Pinia/Vuex stores under `src/stores`
|
|
17
|
-
|
|
18
|
-
## Implementation Guidelines
|
|
19
|
-
- Adopt `<script setup>` with TypeScript and define props via `defineProps`
|
|
20
|
-
- Leverage `defineEmits` for typed event emission
|
|
21
|
-
- Lazy-load routes with dynamic imports in `router/index.ts`
|
|
22
|
-
- Ensure global styles scoped via `:global` or dedicated CSS files
|
|
23
|
-
|
|
24
|
-
## Pre-Commit Commands
|
|
25
|
-
```bash
|
|
26
|
-
npm run lint
|
|
27
|
-
npm run test:unit
|
|
28
|
-
npm run build
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Documentation
|
|
32
|
-
- Update `/docs/vue-architecture.md` with module tree changes
|
|
33
|
-
- Document composables in `/docs/composables.md`
|
|
34
|
-
- Add component usage examples to `/docs/ui-components.md`
|
|
35
|
-
|
|
36
|
-
<!-- VUE:END -->
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<!-- ZEND:START -->
|
|
2
|
-
# Zend/Laminas Framework Rules
|
|
3
|
-
|
|
4
|
-
**Language**: PHP
|
|
5
|
-
**Version**: Laminas MVC 3.x+
|
|
6
|
-
|
|
7
|
-
## Setup
|
|
8
|
-
|
|
9
|
-
```php
|
|
10
|
-
// config/modules.config.php
|
|
11
|
-
return [
|
|
12
|
-
'Laminas\Router',
|
|
13
|
-
'Application',
|
|
14
|
-
];
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Quality Gates
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
vendor/bin/phpcs --standard=PSR12 src/
|
|
21
|
-
vendor/bin/phpstan analyze
|
|
22
|
-
vendor/bin/phpunit
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Best Practices
|
|
26
|
-
|
|
27
|
-
✅ Use service manager
|
|
28
|
-
✅ Implement middleware
|
|
29
|
-
✅ Use form validation
|
|
30
|
-
|
|
31
|
-
❌ Don't skip CSRF tokens
|
|
32
|
-
❌ Don't expose errors in production
|
|
33
|
-
|
|
34
|
-
<!-- ZEND:END -->
|
|
35
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# PreToolUse hook: deny manual task file creation — must use MCP tools
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
input="$(cat)"
|
|
5
|
-
|
|
6
|
-
result="$(node -e "
|
|
7
|
-
const input = JSON.parse(process.argv[1]);
|
|
8
|
-
const tool = input.tool_name || '';
|
|
9
|
-
if (tool === 'Write' || tool === 'Edit') {
|
|
10
|
-
const file = input.tool_input?.file_path || input.tool_input?.filePath || '';
|
|
11
|
-
// Block creating new proposal.md or .metadata.json in tasks/
|
|
12
|
-
if (/\.rulebook\/tasks\/[^/]+\/(proposal\.md|\.metadata\.json)$/.test(file.replace(/\\\\/g,'/'))) {
|
|
13
|
-
// Allow if editing existing file
|
|
14
|
-
try { require('fs').accessSync(file); console.log('ALLOW'); } catch { console.log('DENY'); }
|
|
15
|
-
process.exit(0);
|
|
16
|
-
}
|
|
17
|
-
} else if (tool === 'Bash') {
|
|
18
|
-
const cmd = input.tool_input?.command || '';
|
|
19
|
-
if (/mkdir.*\.rulebook\/tasks\//.test(cmd) || /mkdir.*\.rulebook\\\\tasks\\\\/.test(cmd)) {
|
|
20
|
-
console.log('DENY');
|
|
21
|
-
process.exit(0);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
console.log('ALLOW');
|
|
25
|
-
" "$input" 2>/dev/null || echo "ALLOW")"
|
|
26
|
-
|
|
27
|
-
if [[ "$result" == "DENY" ]]; then
|
|
28
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"DENIED: task files must be created via rulebook_task_create MCP tool, not manually. Use: rulebook_task_create({ taskId: phase1_your-task-name })"}}'
|
|
29
|
-
else
|
|
30
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
31
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# PreToolUse hook: deny deferred/TODO/skip items in tasks.md
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
input="$(cat)"
|
|
5
|
-
|
|
6
|
-
# Parse JSON with node (jq may not be available on Windows)
|
|
7
|
-
result="$(node -e "
|
|
8
|
-
const input = JSON.parse(process.argv[1]);
|
|
9
|
-
const tool = input.tool_name || '';
|
|
10
|
-
if (tool !== 'Edit' && tool !== 'Write') { console.log('ALLOW'); process.exit(0); }
|
|
11
|
-
const file = input.tool_input?.file_path || input.tool_input?.filePath || '';
|
|
12
|
-
if (!file.endsWith('tasks.md')) { console.log('ALLOW'); process.exit(0); }
|
|
13
|
-
const content = input.tool_input?.new_string || input.tool_input?.content || '';
|
|
14
|
-
if (/\b(deferred|skip(ped)?|later|todo)\b/i.test(content)) { console.log('DENY'); } else { console.log('ALLOW'); }
|
|
15
|
-
" "$input" 2>/dev/null || echo "ALLOW")"
|
|
16
|
-
|
|
17
|
-
if [[ "$result" == "DENY" ]]; then
|
|
18
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"DENIED: tasks.md cannot contain deferred, skip, later, or TODO. Implement the item now or explain why impossible. See .claude/rules/no-deferred.md"}}'
|
|
19
|
-
else
|
|
20
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
21
|
-
fi
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# PreToolUse hook: deny stubs, TODOs, placeholders in source code
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
input="$(cat)"
|
|
5
|
-
|
|
6
|
-
result="$(node -e "
|
|
7
|
-
const input = JSON.parse(process.argv[1]);
|
|
8
|
-
const tool = input.tool_name || '';
|
|
9
|
-
if (tool !== 'Edit' && tool !== 'Write') { console.log('ALLOW'); process.exit(0); }
|
|
10
|
-
const file = input.tool_input?.file_path || input.tool_input?.filePath || '';
|
|
11
|
-
// Only check source files
|
|
12
|
-
if (!/\.(ts|tsx|js|jsx|py|rs|go|java|cs|cpp|c|hpp|h)$/.test(file)) { console.log('ALLOW'); process.exit(0); }
|
|
13
|
-
// Skip test files
|
|
14
|
-
if (/\.test\.|\.spec\.|__tests__|\/tests\//.test(file)) { console.log('ALLOW'); process.exit(0); }
|
|
15
|
-
const content = input.tool_input?.new_string || input.tool_input?.content || '';
|
|
16
|
-
if (/\/\/\s*(TODO|FIXME|HACK)\b|\/\*\s*(TODO|FIXME|HACK)\b|#\s*(TODO|FIXME|HACK)\b/.test(content)) { console.log('DENY_TODO'); process.exit(0); }
|
|
17
|
-
if (/\bplaceholder\b|\bstub\b/i.test(content)) { console.log('DENY_STUB'); process.exit(0); }
|
|
18
|
-
console.log('ALLOW');
|
|
19
|
-
" "$input" 2>/dev/null || echo "ALLOW")"
|
|
20
|
-
|
|
21
|
-
case "$result" in
|
|
22
|
-
DENY_TODO)
|
|
23
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"DENIED: source code cannot contain // TODO, // FIXME, or // HACK. Implement the logic now. See .claude/rules/no-shortcuts.md"}}'
|
|
24
|
-
;;
|
|
25
|
-
DENY_STUB)
|
|
26
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"DENIED: source code cannot contain placeholders or stubs. Implement real logic. See .claude/rules/no-shortcuts.md"}}'
|
|
27
|
-
;;
|
|
28
|
-
*)
|
|
29
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
30
|
-
;;
|
|
31
|
-
esac
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<!-- COPILOT:START -->
|
|
2
|
-
# GitHub Copilot Rules
|
|
3
|
-
|
|
4
|
-
**Tool**: GitHub's AI pair programmer (inline + chat)
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
Copilot reads:
|
|
9
|
-
- `.github/copilot-instructions.md` (generated by `rulebook init`)
|
|
10
|
-
- Workspace context (open files)
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# In Copilot Chat:
|
|
16
|
-
"Follow @AGENTS.md. Implement [feature] with tests (95%+ coverage)."
|
|
17
|
-
|
|
18
|
-
# Inline suggestions:
|
|
19
|
-
Accept/reject based on AGENTS.md standards
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Modes
|
|
23
|
-
|
|
24
|
-
**Inline Completions**: Context-aware suggestions while typing
|
|
25
|
-
**Copilot Chat**: Ask questions, request implementations
|
|
26
|
-
**Workspace Agent** (Labs): Multi-file autonomous mode
|
|
27
|
-
|
|
28
|
-
## Workflow
|
|
29
|
-
|
|
30
|
-
1. Rulebook generates `.github/copilot-instructions.md` → references AGENTS.md
|
|
31
|
-
2. Keep AGENTS.md open for context
|
|
32
|
-
3. Use `@workspace` to include project context
|
|
33
|
-
4. Reference `@AGENTS.md` explicitly in chat
|
|
34
|
-
|
|
35
|
-
**Critical**: Generated `copilot-instructions.md` points Copilot to AGENTS.md standards.
|
|
36
|
-
|
|
37
|
-
<!-- COPILOT:END -->
|
package/templates/ides/CURSOR.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!-- CURSOR:START -->
|
|
2
|
-
# Cursor IDE Rules
|
|
3
|
-
|
|
4
|
-
**IDE**: AI-first code editor with Agent mode and Composer
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
Cursor automatically reads:
|
|
9
|
-
- `.cursorrules` (generated by `rulebook init`)
|
|
10
|
-
- `AGENTS.md` (via `@AGENTS.md` references)
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# In Cursor chat/composer:
|
|
16
|
-
"Follow @AGENTS.md. Implement [feature] with tests (95%+ coverage)."
|
|
17
|
-
|
|
18
|
-
# Agent mode (Ctrl+Shift+K):
|
|
19
|
-
Use for complex multi-file changes
|
|
20
|
-
Reference @AGENTS.md for standards
|
|
21
|
-
|
|
22
|
-
# Composer (Cmd+I):
|
|
23
|
-
Use for quick edits
|
|
24
|
-
Reference @AGENTS.md when needed
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Features
|
|
28
|
-
|
|
29
|
-
- **Auto-context**: Reads .cursorrules automatically
|
|
30
|
-
- **@ Mentions**: Use `@AGENTS.md` to include standards
|
|
31
|
-
- **Agent Mode**: Autonomous multi-step implementations
|
|
32
|
-
- **Composer**: Quick inline edits
|
|
33
|
-
|
|
34
|
-
## Workflow
|
|
35
|
-
|
|
36
|
-
1. Rulebook generates `.cursorrules` pointing to AGENTS.md
|
|
37
|
-
2. Use `@AGENTS.md` in prompts for explicit reference
|
|
38
|
-
3. Agent/Composer follows standards automatically
|
|
39
|
-
4. Review changes and run quality checks
|
|
40
|
-
|
|
41
|
-
**Critical**: `.cursorrules` ensures Cursor follows AGENTS.md by default.
|
|
42
|
-
|
|
43
|
-
<!-- CURSOR:END -->
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<!-- JETBRAINS_AI:START -->
|
|
2
|
-
# JetBrains AI Assistant Rules
|
|
3
|
-
|
|
4
|
-
**IDEs**: IntelliJ, PyCharm, WebStorm, GoLand, RustRover, Rider, CLion, PhpStorm
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
JetBrains AI reads workspace files automatically.
|
|
9
|
-
|
|
10
|
-
## Usage
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# In AI Assistant chat:
|
|
14
|
-
"Follow @AGENTS.md. Implement [feature] with tests (95%+ coverage)."
|
|
15
|
-
|
|
16
|
-
# Keep AGENTS.md open for AI to reference
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Features
|
|
20
|
-
|
|
21
|
-
- **AI Chat**: Full conversation mode
|
|
22
|
-
- **Inline Suggestions**: Context-aware completions
|
|
23
|
-
- **Refactoring**: AI-powered code improvements
|
|
24
|
-
- **Test Generation**: Automated test creation
|
|
25
|
-
|
|
26
|
-
## Workflow
|
|
27
|
-
|
|
28
|
-
1. Keep AGENTS.md open in editor
|
|
29
|
-
2. Use AI Chat with "@AGENTS.md" references
|
|
30
|
-
3. Review suggested changes
|
|
31
|
-
4. Run IDE quality checks (built-in linters, tests)
|
|
32
|
-
|
|
33
|
-
**Critical**: Keep AGENTS.md open for AI Assistant to include standards in context.
|
|
34
|
-
|
|
35
|
-
<!-- JETBRAINS_AI:END -->
|
package/templates/ides/REPLIT.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!-- REPLIT:START -->
|
|
2
|
-
# Replit IDE Rules
|
|
3
|
-
|
|
4
|
-
**Tool**: Cloud IDE with Ghostwriter AI
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
Replit Ghostwriter reads workspace files automatically.
|
|
9
|
-
|
|
10
|
-
## Usage
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# In Ghostwriter chat:
|
|
14
|
-
"Follow @AGENTS.md. Implement [feature] with tests."
|
|
15
|
-
|
|
16
|
-
# Inline completions:
|
|
17
|
-
Accept/reject based on AGENTS.md standards
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Features
|
|
21
|
-
|
|
22
|
-
- **Ghostwriter Chat**: AI assistant
|
|
23
|
-
- **Inline Completions**: Code suggestions
|
|
24
|
-
- **Explain Code**: AI explanations
|
|
25
|
-
- **Generate Code**: Full implementations
|
|
26
|
-
|
|
27
|
-
## Workflow
|
|
28
|
-
|
|
29
|
-
1. Keep AGENTS.md in workspace (Ghostwriter reads it)
|
|
30
|
-
2. Reference `@AGENTS.md` in chat
|
|
31
|
-
3. Review suggestions
|
|
32
|
-
4. Run tests in Replit console
|
|
33
|
-
|
|
34
|
-
**Critical**: Ghostwriter has workspace context - AGENTS.md is automatically available.
|
|
35
|
-
|
|
36
|
-
<!-- REPLIT:END -->
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!-- TABNINE:START -->
|
|
2
|
-
# Tabnine AI Rules
|
|
3
|
-
|
|
4
|
-
**Tool**: Multi-IDE AI completion with team learning
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
Works in: VS Code, JetBrains, Vim, Sublime, Atom, Emacs
|
|
9
|
-
|
|
10
|
-
## Usage
|
|
11
|
-
|
|
12
|
-
Tabnine learns from your codebase automatically. Keep AGENTS.md in workspace for team learning.
|
|
13
|
-
|
|
14
|
-
## Features
|
|
15
|
-
|
|
16
|
-
- **Inline Completions**: AI-powered code suggestions
|
|
17
|
-
- **Team Learning**: Learns from team patterns
|
|
18
|
-
- **Multi-IDE**: Consistent across all editors
|
|
19
|
-
|
|
20
|
-
## Workflow
|
|
21
|
-
|
|
22
|
-
1. Keep AGENTS.md in project root
|
|
23
|
-
2. Tabnine learns standards from codebase
|
|
24
|
-
3. Accept/reject suggestions based on AGENTS.md patterns
|
|
25
|
-
4. Team model improves over time
|
|
26
|
-
|
|
27
|
-
**Critical**: Tabnine learns from existing code - maintain AGENTS.md standards in all files.
|
|
28
|
-
|
|
29
|
-
<!-- TABNINE:END -->
|
package/templates/ides/VSCODE.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<!-- VSCODE:START -->
|
|
2
|
-
# VS Code AI Extensions Rules
|
|
3
|
-
|
|
4
|
-
**IDE**: VS Code with Copilot, Cody, Continue, or other AI extensions
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
VS Code reads:
|
|
9
|
-
- `.vscode/settings.json` (generated by `rulebook init`)
|
|
10
|
-
- `.vscode/copilot-instructions.md` (if Copilot enabled)
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# In any AI chat/extension:
|
|
16
|
-
"Follow @AGENTS.md. Implement [feature] with tests (95%+ coverage)."
|
|
17
|
-
|
|
18
|
-
# Keep AGENTS.md open for context
|
|
19
|
-
# Extensions will reference it automatically
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Supported Extensions
|
|
23
|
-
|
|
24
|
-
- GitHub Copilot
|
|
25
|
-
- Cody
|
|
26
|
-
- Continue
|
|
27
|
-
- Codeium
|
|
28
|
-
- Tabnine
|
|
29
|
-
- Amazon Q
|
|
30
|
-
|
|
31
|
-
## Workflow
|
|
32
|
-
|
|
33
|
-
1. Rulebook generates `.vscode/settings.json` and `copilot-instructions.md`
|
|
34
|
-
2. Keep AGENTS.md open in workspace
|
|
35
|
-
3. Reference `@AGENTS.md` in extension prompts
|
|
36
|
-
4. Extensions read workspace context automatically
|
|
37
|
-
|
|
38
|
-
**Critical**: Generated settings point extensions to AGENTS.md standards.
|
|
39
|
-
|
|
40
|
-
<!-- VSCODE:END -->
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!-- WINDSURF:START -->
|
|
2
|
-
# Windsurf IDE Rules
|
|
3
|
-
|
|
4
|
-
**IDE**: AI-powered editor with Cascade AI and Flow State
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
Windsurf reads:
|
|
9
|
-
- `.windsurfrules` (generated by `rulebook init`)
|
|
10
|
-
- AGENTS.md (when open in workspace)
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# In Windsurf chat:
|
|
16
|
-
"Follow @AGENTS.md. Implement [feature] with tests."
|
|
17
|
-
|
|
18
|
-
# Cascade AI:
|
|
19
|
-
Multi-file autonomous mode
|
|
20
|
-
Reference @AGENTS.md for standards
|
|
21
|
-
|
|
22
|
-
# Flow State:
|
|
23
|
-
Inline suggestions
|
|
24
|
-
Context-aware completions
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Workflow
|
|
28
|
-
|
|
29
|
-
1. Rulebook generates `.windsurfrules` → points to AGENTS.md
|
|
30
|
-
2. Keep AGENTS.md open in workspace
|
|
31
|
-
3. Use Cascade for complex tasks with `@AGENTS.md` references
|
|
32
|
-
4. Flow State provides inline suggestions
|
|
33
|
-
|
|
34
|
-
**Critical**: `.windsurfrules` ensures standards are followed automatically.
|
|
35
|
-
|
|
36
|
-
<!-- WINDSURF:END -->
|
package/templates/ides/ZED.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!-- ZED:START -->
|
|
2
|
-
# Zed Editor Rules
|
|
3
|
-
|
|
4
|
-
**Tool**: High-performance collaborative editor (Rust-powered)
|
|
5
|
-
|
|
6
|
-
## Quick Start
|
|
7
|
-
|
|
8
|
-
Zed reads workspace files for AI context.
|
|
9
|
-
|
|
10
|
-
## Usage
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# In Zed AI assistant:
|
|
14
|
-
"Follow @AGENTS.md. Implement [feature] with tests."
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Features
|
|
18
|
-
|
|
19
|
-
- **AI Assistant**: Inline chat
|
|
20
|
-
- **Collaborative Editing**: Real-time collaboration
|
|
21
|
-
- **Fast Performance**: Rust-based, instant responsiveness
|
|
22
|
-
|
|
23
|
-
## Workflow
|
|
24
|
-
|
|
25
|
-
1. Keep AGENTS.md open in workspace
|
|
26
|
-
2. Use AI assistant with `@AGENTS.md` references
|
|
27
|
-
3. Review suggestions
|
|
28
|
-
4. Run quality checks in terminal
|
|
29
|
-
|
|
30
|
-
**Critical**: Zed's AI reads open files - keep AGENTS.md accessible.
|
|
31
|
-
|
|
32
|
-
<!-- ZED:END -->
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Go coding standards and best practices
|
|
3
|
-
globs: ["**/*.go"]
|
|
4
|
-
alwaysApply: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Go Rules
|
|
8
|
-
|
|
9
|
-
See `/.rulebook/specs/GO.md` for full requirements.
|
|
10
|
-
|
|
11
|
-
## Key Rules
|
|
12
|
-
|
|
13
|
-
- Always check and handle errors (never `_` for error returns)
|
|
14
|
-
- Use `errors.Is()` / `errors.As()` for error comparison
|
|
15
|
-
- Prefer `context.Context` for cancellation and deadlines
|
|
16
|
-
- Use `fmt.Errorf("...: %w", err)` for error wrapping
|
|
17
|
-
- Follow standard Go project layout (`cmd/`, `internal/`, `pkg/`)
|
|
18
|
-
- Run `gofmt` and `golangci-lint` before committing
|
|
19
|
-
|
|
20
|
-
## Error Handling
|
|
21
|
-
|
|
22
|
-
- Return errors as last return value
|
|
23
|
-
- Wrap errors with context using `%w`
|
|
24
|
-
- Use sentinel errors for well-known conditions
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Python coding standards and best practices
|
|
3
|
-
globs: ["**/*.py"]
|
|
4
|
-
alwaysApply: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Python Rules
|
|
8
|
-
|
|
9
|
-
See `/.rulebook/specs/PYTHON.md` for full requirements.
|
|
10
|
-
|
|
11
|
-
## Key Rules
|
|
12
|
-
|
|
13
|
-
- Type hints required for all function signatures
|
|
14
|
-
- Use `dataclasses` or `pydantic` for structured data
|
|
15
|
-
- Prefer `pathlib.Path` over `os.path`
|
|
16
|
-
- Use `async/await` for I/O-bound operations
|
|
17
|
-
- Black formatting, ruff linting
|
|
18
|
-
- `__all__` in modules to control public API
|
|
19
|
-
|
|
20
|
-
## Error Handling
|
|
21
|
-
|
|
22
|
-
- Use specific exception types (not bare `except`)
|
|
23
|
-
- Validate inputs at module boundaries
|
|
24
|
-
- Log errors with context before re-raising
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Quality enforcement rules — type safety, linting, testing, coverage
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Quality Enforcement
|
|
7
|
-
|
|
8
|
-
See `/.rulebook/specs/QUALITY_ENFORCEMENT.md` for full requirements.
|
|
9
|
-
|
|
10
|
-
## Mandatory Quality Gates
|
|
11
|
-
|
|
12
|
-
Every change MUST pass all quality gates before merge:
|
|
13
|
-
|
|
14
|
-
1. **Type Check** — `npm run type-check` (zero TypeScript errors)
|
|
15
|
-
2. **Lint** — `npm run lint` (zero ESLint errors)
|
|
16
|
-
3. **Tests** — `npm test` (all tests pass)
|
|
17
|
-
4. **Coverage** — Meet configured threshold (default 75%)
|
|
18
|
-
|
|
19
|
-
## Code Standards
|
|
20
|
-
|
|
21
|
-
- No `any` types without explicit justification
|
|
22
|
-
- No unused variables or imports
|
|
23
|
-
- Error handling at system boundaries only
|
|
24
|
-
- No over-engineering: minimum complexity for the task
|
|
25
|
-
- No backwards-compatibility hacks for unused code
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Ralph autonomous loop directives for AI-driven task completion
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Ralph Autonomous Loop
|
|
7
|
-
|
|
8
|
-
See `/.rulebook/specs/AGENT_AUTOMATION.md` for full directives.
|
|
9
|
-
|
|
10
|
-
## Ralph Commands
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
rulebook ralph init # Initialize autonomous loop
|
|
14
|
-
rulebook ralph run # Start iterating on tasks
|
|
15
|
-
rulebook ralph status # Check progress
|
|
16
|
-
rulebook ralph pause # Pause for manual intervention
|
|
17
|
-
rulebook ralph history # View past iterations
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## PRD Format
|
|
21
|
-
|
|
22
|
-
Ralph uses `.rulebook/ralph/prd.json` with `userStories[]`:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"id": "US-001",
|
|
27
|
-
"title": "Story Title",
|
|
28
|
-
"description": "What needs to be done",
|
|
29
|
-
"acceptanceCriteria": ["Must compile", "Tests pass"],
|
|
30
|
-
"passes": false
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Quality Gates
|
|
35
|
-
|
|
36
|
-
All 4 gates MUST pass per iteration:
|
|
37
|
-
- type-check ✓, lint ✓, tests ✓, coverage ✓
|
|
38
|
-
|
|
39
|
-
Failed gates mark the story `passes: false` for retry.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Core Rulebook project directives and task management rules
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Project Agent Directives
|
|
7
|
-
|
|
8
|
-
Generated by @hivehub/rulebook. See `.rulebook/specs/` for detailed specifications.
|
|
9
|
-
|
|
10
|
-
## Task Management
|
|
11
|
-
|
|
12
|
-
All tasks MUST follow the Rulebook task structure:
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
.rulebook/tasks/<task-id>/
|
|
16
|
-
├── proposal.md # Why and what changes
|
|
17
|
-
├── tasks.md # Simple checklist only
|
|
18
|
-
└── specs/<module>/spec.md # Technical specs
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
- Use `rulebook task create` to create tasks
|
|
22
|
-
- `tasks.md` contains ONLY simple checklist items
|
|
23
|
-
- Technical details go in `specs/<module>/spec.md`
|
|
24
|
-
- NEVER create README.md or PROCESS.md in task directories
|
|
25
|
-
|
|
26
|
-
## Quality Gates
|
|
27
|
-
|
|
28
|
-
Before every commit:
|
|
29
|
-
- `npm run type-check` — TypeScript must compile
|
|
30
|
-
- `npm run lint` — Zero lint errors
|
|
31
|
-
- `npm test` — All tests must pass
|
|
32
|
-
- Coverage threshold must be met
|
|
33
|
-
|
|
34
|
-
## Spec References
|
|
35
|
-
|
|
36
|
-
- Core rules: `/.rulebook/specs/RULEBOOK.md`
|
|
37
|
-
- Quality enforcement: `/.rulebook/specs/QUALITY_ENFORCEMENT.md`
|
|
38
|
-
- Git workflow: `/.rulebook/specs/GIT.md`
|