devhive 0.1.19__tar.gz → 0.1.20__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 (50) hide show
  1. {devhive-0.1.19 → devhive-0.1.20}/PKG-INFO +1 -1
  2. {devhive-0.1.19 → devhive-0.1.20}/devhive/cli.py +75 -55
  3. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/task_orchestrator.py +2 -2
  4. {devhive-0.1.19 → devhive-0.1.20}/devhive/server.py +4 -4
  5. {devhive-0.1.19 → devhive-0.1.20}/devhive.egg-info/PKG-INFO +1 -1
  6. {devhive-0.1.19 → devhive-0.1.20}/pyproject.toml +1 -1
  7. {devhive-0.1.19 → devhive-0.1.20}/setup.py +1 -1
  8. {devhive-0.1.19 → devhive-0.1.20}/LICENSE +0 -0
  9. {devhive-0.1.19 → devhive-0.1.20}/README.md +0 -0
  10. {devhive-0.1.19 → devhive-0.1.20}/devhive/__init__.py +0 -0
  11. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/__init__.py +0 -0
  12. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/architect.py +0 -0
  13. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/archivist.py +0 -0
  14. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/auditor.py +0 -0
  15. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/base_agent.py +0 -0
  16. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/ceo.py +0 -0
  17. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/developer.py +0 -0
  18. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/explorer.py +0 -0
  19. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/proposal.py +0 -0
  20. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/qa.py +0 -0
  21. {devhive-0.1.19 → devhive-0.1.20}/devhive/agents/task_agent.py +0 -0
  22. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/__init__.py +0 -0
  23. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/artifact_manager.py +0 -0
  24. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/context_optimizer.py +0 -0
  25. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/context_router.py +0 -0
  26. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/dependency_manager.py +0 -0
  27. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/llm.py +0 -0
  28. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/memory_store.py +0 -0
  29. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/project_state_manager.py +0 -0
  30. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/prompt_builder.py +0 -0
  31. {devhive-0.1.19 → devhive-0.1.20}/devhive/core/task_queue.py +0 -0
  32. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/auditor/owasp_security_audit.md +0 -0
  33. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/auditor/performance_bottlenecks.md +0 -0
  34. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/developer/backend-architect.md +0 -0
  35. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/developer/backend-security-coder.md +0 -0
  36. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/explorer/edge_case_hunter.md +0 -0
  37. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/explorer/nfr_checklist.md +0 -0
  38. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/global/inclusive_language.md +0 -0
  39. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/global/json_strictness.md +0 -0
  40. {devhive-0.1.19 → devhive-0.1.20}/devhive/skills/global/security_mandates.md +0 -0
  41. {devhive-0.1.19 → devhive-0.1.20}/devhive/utils/__init__.py +0 -0
  42. {devhive-0.1.19 → devhive-0.1.20}/devhive/utils/filesystem.py +0 -0
  43. {devhive-0.1.19 → devhive-0.1.20}/devhive/utils/validation.py +0 -0
  44. {devhive-0.1.19 → devhive-0.1.20}/devhive.egg-info/SOURCES.txt +0 -0
  45. {devhive-0.1.19 → devhive-0.1.20}/devhive.egg-info/dependency_links.txt +0 -0
  46. {devhive-0.1.19 → devhive-0.1.20}/devhive.egg-info/entry_points.txt +0 -0
  47. {devhive-0.1.19 → devhive-0.1.20}/devhive.egg-info/requires.txt +0 -0
  48. {devhive-0.1.19 → devhive-0.1.20}/devhive.egg-info/top_level.txt +0 -0
  49. {devhive-0.1.19 → devhive-0.1.20}/setup.cfg +0 -0
  50. {devhive-0.1.19 → devhive-0.1.20}/tests/test_parallel_development.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.19
3
+ Version: 0.1.20
4
4
  Summary: DevHive MCP Server
5
5
  Requires-Python: >=3.10
6
6
  License-File: LICENSE
@@ -5,55 +5,55 @@ import json
5
5
  import os
6
6
  from pathlib import Path
7
7
 
8
- # Try to find default agent file location relative to package
9
- # This assumes the package structure allows finding the file in the root
8
+ # Try to find default skill file location relative to package
10
9
  PACKAGE_ROOT = Path(__file__).parent.parent
