devhive 0.1.23__tar.gz → 0.1.24__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 (51) hide show
  1. {devhive-0.1.23 → devhive-0.1.24}/MANIFEST.in +2 -0
  2. {devhive-0.1.23/devhive.egg-info → devhive-0.1.24}/PKG-INFO +5 -2
  3. {devhive-0.1.23 → devhive-0.1.24}/README.md +3 -0
  4. {devhive-0.1.23 → devhive-0.1.24/devhive.egg-info}/PKG-INFO +5 -2
  5. {devhive-0.1.23 → devhive-0.1.24}/devhive.egg-info/SOURCES.txt +2 -1
  6. {devhive-0.1.23 → devhive-0.1.24}/devhive_cli/main.py +18 -0
  7. {devhive-0.1.23 → devhive-0.1.24}/setup.py +2 -2
  8. devhive-0.1.24/templates/AGENTS.frontend.md +160 -0
  9. {devhive-0.1.23 → devhive-0.1.24}/LICENSE +0 -0
  10. {devhive-0.1.23 → devhive-0.1.24}/community_skills/architecture-patterns/SKILL.md +0 -0
  11. {devhive-0.1.23 → devhive-0.1.24}/community_skills/architecture-patterns/resources/implementation-playbook.md +0 -0
  12. {devhive-0.1.23 → devhive-0.1.24}/community_skills/backend-arthitect/SKILL.md +0 -0
  13. {devhive-0.1.23 → devhive-0.1.24}/community_skills/backend-security-coder/SKILL.md +0 -0
  14. {devhive-0.1.23 → devhive-0.1.24}/community_skills/docker-expert/SKILL.md +0 -0
  15. {devhive-0.1.23 → devhive-0.1.24}/community_skills/frontend-design/SKILL.md +0 -0
  16. {devhive-0.1.23 → devhive-0.1.24}/community_skills/frontend-developer/SKILL.md +0 -0
  17. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/SKILL.md +0 -0
  18. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/theme-showcase.pdf +0 -0
  19. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/arctic-frost.md +0 -0
  20. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/botanical-garden.md +0 -0
  21. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/desert-rose.md +0 -0
  22. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/forest-canopy.md +0 -0
  23. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/golden-hour.md +0 -0
  24. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/midnight-galaxy.md +0 -0
  25. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/modern-minimalist.md +0 -0
  26. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/ocean-depths.md +0 -0
  27. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/sunset-boulevard.md +0 -0
  28. {devhive-0.1.23 → devhive-0.1.24}/community_skills/theme-factory/themes/tech-innovation.md +0 -0
  29. {devhive-0.1.23 → devhive-0.1.24}/devhive.egg-info/dependency_links.txt +0 -0
  30. {devhive-0.1.23 → devhive-0.1.24}/devhive.egg-info/entry_points.txt +0 -0
  31. {devhive-0.1.23 → devhive-0.1.24}/devhive.egg-info/requires.txt +0 -0
  32. {devhive-0.1.23 → devhive-0.1.24}/devhive.egg-info/top_level.txt +0 -0
  33. {devhive-0.1.23 → devhive-0.1.24}/devhive_cli/__init__.py +0 -0
  34. {devhive-0.1.23 → devhive-0.1.24}/setup.cfg +0 -0
  35. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_architect/SKILL.md +0 -0
  36. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_auditor/SKILL.md +0 -0
  37. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_backender/SKILL.md +0 -0
  38. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_dba/SKILL.md +0 -0
  39. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_designer/SKILL.md +0 -0
  40. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_devops/SKILL.md +0 -0
  41. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_explorer/SKILL.md +0 -0
  42. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_frontender/SKILL.md +0 -0
  43. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_orchestrator/SKILL.md +0 -0
  44. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_perf/SKILL.md +0 -0
  45. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_proposal/SKILL.md +0 -0
  46. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_qa/SKILL.md +0 -0
  47. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_releaser/SKILL.md +0 -0
  48. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_sast/SKILL.md +0 -0
  49. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_taskplanner/SKILL.md +0 -0
  50. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_techwriter/SKILL.md +0 -0
  51. {devhive-0.1.23 → devhive-0.1.24}/skills/devhive_workflow.md +0 -0
