AI Features¶
FuncSpec integrates AI throughout the specification workflow — from reviewing individual items to auditing your entire codebase against your specs.
AI Review¶
AI Review analyzes a spec item and produces a structured evaluation of its quality and completeness.
What it produces¶
| Field | Description |
|---|---|
| Coverage score | 0–100 score reflecting how thoroughly the spec covers the requirement |
| Verdict | pass, needs_work, or fail |
| Gaps | Specific areas that are missing or underspecified |
| Suggestions | Concrete improvements recommended by the AI |
Running a review¶
Via web: Open any spec item → AI button → Review Specification
Via CLI:
Via API:
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/15/review \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Example review result¶
{
"coverage_score": 72,
"verdict": "needs_work",
"gaps": [
"No error handling specified for invalid email addresses",
"Password reset token expiry not mentioned",
"Behavior when user account is locked is undefined"
],
"suggestions": [
"Specify the token validity window (recommend 1 hour)",
"Define what happens on expired token use — should show a clear error and allow re-requesting",
"Clarify whether the old password is invalidated immediately on reset or only after confirmation"
]
}
Batch review¶
Review all accepted items in a project at once:
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/review_all \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Note
Batch operations run asynchronously. Large projects may take several minutes. The web interface shows progress in real time.
AI Improve¶
AI Improve proposes a rewritten version of the spec's description, addressing gaps identified during review.
Workflow¶
- Open a spec item that has been reviewed
- Click AI → Improve Specification
- The AI generates a proposed new description
- Review the diff between the current and proposed version
- Accept to apply the proposal, or Reject to discard it
Via CLI¶
# Generate improvement proposal
funcspec ai improve F-12
# Accept the pending proposal
funcspec ai accept F-12
# Reject it
funcspec ai reject F-12
Apply all proposals¶
After running batch review and generating proposals across a project:
This accepts all pending proposals in one operation. Review the diff before confirming.
Warning
apply-all modifies spec descriptions for every item with a pending proposal. Use with caution on large projects.
Generate Tech Specs¶
Given a functional spec, the AI generates a set of technical specs that describe how to implement the requirement.
Running generation¶
Via web: Open a functional spec → AI → Generate Tech Specs
The AI produces a list of proposed technical items. For each one you can: - Edit the title and description before creating - Click Create to save it as a new Technical spec linked to this functional spec - Skip items you don't need
Via CLI:
Via API:
# Step 1: Generate proposals
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/5/generate_tech \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
# Step 2: Create a proposed tech spec
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/5/create_tech \
-H "X-Api-Key: $FUNCSPEC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"index": 0}'
Example output¶
For a functional spec titled "User password reset", the AI might generate:
| Proposed Tech Spec | Description |
|---|---|
| T-12 | PasswordResetToken model with HMAC-signed token, expiry, and single-use flag |
| T-13 | PasswordResetMailer — sends reset email with tokenized link |
| T-14 | POST /api/v1/password_resets — create token, trigger email |
| T-15 | PATCH /api/v1/password_resets/:token — validate token and update password |
| T-16 | Background job to purge expired tokens (runs nightly) |
Functional Review¶
Functional Review analyzes a functional spec from a product requirements perspective — checking for ambiguity, contradictions, and missing edge cases rather than coverage score.
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/5/func_review \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Batch functional review:
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/func_review_all \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Code Audit¶
Code Audit checks whether your accepted technical specs are reflected in your connected GitHub repository. It helps identify:
- Specs that have no corresponding code
- Specs where the implementation diverges from the specification
- Technical debt — specs that were once implemented but have drifted
Prerequisites¶
You must have a GitHub repository connected to your project.
Running an audit¶
Via web: Open a technical spec → AI → Audit Against Codebase
Via CLI:
Via API:
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/12/audit \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Batch audit¶
curl -X POST https://funcspec.net/api/v1/projects/42/work_package/audit_all \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Viewing audit results¶
curl https://funcspec.net/api/v1/projects/42/spec/items/12/audit_results \
-H "X-Api-Key: $FUNCSPEC_API_KEY"
Example audit result¶
{
"status": "partial",
"findings": [
{
"type": "implemented",
"detail": "PasswordResetToken model found in app/models/password_reset_token.rb"
},
{
"type": "divergence",
"detail": "Token expiry is 24 hours in code; spec requires 1 hour"
},
{
"type": "missing",
"detail": "Single-use flag (used_at column) not found in schema"
}
]
}
BYOK Configuration¶
Bring Your Own Key (BYOK) lets you use your own AI provider API keys instead of the platform default. This gives you:
- Cost control: Usage billed to your own account
- Model choice: Select models from your provider contract
- Privacy: Spec content is sent directly to your provider, not via FuncSpec's AI credentials
Configuring BYOK¶
Go to Project Settings → AI Configuration:
- Select your Provider (OpenAI, Anthropic, or compatible endpoint)
- Enter your API Key
- Choose the Model (e.g.,
claude-opus-4-5,gpt-4o) - Click Save and Test — FuncSpec will verify connectivity
Tip
BYOK settings are per-project. You can use different providers for different projects, for example using a more capable model on projects with complex technical specs.
Supported providers¶
| Provider | Models |
|---|---|
| Anthropic | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 |
| OpenAI | gpt-4o, gpt-4o-mini, o1, o3-mini |
| Compatible | Any OpenAI-compatible endpoint |
Note
API keys are stored encrypted at rest. They are only used to make AI requests on your behalf and are never logged or exposed in the UI after saving.
AI Operation Limits¶
AI operations consume credits or count against your plan's usage limits.
| Operation | Relative cost |
|---|---|
| Review | 1 credit |
| Improve (propose) | 1 credit |
| Functional Review | 1 credit |
| Generate Tech Specs | 2 credits |
| Code Audit | 2 credits |
Check your current usage at Organization Settings → Usage or via the usage API.
Tip
When using BYOK, operations are unlimited on the FuncSpec side — you're only limited by your own provider quotas.