Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .agents/skills/antigravity-sdk-rust/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
```markdown
# antigravity-sdk-rust Development Patterns

> Auto-generated skill from repository analysis

## Overview
This skill teaches you the core development patterns, coding conventions, and workflows for contributing to the `antigravity-sdk-rust` repository. The SDK is written in Rust and is organized as a modular library, focusing on extensibility and clarity. You'll learn how to implement new features, wire them into the SDK, update documentation, and follow the project's conventions for code, commits, and testing.

## Coding Conventions

### File Naming
- Use **camelCase** for file names.
- Example: `toolContext.rs`, `triggerHelpers.rs`

### Imports
- Use **relative imports** within modules.
- Example:
```rust
mod error;
use crate::error::AntigravityError;
```

### Exports
- Use **named exports** for modules, traits, and structs.
- Example:
```rust
pub mod context;
pub use context::Context;
```

### Commit Messages
- Use **conventional commit** prefixes:
- `feat:` for new features
- `docs:` for documentation changes
- Keep commit messages concise (average ~51 characters).
- Example: `feat: add interactive tool context support`

## Workflows

### Feature Implementation and Wiring
**Trigger:** When adding a new core feature or module to the SDK
**Command:** `/new-module`

1. **Create or update module files** in `src/` (e.g., `context.rs`, `error.rs`, `tool_context.rs`, `trigger_helpers.rs`, `interactive.rs`).
2. **Wire the new modules** into `src/lib.rs`:
```rust
// In src/lib.rs
pub mod toolContext;
pub use toolContext::ToolContext;
```
3. **Optionally update or create related trait or struct files** (e.g., `hooks.rs`, `tools.rs`).
4. **Test the integration** by running or writing tests (see Testing Patterns).

#### Example
Suppose you're adding a new module `interactive.rs`:
```rust
// src/interactive.rs
pub struct Interactive {
// fields
}
impl Interactive {
pub fn new() -> Self { /* ... */ }
}
```
Update `src/lib.rs`:
```rust
pub mod interactive;
pub use interactive::Interactive;
```

---

### Documentation Update After Feature
**Trigger:** When documenting new features, modules, or API changes
**Command:** `/update-docs`

1. **Update or create documentation files** in `docs/*.md` to cover new or changed components.
2. **Edit `README.md`** to add or update sections reflecting new features or changes.
3. **Add cross-links or summary sections** in `README.md` for better discoverability.

#### Example
If you add a new `Interactive` module:
- Update `docs/interactive.md` with usage and API details.
- Add a section in `README.md`:
```markdown
## Interactive Module
Provides interactive SDK features for advanced workflows.
See [docs/interactive.md](docs/interactive.md) for details.
```

## Testing Patterns

- **Test files** use the pattern `*.test.*` (e.g., `context.test.rs`).
- **Testing framework** is not explicitly specified; use Rust's built-in test framework.
- **Example test structure:**
```rust
// src/context.test.rs
#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_context_creation() {
let ctx = Context::new();
assert!(ctx.is_valid());
}
}
```

## Commands

| Command | Purpose |
|----------------|----------------------------------------------------------------|
| /new-module | Scaffold and wire a new core module into the SDK |
| /update-docs | Update documentation and README after a feature or API change |
```
6 changes: 6 additions & 0 deletions .agents/skills/antigravity-sdk-rust/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface:
display_name: "Antigravity Sdk Rust"
short_description: "Repo-specific patterns and workflows for antigravity-sdk-rust"
default_prompt: "Use the antigravity-sdk-rust repo skill to follow existing architecture, testing, and workflow conventions."
policy:
allow_implicit_invocation: true
36 changes: 36 additions & 0 deletions .claude/commands/documentation-update-after-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: documentation-update-after-feature
description: Workflow command scaffold for documentation-update-after-feature in antigravity-sdk-rust.
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
---

# /documentation-update-after-feature

Use this workflow when working on **documentation-update-after-feature** in `antigravity-sdk-rust`.

## Goal

Updates documentation files and README to reflect new features, components, or API changes.

## Common Files

- `README.md`
- `docs/*.md`

## Suggested Sequence

1. Understand the current state and failure mode before editing.
2. Make the smallest coherent change that satisfies the workflow goal.
3. Run the most relevant verification for touched files.
4. Summarize what changed and what still needs review.

## Typical Commit Signals

- Update or create relevant docs/*.md files for new or changed components
- Add or update sections in README.md to reflect new features or changes
- Add cross-links or summary sections in README.md for discoverability

## Notes

- Treat this as a scaffold, not a hard-coded script.
- Update the command if the workflow evolves materially.
35 changes: 35 additions & 0 deletions .claude/commands/feature-development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: feature-development
description: Workflow command scaffold for feature-development in antigravity-sdk-rust.
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
---

# /feature-development

Use this workflow when working on **feature-development** in `antigravity-sdk-rust`.

## Goal

Standard feature implementation workflow

## Common Files

- `**/*.test.*`

## Suggested Sequence

1. Understand the current state and failure mode before editing.
2. Make the smallest coherent change that satisfies the workflow goal.
3. Run the most relevant verification for touched files.
4. Summarize what changed and what still needs review.

## Typical Commit Signals

- Add feature implementation
- Add tests for feature
- Update documentation

## Notes

- Treat this as a scaffold, not a hard-coded script.
- Update the command if the workflow evolves materially.
36 changes: 36 additions & 0 deletions .claude/commands/feature-implementation-and-wiring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: feature-implementation-and-wiring
description: Workflow command scaffold for feature-implementation-and-wiring in antigravity-sdk-rust.
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
---

# /feature-implementation-and-wiring

Use this workflow when working on **feature-implementation-and-wiring** in `antigravity-sdk-rust`.

## Goal

Implements a new core feature or module, then wires it into the main library entry point and supporting files.

## Common Files

- `src/*.rs`
- `src/lib.rs`

## Suggested Sequence

1. Understand the current state and failure mode before editing.
2. Make the smallest coherent change that satisfies the workflow goal.
3. Run the most relevant verification for touched files.
4. Summarize what changed and what still needs review.

## Typical Commit Signals

- Create or update one or more module files in src/ (e.g., context.rs, error.rs, tool_context.rs, trigger_helpers.rs, interactive.rs)
- Update src/lib.rs to wire in the new modules
- Optionally, update or create related trait or struct files (e.g., hooks.rs, tools.rs)

## Notes

- Treat this as a scaffold, not a hard-coded script.
- Update the command if the workflow evolves materially.
Loading
Loading