devhive 0.1.25__tar.gz → 0.1.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {devhive-0.1.25/devhive.egg-info → devhive-0.1.26}/PKG-INFO +1 -1
  2. {devhive-0.1.25 → devhive-0.1.26/devhive.egg-info}/PKG-INFO +1 -1
  3. {devhive-0.1.25 → devhive-0.1.26}/devhive.egg-info/SOURCES.txt +1 -0
  4. {devhive-0.1.25 → devhive-0.1.26}/devhive_cli/main.py +6 -1
  5. {devhive-0.1.25 → devhive-0.1.26}/devhive_cli/templates_backend.py +21 -62
  6. {devhive-0.1.25 → devhive-0.1.26}/setup.py +1 -1
  7. devhive-0.1.26/templates/AGENTS.backend.md +54 -0
  8. {devhive-0.1.25 → devhive-0.1.26}/LICENSE +0 -0
  9. {devhive-0.1.25 → devhive-0.1.26}/MANIFEST.in +0 -0
  10. {devhive-0.1.25 → devhive-0.1.26}/README.md +0 -0
  11. {devhive-0.1.25 → devhive-0.1.26}/community_skills/architecture-patterns/SKILL.md +0 -0
  12. {devhive-0.1.25 → devhive-0.1.26}/community_skills/architecture-patterns/resources/implementation-playbook.md +0 -0
  13. {devhive-0.1.25 → devhive-0.1.26}/community_skills/backend-arthitect/SKILL.md +0 -0
  14. {devhive-0.1.25 → devhive-0.1.26}/community_skills/backend-security-coder/SKILL.md +0 -0
  15. {devhive-0.1.25 → devhive-0.1.26}/community_skills/docker-expert/SKILL.md +0 -0
  16. {devhive-0.1.25 → devhive-0.1.26}/community_skills/frontend-design/SKILL.md +0 -0
  17. {devhive-0.1.25 → devhive-0.1.26}/community_skills/frontend-developer/SKILL.md +0 -0
  18. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/SKILL.md +0 -0
  19. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/theme-showcase.pdf +0 -0
  20. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/arctic-frost.md +0 -0
  21. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/botanical-garden.md +0 -0
  22. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/desert-rose.md +0 -0
  23. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/forest-canopy.md +0 -0
  24. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/golden-hour.md +0 -0
  25. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/midnight-galaxy.md +0 -0
  26. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/modern-minimalist.md +0 -0
  27. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/ocean-depths.md +0 -0
  28. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/sunset-boulevard.md +0 -0
  29. {devhive-0.1.25 → devhive-0.1.26}/community_skills/theme-factory/themes/tech-innovation.md +0 -0
  30. {devhive-0.1.25 → devhive-0.1.26}/devhive.egg-info/dependency_links.txt +0 -0
  31. {devhive-0.1.25 → devhive-0.1.26}/devhive.egg-info/entry_points.txt +0 -0
  32. {devhive-0.1.25 → devhive-0.1.26}/devhive.egg-info/requires.txt +0 -0
  33. {devhive-0.1.25 → devhive-0.1.26}/devhive.egg-info/top_level.txt +0 -0
  34. {devhive-0.1.25 → devhive-0.1.26}/devhive_cli/__init__.py +0 -0
  35. {devhive-0.1.25 → devhive-0.1.26}/setup.cfg +0 -0
  36. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_architect/SKILL.md +0 -0
  37. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_auditor/SKILL.md +0 -0
  38. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_backender/SKILL.md +0 -0
  39. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_dba/SKILL.md +0 -0
  40. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_designer/SKILL.md +0 -0
  41. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_devops/SKILL.md +0 -0
  42. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_explorer/SKILL.md +0 -0
  43. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_frontender/SKILL.md +0 -0
  44. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_orchestrator/SKILL.md +0 -0
  45. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_perf/SKILL.md +0 -0
  46. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_proposal/SKILL.md +0 -0
  47. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_qa/SKILL.md +0 -0
  48. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_releaser/SKILL.md +0 -0
  49. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_sast/SKILL.md +0 -0
  50. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_taskplanner/SKILL.md +0 -0
  51. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_techwriter/SKILL.md +0 -0
  52. {devhive-0.1.25 → devhive-0.1.26}/skills/devhive_workflow.md +0 -0
  53. {devhive-0.1.25 → devhive-0.1.26}/templates/AGENTS.frontend.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary: CLI to manage DevHive skills and autonomous AI agents for OpenCode.