11
- DEFAULT_AGENT_PATH = PACKAGE_ROOT / "DEVHIVE_AGENT.md"
10
+ DEFAULT_SKILL_PATH = PACKAGE_ROOT / "skills" / "devhive_workflow.md"
12
11
 
13
- def get_default_agent_content():
14
- """Reads the DEVHIVE_AGENT.md content from the package source."""
15
- if DEFAULT_AGENT_PATH.exists():
16
- return DEFAULT_AGENT_PATH.read_text()
12
+ def get_default_skill_content():
13
+ """Reads the devhive_workflow.md content from the package source."""
14
+ if DEFAULT_SKILL_PATH.exists():
15
+ return DEFAULT_SKILL_PATH.read_text()
17
16
 
18
- # Fallback content if file is totally missing (should not happen in proper install)
19
- return """# DevHive Agent System Prompt
17
+ # Fallback content if file is missing
18
+ return """# DevHive Workflow Orchestrator
20
19
 
21
- You are the DevHive Agent, an autonomous software development orchestrator.
22
- Your goal is to manage the full software development lifecycle using the DevHive MCP server tools.
20
+ This skill defines the autonomous execution loop for the DevHive AI software development pipeline.
23
21
 
24
- ## Core Workflow
22
+ ## Core Rules
23
+ 1. **Autonomous Execution**: Run the entire DevHive pipeline autonomously. Do not stop to ask the user for permission between each agent step unless an unrecoverable error occurs or the Explorer agent explicitly asks a `clarification_question`.
24
+ 2. **Subagent Delegation**: You MUST use the `Task` tool with `subagent_type="general"` to execute the prompts generated by the MCP server. Do not execute the prompts yourself in the main context.
25
+ 3. **Strict JSON**: The DevHive MCP server expects strict JSON. Instruct the subagent to output ONLY valid JSON without markdown formatting.
25
26
 
26
- 1. **Start/Resume Project**:
27
- - Use `devhive_start_pipeline(project_name, requirements)` to initialize a project or get the next task.
28
- - If the project already exists, this will resume from the last state.
27
+ ## The Execution Loop
29
28
 
30
- 2. **Execute Task**:
31
- - The output of `devhive_start_pipeline` (or `devhive_submit_result`) provides a `next_task` object containing:
32
- - `agent`: The sub-agent role (e.g., Explorer, Developer).
33
- - `system_prompt`: The specific instructions for this sub-agent.
34
- - `user_prompt`: The context and requirements for the task.
35
- - You must execute this task.
36
- - **OpenCode**: Use the `Task` tool with the provided prompts.
37
- - **Copilot**: Act as the sub-agent directly using the prompts.
29
+ When a user asks you to build a feature or start a project using DevHive, follow this exact procedure:
38
30
 
39
- 3. **Submit Result**:
40
- - Once the sub-agent task is complete, use `devhive_submit_result(project_name, agent_name, llm_response)` to save the work.
41
- - This tool will return the *next* task in the pipeline.
42
- - Repeat step 2 with the new task.
31
+ ### 1. Initialization
32
+ Use the `devhive_start_pipeline` tool.
33
+ - `project_name`: A short snake_case identifier derived from the request.
34
+ - `requirements`: The user's full request.
43
35
 
44
- ## Available Tools
36
+ The tool will return a JSON envelope containing `status`, `agent`, `system_prompt`, `user_prompt`, `expected_keys`, and `task_description`.
45
37
 
46
- - `devhive_start_pipeline`: Initialize project and get first task.
47
- - `devhive_submit_result`: Save task result and get next task.
48
- - `devhive_search_memory`: Retrieve context from previous steps.
49
- - `devhive_get_memory_stats`: Check project memory usage.
50
- - `devhive_get_recent_memories`: See recent project activity.
38
+ ### 2. Main Loop
39
+ While `status` is `"pending"`:
51
40
 
52
- ## Important Instructions
41
+ **A. Launch Subagent**
42
+ Use the `Task` tool with `subagent_type="general"`.
43
+ - `description`: The `task_description` from the envelope.
44
+ - `prompt`: Combine the `system_prompt` and `user_prompt` from the envelope. Append this CRITICAL instruction: *"You must ONLY output valid JSON containing these exact keys: {expected_keys}. Do not include any other text, markdown formatting, or explanations."*
53
45
 
