Skip to content

Staging#58

Merged
Hackshaven merged 11 commits intomainfrom
staging
Aug 24, 2025
Merged

Staging#58
Hackshaven merged 11 commits intomainfrom
staging

Conversation

@Hackshaven
Copy link
Collaborator

@Hackshaven Hackshaven commented Aug 23, 2025

This pull request introduces a comprehensive set of improvements focused on project documentation, issue/PR workflow templates, and LLM integration support. The main themes are: establishing structured templates for issues and pull requests, providing explicit repository instructions for contributors and Copilot, and adding resources for LLM tooling and API integrations.

Issue & PR Workflow Standardization

  • Added structured templates for bug reports, feature requests, and workflow gap issues in .github/ISSUE_TEMPLATE/ to ensure contributors provide clear, actionable information and implementation plans. [1] [2] [3]
  • Introduced a pull request template (.github/PULL_REQUEST_TEMPLATE.md) with a checklist for code, tests, documentation, and workflow alignment.
  • Updated CONTRIBUTING.md to document the new workflow gap process and template usage, guiding contributors to link PRs to relevant issues and maintain documentation accuracy.

Copilot & Contributor Guidance

  • Added detailed Copilot instructions (.github/copilot-instructions.md) covering project overview, environment setup, build/test/lint steps, CI validation, repo layout, and explicit guidance for Copilot usage.

LLM Tooling & API Integration

  • Introduced the llm/ directory with documentation (llm/README.md) describing its purpose, layout, and conventions for repository-local LLM tools and prompts. [1] [2]
  • Added OpenAPI specs and plugin definitions for ChatGPT Actions to interact with Zyra CLI manifest (llm/actions/cli_manifest/openapi.yaml, [1] browse the repository (llm/actions/github_repo_access/openapi.yaml, [2] [3] and provide sample endpoints (llm/actions/sample/openapi.yaml, [4] [5].
  • Supplemented these integrations with clear usage notes and configuration instructions for LLM tools. (llm/actions/cli_manifest/README.md, llm/actions/cli_manifest/README.mdR1-R14)

Repository Hygiene

  • Added .copilotignore to exclude environment files, secrets, and dependency lockfiles from Copilot indexing.

These changes collectively improve contributor experience, project maintainability, and enable advanced LLM-powered workflows.


References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] llm/actions/cli_manifest/README.md [14] [15]

Hackshaven and others added 6 commits August 22, 2025 22:42
- Introduced a new endpoint `/commands` to retrieve available Zyra CLI commands and their details.
- Implemented the `zyra_cli_manifest` service to handle command listing and details retrieval.
- Created multiple system prompts for the Zyra assistant, including `zyra_helper_bot_system.md`, `zyra_tools_system.md`, and `wizard_system.md`, to guide user interactions.
- Added a caching mechanism for the command manifest to improve performance.
- Updated the server to include the new manifest router and ensure proper API key requirements.
- Established guidelines for the assistant's behavior, emphasizing clarity, structure, and educational responses.
- Included example commands and fallback handling for unsupported requests.
- Enhanced the README documentation for LLM assets and structured the asset directories for better organization.
Add Zyra CLI manifest and assistant prompts
@Hackshaven Hackshaven self-assigned this Aug 23, 2025
@Hackshaven Hackshaven requested a review from Copilot August 23, 2025 17:51

This comment was marked as outdated.

@Hackshaven Hackshaven requested a review from Copilot August 24, 2025 03:30

This comment was marked as outdated.

…enAPI schema and GitHub repo access functionality, code review improvements
@Hackshaven Hackshaven requested a review from Copilot August 24, 2025 03:45

This comment was marked as outdated.

@Hackshaven Hackshaven requested a review from Copilot August 24, 2025 03:54

This comment was marked as outdated.

…er maintainability, code review improvements
@Hackshaven Hackshaven requested a review from Copilot August 24, 2025 04:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces comprehensive infrastructure for LLM tooling and project workflows, enhancing Zyra's integration capabilities and contributor experience. The changes establish structured templates for issues and pull requests, provide explicit repository guidance, and add extensive LLM integration support.

  • Establishes workflow gap tracking with structured issue/PR templates to align development with actual CLI needs
  • Adds comprehensive LLM tooling infrastructure including prompts, OpenAPI specs, and Open WebUI tools
  • Introduces a new manifest API service enabling dynamic CLI command discovery and examples

Reviewed Changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/snapshots/ Updates API snapshots to include new /commands endpoint
src/zyra/wizard/prompts.py Refactors system prompt loading to support packaged assets with fallback
src/zyra/assets/llm/ Adds comprehensive LLM assets including prompts and action definitions
src/zyra/api/ Implements new manifest service and router for CLI command discovery
pyproject.toml Version bump to 0.1.23
llm/ Extensive LLM integration resources including prompts, tools, and OpenAPI specs
.github/ Adds contributor templates, Copilot instructions, and workflow standardization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +64 to +65
_asset_prompt = _load_system_prompt_from_assets()
SYSTEM_PROMPT = _asset_prompt if _asset_prompt else _default_system_prompt()
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module-level prompt loading executes on every import, potentially causing unnecessary I/O operations. Consider lazy-loading the SYSTEM_PROMPT using a function or property to defer the file system access until actually needed.

Suggested change
_asset_prompt = _load_system_prompt_from_assets()
SYSTEM_PROMPT = _asset_prompt if _asset_prompt else _default_system_prompt()
_system_prompt_cache: str | None = None
def get_system_prompt() -> str:
global _system_prompt_cache
if _system_prompt_cache is None:
asset_prompt = _load_system_prompt_from_assets()
_system_prompt_cache = asset_prompt if asset_prompt else _default_system_prompt()
return _system_prompt_cache

Copilot uses AI. Check for mistakes.
Comment on lines +315 to +316
except Exception:
self.valves = None
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The broad exception handling in the else clause silently sets valves to None, which could mask configuration issues. Consider logging the exception or catching more specific exceptions like ValidationError to provide better debugging information.

Suggested change
except Exception:
self.valves = None
except ValidationError as ve:
logging.error(f"Failed to instantiate Valves: {ve}")
self.valves = None
except Exception as e:
logging.error(f"Unexpected error during Valves instantiation: {e}")
self.valves = None

Copilot uses AI. Check for mistakes.
Comment on lines +377 to +378
# Use injected valves if provided; else seed with schema defaults
self.valves = valves if valves is not None else self.Valves() # type: ignore[call-arg]
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This initialization pattern differs from the zyra_cli_manifest tool's more defensive approach with try/except. Consider aligning the error handling strategies between the two tools for consistency, especially since both deal with similar valve initialization.

Suggested change
# Use injected valves if provided; else seed with schema defaults
self.valves = valves if valves is not None else self.Valves() # type: ignore[call-arg]
# Use injected valves if provided; else seed with schema defaults, with error handling
try:
self.valves = valves if valves is not None else self.Valves() # type: ignore[call-arg]
except Exception as e:
print(f"Error initializing valves: {e}")
self.valves = self.Valves() # fallback to defaults

Copilot uses AI. Check for mistakes.
@Hackshaven Hackshaven merged commit 3999c8f into main Aug 24, 2025
8 checks passed
@Hackshaven Hackshaven mentioned this pull request Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants