mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 09:37:15 +00:00
Compare commits
10 Commits
682abfcdeb
...
5140d20204
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5140d20204 | ||
|
|
b198104783 | ||
|
|
1874219995 | ||
|
|
25219b70d3 | ||
|
|
9da3e5598e | ||
|
|
b9a6404352 | ||
|
|
967b1f7983 | ||
|
|
17d4eb1fc1 | ||
|
|
13c1081312 | ||
|
|
2b8e3166a1 |
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Production-ready workflow orchestration with 72 focused plugins, 112 specialized agents, and 146 skills - optimized for granular installation and minimal token usage",
|
"description": "Production-ready workflow orchestration with 72 focused plugins, 112 specialized agents, and 146 skills - optimized for granular installation and minimal token usage",
|
||||||
"version": "1.5.3"
|
"version": "1.5.4"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
@@ -897,7 +897,7 @@
|
|||||||
{
|
{
|
||||||
"name": "conductor",
|
"name": "conductor",
|
||||||
"description": "Context-Driven Development plugin that transforms Claude Code into a project management tool with structured workflow: Context → Spec & Plan → Implement",
|
"description": "Context-Driven Development plugin that transforms Claude Code into a project management tool with structured workflow: Context → Spec & Plan → Implement",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Seth Hobson",
|
"name": "Seth Hobson",
|
||||||
"email": "seth@major7apps.com"
|
"email": "seth@major7apps.com"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "conductor",
|
"name": "conductor",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"description": "Context-Driven Development plugin that transforms Claude Code into a project management tool with structured workflow: Context → Spec & Plan → Implement",
|
"description": "Context-Driven Development plugin that transforms Claude Code into a project management tool with structured workflow: Context → Spec & Plan → Implement",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Seth Hobson",
|
"name": "Seth Hobson",
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
---
|
---
|
||||||
name: context-driven-development
|
name: context-driven-development
|
||||||
description: Use this skill when working with Conductor's context-driven development methodology, managing project context artifacts, or understanding the relationship between product.md, tech-stack.md, and workflow.md files.
|
description: >-
|
||||||
|
Creates and maintains project context artifacts (product.md, tech-stack.md, workflow.md, tracks.md)
|
||||||
|
in a `conductor/` directory. Scaffolds new projects from scratch, extracts context from existing
|
||||||
|
codebases, validates artifact consistency before implementation, and synchronizes documents as the
|
||||||
|
project evolves. Use when setting up a project, creating or updating product docs, managing a tech
|
||||||
|
stack file, defining development workflows, tracking work units, onboarding to an existing codebase,
|
||||||
|
or running project scaffolding.
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -133,6 +139,8 @@ Update when:
|
|||||||
- Track status changes
|
- Track status changes
|
||||||
- Tracks are completed or archived
|
- Tracks are completed or archived
|
||||||
|
|
||||||
|
See [references/artifact-templates.md](references/artifact-templates.md) for copy-paste starter templates.
|
||||||
|
|
||||||
## Context Maintenance Principles
|
## Context Maintenance Principles
|
||||||
|
|
||||||
### Keep Artifacts Synchronized
|
### Keep Artifacts Synchronized
|
||||||
|
|||||||
@@ -0,0 +1,154 @@
|
|||||||
|
# Artifact Templates
|
||||||
|
|
||||||
|
Starter templates for each Conductor context artifact. Copy and fill in for new projects.
|
||||||
|
|
||||||
|
> Contributed by [@fernandezbaptiste](https://github.com/fernandezbaptiste) ([#437](https://github.com/wshobson/agents/pull/437))
|
||||||
|
|
||||||
|
## product.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# [Product Name]
|
||||||
|
|
||||||
|
> One-line description of what this product does.
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
What problem does this solve and for whom?
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
|
||||||
|
High-level approach to solving the problem.
|
||||||
|
|
||||||
|
## Target Users
|
||||||
|
|
||||||
|
| Persona | Needs | Pain Points |
|
||||||
|
|---|---|---|
|
||||||
|
| Persona 1 | What they need | What frustrates them |
|
||||||
|
|
||||||
|
## Core Features
|
||||||
|
|
||||||
|
| Feature | Status | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| Feature A | planned | What it does |
|
||||||
|
| Feature B | implemented | What it does |
|
||||||
|
|
||||||
|
## Success Metrics
|
||||||
|
|
||||||
|
| Metric | Target | Current |
|
||||||
|
|---|---|---|
|
||||||
|
| Metric 1 | target value | - |
|
||||||
|
|
||||||
|
## Roadmap
|
||||||
|
|
||||||
|
- **Phase 1**: scope
|
||||||
|
- **Phase 2**: scope
|
||||||
|
```
|
||||||
|
|
||||||
|
## tech-stack.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Tech Stack
|
||||||
|
|
||||||
|
## Languages & Frameworks
|
||||||
|
|
||||||
|
| Technology | Version | Purpose |
|
||||||
|
|---|---|---|
|
||||||
|
| Python | 3.12 | Backend API |
|
||||||
|
| React | 18.x | Frontend UI |
|
||||||
|
|
||||||
|
## Key Dependencies
|
||||||
|
|
||||||
|
| Package | Version | Rationale |
|
||||||
|
|---|---|---|
|
||||||
|
| FastAPI | 0.100+ | REST API framework |
|
||||||
|
| SQLAlchemy | 2.x | ORM and database access |
|
||||||
|
|
||||||
|
## Infrastructure
|
||||||
|
|
||||||
|
| Component | Choice | Notes |
|
||||||
|
|---|---|---|
|
||||||
|
| Hosting | AWS ECS | Production containers |
|
||||||
|
| Database | PostgreSQL 16 | Primary data store |
|
||||||
|
| CI/CD | GitHub Actions | Build and deploy |
|
||||||
|
|
||||||
|
## Dev Tools
|
||||||
|
|
||||||
|
| Tool | Purpose | Config |
|
||||||
|
|---|---|---|
|
||||||
|
| pytest | Testing (target: 80% coverage) | pyproject.toml |
|
||||||
|
| ruff | Linting + formatting | ruff.toml |
|
||||||
|
```
|
||||||
|
|
||||||
|
## workflow.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Workflow
|
||||||
|
|
||||||
|
## Methodology
|
||||||
|
|
||||||
|
TDD with trunk-based development.
|
||||||
|
|
||||||
|
## Git Conventions
|
||||||
|
|
||||||
|
- **Branch naming**: `feature/<track-id>-description`
|
||||||
|
- **Commit format**: `type(scope): message`
|
||||||
|
- **PR requirements**: 1 approval, all checks green
|
||||||
|
|
||||||
|
## Quality Gates
|
||||||
|
|
||||||
|
| Gate | Requirement |
|
||||||
|
|---|---|
|
||||||
|
| Tests | All pass, coverage >= 80% |
|
||||||
|
| Lint | Zero errors |
|
||||||
|
| Review | At least 1 approval |
|
||||||
|
| Types | No type errors |
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
1. PR merged to main
|
||||||
|
2. CI runs tests + build
|
||||||
|
3. Auto-deploy to staging
|
||||||
|
4. Manual promotion to production
|
||||||
|
```
|
||||||
|
|
||||||
|
## tracks.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Tracks
|
||||||
|
|
||||||
|
## Active
|
||||||
|
|
||||||
|
| ID | Title | Status | Priority | Assignee |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| TRACK-001 | Feature name | in-progress | high | @person |
|
||||||
|
|
||||||
|
## Completed
|
||||||
|
|
||||||
|
| ID | Title | Completed |
|
||||||
|
|---|---|---|
|
||||||
|
| TRACK-000 | Initial setup | 2024-01-15 |
|
||||||
|
```
|
||||||
|
|
||||||
|
## product-guidelines.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Product Guidelines
|
||||||
|
|
||||||
|
## Voice & Tone
|
||||||
|
|
||||||
|
- Professional but approachable
|
||||||
|
- Direct and concise
|
||||||
|
- Technical where needed, plain language by default
|
||||||
|
|
||||||
|
## Terminology
|
||||||
|
|
||||||
|
| Term | Use | Don't Use |
|
||||||
|
|---|---|---|
|
||||||
|
| workspace | preferred | project, repo |
|
||||||
|
| track | preferred | ticket, issue |
|
||||||
|
|
||||||
|
## Error Messages
|
||||||
|
|
||||||
|
Format: `[Component] What happened. What to do next.`
|
||||||
|
Example: `[Auth] Session expired. Please sign in again.`
|
||||||
|
```
|
||||||
@@ -21,19 +21,21 @@ Master Stripe payment processing integration for robust, PCI-compliant payment f
|
|||||||
|
|
||||||
### 1. Payment Flows
|
### 1. Payment Flows
|
||||||
|
|
||||||
**Checkout Session (Hosted)**
|
**Checkout Sessions**
|
||||||
|
|
||||||
- Stripe-hosted payment page
|
- Recommended for most integrations
|
||||||
- Minimal PCI compliance burden
|
- Supports all UI paths:
|
||||||
- Fastest implementation
|
- Stripe-hosted checkout page
|
||||||
- Supports one-time and recurring payments
|
- Embedded checkout form
|
||||||
|
- Custom UI with Elements (Payment Element, Express Checkout Element) using `ui_mode='custom'`
|
||||||
|
- Provides built-in checkout capabilities (line items, discounts, tax, shipping, address collection, saved payment methods, and checkout lifecycle events)
|
||||||
|
- Lower integration and maintenance burden than Payment Intents
|
||||||
|
|
||||||
**Payment Intents (Custom UI)**
|
**Payment Intents (Bespoke control)**
|
||||||
|
|
||||||
- Full control over payment UI
|
- You calculate the final amount with taxes, discounts, subscriptions, and currency conversion yourself.
|
||||||
|
- More complex implementation and long-term maintenance burden
|
||||||
- Requires Stripe.js for PCI compliance
|
- Requires Stripe.js for PCI compliance
|
||||||
- More complex implementation
|
|
||||||
- Better customization options
|
|
||||||
|
|
||||||
**Setup Intents (Save Payment Methods)**
|
**Setup Intents (Save Payment Methods)**
|
||||||
|
|
||||||
@@ -77,7 +79,6 @@ stripe.api_key = "sk_test_..."
|
|||||||
|
|
||||||
# Create a checkout session
|
# Create a checkout session
|
||||||
session = stripe.checkout.Session.create(
|
session = stripe.checkout.Session.create(
|
||||||
payment_method_types=['card'],
|
|
||||||
line_items=[{
|
line_items=[{
|
||||||
'price_data': {
|
'price_data': {
|
||||||
'currency': 'usd',
|
'currency': 'usd',
|
||||||
@@ -93,7 +94,7 @@ session = stripe.checkout.Session.create(
|
|||||||
}],
|
}],
|
||||||
mode='subscription',
|
mode='subscription',
|
||||||
success_url='https://yourdomain.com/success?session_id={CHECKOUT_SESSION_ID}',
|
success_url='https://yourdomain.com/success?session_id={CHECKOUT_SESSION_ID}',
|
||||||
cancel_url='https://yourdomain.com/cancel',
|
cancel_url='https://yourdomain.com/cancel'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Redirect user to session.url
|
# Redirect user to session.url
|
||||||
@@ -109,12 +110,11 @@ def create_checkout_session(amount, currency='usd'):
|
|||||||
"""Create a one-time payment checkout session."""
|
"""Create a one-time payment checkout session."""
|
||||||
try:
|
try:
|
||||||
session = stripe.checkout.Session.create(
|
session = stripe.checkout.Session.create(
|
||||||
payment_method_types=['card'],
|
|
||||||
line_items=[{
|
line_items=[{
|
||||||
'price_data': {
|
'price_data': {
|
||||||
'currency': currency,
|
'currency': currency,
|
||||||
'product_data': {
|
'product_data': {
|
||||||
'name': 'Purchase',
|
'name': 'Blue T-shirt',
|
||||||
'images': ['https://example.com/product.jpg'],
|
'images': ['https://example.com/product.jpg'],
|
||||||
},
|
},
|
||||||
'unit_amount': amount, # Amount in cents
|
'unit_amount': amount, # Amount in cents
|
||||||
@@ -136,11 +136,77 @@ def create_checkout_session(amount, currency='usd'):
|
|||||||
raise
|
raise
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pattern 2: Custom Payment Intent Flow
|
### Pattern 2: Elements with Checkout Sessions
|
||||||
|
|
||||||
|
```python
|
||||||
|
def create_checkout_session_for_elements(amount, currency='usd'):
|
||||||
|
"""Create a checkout session configured for Payment Element."""
|
||||||
|
session = stripe.checkout.Session.create(
|
||||||
|
mode='payment',
|
||||||
|
ui_mode='custom',
|
||||||
|
line_items=[{
|
||||||
|
'price_data': {
|
||||||
|
'currency': currency,
|
||||||
|
'product_data': {'name': 'Blue T-shirt'},
|
||||||
|
'unit_amount': amount,
|
||||||
|
},
|
||||||
|
'quantity': 1,
|
||||||
|
}],
|
||||||
|
return_url='https://yourdomain.com/complete?session_id={CHECKOUT_SESSION_ID}'
|
||||||
|
)
|
||||||
|
return session.client_secret # Send to frontend
|
||||||
|
```
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const stripe = Stripe("pk_test_...");
|
||||||
|
const appearance = { theme: "stripe" };
|
||||||
|
|
||||||
|
const checkout = stripe.initCheckout({
|
||||||
|
clientSecret,
|
||||||
|
elementsOptions: { appearance },
|
||||||
|
});
|
||||||
|
const loadActionsResult = await checkout.loadActions();
|
||||||
|
|
||||||
|
if (loadActionsResult.type === "success") {
|
||||||
|
const { actions } = loadActionsResult;
|
||||||
|
const session = actions.getSession();
|
||||||
|
|
||||||
|
const button = document.getElementById("pay-button");
|
||||||
|
const checkoutContainer = document.getElementById("checkout-container");
|
||||||
|
const emailInput = document.getElementById("email");
|
||||||
|
const emailErrors = document.getElementById("email-errors");
|
||||||
|
const errors = document.getElementById("confirm-errors");
|
||||||
|
|
||||||
|
// Display a formatted string representing the total amount
|
||||||
|
checkoutContainer.append(`Total: ${session.total.total.amount}`);
|
||||||
|
|
||||||
|
// Mount Payment Element
|
||||||
|
const paymentElement = checkout.createPaymentElement();
|
||||||
|
paymentElement.mount("#payment-element");
|
||||||
|
|
||||||
|
// Store email for submission
|
||||||
|
emailInput.addEventListener("blur", () => {
|
||||||
|
actions.updateEmail(emailInput.value).then((result) => {
|
||||||
|
if (result.error) emailErrors.textContent = result.error.message;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
actions.confirm().then((result) => {
|
||||||
|
if (result.type === "error") errors.textContent = result.error.message;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pattern 3: Elements with Payment Intents
|
||||||
|
|
||||||
|
Pattern 2 (Elements with Checkout Sessions) is Stripe's recommended approach, but you can also use Payment Intents as an alternative.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def create_payment_intent(amount, currency='usd', customer_id=None):
|
def create_payment_intent(amount, currency='usd', customer_id=None):
|
||||||
"""Create a payment intent for custom checkout UI."""
|
"""Create a payment intent for bespoke checkout UI with Payment Element."""
|
||||||
intent = stripe.PaymentIntent.create(
|
intent = stripe.PaymentIntent.create(
|
||||||
amount=amount,
|
amount=amount,
|
||||||
currency=currency,
|
currency=currency,
|
||||||
@@ -153,35 +219,32 @@ def create_payment_intent(amount, currency='usd', customer_id=None):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
return intent.client_secret # Send to frontend
|
return intent.client_secret # Send to frontend
|
||||||
|
|
||||||
# Frontend (JavaScript)
|
|
||||||
"""
|
|
||||||
const stripe = Stripe('pk_test_...');
|
|
||||||
const elements = stripe.elements();
|
|
||||||
const cardElement = elements.create('card');
|
|
||||||
cardElement.mount('#card-element');
|
|
||||||
|
|
||||||
const {error, paymentIntent} = await stripe.confirmCardPayment(
|
|
||||||
clientSecret,
|
|
||||||
{
|
|
||||||
payment_method: {
|
|
||||||
card: cardElement,
|
|
||||||
billing_details: {
|
|
||||||
name: 'Customer Name'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
// Handle error
|
|
||||||
} else if (paymentIntent.status === 'succeeded') {
|
|
||||||
// Payment successful
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pattern 3: Subscription Creation
|
```javascript
|
||||||
|
// Mount Payment Element and confirm via Payment Intents
|
||||||
|
const stripe = Stripe("pk_test_...");
|
||||||
|
const appearance = { theme: "stripe" };
|
||||||
|
const elements = stripe.elements({ appearance, clientSecret });
|
||||||
|
|
||||||
|
const paymentElement = elements.create("payment");
|
||||||
|
paymentElement.mount("#payment-element");
|
||||||
|
|
||||||
|
document.getElementById("pay-button").addEventListener("click", async () => {
|
||||||
|
const { error } = await stripe.confirmPayment({
|
||||||
|
elements,
|
||||||
|
confirmParams: {
|
||||||
|
return_url: "https://yourdomain.com/complete",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
document.getElementById("errors").textContent = error.message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pattern 4: Subscription Creation
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def create_subscription(customer_id, price_id):
|
def create_subscription(customer_id, price_id):
|
||||||
@@ -204,7 +267,7 @@ def create_subscription(customer_id, price_id):
|
|||||||
raise
|
raise
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pattern 4: Customer Portal
|
### Pattern 5: Customer Portal
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def create_customer_portal_session(customer_id):
|
def create_customer_portal_session(customer_id):
|
||||||
@@ -412,9 +475,11 @@ def test_payment_flow():
|
|||||||
# Create payment intent
|
# Create payment intent
|
||||||
intent = stripe.PaymentIntent.create(
|
intent = stripe.PaymentIntent.create(
|
||||||
amount=1000,
|
amount=1000,
|
||||||
|
automatic_payment_methods={
|
||||||
|
'enabled': True
|
||||||
|
},
|
||||||
currency='usd',
|
currency='usd',
|
||||||
customer=customer.id,
|
customer=customer.id
|
||||||
payment_method_types=['card']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Confirm with test card
|
# Confirm with test card
|
||||||
|
|||||||
Reference in New Issue
Block a user