54
- - Always follow the strict sequential pipeline: Explorer -> Proposal -> Architect -> TaskPlanner -> Developer -> QA -> Auditor -> Archivist.
55
- - Do not skip steps unless the pipeline explicitly skips them.
56
- - Use the prompts provided by the tools exactly as given.
46
+ **B. Submit Result**
47
+ Once the subagent returns its JSON output, use the `devhive_submit_result` tool.
48
+ - `project_name`: The current project name.
49
+ - `agent_name`: The `agent` from the current envelope.
50
+ - `llm_response`: The raw JSON output from the subagent.
51
+
52
+ **C. Process Server Response**
53
+ The tool will return a new envelope:
54
+ - If `status` == `"success"`: Print a brief update to the user. If `next_task` is present, update your envelope and repeat the loop.
55
+ - If `status` == `"error"`: The envelope has an error message. Launch the subagent again, provide the error and the previous output, and ask it to fix the JSON structure. Retry up to 3 times.
56
+ - If `status` == `"complete"`: The pipeline is finished. Give the user a final summary and exit the loop.
57
57
  """
58
58
 
59
59
  def configure():
@@ -68,24 +68,24 @@ def configure():
68
68
  print("Invalid choice. Please type 'opencode', 'copilot', or 'both'.")
69
69
 
70
70
  # 2. Locate source file
71
- cwd_agent = Path("DEVHIVE_AGENT.md").resolve()
72
- pkg_agent = DEFAULT_AGENT_PATH.resolve()
71
+ cwd_skill = Path("skills/devhive_workflow.md").resolve()
72
+ pkg_skill = DEFAULT_SKILL_PATH.resolve()
73
73
 
74
74
  source_to_use = None
75
75
 
76
- if cwd_agent.exists():
77
- print(f"[+] Found agent file in current directory: {cwd_agent}")
78
- source_to_use = cwd_agent
79
- elif pkg_agent.exists():
80
- print(f"[+] Found agent file in package: {pkg_agent}")
81
- source_to_use = pkg_agent
76
+ if cwd_skill.exists():
77
+ print(f"[+] Found skill file in current directory: {cwd_skill}")
78
+ source_to_use = cwd_skill
79
+ elif pkg_skill.exists():
80
+ print(f"[+] Found skill file in package: {pkg_skill}")
81
+ source_to_use = pkg_skill
82
82
  else:
83
- print("[-] DEVHIVE_AGENT.md not found.")
84
- print("[*] Using embedded default agent prompt.")
85
- temp_path = Path("DEVHIVE_AGENT.md").resolve()
83
+ print("[-] skills/devhive_workflow.md not found.")
84
+ print("[*] Using embedded default skill prompt.")
85
+ temp_path = Path("devhive_workflow.md").resolve()
86
86
  try:
87
87
  with open(temp_path, "w") as f:
88
- f.write(get_default_agent_content())
88
+ f.write(get_default_skill_content())
89
89
  print(f"[+] Created temporary source file at: {temp_path}")
90
90
  source_to_use = temp_path
91
91
  except Exception as e:
@@ -94,16 +94,36 @@ def configure():
94
94
 
95
95
  # 3. Configure OpenCode
96
96
  if choice in ["opencode", "both"]:
97
- dest_dir = Path.home() / ".config" / "opencode" / "agents"
98
- dest_file = dest_dir / "DevHive0119.md"
99
- _copy_agent_file(source_to_use, dest_dir, dest_file, "OpenCode Agent")
97
+ # Remove legacy agent
98
+ old_agent_dir = Path.home() / ".config" / "opencode" / "agents"
99
+ old_agent = old_agent_dir / "DevHive0119.md"
100
+ if old_agent.exists():
101
+ print(f"[*] Removing legacy OpenCode agent: {old_agent}")
102
+ try:
103
+ old_agent.unlink()
104
+ except Exception as e:
105
+ print(f"[-] Could not remove legacy agent: {e}")
106
+
107
+ dest_dir = Path.home() / ".config" / "opencode" / "skills"
108
+ dest_file = dest_dir / "devhive_workflow.md"
109
+ _copy_agent_file(source_to_use, dest_dir, dest_file, "OpenCode Skill")
100
110
  _configure_devhive()
101
111
 
102
112
  # 4. Configure Copilot
103
113
  if choice in ["copilot", "both"]:
104
- dest_dir = Path.home() / ".copilot" / "agents"
105
- dest_file = dest_dir / "DevHive.md"
106
- _copy_agent_file(source_to_use, dest_dir, dest_file, "Copilot Agent")
114
+ # Remove legacy agent
115
+ old_agent_dir = Path.home() / ".copilot" / "agents"
116
+ old_agent = old_agent_dir / "DevHive.md"
117
+ if old_agent.exists():
118
+ print(f"[*] Removing legacy Copilot agent: {old_agent}")
119
+ try:
120
+ old_agent.unlink()
121
+ except Exception as e:
122
+ print(f"[-] Could not remove legacy agent: {e}")
123
+
124
+ dest_dir = Path.home() / ".copilot" / "instructions"
125
+ dest_file = dest_dir / "devhive_workflow.md"
126
+ _copy_agent_file(source_to_use, dest_dir, dest_file, "Copilot Instructions")
107
127
  _configure_vscode_copilot(dest_file)
108
128
 
109
129
  print("\nConfiguration complete!")
@@ -1,6 +1,6 @@
1
1
  """