@@ -1,2 +1,4 @@
1
1
  recursive-include skills *
2
2
  recursive-include community_skills *
3
+ recursive-include templates *
4
+
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.23
3
+ Version: 0.1.24
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
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.8
10
+ Requires-Python: >=3.7
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: click>=8.0.0
@@ -65,6 +65,9 @@ devhive install
65
65
 
66
66
  # Update your existing skills to the latest versions
67
67
  devhive update-skill
68
+
69
+ # Initialize a modern Next.js/React frontend AI guidelines file in your current project
70
+ devhive init-frontend
68
71
  ```
69
72
 
70
73
  ## Usage (The `@devhive` Agent)
@@ -42,6 +42,9 @@ devhive install
42
42
 
43
43
  # Update your existing skills to the latest versions
44
44
  devhive update-skill
45
+
46
+ # Initialize a modern Next.js/React frontend AI guidelines file in your current project
47
+ devhive init-frontend
45
48
  ```
46
49
 
47
50
  ## Usage (The `@devhive` Agent)
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhive
3
- Version: 0.1.23
3
+ Version: 0.1.24
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
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.8
10
+ Requires-Python: >=3.7
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: click>=8.0.0
@@ -65,6 +65,9 @@ devhive install
65
65
 
66
66
  # Update your existing skills to the latest versions
67
67
  devhive update-skill
