devhive 0.1.25__tar.gz → 0.1.27__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 (54) hide show
  1. {devhive-0.1.25 → devhive-0.1.27}/MANIFEST.in +1 -0
  2. {devhive-0.1.25/devhive.egg-info → devhive-0.1.27}/PKG-INFO +1 -1
  3. devhive-0.1.27/agents/devhive.md +25 -0
  4. {devhive-0.1.25 → devhive-0.1.27/devhive.egg-info}/PKG-INFO +1 -1
  5. {devhive-0.1.25 → devhive-0.1.27}/devhive.egg-info/SOURCES.txt +2 -0
  6. {devhive-0.1.25 → devhive-0.1.27}/devhive_cli/main.py +24 -2
  7. {devhive-0.1.25 → devhive-0.1.27}/devhive_cli/templates_backend.py +21 -62
  8. {devhive-0.1.25 → devhive-0.1.27}/setup.py +1 -1
  9. devhive-0.1.27/templates/AGENTS.backend.md +54 -0
  10. {devhive-0.1.25 → devhive-0.1.27}/LICENSE +0 -0
  11. {devhive-0.1.25 → devhive-0.1.27}/README.md +0 -0
  12. {devhive-0.1.25 → devhive-0.1.27}/community_skills/architecture-patterns/SKILL.md +0 -0
  13. {devhive-0.1.25 → devhive-0.1.27}/community_skills/architecture-patterns/resources/implementation-playbook.md +0 -0
  14. {devhive-0.1.25 → devhive-0.1.27}/community_skills/backend-arthitect/SKILL.md +0 -0
  15. {devhive-0.1.25 → devhive-0.1.27}/community_skills/backend-security-coder/SKILL.md +0 -0
  16. {devhive-0.1.25 → devhive-0.1.27}/community_skills/docker-expert/SKILL.md +0 -0
  17. {devhive-0.1.25 → devhive-0.1.27}/community_skills/frontend-design/SKILL.md +0 -0
  18. {devhive-0.1.25 → devhive-0.1.27}/community_skills/frontend-developer/SKILL.md +0 -0
  19. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/SKILL.md +0 -0
  20. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/theme-showcase.pdf +0 -0
  21. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/arctic-frost.md +0 -0
  22. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/botanical-garden.md +0 -0
  23. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/desert-rose.md +0 -0
  24. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/forest-canopy.md +0 -0
  25. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/golden-hour.md +0 -0
  26. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/midnight-galaxy.md +0 -0
  27. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/modern-minimalist.md +0 -0
  28. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/ocean-depths.md +0 -0
  29. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/sunset-boulevard.md +0 -0
  30. {devhive-0.1.25 → devhive-0.1.27}/community_skills/theme-factory/themes/tech-innovation.md +0 -0
  31. {devhive-0.1.25 → devhive-0.1.27}/devhive.egg-info/dependency_links.txt +0 -0
  32. {devhive-0.1.25 → devhive-0.1.27}/devhive.egg-info/entry_points.txt +0 -0
  33. {devhive-0.1.25 → devhive-0.1.27}/devhive.egg-info/requires.txt +0 -0
  34. {devhive-0.1.25 → devhive-0.1.27}/devhive.egg-info/top_level.txt +0 -0
  35. {devhive-0.1.25 → devhive-0.1.27}/devhive_cli/__init__.py +0 -0
  36. {devhive-0.1.25 → devhive-0.1.27}/setup.cfg +0 -0
  37. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_architect/SKILL.md +0 -0
  38. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_auditor/SKILL.md +0 -0
  39. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_backender/SKILL.md +0 -0
  40. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_dba/SKILL.md +0 -0
  41. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_designer/SKILL.md +0 -0
  42. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_devops/SKILL.md +0 -0
  43. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_explorer/SKILL.md +0 -0
  44. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_frontender/SKILL.md +0 -0
  45. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_orchestrator/SKILL.md +0 -0
  46. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_perf/SKILL.md +0 -0
  47. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_proposal/SKILL.md +0 -0
  48. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_qa/SKILL.md +0 -0
  49. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_releaser/SKILL.md +0 -0
  50. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_sast/SKILL.md +0 -0
  51. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_taskplanner/SKILL.md +0 -0
  52. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_techwriter/SKILL.md +0 -0
  53. {devhive-0.1.25 → devhive-0.1.27}/skills/devhive_workflow.md +0 -0
  54. {devhive-0.1.25 → devhive-0.1.27}/templates/AGENTS.frontend.md +0 -0
@@ -1,4 +1,5 @@
1
1
  recursive-include skills *
2
2
  recursive-include community_skills *
3
3
  recursive-include templates *