5
5
  Home-page: https://github.com/ramBlanco/devhive
6
6
  Author: ramBlanco
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary: CLI to manage DevHive skills and autonomous AI agents for OpenCode.
5
5
  Home-page: https://github.com/ramBlanco/devhive
6
6
  Author: ramBlanco
@@ -47,4 +47,5 @@ skills/devhive_releaser/SKILL.md
47
47
  skills/devhive_sast/SKILL.md
48
48
  skills/devhive_taskplanner/SKILL.md
49
49
  skills/devhive_techwriter/SKILL.md
50
+ templates/AGENTS.backend.md
50
51
  templates/AGENTS.frontend.md
@@ -115,7 +115,12 @@ def init_backend():
115
115
 
116
116
  iac = click.prompt("Which IaC tool are you using?", type=click.Choice(['cdk', 'terraform', 'serverless']))
117
117
 
118
- md_content = generate_backend_agents_md(language, framework, iac, use_di)
118
+ template_path = TEMPLATES_DIR / "AGENTS.backend.md"
119
+ if not template_path.exists():
120
+ click.secho("Error: Backend template not found in the devhive package.", fg="red")
121
+ return
122
+
123
+ md_content = generate_backend_agents_md(template_path, language, framework, iac, use_di)
119
124
 
120
125
  with open(dest_path, "w", encoding="utf-8") as f:
121
126
  f.write(md_content)
@@ -1,4 +1,7 @@
1
- def generate_backend_agents_md(language: str, framework: str, iac: str, use_di: bool) -> str:
1
+ import os
2
+ from pathlib import Path
3
+
4
+ def generate_backend_agents_md(template_path: Path, language: str, framework: str, iac: str, use_di: bool) -> str:
2
5
  stack_list = []
3
6
  if language == 'python':
4
7
  stack_list.append("- **Language**: Python 3.10+ (Strict Type Hinting)")