68
+
69
+ # Initialize a modern Next.js/React frontend AI guidelines file in your current project
70
+ devhive init-frontend
68
71
  ```
69
72
 
70
73
  ## Usage (The `@devhive` Agent)
@@ -45,4 +45,5 @@ skills/devhive_qa/SKILL.md
45
45
  skills/devhive_releaser/SKILL.md
46
46
  skills/devhive_sast/SKILL.md
47
47
  skills/devhive_taskplanner/SKILL.md
48
- skills/devhive_techwriter/SKILL.md
48
+ skills/devhive_techwriter/SKILL.md
49
+ templates/AGENTS.frontend.md
@@ -9,6 +9,7 @@ CLI_DIR = Path(__file__).resolve().parent
9
9
  ROOT_DIR = CLI_DIR.parent
10
10
  LOCAL_SKILLS_DIR = ROOT_DIR / "skills"
11
11
  COMMUNITY_SKILLS_DIR = ROOT_DIR / "community_skills"
12
+ TEMPLATES_DIR = ROOT_DIR / "templates"
12
13
  TARGET_DIR = Path.home() / ".config" / "opencode" / "skills"
13
14
 
14
15
  @click.group()
@@ -75,5 +76,22 @@ def update_skill():
75
76
  install_remote_skills()
76
77
  click.secho("\nUpdate Complete! 🚀", fg="green", bold=True)
77
78
 
79
+ @cli.command()
80
+ def init_frontend():
81
+ """Initialize a modern frontend AGENTS.md template in the current directory."""
82
+ template_path = TEMPLATES_DIR / "AGENTS.frontend.md"
83
+ dest_path = Path.cwd() / "AGENTS.md"
84
+
85
+ if not template_path.exists():
86
+ click.secho("Error: Frontend template not found in the devhive package.", fg="red")
87
+ return
88
+
89
+ if dest_path.exists():
90
+ click.secho("AGENTS.md already exists in this directory. Aborting to prevent overwrite.", fg="yellow")
91
+ return
92
+
93
+ shutil.copy2(template_path, dest_path)
94
+ click.secho("✅ Successfully created AGENTS.md with modern Next.js/React frontend guidelines!", fg="green", bold=True)
95
+
78
96
  if __name__ == "__main__":
79
97
  cli()
@@ -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.23", # Bumping from the last deployed version 0.1.21
11
+ version="0.1.24",
12
12
  packages=find_packages(),
13
13
  include_package_data=True,
14
14
  install_requires=[
@@ -29,5 +29,5 @@ setup(
29
29
  "License :: OSI Approved :: MIT License",
30
30
  "Operating System :: OS Independent",
31
31
  ],
32
- python_requires='>=3.8',
32
+ python_requires='>=3.7',
33
33
  )
@@ -0,0 +1,160 @@
1
+ # Frontend 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 frontend project.
4
+
5
+ ## 🛠️ 1. Tech Stack
6
+ - **Framework**: Next.js 15 (App Router)
7
+ - **Library**: React 19
8
+ - **Language**: TypeScript (Strict Mode)
9
+ - **Styling**: Tailwind CSS v3/v4 + `clsx` + `tailwind-merge`
10
+ - **Components**: shadcn/ui (Radix UI primitives)
11
+ - **Icons**: Lucide React
12
+ - **Data Fetching**: React Server Components (RSC) & Server Actions
13
+
14
+ ## 🧠 2. OpenCode Skills to Load
15
+ Agents **MUST** load the following specialized skills before executing tasks:
16
+ - `frontend-developer`: For modern React 19 / Next.js 15 patterns.
17
+ - `frontend-design`: For high-quality, non-generic UI aesthetics.
18
+ - `shadcn`: For proper installation and composition of shadcn/ui components.
19
+ - `theme-factory`: For applying cohesive color palettes and typography.
20
+ - `architecture-patterns`: For maintaining clean separation of concerns.
21
+
22
+ ## 📂 3. Project Structure (Feature-Based Architecture)
23
+ For maximum scalability and maintainability, the project follows a feature-based architecture within the `src/` directory.
24
+
25
+ ```text
26
+ src/
27
+ ├── app/ # Next.js App Router (Pages, Layouts, API Routes)
28
+ │ ├── (auth)/ # Route groups for logical separation
29
+ │ ├── dashboard/ # Dashboard routes
30
+ │ └── layout.tsx # Root layout (Providers, Fonts, Metadata)
31
+ ├── components/
32
+ │ ├── ui/ # Pure shadcn/ui components (DO NOT EDIT DIRECTLY unless styling)
33
+ │ └── shared/ # Reusable global components (Navbar, Footer, etc.)
34
+ ├── features/ # Feature-based modules (THE CORE OF THE APP)
35
+ │ ├── users/ # "Users" feature module
36
+ │ │ ├── actions.ts # Server Actions for this feature
37
+ │ │ ├── components/ # Feature-specific React components
38
+ │ │ └── types.ts # Feature-specific TypeScript interfaces
39
+ │ └── products/ # "Products" feature module
40
+ ├── lib/ # Utility functions (utils.ts, formatting, constants)
41
+ └── hooks/ # Global custom React hooks
42
+ ```
43
+
44
+ ## 📐 4. Architectural Rules & Best Practices
45
+
46
+ 1. **Default to Server Components (RSC)**:
47
+ - All components inside `app/` and `features/` MUST be Server Components by default to optimize bundle size and SEO.
48
+ - ONLY add the `"use client"` directive at the very top of a file if the component requires interactivity (`useState`, `useEffect`, `onClick`, browser APIs).
49
+ - Keep Client Components as low in the tree (leaf nodes) as possible.
50
+
51
+ 2. **Server Actions for Mutations**:
52
+ - Do NOT build traditional API routes (`route.ts`) for internal app data mutations.
53
+ - Use Next.js Server Actions (`"use server"`) placed in `src/features/[name]/actions.ts`.
54
+ - Always validate inputs inside Server Actions (using Zod or similar) before mutating data.
55
+
56
+ 3. **Shadcn/ui Usage**:
57
+ - Use the OpenCode CLI or `npx shadcn@latest add [component]` to install components.
58
+ - Combine UI components to build complex blocks (e.g., combining `Card`, `Button`, and `Input` to make a LoginForm).
59
+
60
+ 4. **Type Safety**:
61
+ - Avoid `any`. Define interfaces/types in `types.ts` files.
62
+ - Export types and reuse them across Server Actions and Client Components.
63
+
64
+ ## 💻 5. Code Examples
65
+
66
+ ### Example A: Data Fetching in a Server Component (RSC)
67
+ *File: `src/app/dashboard/page.tsx`*
68
+ ```tsx
69
+ import { Suspense } from "react";
70
+ import { getUserProfile } from "@/features/users/actions";
71
+ import { UserProfileCard } from "@/features/users/components/user-profile-card";
72
+ import { Skeleton } from "@/components/ui/skeleton";
73
+
74
+ // This is a Server Component (no "use client")
75
+ export default async function DashboardPage() {
76
+ // Fetch data directly on the server
77
+ const user = await getUserProfile();
78
+
79
+ return (
80
+ <main className="container mx-auto p-6">
81
+ <h1 className="text-3xl font-bold mb-6">Dashboard</h1>
82
+ <Suspense fallback={<Skeleton className="h-[200px] w-full rounded-xl" />}>
83
+ <UserProfileCard user={user} />
84
+ </Suspense>
85
+ </main>
86
+ );
87
+ }
88
+ ```
89
+
90
+ ### Example B: Server Action for Data Mutation
91
+ *File: `src/features/users/actions.ts`*
92
+ ```typescript
93
+ "use server";
94
+
95
+ import { revalidatePath } from "next/cache";
96
+
97
+ export type UpdateUserResponse = {
98
+ success: boolean;
99
+ message: string;
100
+ };
101
+
102
+ export async function updateUserName(formData: FormData): Promise<UpdateUserResponse> {
103
+ const newName = formData.get("name") as string;
104
+
105
+ if (!newName || newName.length < 3) {
106
+ return { success: false, message: "Name must be at least 3 characters." };
107
+ }
108
+
109
+ // Perform database mutation here...
110
+ // await db.user.update(...)
111
+
112
+ // Revalidate the cache so the UI updates instantly
113
+ revalidatePath("/dashboard");
114
+
115
+ return { success: true, message: "Profile updated successfully." };
116
+ }
117
+ ```
118
+
119
+ ### Example C: Client Component using Shadcn/ui & Server Actions
120
+ *File: `src/features/users/components/edit-name-form.tsx`*
121
+ ```tsx
122
+ "use client";
123
+
124
+ import { useState, useTransition } from "react";
125
+ import { updateUserName } from "@/features/users/actions";
126
+ import { Button } from "@/components/ui/button";
127
+ import { Input } from "@/components/ui/input";
128
+ import { toast } from "@/components/ui/use-toast"; // shadcn toast
129
+
130
+ export function EditNameForm() {
131
+ const [isPending, startTransition] = useTransition();
132
+
133
+ const handleSubmit = (formData: FormData) => {
134
+ startTransition(async () => {
135
+ const result = await updateUserName(formData);
136
+
137
+ if (result.success) {
138
+ toast({ title: "Success", description: result.message });
139
+ } else {
140
+ toast({ title: "Error", description: result.message, variant: "destructive" });
141
+ }
142
+ });
143
+ };
144
+
145
+ return (
146
+ <form action={handleSubmit} className="flex gap-4 items-center">
147
+ <Input
148
+ name="name"
149
+ placeholder="Enter new name"
150
+ required
151
+ disabled={isPending}
152
+ className="max-w-sm"
153
+ />
154
+ <Button type="submit" disabled={isPending}>
155
+ {isPending ? "Saving..." : "Save Name"}
156
+ </Button>
157
+ </form>
158
+ );
159
+ }
160
+ ```
File without changes
File without changes