@hivehub/rulebook 1.2.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/LICENSE +191 -0
- package/README.md +539 -0
- package/dist/agents/claude-code.d.ts +69 -0
- package/dist/agents/claude-code.d.ts.map +1 -0
- package/dist/agents/claude-code.js +180 -0
- package/dist/agents/claude-code.js.map +1 -0
- package/dist/agents/cursor-agent.d.ts +184 -0
- package/dist/agents/cursor-agent.d.ts.map +1 -0
- package/dist/agents/cursor-agent.js +299 -0
- package/dist/agents/cursor-agent.js.map +1 -0
- package/dist/agents/gemini-cli.d.ts +69 -0
- package/dist/agents/gemini-cli.d.ts.map +1 -0
- package/dist/agents/gemini-cli.js +180 -0
- package/dist/agents/gemini-cli.js.map +1 -0
- package/dist/cli/commands.d.ts +57 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +1370 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/docs-prompts.d.ts +3 -0
- package/dist/cli/docs-prompts.d.ts.map +1 -0
- package/dist/cli/docs-prompts.js +45 -0
- package/dist/cli/docs-prompts.js.map +1 -0
- package/dist/cli/prompts.d.ts +6 -0
- package/dist/cli/prompts.d.ts.map +1 -0
- package/dist/cli/prompts.js +376 -0
- package/dist/cli/prompts.js.map +1 -0
- package/dist/core/agent-manager.d.ts +89 -0
- package/dist/core/agent-manager.d.ts.map +1 -0
- package/dist/core/agent-manager.js +546 -0
- package/dist/core/agent-manager.js.map +1 -0
- package/dist/core/auto-fixer.d.ts +14 -0
- package/dist/core/auto-fixer.d.ts.map +1 -0
- package/dist/core/auto-fixer.js +207 -0
- package/dist/core/auto-fixer.js.map +1 -0
- package/dist/core/changelog-generator.d.ts +44 -0
- package/dist/core/changelog-generator.d.ts.map +1 -0
- package/dist/core/changelog-generator.js +222 -0
- package/dist/core/changelog-generator.js.map +1 -0
- package/dist/core/cli-bridge.d.ts +113 -0
- package/dist/core/cli-bridge.d.ts.map +1 -0
- package/dist/core/cli-bridge.js +1094 -0
- package/dist/core/cli-bridge.js.map +1 -0
- package/dist/core/config-manager.d.ts +65 -0
- package/dist/core/config-manager.d.ts.map +1 -0
- package/dist/core/config-manager.js +266 -0
- package/dist/core/config-manager.js.map +1 -0
- package/dist/core/coverage-checker.d.ts +14 -0
- package/dist/core/coverage-checker.d.ts.map +1 -0
- package/dist/core/coverage-checker.js +176 -0
- package/dist/core/coverage-checker.js.map +1 -0
- package/dist/core/custom-templates.d.ts +27 -0
- package/dist/core/custom-templates.d.ts.map +1 -0
- package/dist/core/custom-templates.js +122 -0
- package/dist/core/custom-templates.js.map +1 -0
- package/dist/core/dependency-checker.d.ts +21 -0
- package/dist/core/dependency-checker.d.ts.map +1 -0
- package/dist/core/dependency-checker.js +247 -0
- package/dist/core/dependency-checker.js.map +1 -0
- package/dist/core/detector.d.ts +3 -0
- package/dist/core/detector.d.ts.map +1 -0
- package/dist/core/detector.js +1443 -0
- package/dist/core/detector.js.map +1 -0
- package/dist/core/docs-generator.d.ts +9 -0
- package/dist/core/docs-generator.d.ts.map +1 -0
- package/dist/core/docs-generator.js +531 -0
- package/dist/core/docs-generator.js.map +1 -0
- package/dist/core/generator.d.ts +16 -0
- package/dist/core/generator.d.ts.map +1 -0
- package/dist/core/generator.js +561 -0
- package/dist/core/generator.js.map +1 -0
- package/dist/core/gitignore-generator.d.ts +13 -0
- package/dist/core/gitignore-generator.d.ts.map +1 -0
- package/dist/core/gitignore-generator.js +307 -0
- package/dist/core/gitignore-generator.js.map +1 -0
- package/dist/core/health-scorer.d.ts +22 -0
- package/dist/core/health-scorer.d.ts.map +1 -0
- package/dist/core/health-scorer.js +395 -0
- package/dist/core/health-scorer.js.map +1 -0
- package/dist/core/logger.d.ts +116 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +289 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/merger.d.ts +6 -0
- package/dist/core/merger.d.ts.map +1 -0
- package/dist/core/merger.js +131 -0
- package/dist/core/merger.js.map +1 -0
- package/dist/core/migrator.d.ts +19 -0
- package/dist/core/migrator.d.ts.map +1 -0
- package/dist/core/migrator.js +102 -0
- package/dist/core/migrator.js.map +1 -0
- package/dist/core/minimal-scaffolder.d.ts +8 -0
- package/dist/core/minimal-scaffolder.d.ts.map +1 -0
- package/dist/core/minimal-scaffolder.js +51 -0
- package/dist/core/minimal-scaffolder.js.map +1 -0
- package/dist/core/modern-console-new.d.ts +81 -0
- package/dist/core/modern-console-new.d.ts.map +1 -0
- package/dist/core/modern-console-new.js +340 -0
- package/dist/core/modern-console-new.js.map +1 -0
- package/dist/core/modern-console.d.ts +99 -0
- package/dist/core/modern-console.d.ts.map +1 -0
- package/dist/core/modern-console.js +568 -0
- package/dist/core/modern-console.js.map +1 -0
- package/dist/core/openspec-manager.d.ts +133 -0
- package/dist/core/openspec-manager.d.ts.map +1 -0
- package/dist/core/openspec-manager.js +605 -0
- package/dist/core/openspec-manager.js.map +1 -0
- package/dist/core/openspec-migrator.d.ts +27 -0
- package/dist/core/openspec-migrator.d.ts.map +1 -0
- package/dist/core/openspec-migrator.js +255 -0
- package/dist/core/openspec-migrator.js.map +1 -0
- package/dist/core/task-manager.d.ts +65 -0
- package/dist/core/task-manager.d.ts.map +1 -0
- package/dist/core/task-manager.js +318 -0
- package/dist/core/task-manager.js.map +1 -0
- package/dist/core/test-task-manager.d.ts +49 -0
- package/dist/core/test-task-manager.d.ts.map +1 -0
- package/dist/core/test-task-manager.js +121 -0
- package/dist/core/test-task-manager.js.map +1 -0
- package/dist/core/validator.d.ts +21 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/validator.js +177 -0
- package/dist/core/validator.js.map +1 -0
- package/dist/core/version-bumper.d.ts +19 -0
- package/dist/core/version-bumper.d.ts.map +1 -0
- package/dist/core/version-bumper.js +180 -0
- package/dist/core/version-bumper.js.map +1 -0
- package/dist/core/watcher.d.ts +9 -0
- package/dist/core/watcher.d.ts.map +1 -0
- package/dist/core/watcher.js +22 -0
- package/dist/core/watcher.js.map +1 -0
- package/dist/core/workflow-generator.d.ts +10 -0
- package/dist/core/workflow-generator.d.ts.map +1 -0
- package/dist/core/workflow-generator.js +279 -0
- package/dist/core/workflow-generator.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/handlers/archive-task.d.ts +17 -0
- package/dist/mcp/handlers/archive-task.d.ts.map +1 -0
- package/dist/mcp/handlers/archive-task.js +36 -0
- package/dist/mcp/handlers/archive-task.js.map +1 -0
- package/dist/mcp/handlers/create-task.d.ts +17 -0
- package/dist/mcp/handlers/create-task.d.ts.map +1 -0
- package/dist/mcp/handlers/create-task.js +56 -0
- package/dist/mcp/handlers/create-task.js.map +1 -0
- package/dist/mcp/handlers/list-tasks.d.ts +22 -0
- package/dist/mcp/handlers/list-tasks.d.ts.map +1 -0
- package/dist/mcp/handlers/list-tasks.js +42 -0
- package/dist/mcp/handlers/list-tasks.js.map +1 -0
- package/dist/mcp/handlers/show-task.d.ts +25 -0
- package/dist/mcp/handlers/show-task.d.ts.map +1 -0
- package/dist/mcp/handlers/show-task.js +43 -0
- package/dist/mcp/handlers/show-task.js.map +1 -0
- package/dist/mcp/handlers/update-task.d.ts +17 -0
- package/dist/mcp/handlers/update-task.d.ts.map +1 -0
- package/dist/mcp/handlers/update-task.js +35 -0
- package/dist/mcp/handlers/update-task.js.map +1 -0
- package/dist/mcp/handlers/validate-task.d.ts +15 -0
- package/dist/mcp/handlers/validate-task.d.ts.map +1 -0
- package/dist/mcp/handlers/validate-task.js +27 -0
- package/dist/mcp/handlers/validate-task.js.map +1 -0
- package/dist/mcp/rulebook-config.d.ts +22 -0
- package/dist/mcp/rulebook-config.d.ts.map +1 -0
- package/dist/mcp/rulebook-config.js +65 -0
- package/dist/mcp/rulebook-config.js.map +1 -0
- package/dist/mcp/rulebook-server.d.ts +4 -0
- package/dist/mcp/rulebook-server.d.ts.map +1 -0
- package/dist/mcp/rulebook-server.js +246 -0
- package/dist/mcp/rulebook-server.js.map +1 -0
- package/dist/types.d.ts +190 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +51 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/git-hooks.d.ts +8 -0
- package/dist/utils/git-hooks.d.ts.map +1 -0
- package/dist/utils/git-hooks.js +440 -0
- package/dist/utils/git-hooks.js.map +1 -0
- package/dist/utils/rulesignore.d.ts +9 -0
- package/dist/utils/rulesignore.d.ts.map +1 -0
- package/dist/utils/rulesignore.js +42 -0
- package/dist/utils/rulesignore.js.map +1 -0
- package/package.json +106 -0
- package/templates/cli/AIDER.md +49 -0
- package/templates/cli/AMAZON_Q.md +25 -0
- package/templates/cli/AUGGIE.md +32 -0
- package/templates/cli/CLAUDE.md +32 -0
- package/templates/cli/CLAUDE_CODE.md +35 -0
- package/templates/cli/CLINE.md +32 -0
- package/templates/cli/CODEBUDDY.md +20 -0
- package/templates/cli/CODEIUM.md +20 -0
- package/templates/cli/CODEX.md +21 -0
- package/templates/cli/CONTINUE.md +34 -0
- package/templates/cli/CURSOR_CLI.md +28 -0
- package/templates/cli/FACTORY.md +18 -0
- package/templates/cli/GEMINI.md +35 -0
- package/templates/cli/KILOCODE.md +18 -0
- package/templates/cli/OPENCODE.md +18 -0
- package/templates/cli/_GENERIC_TEMPLATE.md +29 -0
- package/templates/commands/rulebook-task-apply.md +67 -0
- package/templates/commands/rulebook-task-archive.md +70 -0
- package/templates/commands/rulebook-task-create.md +93 -0
- package/templates/commands/rulebook-task-list.md +42 -0
- package/templates/commands/rulebook-task-show.md +52 -0
- package/templates/commands/rulebook-task-validate.md +53 -0
- package/templates/core/AGENT_AUTOMATION.md +184 -0
- package/templates/core/DAG.md +304 -0
- package/templates/core/DOCUMENTATION_RULES.md +37 -0
- package/templates/core/QUALITY_ENFORCEMENT.md +68 -0
- package/templates/core/RULEBOOK.md +1874 -0
- package/templates/frameworks/ANGULAR.md +36 -0
- package/templates/frameworks/DJANGO.md +83 -0
- package/templates/frameworks/ELECTRON.md +147 -0
- package/templates/frameworks/FLASK.md +38 -0
- package/templates/frameworks/FLUTTER.md +55 -0
- package/templates/frameworks/JQUERY.md +32 -0
- package/templates/frameworks/LARAVEL.md +38 -0
- package/templates/frameworks/NESTJS.md +43 -0
- package/templates/frameworks/NEXTJS.md +127 -0
- package/templates/frameworks/NUXT.md +40 -0
- package/templates/frameworks/RAILS.md +66 -0
- package/templates/frameworks/REACT.md +38 -0
- package/templates/frameworks/REACT_NATIVE.md +47 -0
- package/templates/frameworks/SPRING.md +39 -0
- package/templates/frameworks/SYMFONY.md +36 -0
- package/templates/frameworks/VUE.md +36 -0
- package/templates/frameworks/ZEND.md +35 -0
- package/templates/git/CI_CD_PATTERNS.md +661 -0
- package/templates/git/GITHUB_ACTIONS.md +728 -0
- package/templates/git/GITLAB_CI.md +730 -0
- package/templates/git/GIT_WORKFLOW.md +1157 -0
- package/templates/git/SECRETS_MANAGEMENT.md +585 -0
- package/templates/hooks/COMMIT_MSG.md +530 -0
- package/templates/hooks/POST_CHECKOUT.md +546 -0
- package/templates/hooks/PREPARE_COMMIT_MSG.md +619 -0
- package/templates/hooks/PRE_COMMIT.md +414 -0
- package/templates/hooks/PRE_PUSH.md +601 -0
- package/templates/hooks/csharp-pre-commit.sh +23 -0
- package/templates/hooks/csharp-pre-push.sh +23 -0
- package/templates/hooks/dart-pre-commit.sh +30 -0
- package/templates/hooks/dart-pre-push.sh +25 -0
- package/templates/hooks/elixir-pre-commit.sh +32 -0
- package/templates/hooks/elixir-pre-push.sh +31 -0
- package/templates/hooks/erlang-pre-commit.sh +30 -0
- package/templates/hooks/erlang-pre-push.sh +37 -0
- package/templates/hooks/go-pre-commit.sh +40 -0
- package/templates/hooks/go-pre-push.sh +31 -0
- package/templates/hooks/haskell-pre-commit.sh +41 -0
- package/templates/hooks/haskell-pre-push.sh +37 -0
- package/templates/hooks/java-pre-commit.sh +34 -0
- package/templates/hooks/java-pre-push.sh +24 -0
- package/templates/hooks/kotlin-pre-commit.sh +32 -0
- package/templates/hooks/kotlin-pre-push.sh +16 -0
- package/templates/hooks/php-pre-commit.sh +36 -0
- package/templates/hooks/php-pre-push.sh +26 -0
- package/templates/hooks/python-pre-commit.sh +51 -0
- package/templates/hooks/python-pre-push.sh +25 -0
- package/templates/hooks/ruby-pre-commit.sh +33 -0
- package/templates/hooks/ruby-pre-push.sh +32 -0
- package/templates/hooks/rust-pre-commit.sh +30 -0
- package/templates/hooks/rust-pre-push.sh +30 -0
- package/templates/hooks/scala-pre-commit.sh +32 -0
- package/templates/hooks/scala-pre-push.sh +24 -0
- package/templates/hooks/swift-pre-commit.sh +25 -0
- package/templates/hooks/swift-pre-push.sh +23 -0
- package/templates/hooks/typescript-pre-commit.sh +37 -0
- package/templates/hooks/typescript-pre-push.sh +36 -0
- package/templates/ides/COPILOT.md +37 -0
- package/templates/ides/CURSOR.md +43 -0
- package/templates/ides/JETBRAINS_AI.md +35 -0
- package/templates/ides/REPLIT.md +36 -0
- package/templates/ides/TABNINE.md +29 -0
- package/templates/ides/VSCODE.md +40 -0
- package/templates/ides/WINDSURF.md +36 -0
- package/templates/ides/ZED.md +32 -0
- package/templates/languages/ADA.md +58 -0
- package/templates/languages/C.md +333 -0
- package/templates/languages/CPP.md +743 -0
- package/templates/languages/CSHARP.md +417 -0
- package/templates/languages/DART.md +332 -0
- package/templates/languages/ELIXIR.md +454 -0
- package/templates/languages/ERLANG.md +361 -0
- package/templates/languages/GO.md +645 -0
- package/templates/languages/HASKELL.md +177 -0
- package/templates/languages/JAVA.md +607 -0
- package/templates/languages/JAVASCRIPT.md +631 -0
- package/templates/languages/JULIA.md +97 -0
- package/templates/languages/KOTLIN.md +511 -0
- package/templates/languages/LISP.md +100 -0
- package/templates/languages/LUA.md +74 -0
- package/templates/languages/OBJECTIVEC.md +90 -0
- package/templates/languages/PHP.md +416 -0
- package/templates/languages/PYTHON.md +682 -0
- package/templates/languages/R.md +350 -0
- package/templates/languages/RUBY.md +421 -0
- package/templates/languages/RUST.md +477 -0
- package/templates/languages/SAS.md +73 -0
- package/templates/languages/SCALA.md +348 -0
- package/templates/languages/SOLIDITY.md +580 -0
- package/templates/languages/SQL.md +137 -0
- package/templates/languages/SWIFT.md +466 -0
- package/templates/languages/TYPESCRIPT.md +591 -0
- package/templates/languages/ZIG.md +265 -0
- package/templates/modules/ATLASSIAN.md +255 -0
- package/templates/modules/CONTEXT7.md +54 -0
- package/templates/modules/FIGMA.md +267 -0
- package/templates/modules/GITHUB_MCP.md +64 -0
- package/templates/modules/GRAFANA.md +328 -0
- package/templates/modules/NOTION.md +247 -0
- package/templates/modules/PLAYWRIGHT.md +90 -0
- package/templates/modules/RULEBOOK_MCP.md +156 -0
- package/templates/modules/SERENA.md +337 -0
- package/templates/modules/SUPABASE.md +223 -0
- package/templates/modules/SYNAP.md +69 -0
- package/templates/modules/VECTORIZER.md +63 -0
- package/templates/services/AZURE_BLOB.md +184 -0
- package/templates/services/CASSANDRA.md +239 -0
- package/templates/services/DYNAMODB.md +308 -0
- package/templates/services/ELASTICSEARCH.md +347 -0
- package/templates/services/GCS.md +178 -0
- package/templates/services/INFLUXDB.md +265 -0
- package/templates/services/KAFKA.md +341 -0
- package/templates/services/MARIADB.md +183 -0
- package/templates/services/MEMCACHED.md +242 -0
- package/templates/services/MINIO.md +201 -0
- package/templates/services/MONGODB.md +268 -0
- package/templates/services/MYSQL.md +358 -0
- package/templates/services/NEO4J.md +247 -0
- package/templates/services/ORACLE.md +290 -0
- package/templates/services/POSTGRESQL.md +326 -0
- package/templates/services/RABBITMQ.md +286 -0
- package/templates/services/REDIS.md +292 -0
- package/templates/services/S3.md +298 -0
- package/templates/services/SQLITE.md +294 -0
- package/templates/services/SQLSERVER.md +294 -0
- package/templates/workflows/codespell.yml +31 -0
- package/templates/workflows/cpp-lint.yml +47 -0
- package/templates/workflows/cpp-publish.yml +119 -0
- package/templates/workflows/cpp-test.yml +77 -0
- package/templates/workflows/dotnet-lint.yml +29 -0
- package/templates/workflows/dotnet-publish.yml +40 -0
- package/templates/workflows/dotnet-test.yml +41 -0
- package/templates/workflows/elixir-lint.yml +45 -0
- package/templates/workflows/elixir-publish.yml +49 -0
- package/templates/workflows/elixir-test.yml +54 -0
- package/templates/workflows/erlang-lint.yml +47 -0
- package/templates/workflows/erlang-test.yml +62 -0
- package/templates/workflows/go-lint.yml +39 -0
- package/templates/workflows/go-publish.yml +95 -0
- package/templates/workflows/go-test.yml +59 -0
- package/templates/workflows/java-lint.yml +60 -0
- package/templates/workflows/java-publish.yml +120 -0
- package/templates/workflows/java-test.yml +85 -0
- package/templates/workflows/kotlin-lint.yml +34 -0
- package/templates/workflows/kotlin-publish.yml +56 -0
- package/templates/workflows/kotlin-test.yml +48 -0
- package/templates/workflows/php-lint.yml +39 -0
- package/templates/workflows/php-publish.yml +50 -0
- package/templates/workflows/php-test.yml +54 -0
- package/templates/workflows/python-lint.yml +47 -0
- package/templates/workflows/python-publish.yml +91 -0
- package/templates/workflows/python-test.yml +59 -0
- package/templates/workflows/rust-lint.yml +54 -0
- package/templates/workflows/rust-publish.yml +66 -0
- package/templates/workflows/rust-test.yml +75 -0
- package/templates/workflows/solidity-lint.yml +41 -0
- package/templates/workflows/solidity-test.yml +47 -0
- package/templates/workflows/swift-lint.yml +32 -0
- package/templates/workflows/swift-publish.yml +58 -0
- package/templates/workflows/swift-test.yml +44 -0
- package/templates/workflows/typescript-lint.yml +61 -0
- package/templates/workflows/typescript-publish.yml +60 -0
- package/templates/workflows/typescript-test.yml +73 -0
- package/templates/workflows/zig-lint.yml +27 -0
- package/templates/workflows/zig-test.yml +40 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-list
|
|
3
|
+
id: rulebook-task-list
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: List all Rulebook tasks (active and optionally archived).
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **List Active Tasks**:
|
|
15
|
+
```bash
|
|
16
|
+
rulebook task list
|
|
17
|
+
```
|
|
18
|
+
Shows all active tasks with their status (pending, in-progress, completed, blocked).
|
|
19
|
+
|
|
20
|
+
2. **List Including Archived**:
|
|
21
|
+
```bash
|
|
22
|
+
rulebook task list --archived
|
|
23
|
+
```
|
|
24
|
+
Shows both active and archived tasks.
|
|
25
|
+
|
|
26
|
+
3. **Review Task Status**:
|
|
27
|
+
- **pending**: Task not started
|
|
28
|
+
- **in-progress**: Task being worked on
|
|
29
|
+
- **completed**: Task finished (ready for archive)
|
|
30
|
+
- **blocked**: Task blocked by dependency
|
|
31
|
+
|
|
32
|
+
4. **Select Task to Work On**:
|
|
33
|
+
- Choose task with highest priority
|
|
34
|
+
- Check task status before starting
|
|
35
|
+
- Verify task is not blocked
|
|
36
|
+
|
|
37
|
+
**Reference**
|
|
38
|
+
- Use `rulebook task show <task-id>` to view task details
|
|
39
|
+
- Use `rulebook task validate <task-id>` to check task format
|
|
40
|
+
- See `/rulebook/RULEBOOK.md` for complete task management guidelines
|
|
41
|
+
<!-- RULEBOOK:END -->
|
|
42
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-show
|
|
3
|
+
id: rulebook-task-show
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Show detailed information about a specific Rulebook task.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **Show Task Details**:
|
|
15
|
+
```bash
|
|
16
|
+
rulebook task show <task-id>
|
|
17
|
+
```
|
|
18
|
+
Displays:
|
|
19
|
+
- Task ID and title
|
|
20
|
+
- Status (pending, in-progress, completed, blocked)
|
|
21
|
+
- Created and updated dates
|
|
22
|
+
- Archive date (if archived)
|
|
23
|
+
- Proposal summary
|
|
24
|
+
- Spec files list
|
|
25
|
+
|
|
26
|
+
2. **Review Proposal**:
|
|
27
|
+
- Read `proposal.md` to understand why and what changes
|
|
28
|
+
- Check impact assessment
|
|
29
|
+
- Verify breaking changes are documented
|
|
30
|
+
|
|
31
|
+
3. **Review Tasks Checklist**:
|
|
32
|
+
- Check `tasks.md` for implementation checklist
|
|
33
|
+
- Identify completed items (`[x]`)
|
|
34
|
+
- Identify pending items (`[ ]`)
|
|
35
|
+
- Follow priority order (most critical first)
|
|
36
|
+
|
|
37
|
+
4. **Review Spec Deltas**:
|
|
38
|
+
- Check `specs/*/spec.md` files
|
|
39
|
+
- Verify format compliance (SHALL/MUST, 4 hashtags for scenarios)
|
|
40
|
+
- Understand requirements and scenarios
|
|
41
|
+
|
|
42
|
+
5. **Check Task Status**:
|
|
43
|
+
- Verify task is not blocked
|
|
44
|
+
- Check if task is ready for implementation
|
|
45
|
+
- Confirm all prerequisites are met
|
|
46
|
+
|
|
47
|
+
**Reference**
|
|
48
|
+
- Use `rulebook task list` to see all tasks
|
|
49
|
+
- Use `rulebook task validate <task-id>` to check task format
|
|
50
|
+
- See `/rulebook/RULEBOOK.md` for complete task management guidelines
|
|
51
|
+
<!-- RULEBOOK:END -->
|
|
52
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-validate
|
|
3
|
+
id: rulebook-task-validate
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Validate Rulebook task format against OpenSpec-compatible requirements.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines and format requirements.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **Validate Task Format**:
|
|
15
|
+
```bash
|
|
16
|
+
rulebook task validate <task-id>
|
|
17
|
+
```
|
|
18
|
+
Checks:
|
|
19
|
+
- Purpose section length (≥20 characters)
|
|
20
|
+
- Requirement keywords (SHALL/MUST)
|
|
21
|
+
- Scenario format (4 hashtags, not 3)
|
|
22
|
+
- Given/When/Then structure
|
|
23
|
+
- Delta headers format (ADDED/MODIFIED/REMOVED/RENAMED)
|
|
24
|
+
|
|
25
|
+
2. **Review Validation Results**:
|
|
26
|
+
- **Errors**: Must be fixed before proceeding
|
|
27
|
+
- **Warnings**: Should be addressed but not blocking
|
|
28
|
+
|
|
29
|
+
3. **Fix Format Issues**:
|
|
30
|
+
- **Purpose too short**: Expand "Why" section to ≥20 characters
|
|
31
|
+
- **Missing SHALL/MUST**: Add SHALL or MUST keyword to requirements
|
|
32
|
+
- **Wrong scenario format**: Change `### Scenario:` to `#### Scenario:` (4 hashtags)
|
|
33
|
+
- **Missing Given/When/Then**: Replace bullet points with Given/When/Then structure
|
|
34
|
+
- **Wrong delta headers**: Use ADDED/MODIFIED/REMOVED/RENAMED, not "New Requirements"
|
|
35
|
+
|
|
36
|
+
4. **Re-validate After Fixes**:
|
|
37
|
+
```bash
|
|
38
|
+
rulebook task validate <task-id>
|
|
39
|
+
```
|
|
40
|
+
Ensure all errors are resolved.
|
|
41
|
+
|
|
42
|
+
5. **Common Format Errors**:
|
|
43
|
+
- ❌ `### Scenario:` (3 hashtags) → ✅ `#### Scenario:` (4 hashtags)
|
|
44
|
+
- ❌ "The system provides X" → ✅ "The system SHALL provide X"
|
|
45
|
+
- ❌ `- WHEN user does X THEN Y` → ✅ `Given X\nWhen Y\nThen Z`
|
|
46
|
+
- ❌ `## New Requirements` → ✅ `## ADDED Requirements`
|
|
47
|
+
|
|
48
|
+
**Reference**
|
|
49
|
+
- See `/rulebook/RULEBOOK.md` for complete format requirements
|
|
50
|
+
- Use Context7 MCP to get official OpenSpec format documentation
|
|
51
|
+
- Use `rulebook task show <task-id>` to view task details
|
|
52
|
+
<!-- RULEBOOK:END -->
|
|
53
|
+
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<!-- AGENT_AUTOMATION:START -->
|
|
2
|
+
# Agent Automation Rules
|
|
3
|
+
|
|
4
|
+
**CRITICAL**: Mandatory workflow that AI agents MUST execute after EVERY implementation.
|
|
5
|
+
|
|
6
|
+
## Workflow Overview
|
|
7
|
+
|
|
8
|
+
After completing ANY feature, bug fix, or code change, execute this workflow in order:
|
|
9
|
+
|
|
10
|
+
### Step 1: Quality Checks (MANDATORY)
|
|
11
|
+
|
|
12
|
+
Run these checks in order - ALL must pass:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
1. Type check (if applicable)
|
|
16
|
+
2. Lint (MUST pass with ZERO warnings)
|
|
17
|
+
3. Format code
|
|
18
|
+
4. Run ALL tests (MUST pass 100%)
|
|
19
|
+
5. Verify coverage meets threshold (default 95%)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Language-specific commands**: See your language template (TYPESCRIPT, RUST, PYTHON, etc.) for exact commands.
|
|
23
|
+
|
|
24
|
+
**IF ANY CHECK FAILS:**
|
|
25
|
+
- ❌ STOP immediately
|
|
26
|
+
- ❌ DO NOT proceed
|
|
27
|
+
- ❌ DO NOT commit
|
|
28
|
+
- ✅ Fix the issue first
|
|
29
|
+
- ✅ Re-run ALL checks
|
|
30
|
+
|
|
31
|
+
### Step 2: Security & Dependency Audits
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Check for vulnerabilities (language-specific)
|
|
35
|
+
# Check for outdated dependencies (informational)
|
|
36
|
+
# Find unused dependencies (optional)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Language-specific commands**: See your language template for audit commands.
|
|
40
|
+
|
|
41
|
+
**IF VULNERABILITIES FOUND:**
|
|
42
|
+
- ✅ Attempt automatic fix
|
|
43
|
+
- ✅ Document if auto-fix fails
|
|
44
|
+
- ✅ Include in Step 5 report
|
|
45
|
+
- ❌ Never ignore critical/high vulnerabilities without user approval
|
|
46
|
+
|
|
47
|
+
### Step 3: Update OpenSpec Tasks
|
|
48
|
+
|
|
49
|
+
If `openspec/` directory exists:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Mark completed tasks as [DONE]
|
|
53
|
+
# Update in-progress tasks
|
|
54
|
+
# Add new tasks if discovered
|
|
55
|
+
# Update progress percentages
|
|
56
|
+
# Document deviations or blockers
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 4: Update Documentation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Update ROADMAP.md (if feature is milestone)
|
|
63
|
+
# Update CHANGELOG.md (conventional commits format)
|
|
64
|
+
# Update feature specs (if implementation differs)
|
|
65
|
+
# Update README.md (if public API changed)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 5: Git Commit
|
|
69
|
+
|
|
70
|
+
**ONLY after ALL above steps pass:**
|
|
71
|
+
|
|
72
|
+
**⚠️ CRITICAL: All commit messages MUST be in English**
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git add .
|
|
76
|
+
git commit -m "<type>(<scope>): <description>
|
|
77
|
+
|
|
78
|
+
- Detailed change 1
|
|
79
|
+
- Detailed change 2
|
|
80
|
+
- Tests: [describe coverage]
|
|
81
|
+
- Coverage: X% (threshold: 95%)
|
|
82
|
+
|
|
83
|
+
Closes #<issue> (if applicable)"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Commit Types**: `feat`, `fix`, `docs`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`
|
|
87
|
+
|
|
88
|
+
**Language Requirement**: Commit messages must be written in English. Never use Portuguese, Spanish, or any other language.
|
|
89
|
+
|
|
90
|
+
### Step 6: Report to User
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
✅ Implementation Complete
|
|
94
|
+
|
|
95
|
+
📝 Changes:
|
|
96
|
+
- [List main changes]
|
|
97
|
+
|
|
98
|
+
🧪 Quality Checks:
|
|
99
|
+
- ✅ Type check: Passed
|
|
100
|
+
- ✅ Linting: Passed (0 warnings)
|
|
101
|
+
- ✅ Formatting: Applied
|
|
102
|
+
- ✅ Tests: X/X passed (100%)
|
|
103
|
+
- ✅ Coverage: X% (threshold: 95%)
|
|
104
|
+
|
|
105
|
+
🔒 Security:
|
|
106
|
+
- ✅ No vulnerabilities
|
|
107
|
+
|
|
108
|
+
📊 OpenSpec:
|
|
109
|
+
- ✅ Tasks updated
|
|
110
|
+
- ✅ Progress: X% → Y%
|
|
111
|
+
|
|
112
|
+
📚 Documentation:
|
|
113
|
+
- ✅ CHANGELOG.md updated
|
|
114
|
+
- ✅ [other docs updated]
|
|
115
|
+
|
|
116
|
+
💾 Git:
|
|
117
|
+
- ✅ Committed: <commit message>
|
|
118
|
+
- ✅ Hash: <commit hash>
|
|
119
|
+
|
|
120
|
+
📋 Next Steps:
|
|
121
|
+
- [ ] Review changes
|
|
122
|
+
- [ ] Push to remote (if ready)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Automation Exceptions
|
|
126
|
+
|
|
127
|
+
Skip steps ONLY when:
|
|
128
|
+
|
|
129
|
+
1. **Exploratory Code**: User says "experimental", "draft", "try"
|
|
130
|
+
- Still run quality checks
|
|
131
|
+
- Don't commit
|
|
132
|
+
|
|
133
|
+
2. **User Explicitly Requests**: User says "skip tests", "no commit"
|
|
134
|
+
- Only skip requested step
|
|
135
|
+
- Warn about skipped steps
|
|
136
|
+
|
|
137
|
+
3. **Emergency Hotfix**: Critical production bug
|
|
138
|
+
- Run minimal checks
|
|
139
|
+
- Document technical debt
|
|
140
|
+
|
|
141
|
+
**In ALL other cases: Execute complete workflow**
|
|
142
|
+
|
|
143
|
+
## Error Recovery
|
|
144
|
+
|
|
145
|
+
If workflow fails 3+ times:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
1. Create backup branch
|
|
149
|
+
2. Reset to last stable commit
|
|
150
|
+
3. Report to user with error details
|
|
151
|
+
4. Request guidance or try alternative approach
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Best Practices
|
|
155
|
+
|
|
156
|
+
### DO's ✅
|
|
157
|
+
- ALWAYS run complete workflow
|
|
158
|
+
- ALWAYS update OpenSpec and documentation
|
|
159
|
+
- ALWAYS use conventional commits
|
|
160
|
+
- ALWAYS report summary to user
|
|
161
|
+
- ASK before skipping steps
|
|
162
|
+
|
|
163
|
+
### DON'Ts ❌
|
|
164
|
+
- NEVER skip quality checks without permission
|
|
165
|
+
- NEVER commit failing tests
|
|
166
|
+
- NEVER commit linting errors
|
|
167
|
+
- NEVER skip documentation updates
|
|
168
|
+
- NEVER assume user wants to skip automation
|
|
169
|
+
- NEVER commit debug code or secrets
|
|
170
|
+
|
|
171
|
+
## Summary
|
|
172
|
+
|
|
173
|
+
**Complete workflow after EVERY implementation:**
|
|
174
|
+
|
|
175
|
+
1. ✅ Quality checks (type, lint, format, test, coverage)
|
|
176
|
+
2. ✅ Security audit
|
|
177
|
+
3. ✅ Update OpenSpec tasks
|
|
178
|
+
4. ✅ Update documentation
|
|
179
|
+
5. ✅ Git commit (conventional format)
|
|
180
|
+
6. ✅ Report summary to user
|
|
181
|
+
|
|
182
|
+
**Only skip with explicit user permission and document why.**
|
|
183
|
+
|
|
184
|
+
<!-- AGENT_AUTOMATION:END -->
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
<!-- DAG:START -->
|
|
2
|
+
# Dependency Architecture Guidelines (DAG)
|
|
3
|
+
|
|
4
|
+
**CRITICAL**: Maintain a clean dependency graph (DAG) to prevent circular dependencies and ensure maintainable architecture.
|
|
5
|
+
|
|
6
|
+
## Core Principles
|
|
7
|
+
|
|
8
|
+
### No Circular Dependencies
|
|
9
|
+
- **NEVER** create circular dependencies between components
|
|
10
|
+
- **ALWAYS** ensure dependencies form a Directed Acyclic Graph (DAG)
|
|
11
|
+
- **ALWAYS** validate dependency structure before committing
|
|
12
|
+
|
|
13
|
+
### Layer Separation
|
|
14
|
+
- **ALWAYS** maintain clear layer boundaries
|
|
15
|
+
- **ALWAYS** ensure higher layers depend only on lower layers
|
|
16
|
+
- **NEVER** allow lower layers to depend on higher layers
|
|
17
|
+
|
|
18
|
+
### Interface Boundaries
|
|
19
|
+
- **ALWAYS** use interfaces for cross-component communication
|
|
20
|
+
- **ALWAYS** define clear contracts between components
|
|
21
|
+
- **NEVER** create tight coupling between components
|
|
22
|
+
|
|
23
|
+
## Dependency Rules
|
|
24
|
+
|
|
25
|
+
### Layer Architecture
|
|
26
|
+
|
|
27
|
+
**Layer 1: Foundation**
|
|
28
|
+
- Utils, helpers, utilities
|
|
29
|
+
- Type definitions
|
|
30
|
+
- Configuration management
|
|
31
|
+
- Base constants and enums
|
|
32
|
+
|
|
33
|
+
**Layer 2: Core**
|
|
34
|
+
- Core business logic
|
|
35
|
+
- Data models and schemas
|
|
36
|
+
- Base services and repositories
|
|
37
|
+
- Domain entities
|
|
38
|
+
|
|
39
|
+
**Layer 3: Features**
|
|
40
|
+
- Feature implementations
|
|
41
|
+
- Business logic
|
|
42
|
+
- API endpoints
|
|
43
|
+
- Service orchestration
|
|
44
|
+
|
|
45
|
+
**Layer 4: Presentation**
|
|
46
|
+
- UI components
|
|
47
|
+
- CLI interfaces
|
|
48
|
+
- API controllers
|
|
49
|
+
- View models
|
|
50
|
+
|
|
51
|
+
### Dependency Flow
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Foundation → Core → Features → Presentation
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Rules:**
|
|
58
|
+
- ✅ Foundation can depend on nothing (or external libraries only)
|
|
59
|
+
- ✅ Core can depend on Foundation
|
|
60
|
+
- ✅ Features can depend on Core and Foundation
|
|
61
|
+
- ✅ Presentation can depend on Features, Core, and Foundation
|
|
62
|
+
- ❌ Foundation CANNOT depend on Core, Features, or Presentation
|
|
63
|
+
- ❌ Core CANNOT depend on Features or Presentation
|
|
64
|
+
- ❌ Features CANNOT depend on Presentation
|
|
65
|
+
|
|
66
|
+
## Component Graph Structure
|
|
67
|
+
|
|
68
|
+
### Example Valid DAG
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Core
|
|
72
|
+
├── Utils
|
|
73
|
+
├── Types
|
|
74
|
+
└── Config
|
|
75
|
+
|
|
76
|
+
Features
|
|
77
|
+
├── Feature A
|
|
78
|
+
│ └── Core
|
|
79
|
+
└── Feature B
|
|
80
|
+
├── Core
|
|
81
|
+
└── Feature A
|
|
82
|
+
|
|
83
|
+
Presentation
|
|
84
|
+
├── CLI
|
|
85
|
+
│ └── Features
|
|
86
|
+
└── API
|
|
87
|
+
└── Features
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Invalid Patterns (Circular Dependencies)
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
❌ Feature A → Feature B → Feature A
|
|
94
|
+
❌ Core → Feature → Core
|
|
95
|
+
❌ Utils → Core → Utils
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Verification
|
|
99
|
+
|
|
100
|
+
### Before Committing
|
|
101
|
+
|
|
102
|
+
**MANDATORY**: Verify dependency structure:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Check for circular dependencies
|
|
106
|
+
# Add your dependency check command here
|
|
107
|
+
# Examples:
|
|
108
|
+
# - TypeScript: tsc --noEmit (catches import cycles)
|
|
109
|
+
# - Rust: cargo check (catches circular dependencies)
|
|
110
|
+
# - Python: pylint --disable=all --enable=import-error
|
|
111
|
+
# - Go: go vet ./...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Dependency Analysis Tools
|
|
115
|
+
|
|
116
|
+
**TypeScript/JavaScript:**
|
|
117
|
+
```bash
|
|
118
|
+
# Use madge to detect circular dependencies
|
|
119
|
+
npx madge --circular src/
|
|
120
|
+
|
|
121
|
+
# Use dependency-cruiser
|
|
122
|
+
npx dependency-cruiser --validate src/
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Rust:**
|
|
126
|
+
```bash
|
|
127
|
+
# Cargo automatically detects circular dependencies
|
|
128
|
+
cargo check
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Python:**
|
|
132
|
+
```bash
|
|
133
|
+
# Use vulture or pylint
|
|
134
|
+
pylint --disable=all --enable=import-error src/
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Go:**
|
|
138
|
+
```bash
|
|
139
|
+
# Use go vet
|
|
140
|
+
go vet ./...
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Best Practices
|
|
144
|
+
|
|
145
|
+
### DO's ✅
|
|
146
|
+
|
|
147
|
+
- **ALWAYS** maintain clear layer boundaries
|
|
148
|
+
- **ALWAYS** validate dependencies before committing
|
|
149
|
+
- **ALWAYS** use interfaces for cross-layer communication
|
|
150
|
+
- **ALWAYS** document component dependencies
|
|
151
|
+
- **ALWAYS** refactor when circular dependencies are detected
|
|
152
|
+
- **ALWAYS** keep dependency graph shallow (avoid deep nesting)
|
|
153
|
+
|
|
154
|
+
### DON'Ts ❌
|
|
155
|
+
|
|
156
|
+
- **NEVER** create circular dependencies
|
|
157
|
+
- **NEVER** allow lower layers to depend on higher layers
|
|
158
|
+
- **NEVER** create tight coupling between components
|
|
159
|
+
- **NEVER** skip dependency validation
|
|
160
|
+
- **NEVER** mix concerns across layers
|
|
161
|
+
- **NEVER** create bidirectional dependencies
|
|
162
|
+
|
|
163
|
+
## Dependency Documentation
|
|
164
|
+
|
|
165
|
+
### Documenting Dependencies
|
|
166
|
+
|
|
167
|
+
**In code:**
|
|
168
|
+
```typescript
|
|
169
|
+
// Component: UserService
|
|
170
|
+
// Dependencies:
|
|
171
|
+
// - UserRepository (Core layer)
|
|
172
|
+
// - Logger (Foundation layer)
|
|
173
|
+
// - Config (Foundation layer)
|
|
174
|
+
// Does NOT depend on:
|
|
175
|
+
// - UserController (Presentation layer)
|
|
176
|
+
// - UserAPI (Presentation layer)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**In documentation:**
|
|
180
|
+
- Maintain `docs/DAG.md` with component dependency graph
|
|
181
|
+
- Update when adding new components
|
|
182
|
+
- Include dependency direction and purpose
|
|
183
|
+
|
|
184
|
+
## Refactoring Circular Dependencies
|
|
185
|
+
|
|
186
|
+
### When Circular Dependency is Detected
|
|
187
|
+
|
|
188
|
+
1. **Identify the cycle**: Map the dependency chain
|
|
189
|
+
2. **Find common dependency**: Extract shared functionality
|
|
190
|
+
3. **Introduce interface**: Use dependency inversion
|
|
191
|
+
4. **Restructure layers**: Move components to appropriate layer
|
|
192
|
+
5. **Validate fix**: Run dependency check again
|
|
193
|
+
|
|
194
|
+
### Example Refactoring
|
|
195
|
+
|
|
196
|
+
**Before (Circular):**
|
|
197
|
+
```
|
|
198
|
+
Feature A → Feature B → Feature A
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**After (Fixed):**
|
|
202
|
+
```
|
|
203
|
+
Core
|
|
204
|
+
└── SharedService
|
|
205
|
+
|
|
206
|
+
Feature A → Core
|
|
207
|
+
Feature B → Core
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Integration with AGENT_AUTOMATION
|
|
211
|
+
|
|
212
|
+
**CRITICAL**: Include dependency validation in AGENT_AUTOMATION workflow:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Step 1.5: Dependency Validation (before implementation)
|
|
216
|
+
# Check for circular dependencies
|
|
217
|
+
npm run check-deps # or equivalent for your language
|
|
218
|
+
|
|
219
|
+
# If circular dependencies detected:
|
|
220
|
+
# ❌ STOP - Fix architecture first
|
|
221
|
+
# ✅ Refactor to remove cycles
|
|
222
|
+
# ✅ Re-validate before proceeding
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Language-Specific Guidelines
|
|
226
|
+
|
|
227
|
+
### TypeScript/JavaScript
|
|
228
|
+
- Use `madge` or `dependency-cruiser` for validation
|
|
229
|
+
- Configure ESLint rules for import ordering
|
|
230
|
+
- Use path aliases to enforce layer structure
|
|
231
|
+
|
|
232
|
+
### Rust
|
|
233
|
+
- Cargo automatically detects circular dependencies
|
|
234
|
+
- Use `cargo tree` to visualize dependencies
|
|
235
|
+
- Organize modules to reflect layer structure
|
|
236
|
+
|
|
237
|
+
### Python
|
|
238
|
+
- Use `pylint` or `vulture` for import analysis
|
|
239
|
+
- Organize packages to reflect layer structure
|
|
240
|
+
- Use `__init__.py` to control exports
|
|
241
|
+
|
|
242
|
+
### Go
|
|
243
|
+
- Use `go vet` for dependency validation
|
|
244
|
+
- Organize packages in directories reflecting layers
|
|
245
|
+
- Use interfaces to decouple components
|
|
246
|
+
|
|
247
|
+
## Examples
|
|
248
|
+
|
|
249
|
+
### Good Architecture ✅
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
src/
|
|
253
|
+
├── foundation/
|
|
254
|
+
│ ├── utils/
|
|
255
|
+
│ ├── types/
|
|
256
|
+
│ └── config/
|
|
257
|
+
├── core/
|
|
258
|
+
│ ├── models/
|
|
259
|
+
│ ├── services/
|
|
260
|
+
│ └── repositories/
|
|
261
|
+
├── features/
|
|
262
|
+
│ ├── auth/
|
|
263
|
+
│ │ └── (depends on core, foundation)
|
|
264
|
+
│ └── payments/
|
|
265
|
+
│ └── (depends on core, foundation)
|
|
266
|
+
└── presentation/
|
|
267
|
+
├── cli/
|
|
268
|
+
│ └── (depends on features, core, foundation)
|
|
269
|
+
└── api/
|
|
270
|
+
└── (depends on features, core, foundation)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Bad Architecture ❌
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
src/
|
|
277
|
+
├── features/
|
|
278
|
+
│ └── auth/
|
|
279
|
+
│ └── (depends on presentation) # ❌ Wrong direction
|
|
280
|
+
├── core/
|
|
281
|
+
│ └── (depends on features) # ❌ Wrong direction
|
|
282
|
+
└── presentation/
|
|
283
|
+
└── (depends on foundation only) # ❌ Missing dependencies
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Maintenance
|
|
287
|
+
|
|
288
|
+
### Regular Checks
|
|
289
|
+
|
|
290
|
+
- **Before every commit**: Run dependency validation
|
|
291
|
+
- **Weekly**: Review dependency graph for optimization
|
|
292
|
+
- **Before major refactoring**: Document current dependencies
|
|
293
|
+
- **After adding new components**: Update DAG documentation
|
|
294
|
+
|
|
295
|
+
### Tools Integration
|
|
296
|
+
|
|
297
|
+
Add dependency checks to:
|
|
298
|
+
- Pre-commit hooks
|
|
299
|
+
- CI/CD pipelines
|
|
300
|
+
- AGENT_AUTOMATION workflow
|
|
301
|
+
- Quality gates
|
|
302
|
+
|
|
303
|
+
<!-- DAG:END -->
|
|
304
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Documentation Standards
|
|
2
|
+
|
|
3
|
+
**CRITICAL**: All documentation in English. Root README concise, detailed docs in `/docs`.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
**Root-Level (ONLY):**
|
|
8
|
+
- `README.md` - Overview + quick start
|
|
9
|
+
- `CHANGELOG.md` - Version history
|
|
10
|
+
- `AGENTS.md` - AI instructions
|
|
11
|
+
- `LICENSE`, `CONTRIBUTING.md`, `SECURITY.md`
|
|
12
|
+
|
|
13
|
+
**All Other Docs in `/docs`:**
|
|
14
|
+
- `ARCHITECTURE.md`, `DEVELOPMENT.md`, `ROADMAP.md`
|
|
15
|
+
- `specs/`, `guides/`, `diagrams/`, `benchmarks/`
|
|
16
|
+
|
|
17
|
+
## Update Requirements by Commit Type
|
|
18
|
+
|
|
19
|
+
| Type | Update |
|
|
20
|
+
|------|--------|
|
|
21
|
+
| `feat` | README features, API docs, CHANGELOG "Added" |
|
|
22
|
+
| `fix` | Troubleshooting, CHANGELOG "Fixed" |
|
|
23
|
+
| `breaking` | CHANGELOG + migration guide, version docs |
|
|
24
|
+
| `perf` | Benchmarks, CHANGELOG "Performance" |
|
|
25
|
+
| `security` | SECURITY.md, CHANGELOG "Security" |
|
|
26
|
+
| `docs` | Verify spelling/links only |
|
|
27
|
+
| `refactor` | Update if behavior changed |
|
|
28
|
+
|
|
29
|
+
## Quality Checks (CI/CD)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
markdownlint **/*.md # Lint markdown
|
|
33
|
+
markdown-link-check **/*.md # Check links
|
|
34
|
+
codespell **/*.md # Spell check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**MUST pass before commit** (see AGENT_AUTOMATION).
|