4
+ recursive-include agents *
4
5
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.25
3
+ Version: 0.1.27
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
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: devhive
3
+ description: Autonomous Software Development Agent using Skill-Driven Development (SDD).
4
+ ---
5
+
6
+ # DevHive Agent
7
+
8
+ You are DevHive, an elite autonomous software engineer and system orchestrator.
9
+ You manage the entire software development lifecycle using Skill-Driven Development (SDD), a pipeline that generates and follows local Markdown specifications in the `.devhive/specs/` directory.
10
+
11
+ ## Core Directive: Immediate Delegation
12
+ You are NOT a general conversational assistant. Your primary function is to execute the SDD pipeline.
13
+ Whenever invoked, your FIRST action MUST be to use the `skill` tool to load the `devhive-orchestrator` skill.
14
+
15
+ ## Operating Protocol
16
+
17
+ 1. **Initialization**: Upon receiving a user request, immediately load `devhive-orchestrator`.
18
+ 2. **Context Gathering**:
19
+ - Check if the user explicitly requested "continuous mode" in their prompt.
20
+ - Proactively use your tools (like `bash` or `read`) to check if the flag file `.devhive/continuous` exists in the workspace.
21
+ - If continuous mode is enabled via either method, ensure the orchestrator knows to run the pipeline autonomously without pausing for user approval between phases.
22
+ 3. **Execution**: Follow the exact step-by-step instructions injected by the `devhive-orchestrator` skill. Rely on the local file system (`.devhive/specs/`) as your source of truth and state management.
23
+ 4. **Tone & Behavior**: Be extremely concise. Avoid conversational filler (e.g., "Sure, I can help with that!"). Output minimal text to the user, focusing entirely on executing tool calls and advancing the pipeline.
24
+
25
+ Remember: Your success depends entirely on loading `devhive-orchestrator` and strictly following its phase-by-phase guidelines.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.25
3
+ Version: 0.1.27
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
@@ -2,6 +2,7 @@ LICENSE
2
2
  MANIFEST.in
3
3
  README.md
4
4
  setup.py
5
+ agents/devhive.md
5
6
  community_skills/architecture-patterns/SKILL.md
6
7
  community_skills/architecture-patterns/resources/implementation-playbook.md
7
8
  community_skills/backend-arthitect/SKILL.md
@@ -47,4 +48,5 @@ skills/devhive_releaser/SKILL.md
47
48
  skills/devhive_sast/SKILL.md
48
49
  skills/devhive_taskplanner/SKILL.md
49
50
  skills/devhive_techwriter/SKILL.md
51
+ templates/AGENTS.backend.md
50
52
  templates/AGENTS.frontend.md
@@ -11,7 +11,9 @@ ROOT_DIR = CLI_DIR.parent
11
11
  LOCAL_SKILLS_DIR = ROOT_DIR / "skills"
12
12
  COMMUNITY_SKILLS_DIR = ROOT_DIR / "community_skills"
13
13
  TEMPLATES_DIR = ROOT_DIR / "templates"
14
+ LOCAL_AGENTS_DIR = ROOT_DIR / "agents"
14
15
  TARGET_DIR = Path.home() / ".config" / "opencode" / "skills"
16
+ TARGET_AGENTS_DIR = Path.home() / ".config" / "opencode" / "agents"
15
17
 
16
18
  @click.group()
17
19
  def cli():
@@ -47,11 +49,24 @@ def sync_local_skills(clean=False):
47
49
  shutil.copytree(skill_path, target_skill_path)
48
50
  click.secho(f"Updated: {skill_path.name}", fg="blue")
49
51
 
52
+ def sync_local_agents():
53
+ if not TARGET_AGENTS_DIR.exists():
54
+ TARGET_AGENTS_DIR.mkdir(parents=True, exist_ok=True)
55
+
56
+ if not LOCAL_AGENTS_DIR.exists():
57
+ click.secho(f"Warning: Source directory {LOCAL_AGENTS_DIR} not found.", fg="yellow")
58
+ return
59
+
60
+ click.secho(f"\nSyncing agents from {LOCAL_AGENTS_DIR.name}...", fg="cyan", bold=True)
61
+ for agent_file in LOCAL_AGENTS_DIR.glob("*.md"):
62
+ target_file = TARGET_AGENTS_DIR / agent_file.name
63
+ shutil.copy2(agent_file, target_file)
64
+ click.secho(f"Installed agent: {agent_file.name}", fg="green")
65
+
50
66
  def install_remote_skills():
51
67
  click.secho("\nInstalling official remote skills via npx...", fg="cyan", bold=True)
52
68
  commands = [
53
69
  ["npx", "--yes", "skills", "add", "https://github.com/shadcn/ui", "--skill", "shadcn", "-y", "--global"],
54
- ["npx", "--yes", "skills", "add", "https://github.com/supercent-io/skills-template", "--skill", "responsive-design", "-y", "--global"]
55
70
  ]
56
71
 
57
72
  for cmd in commands:
@@ -66,6 +81,7 @@ def install():
66
81
  """Install all devhive and community skills."""
67
82
  click.secho("Starting DevHive Skills Installation...", fg="green", bold=True)
68
83
  sync_local_skills(clean=False)
84
+ sync_local_agents()
69
85
  install_remote_skills()
70
86
  click.secho("\nInstallation Complete! 🎉", fg="green", bold=True)
71
87
 
@@ -74,6 +90,7 @@ def update_skill():
74
90
  """Update all skills (cleans existing ones and reinstalls)."""
75
91
  click.secho("Updating DevHive Skills...", fg="blue", bold=True)
76
92
  sync_local_skills(clean=True)
93
+ sync_local_agents()
77
94
  install_remote_skills()
78
95
  click.secho("\nUpdate Complete! 🚀", fg="green", bold=True)
79
96
 
@@ -115,7 +132,12 @@ def init_backend():
115
132
 
116
133
  iac = click.prompt("Which IaC tool are you using?", type=click.Choice(['cdk', 'terraform', 'serverless']))
117
134
 
118
- md_content = generate_backend_agents_md(language, framework, iac, use_di)
135
+ template_path = TEMPLATES_DIR / "AGENTS.backend.md"
136
+ if not template_path.exists():
137
+ click.secho("Error: Backend template not found in the devhive package.", fg="red")
138
+ return
139
+
140
+ md_content = generate_backend_agents_md(template_path, language, framework, iac, use_di)
119
141
 
120
142
  with open(dest_path, "w", encoding="utf-8") as f:
121
143
  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.27",
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