@@ -29,73 +32,21 @@ def generate_backend_agents_md(language: str, framework: str, iac: str, use_di:
29
32
  stack_list.append("- **Infrastructure as Code**: Serverless Framework")
30
33
 
31
34
  stack_section = "\n".join(stack_list)
35
+ iac_tool_upper = iac.upper()
32
36
 
33
- # Base structure
34
- md = f"""# Backend Architecture & AI Agent Guidelines
35
-
36
- This `AGENTS.md` (or `GUIDELINES.md`) file serves as the strict instruction manual for OpenCode and DevHive agents. It defines the technical stack, architectural patterns, and coding conventions for this backend project.
37
-
38
- ## 🛠️ 1. Tech Stack
39
- {stack_section}
40
-
41
- ## 🧠 2. OpenCode Skills to Load
42
- Agents **MUST** load the following specialized skills before executing tasks:
43
- - `architecture-patterns`: For maintaining clean separation of concerns and Hexagonal Architecture.
44
- - `backend-architect`: For scalable API design and domain modeling.
45
- - `backend-security-coder`: For secure coding practices, input validation, and auth.
46
- - `devhive-devops`: For {iac.upper()} infrastructure setup.
47
-
48
- ## 📂 3. Project Structure (Hexagonal Architecture)
49
- For maximum scalability, testability, and maintainability, the project MUST strictly follow Hexagonal Architecture (Ports & Adapters).
50
-
51
- ```text
52
- src/
53
- ├── domain/ # ENTERPRISE BUSINESS RULES (No external dependencies)
54
- │ ├── entities/ # Pure domain models
55
- │ └── exceptions/ # Domain-specific errors
56
- ├── application/ # APPLICATION BUSINESS RULES (Use Cases & Ports)
57
- │ ├── use_cases/ # Orchestrates domain logic
58
- │ └── ports/ # Interfaces for outbound communication (Repositories, External APIs)
59
- ├── infrastructure/ # ADAPTERS (Database, External Services, Third-party libs)
60
- │ ├── database/ # Concrete implementation of repository ports
61
- │ └── di/ # Dependency Injection container/setup
62
- └── presentation/ # ENTRY POINTS (Controllers, REST APIs, GraphQL, Lambdas)
63
- └── controllers/ # Parses HTTP requests and calls use cases
64
-
65
- infrastructure/ # IaC DEFINITIONS (Outside src/)
66
- └── # {iac.upper()} configurations
67
- ```
68
-
69
- ## 📐 4. Architectural Rules & Clean Code (CRITICAL)
70
-
71
- 1. **The Dependency Rule**: Source code dependencies MUST only point inward, toward the `domain/`.
72
- - `domain/` knows nothing about anything else.
73
- - `application/` depends only on `domain/`.
74
- - `infrastructure/` and `presentation/` depend on `application/` and `domain/`.
75
- - **Never import an infrastructure detail (like a DB model) into a use case.**
76
-
77
- 2. **Ports and Adapters**:
78
- - Outbound communication (like DB queries) MUST be defined as an interface (Port) in the `application/` layer.
79
- - The actual database logic MUST be implemented as an Adapter in the `infrastructure/` layer.
80
-
81
- 3. **Dependency Injection**:
82
- - Use Cases must receive their dependencies (Ports) via constructor injection.
83
- - The Presentation layer resolves these dependencies and passes them to the Use Cases.
84
- """
85
-
37
+ di_rules = ""
86
38
  if language == 'node' and use_di:
87
- md += """
39
+ di_rules = """
88
40
  4. **InversifyJS Usage**:
89
41
  - Decorate concrete adapters in `infrastructure/` with `@injectable()`.
90
42
  - Bind interfaces to symbols in an `inversify.config.ts` container file.
91
43
  - Use the container in the `presentation/` layer to resolve use cases.
92
44
  """
93
45
 
94
- md += "\n## 💻 5. Code Examples\n\n"
95
-
46
+ code_examples = ""
96
47
  if language == 'python':
97
48
  if framework == 'fastapi':
98
- md += """### Example: FastAPI + Hexagonal Architecture
49
+ code_examples = """### Example: FastAPI + Hexagonal Architecture
99
50
 
100
51
  **1. Port (Application Layer)**
101
52
  *File: `src/application/ports/user_repository.py`*
@@ -165,7 +116,7 @@ def get_user(user_id: str, use_case: GetUserUseCase = Depends(get_user_use_case)
165
116
  ```
166
117
  """
167
118
  elif framework == 'django':
168
- md += """### Example: Django + Hexagonal Architecture
119
+ code_examples = """### Example: Django + Hexagonal Architecture
169
120
 
170
121
  **Note on Django**: Do NOT put business logic in Django Views or Models. Use Django ONLY as the `infrastructure/` and `presentation/` layers.
171
122
 
@@ -217,7 +168,7 @@ def get_user_view(request, user_id: str):
217
168
  ```
218
169
  """
219
170
  else:
220
- md += """### Example: Pure Python + Hexagonal Architecture
171
+ code_examples = """### Example: Pure Python + Hexagonal Architecture
221
172
 
222
173
  **1. Port (Application Layer)**
223
174
  *File: `src/application/ports/user_repository.py`*
@@ -262,7 +213,7 @@ def lambda_handler(event, context):
262
213
  """
263
214
  else: # Node.js
264
215
  if use_di:
265
- md += """### Example: Node.js + TypeScript + InversifyJS
216
+ code_examples = """### Example: Node.js + TypeScript + InversifyJS
266
217
 
267
218
  **1. Port (Application Layer)**
268
219
  *File: `src/application/ports/IUserRepository.ts`*
@@ -356,7 +307,7 @@ export class UserController {
356
307
  ```
357
308
  """
358
309
  else:
359
- md += """### Example: Node.js + TypeScript (Manual DI)
310
+ code_examples = """### Example: Node.js + TypeScript (Manual DI)
360
311
 
361
312
  **1. Port (Application Layer)**
362
313
  *File: `src/application/ports/IUserRepository.ts`*
@@ -421,4 +372,12 @@ export class UserController {
421
372
  ```
422
373
  """
423
374
 
375
+ with open(template_path, 'r', encoding='utf-8') as f:
376
+ md = f.read()
377
+
378
+ md = md.replace("{{TECH_STACK}}", stack_section)
379
+ md = md.replace("{{IAC_TOOL}}", iac_tool_upper)
380
+ md = md.replace("{{DI_RULES}}", di_rules)
381
+ md = md.replace("{{CODE_EXAMPLES}}", code_examples)
382
+
424
383
  return md
@@ -8,7 +8,7 @@ with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
8
8
 
9
9
  setup(
10
10
  name="devhive",
11
- version="0.1.25",
11
+ version="0.1.26",
12
12
  packages=find_packages(),
13
13
  include_package_data=True,
14
14
  install_requires=[
@@ -0,0 +1,54 @@
1
+ # Backend Architecture & AI Agent Guidelines
2
+
3
+ This `AGENTS.md` (or `GUIDELINES.md`) file serves as the strict instruction manual for OpenCode and DevHive agents. It defines the technical stack, architectural patterns, and coding conventions for this backend project.
4
+
5
+ ## 🛠️ 1. Tech Stack
6
+ {{TECH_STACK}}
7
+
8
+ ## 🧠 2. OpenCode Skills to Load
9
+ Agents **MUST** load the following specialized skills before executing tasks:
10
+ - `architecture-patterns`: For maintaining clean separation of concerns and Hexagonal Architecture.
11
+ - `backend-architect`: For scalable API design and domain modeling.
12
+ - `backend-security-coder`: For secure coding practices, input validation, and auth.
13
+ - `devhive-devops`: For {{IAC_TOOL}} infrastructure setup.
14
+
15
+ ## 📂 3. Project Structure (Hexagonal Architecture)
16
+ For maximum scalability, testability, and maintainability, the project MUST strictly follow Hexagonal Architecture (Ports & Adapters).
17
+
18
+ ```text
19
+ src/
20
+ ├── domain/ # ENTERPRISE BUSINESS RULES (No external dependencies)
21
+ │ ├── entities/ # Pure domain models
22
+ │ └── exceptions/ # Domain-specific errors
23
+ ├── application/ # APPLICATION BUSINESS RULES (Use Cases & Ports)
24
+ │ ├── use_cases/ # Orchestrates domain logic
25
+ │ └── ports/ # Interfaces for outbound communication (Repositories, External APIs)
26
+ ├── infrastructure/ # ADAPTERS (Database, External Services, Third-party libs)
27
+ │ ├── database/ # Concrete implementation of repository ports
28
+ │ └── di/ # Dependency Injection container/setup
29
+ └── presentation/ # ENTRY POINTS (Controllers, REST APIs, GraphQL, Lambdas)
30
+ └── controllers/ # Parses HTTP requests and calls use cases
31
+
32
+ infrastructure/ # IaC DEFINITIONS (Outside src/)
33
+ └── # {{IAC_TOOL}} configurations
34
+ ```
35
+
36
+ ## 📐 4. Architectural Rules & Clean Code (CRITICAL)
37
+
38
+ 1. **The Dependency Rule**: Source code dependencies MUST only point inward, toward the `domain/`.
39
+ - `domain/` knows nothing about anything else.
40
+ - `application/` depends only on `domain/`.
41
+ - `infrastructure/` and `presentation/` depend on `application/` and `domain/`.
42
+ - **Never import an infrastructure detail (like a DB model) into a use case.**
43
+
44
+ 2. **Ports and Adapters**:
45
+ - Outbound communication (like DB queries) MUST be defined as an interface (Port) in the `application/` layer.
46
+ - The actual database logic MUST be implemented as an Adapter in the `infrastructure/` layer.
47
+
48
+ 3. **Dependency Injection**:
49
+ - Use Cases must receive their dependencies (Ports) via constructor injection.
50
+ - The Presentation layer resolves these dependencies and passes them to the Use Cases.
51
+ {{DI_RULES}}
52
+ ## 💻 5. Code Examples
53
+
54
+ {{CODE_EXAMPLES}}
File without changes
File without changes
File without changes
File without changes