Skip to content

Commit 080a369

Browse files
authored
Implement Conductor Skills Integration (#144)
* feat(skills): Implement Skills Integration * chore: Remove design doc from PR * refactor(skills): Convert catalog to Markdown body * fix(conductor): update skill reference paths to .agents/skills * fix(conductor): update skill download to support folders * fix(skills): update catalog URLs to point to directories * feat(conductor): update skills integration with design doc requirements * feat(conductor): add GCP OWASP Top 10 skills to catalog * feat(conductor): use precise detection signals for OWASP skills * feat(conductor): add file and dependency signals to OWASP skills * chore(conductor): remove obsolete setup_state.json reference * feat(skills): add gcp-apis and Firebase skills to catalog * chore(skills): cleanup inactive skills from catalog * chore(skills): remove gcp-apis skill from catalog * feat(conductor): add /skills reload instruction to setup and newTrack * fix(conductor): update skills catalog path to absolute path * address review comments * feat(conductor): use interactive ask_user for skill recommendations in newTrack * chore: remove GCP OWASP Top 10 Skills from catalog * feat(conductor): update skill installation and style guide selection logic * feat(conductor): add devops skills to catalog * fix(conductor): ensure agent activates relevant skills in implement.toml * fix(conductor): update skill activation phrasing per feedback * fix(conductor): use exact 'ask the model to activate' phrasing * chore(conductor): explicit pause on skill reload * fix(conductor): explicitly specify not to use ask_user tool in skill reload confirmation
1 parent 7a5c560 commit 080a369

5 files changed

Lines changed: 197 additions & 3 deletions

File tree

commands/conductor/implement.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
8181
- **Track Context:** Using the **Universal File Resolution Protocol**, resolve and read the **Specification** and **Implementation Plan** for the selected track.
8282
- **Workflow:** Resolve **Workflow** (via the **Universal File Resolution Protocol** using the project's index file).
8383
c. **Error Handling:** If you fail to read any of these files, you MUST stop and inform the user of the error.
84+
d. **Activate Relevant Skills:**
85+
- Check for the existence of installed skills in `.agents/skills/` (Workspace tier) and `~/.agents/extensions/conductor/skills/` (Extension tier).
86+
- If either exists, list the subdirectories to identify available skills.
87+
- Based on the track's **Specification**, **Implementation Plan**, and the **Product Definition**, determine if any installed skills are relevant to the track.
88+
- **CRITICAL:** For every relevant skill identified, ask the agent to activate it and read its `SKILL.md` and reference files.
89+
- You MUST explicitly apply and prioritize the guidelines, commands, and constraints from these files during the execution of the track's tasks.
8490
8591
4. **Execute Tasks and Update Track Plan:**
8692
a. **Announce:** State that you will now execute the tasks from the track's **Implementation Plan** by following the procedures in the **Workflow**.

commands/conductor/newTrack.toml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,40 @@ PLAN MODE PROTOCOL: Parts of this process run within Plan Mode. While in Plan Mo
134134
- Label: "Revise", Description: "I want to modify the implementation steps."
135135
Await user feedback and revise the `plan.md` content until confirmed.
136136
137-
### 2.4 Create Track Artifacts and Update Main Plan
137+
### 2.4 Skill Recommendation (Interactive)
138+
1. **Analyze Needs:**
139+
- Read `skills/catalog.md` from the directory where the Conductor extension is installed (typically `~/.gemini/extensions/conductor/skills/catalog.md`).
140+
- Analyze the confirmed `spec.md` and `plan.md` against the `Detection Signals` in the loaded `skills/catalog.md`.
141+
- Identify any relevant skills that are NOT yet installed (check `~/.agents/extensions/conductor/skills/` and `.agents/skills/`).
142+
2. **Recommendation Loop:**
143+
- **If relevant missing skills are found:**
144+
- **Ask:** "Would you like to install these skills now?" using the `ask_user` tool (do not repeat in chat):
145+
- **questions:**
146+
- **header:** "Install Skills"
147+
- **question:** "I've identified some skills that could help with this track. Would you like to install any of them?"
148+
- **type:** "choice"
149+
- **multiSelect:** true
150+
- **options:** (Populate with the recommended skills, providing a `label` and a `description` explaining the relevance for each).
151+
- **Install:** If the user selects any skills, then for each selected skill:
152+
- **Determine Installation Path:**
153+
- If `alwaysRecommend` is true, set the path to `~/.agents/extensions/conductor/skills/<skill-name>/`.
154+
- Otherwise, set the path to `.agents/skills/<skill-name>/`.
155+
- Create directory at the determined path.
156+
- **Determine Download Strategy:**
157+
- If `party` is '1p':
158+
- If `version` is provided, download that specific version.
159+
- Otherwise, download the latest copy at the exact `url`.
160+
- If `party` is '3p', MUST use the provided `commit_sha` to download the specific vetted commit.
161+
- Download the content of the skill folder from the `url` specified in `catalog.md` (using the determined strategy) to the determined path.
162+
- **CRITICAL:** If the URL is a file path, find the parent folder. If it is a Git URL, use `git clone` or `sparse-checkout` to get the folder.
163+
- **If no missing skills found:** Skip this section.
164+
165+
### 2.4.1 Skill Reload Confirmation
166+
1. **Execution Trigger:** This step MUST only be executed if you installed new skills in the previous section.
167+
2. **Notify and Pause:** **CRITICAL:** You MUST explicitly instruct the user: "New skills installed. Please run `/skills reload` to enable them. Let me know when you have done this." Do NOT use the `ask_user` tool here.
168+
3. **Wait for Confirmation:** You MUST pause your execution here and wait for the user to confirm they have run the command and reloaded the skills before proceeding.
169+
170+
### 2.5 Create Track Artifacts and Update Main Plan
138171
139172
1. **Check for existing track name:** Before generating a new Track ID, resolve the **Tracks Directory** using the **Universal File Resolution Protocol**. List all existing track directories in that resolved path. Extract the short names from these track IDs (e.g., ``shortname_YYYYMMDD`` -> `shortname`). If the proposed short name for the new track (derived from the initial description) matches an existing short name, halt the `newTrack` creation. Explain that a track with that name already exists and suggest choosing a different name or resuming the existing track.
140173
2. **Generate Track ID:** Create a unique Track ID (e.g., ``shortname_YYYYMMDD``).

commands/conductor/review.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
6363
- Read `product-guidelines.md` and `tech-stack.md`.
6464
- **CRITICAL:** Check for the existence of `conductor/code_styleguides/` directory.
6565
- If it exists, list and read ALL `.md` files within it. These are the **Law**. Violations here are **High** severity.
66+
- **Check for Installed Skills:**
67+
- Check for the existence of `.agents/skills/` (Workspace tier) and `~/.agents/extensions/conductor/skills/` (Extension tier).
68+
- If either exists, list the subdirectories to identify installed skills across both paths.
69+
- If relevant skills (e.g., `gcp-*`) are found, enable specialized feedback for those domains.
6670
2. **Load Track Context (if reviewing a track):**
6771
- Read the track's `plan.md`.
6872
- **Extract Commits:** Parse `plan.md` to find recorded git commit hashes (usually in the "Completed" tasks or "History" section).
@@ -100,6 +104,8 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
100104
- Are there new tests?
101105
- Do the changes look like they are covered by existing tests?
102106
- *Action:* **Execute the test suite automatically.** Infer the test command based on the codebase languages and structure (e.g., `npm test`, `pytest`, `go test`). Run it. Analyze the output for failures.
107+
5. **Skill-Specific Checks:**
108+
- If specific skills are installed (e.g. GCP), verify compliance with their best practices.
103109
104110
### 2.4 Output Findings
105111
**Format your output strictly as follows:**

commands/conductor/setup.toml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ PLAN MODE PROTOCOL: This setup process runs entirely within Plan Mode. While in
4343
| :--- | :--- | :--- |
4444
| All files in `tracks/<track_id>/` (`spec`, `plan`, `metadata`, `index`) | **HALT** | "The project is already initialized. Use `/conductor:newTrack` or `/conductor:implement`." |
4545
| `index.md` (top-level) | **Section 3.0** | "Resuming setup: Scaffolding is complete. Next: generate the first track. (Note: If an incomplete track folder was detected, we will restart this step to ensure a clean, consistent state)." |
46-
| `workflow.md` | **Section 2.6** | "Resuming setup: Workflow is defined. Next: generate project index." |
46+
| `workflow.md` | **Section 2.6** | "Resuming setup: Workflow is defined. Next: select Agent Skills." |
4747
| `code_styleguides/` | **Section 2.5** | "Resuming setup: Guides/Tech Stack configured. Next: define project workflow." |
4848
| `tech-stack.md` | **Section 2.4** | "Resuming setup: Tech Stack defined. Next: select Code Styleguides." |
4949
| `product-guidelines.md` | **Section 2.3** | "Resuming setup: Guidelines are complete. Next: define the Technology Stack." |
@@ -371,7 +371,60 @@ PLAN MODE PROTOCOL: This setup process runs entirely within Plan Mode. While in
371371
4. **Action:** Update `conductor/workflow.md` based on all user answers from both steps.
372372
373373
374-
### 2.6 Finalization
374+
### 2.6 Select Skills (Interactive)
375+
1. **Analyze and Recommend:**
376+
- Read `skills/catalog.md` from the directory where the Conductor extension is installed (typically `~/.gemini/extensions/conductor/skills/catalog.md`).
377+
- **Catalog Not Found Handling:** If the skills catalog cannot be found, announce "Skills catalog not found. Skipping skill selection." and **immediately jump** to Section 2.7.
378+
- Detect applicable skills based on `detectSignals` matched against project files and `conductor/tech-stack.md`.
379+
- Identify "Always Recommended" skills.
380+
2. **Determine Mode:**
381+
- **If no recommended skills are found:** Announce "No additional agent skills were recommended for this project context. Skipping skill installation." and skip to 2.7.
382+
- **If recommended skills are found:** Use the `ask_user` tool to present recommendations and choose an installation path.
383+
- **questions:**
384+
- **header:** "Agent Skills"
385+
- **question:**
386+
Based on your project context, I recommend the following skills:
387+
<List Recommended Skills with Descriptions>
388+
How would you like to proceed?"
389+
- **type:** "choice"
390+
- **options:**
391+
- Label: "Install All", Description: "Install all recommended skills."
392+
- Label: "Hand-pick", Description: "Select specific skills from the catalog."
393+
- Label: "Skip", Description: "Do not install any skills at this time."
394+
3. **Gather Selection (Conditional):**
395+
- **If user chose "Hand-pick":**
396+
- **Action:** List all available skills from the catalog in the chat (including names and descriptions).
397+
- **Prompt for Selection:** Use the `ask_user` tool with a single question:
398+
- **header:** "Select Skills"
399+
- **type:** "text"
400+
- **question:** "Which skill(s) would you like to install? You can type the names (comma-separated) or paste a list."
401+
- **placeholder:** "e.g., firebase-auth-basics, firebase-firestore-basics"
402+
- **Interaction Flow:** Wait for the user's response, then parse the selected skills based on the names provided.
403+
4. **Process Selection:**
404+
- If "Install All": Install all recommended skills.
405+
- If "Hand-pick": Parse the results from the `ask_user` call and install selected skills.
406+
- If "Skip": Proceed without installation.
407+
5. **Installation Action:**
408+
- For each selected skill:
409+
- **Determine Installation Path:**
410+
- If `alwaysRecommend` is true, set the path to `~/.agents/extensions/conductor/skills/<skill-name>/`.
411+
- Otherwise, set the path to `.agents/skills/<skill-name>/`.
412+
- Create directory at the determined path.
413+
- **Determine Download Strategy:**
414+
- If `party` is '1p':
415+
- If `version` is provided, download that specific version.
416+
- Otherwise, download the latest copy at the exact `url`.
417+
- If `party` is '3p', MUST use the provided `commit_sha` to download the specific vetted commit.
418+
- Download the content of the skill folder from the `url` specified in `catalog.md` (using the determined strategy) to the determined path.
419+
- **CRITICAL:** If the URL is a file path, find the parent folder. If it is a Git URL, use `git clone` or `sparse-checkout` to get the folder.
420+
6. **Continue:** Immediately proceed to the next section (2.6.1).
421+
422+
### 2.6.1 Skill Reload Confirmation
423+
1. **Execution Trigger:** This step MUST only be executed if you installed new skills in the previous section.
424+
2. **Notify and Pause:** **CRITICAL:** You MUST explicitly instruct the user: "New skills installed. Please run `/skills reload` to enable them. Let me know when you have done this." Do NOT use the `ask_user` tool here.
425+
3. **Wait for Confirmation:** You MUST pause your execution here and wait for the user to confirm they have run the command and reloaded the skills before proceeding.
426+
427+
### 2.7 Finalization
375428
1. **Generate Index File:**
376429
- Create `conductor/index.md` with the following content:
377430
```markdown

skills/catalog.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Agent Skills Catalog
2+
3+
This catalog defines the curriculum of skills available to the Conductor extension.
4+
5+
## Firebase Skills
6+
Skills focused on setting up, managing, and using various Firebase services.
7+
8+
### firebase-ai-logic-basics
9+
- **Description**: Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.
10+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-ai-logic-basics/
11+
- **Party**: 1p
12+
- **Detection Signals**:
13+
- **Dependencies**: `firebase`, `firebase-admin`
14+
- **Keywords**: `Firebase`, `AI Logic`, `Gemini API`, `GenAI`
15+
16+
### firebase-app-hosting-basics
17+
- **Description**: Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
18+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-app-hosting-basics/
19+
- **Party**: 1p
20+
- **Detection Signals**:
21+
- **Dependencies**: `firebase`, `firebase-admin`
22+
- **Keywords**: `Firebase App Hosting`, `Next.js`, `Angular`
23+
24+
### firebase-auth-basics
25+
- **Description**: Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.
26+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-auth-basics/
27+
- **Party**: 1p
28+
- **Detection Signals**:
29+
- **Dependencies**: `firebase`, `firebase-admin`
30+
- **Keywords**: `Firebase Authentication`, `Auth`, `Sign-in`
31+
32+
### firebase-basics
33+
- **Description**: Guide for setting up and using Firebase. Use this skill when the user is getting started with Firebase - setting up local environment, using Firebase for the first time, or adding Firebase to their app.
34+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-basics/
35+
- **Party**: 1p
36+
- **Detection Signals**:
37+
- **Dependencies**: `firebase`, `firebase-admin`
38+
- **Keywords**: `Firebase`, `Setup`
39+
40+
### firebase-data-connect-basics
41+
- **Description**: Build and deploy Firebase Data Connect backends with PostgreSQL. Use for schema design, GraphQL queries/mutations, authorization, and SDK generation for web, Android, iOS, and Flutter apps.
42+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-data-connect-basics/
43+
- **Party**: 1p
44+
- **Detection Signals**:
45+
- **Dependencies**: `firebase`, `firebase-admin`
46+
- **Keywords**: `Firebase Data Connect`, `PostgreSQL`, `GraphQL`
47+
48+
### firebase-firestore-basics
49+
- **Description**: Comprehensive guide for Firestore basics including provisioning, security rules, and SDK usage. Use this skill when the user needs help setting up Firestore, writing security rules, or using the Firestore SDK in their application.
50+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore-basics/
51+
- **Party**: 1p
52+
- **Detection Signals**:
53+
- **Dependencies**: `firebase`, `firebase-admin`
54+
- **Keywords**: `Firestore`, `Database`, `Security Rules`
55+
56+
### firebase-hosting-basics
57+
- **Description**: Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
58+
- **URL**: https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-hosting-basics/
59+
- **Party**: 1p
60+
- **Detection Signals**:
61+
- **Dependencies**: `firebase`, `firebase-admin`
62+
- **Keywords**: `Firebase Hosting`, `Static Hosting`
63+
64+
## DevOps Skills
65+
Skills for designing, building, and managing CI/CD pipelines and infrastructure on Google Cloud.
66+
67+
### cloud-deploy-pipelines
68+
- **Description**: Manage the entire lifecycle of Google Cloud Deploy, from designing and creating delivery pipelines to managing releases and debugging failures.
69+
- **URL**: https://raw.githubusercontent.com/gemini-cli-extensions/devops/main/skills/cloud-deploy-pipelines/
70+
- **Party**: 1p
71+
- **Detection Signals**:
72+
- **Dependencies**: `skaffold`
73+
- **Keywords**: `Cloud Deploy`, `delivery pipeline`, `skaffold.yaml`, `clouddeploy.yaml`
74+
75+
### gcp-cicd-deploy
76+
- **Description**: Assistant for deploying applications to Google Cloud, supporting Static Sites (GCS), Cloud Run (Buildpacks or Images), and GKE.
77+
- **URL**: https://raw.githubusercontent.com/gemini-cli-extensions/devops/main/skills/gcp-cicd-deploy/
78+
- **Party**: 1p
79+
- **Detection Signals**:
80+
- **Dependencies**: `gcloud`
81+
- **Keywords**: `Cloud Run`, `GCS`, `Static Site`, `Deployment`, `Google Cloud`
82+
83+
### gcp-cicd-design
84+
- **Description**: Assistant for designing, building, and managing CI/CD pipelines on Google Cloud, focusing on architectural design and implementation planning.
85+
- **URL**: https://raw.githubusercontent.com/gemini-cli-extensions/devops/main/skills/gcp-cicd-design/
86+
- **Party**: 1p
87+
- **Detection Signals**:
88+
- **Keywords**: `CI/CD`, `Pipeline Design`, `Google Cloud`, `Architectural Design`
89+
90+
### gcp-cicd-terraform
91+
- **Description**: Use Terraform to provision Google Cloud resources (GKE, Cloud Run, Cloud SQL) with standard GCS backend state management and IAM least-privilege.
92+
- **URL**: https://raw.githubusercontent.com/gemini-cli-extensions/devops/main/skills/gcp-cicd-terraform/
93+
- **Party**: 1p
94+
- **Detection Signals**:
95+
- **Dependencies**: `terraform`
96+
- **Keywords**: `Terraform`, `GCP`, `GCS Backend`, `Infrastructure as Code`, `IaC`

0 commit comments

Comments
 (0)