2
2
  Task-based pipeline orchestrator.
3
- Manages agent sequence and returns Task launch instructions for OpenCode.
3
+ Manages agent sequence and returns Task launch instructions for SDD Skill execution.
4
4
  """
5
5
 
6
6
  import json
@@ -27,7 +27,7 @@ class TaskOrchestrator:
27
27
  - Builds prompts using PromptBuilder
28
28
  - Validates responses using ResponseValidator
29
29
  - Saves artifacts using ArtifactManager
30
- - Returns structured envelopes for OpenCode
30
+ - Returns structured envelopes for Skill execution
31
31
  """
32
32
 
33
33
  def __init__(self, project_name: str):
@@ -55,7 +55,7 @@ def _parse_json_response(text: str) -> Dict[str, Any]:
55
55
  raise ValueError(f"Invalid JSON response: {e}")
56
56
 
57
57
  # ============================================================================
58
- # TASK-BASED WORKFLOW TOOLS (Recommended - Uses OpenCode Task Tool)
58
+ # TASK-BASED WORKFLOW TOOLS (Recommended - Use devhive_workflow skill)
59
59
  # ============================================================================
60
60
 
61
61
  @mcp.tool()
@@ -64,7 +64,7 @@ def devhive_start_pipeline(project_name: str, requirements: str) -> str:
64
64
  Start a new DevHive pipeline with Task-based execution.
65
65
 
66
66
  This is the RECOMMENDED way to use DevHive. It returns Task launch instructions
67
- that OpenCode can use to execute each agent in isolated context.
67
+ that OpenCode should execute using the devhive_workflow skill.
68
68
 
69
69
  Remember always read AGENTS.md if exists.
70
70
 
@@ -85,7 +85,7 @@ def devhive_start_pipeline(project_name: str, requirements: str) -> str:
85
85
 
86
86
  Example:
87
87
  result = devhive_start_pipeline("csv_export", "Add CSV export to dashboard")
88
- # Use result["system_prompt"] and result["user_prompt"] with OpenCode Task tool
88
+ # Use result["system_prompt"] and result["user_prompt"] with Task tool (general)
89
89
  # Then call devhive_submit_result() with the Task output
90
90
  """
91
91
  try:
@@ -136,7 +136,7 @@ def devhive_submit_result(project_name: str, agent_name: str, llm_response: str)
136
136
  if result["status"] == "success":
137
137
  print(result["executive_summary"])
138
138
  next_task = result["next_task"]
139
- # Use next_task with OpenCode Task tool
139
+ # Use next_task with Task tool (general)
140
140
  """
141
141
  try:
142
142
  from devhive.core.task_orchestrator import TaskOrchestrator
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.19
3
+ Version: 0.1.20
4
4
  Summary: DevHive MCP Server
5
5
  Requires-Python: >=3.10
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devhive"
3
- version = "0.1.19"
3
+ version = "0.1.20"
4
4
  description = "DevHive MCP Server"
5
5
  requires-python = ">=3.10"
6
6
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="devhive",
5
- version="0.1.19",
5
+ version="0.1.20",
6
6
  packages=find_packages(),
7
7
  package_data={
8
8
  "devhive": ["skills/*.md", "skills/*/*.md"],
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes