---
title: "generate"
description: "Produce new content"
canonical: "https://acs.synapti.ai/capabilities/generate/"
last_updated: "2026-11-16T01:14:10Z"
---

# generate

Produce new content

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/generate/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/generate/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [SYNTHESIZE](https://acs.synapti.ai/layers/synthesize/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | No |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

In a workflow, constrain, where the workflow has it, must come first (V102).

## Relationships

**Figure: Relationships of generate: 7 relationships with 7 capabilities.** generate has 7 relationships with 7 capabilities: 4 with edges into it, 2 with edges out of it, and 1 joined to it only by edges that run both ways.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`compare`](https://acs.synapti.ai/capabilities/compare/index.md) | Edges into generate | `enables` (into) |
| [`discover`](https://acs.synapti.ai/capabilities/discover/index.md) | Edges into generate | `enables` (into) |
| [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | Edges into generate | `enables` (into) |
| [`transform`](https://acs.synapti.ai/capabilities/transform/index.md) | Either way | `alternative_to` (both ways) |
| [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | Edges out of generate | `enables` (out of) |
| [`verify`](https://acs.synapti.ai/capabilities/verify/index.md) | Edges out of generate | `enables` (out of) |
| [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | Edges into generate | `precedes` (into) |

- `enables`: Unlocks [`verify`](https://acs.synapti.ai/capabilities/verify/index.md), [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md)
- `enables`: Unlocked by [`plan`](https://acs.synapti.ai/capabilities/plan/index.md), [`compare`](https://acs.synapti.ai/capabilities/compare/index.md), [`discover`](https://acs.synapti.ai/capabilities/discover/index.md)
- `precedes`: Comes after, when both are present [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md)
- `alternative_to`: Can substitute for [`transform`](https://acs.synapti.ai/capabilities/transform/index.md)

## Contract

**Figure: Contract of generate: 3 inputs (1 required), 6 outputs.** generate takes 3 inputs, 1 required (filled pin) and 2 optional (hollow pin), and returns 6 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `specification` | string\|object | Yes | What to generate |
| `format` | string | No | Output format |
| `constraints` | object | No | Generation constraints |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `content` | any | Yes | Generated content |
| `metadata` | object | No | Generation metadata |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | Yes | The producer's probability that the output's claim is correct, self-reported unless the host documents a calibration (Standard v1.2 §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 11 fields: 4 are in generate's output contract (3 required) and 7 are the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `content` | Yes, required |
| `metadata` | Yes, optional |
| `constraints_used` | No, the skill's own |
| `rationale` | No, the skill's own |
| `alternatives_considered` | No, the skill's own |
| `quality_signals` | No, the skill's own |
| `confidence` | Yes, required |
| `evidence_anchors` | Yes, required |
| `assumptions` | No, the skill's own |
| `safety_notes` | No, the skill's own |
| `next_actions` | No, the skill's own |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: generate in workflows.** 16 workflows use generate, in 16 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`capability_gap_analysis`](https://acs.synapti.ai/workflows/capability-gap-analysis/index.md): step 6
- [`rag_pipeline`](https://acs.synapti.ai/workflows/rag-pipeline/index.md): step 4
- [`security_assessment`](https://acs.synapti.ai/workflows/security-assessment/index.md): step 6
- [`data_pipeline_validation`](https://acs.synapti.ai/workflows/data-pipeline-validation/index.md): step 11
- [`report_generation`](https://acs.synapti.ai/workflows/report-generation/index.md): step 9
- [`model_monitoring`](https://acs.synapti.ai/workflows/model-monitoring/index.md): step 12
- [`patient_monitoring`](https://acs.synapti.ai/workflows/patient-monitoring/index.md): step 10
- [`clinical_alert_triage`](https://acs.synapti.ai/workflows/clinical-alert-triage/index.md): step 9
- [`handoff_preparation`](https://acs.synapti.ai/workflows/handoff-preparation/index.md): step 11
- [`production_line_monitoring`](https://acs.synapti.ai/workflows/production-line-monitoring/index.md): step 8
- [`predictive_maintenance`](https://acs.synapti.ai/workflows/predictive-maintenance/index.md): step 9
- [`supply_chain_sync`](https://acs.synapti.ai/workflows/supply-chain-sync/index.md): step 9
- [`schedule_management`](https://acs.synapti.ai/workflows/schedule-management/index.md): step 8
- [`information_research`](https://acs.synapti.ai/workflows/information-research/index.md): step 9
- [`task_delegation`](https://acs.synapti.ai/workflows/task-delegation/index.md): step 6
- [`communication_drafting`](https://acs.synapti.ai/workflows/communication-drafting/index.md): step 6

## Claude Code skill

**Figure: What the generate skill's tools can do, against the ontology.** The skill may use 2 tools: 2 only read; the ontology marks generate as read-only, and every tool only reads.

| What they can do | Tools |
| --- | --- |
| Only read | `Read`, `Grep` |
| Run commands, which can change state | none |
| Change files | none |

**Figure: The field names each step of the generate procedure uses.** 4 of the procedure's 8 steps use the name of an input or output field of the generate skill as a word; 8 output fields of 11 are used by no step (metadata, constraints_used, quality_signals, confidence, evidence_anchors, assumptions, safety_notes, next_actions).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Clarify artifact requirements | `format`, `constraints` |  |
| 2. Gather context |  |  |
| 3. Design approach |  |  |
| 4. Generate artifact | `constraints` | `content` |
| 5. Validate constraints | `constraints` |  |
| 6. Assess quality |  |  |
| 7. Document rationale |  | `rationale`, `alternatives_considered` |
| 8. Ground claims |  |  |

Both examples of the skill write out every one of its 11 output fields.

**Figure: The field names each verification check of the generate skill uses.** 4 of the 5 checks use the name of an input or output field as a word; 9 output fields of 11 are named by no check (content, metadata, constraints_used, rationale, alternatives_considered, confidence, evidence_anchors, assumptions and next_actions).

| Check | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. All required constraints marked as satisfied | `constraints` |  |
| 2. Artifact format matches requested format | `format` |  |
| 3. Quality signals include at least correctness and completeness |  | `quality_signals` |
| 4. Rationale explains key design decisions |  |  |
| 5. Safety notes address security considerations |  | `safety_notes` |

**Figure: The neighbours the skill lists for generate, checked against the ontology and the catalogs.** The skill lists 7 capabilities as common neighbours of generate; 5 of them have an edge with it in the ontology, and 4 run next to it, in that order, in a catalog workflow (plan most often, 7 times). Under each tile, an edge reads from its source to its target, with generate's symbol in its place: "requires Gn" is a requires edge from the tile's capability to generate, so the tile's capability must run before generate; "Gn precedes" is a precedes edge from generate to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`compare`](https://acs.synapti.ai/capabilities/compare/index.md) | `enables` | 2 times |
| commonly follows | [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | `enables` | 7 times |
| commonly follows | [`classify`](https://acs.synapti.ai/capabilities/classify/index.md) | none | 1 times |
| commonly follows | [`discover`](https://acs.synapti.ai/capabilities/discover/index.md) | `enables` | never |
| commonly precedes | [`verify`](https://acs.synapti.ai/capabilities/verify/index.md) | `enables` (into it) | never |
| commonly precedes | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `enables` (into it) | never |
| commonly precedes | [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | none | 1 times |

### Intent

Produce a new artifact that satisfies specified constraints and serves a defined purpose. Generation is creative synthesis bounded by requirements, not mere retrieval or transformation.

**Success criteria:**
- Artifact satisfies all stated constraints
- Rationale explains design decisions
- Quality signals demonstrate fitness for purpose
- Safety considerations documented

**Compatible schemas:**
- `schemas/output_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `specification` | Yes | string\|object | What to generate |
| `format` | No | string | Output format: markdown, json, yaml, typescript, etc. |
| `constraints` | No | object | Requirements the artifact must satisfy |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Clarify artifact requirements**: Ensure constraints are understood
   - Must-have: absolute requirements (format, structure, compatibility)
   - Should-have: preferences (style, conventions, optimization)
   - Must-not-have: exclusions (patterns to avoid, security constraints)

2) **Gather context**: Collect relevant reference material
   - Read existing code/docs for style consistency
   - Identify patterns to follow or avoid
   - Understand integration points and dependencies

3) **Design approach**: Plan the generation strategy
   - Outline structure before detailed generation
   - Consider multiple approaches if request is complex
   - Document key design decisions

4) **Generate artifact**: Produce the content systematically
   - Follow identified patterns and conventions
   - Satisfy constraints in priority order
   - Document any constraints that conflict

5) **Validate constraints**: Verify each constraint is satisfied
   - Mark each constraint as satisfied/unsatisfied
   - Note any compromises or partial satisfaction

6) **Assess quality**: Evaluate fitness for purpose
   - Correctness: Does it work as intended?
   - Completeness: Is anything missing?
   - Maintainability: Is it understandable and modifiable?
   - Safety: Are there security or reliability concerns?

7) **Document rationale**: Explain why this design
   - Key decisions and their reasoning
   - Alternatives considered and why rejected
   - Known limitations or future considerations

8) **Ground claims**: Reference sources that informed generation

### Output Contract

Return a structured object:

```yaml
content: string | object  # The generated artifact
metadata:  # Generation metadata
  type: string  # text, code, plan, config, schema, etc.
  format: string  # markdown, json, yaml, typescript, etc.
constraints_used:
  - constraint: string  # Constraint description
    satisfied: boolean  # Was it met?
    notes: string  # How it was satisfied or why not
rationale: string  # Why this design/approach
alternatives_considered: array[string]  # Other approaches evaluated
quality_signals:
  - metric: string  # Quality dimension
    value: number | string  # Assessment
confidence: number  # probability that the artifact meets its specification (§4.1.1)
evidence_anchors: array[EvidenceAnchor]  # References to source material; each {ref, kind} (STANDARD v1.2 §6.5)
assumptions: array[string]  # Conditions affecting the artifact
safety_notes: array[string]  # Security/reliability considerations
next_actions: array[string]  # Suggested follow-ups
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `content` | string\|object | The generated artifact itself |
| `metadata` | object | Generation metadata: `type` (category of content) and `format` |
| `constraints_used` | array | Evaluation of constraint satisfaction |
| `rationale` | string | Design decision explanation |
| `alternatives_considered` | array | Other approaches that were rejected |
| `quality_signals` | array | Quality metrics and assessments |
| `confidence` | number | Probability, 0.0-1.0, that the artifact meets its specification (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | Sources that informed generation |
| `safety_notes` | array[string] | Security/reliability concerns |
| `next_actions` | array[string] | Recommended follow-up steps |

### Examples

#### Example 1: Generate API Endpoint

**Input:**
```yaml
specification:
  artifact_type: "code"
  endpoint: "POST /api/users"
  schema: "{ name: string, email: string, role: 'admin' | 'user' }"
constraints:
  must_have:
    - "TypeScript with strict mode"
    - "Express.js middleware pattern"
    - "Input validation with Zod"
    - "Return 200 on success, 400 on validation error, 500 on server error"
format: "typescript"
```

**Output:**
```yaml
content: |
  import { Request, Response, NextFunction } from 'express';
  import { z } from 'zod';

  const CreateUserSchema = z.object({
    name: z.string().min(1).max(100),
    email: z.string().email(),
    role: z.enum(['admin', 'user'])
  });

  type CreateUserInput = z.infer<typeof CreateUserSchema>;

  export async function createUser(
    req: Request,
    res: Response,
    next: NextFunction
  ): Promise<void> {
    try {
      const parsed = CreateUserSchema.safeParse(req.body);

      if (!parsed.success) {
        res.status(400).json({
          error: 'Validation failed',
          details: parsed.error.issues
        });
        return;
      }

      const userData: CreateUserInput = parsed.data;

      // TODO: Implement actual user creation logic
      const user = await userService.create(userData);

      res.status(200).json({ user });
    } catch (error) {
      next(error);
    }
  }
metadata:
  type: "code"
  format: "typescript"
constraints_used:
  - constraint: "TypeScript with strict mode"
    satisfied: true
    notes: "All types explicit, strict null checks compatible"
  - constraint: "Express.js middleware pattern"
    satisfied: true
    notes: "Standard (req, res, next) signature with async handler"
  - constraint: "Input validation with Zod"
    satisfied: true
    notes: "Zod schema with safeParse for type-safe validation"
  - constraint: "HTTP status codes"
    satisfied: true
    notes: "200 success, 400 validation error, 500 via error middleware"
rationale: "Used safeParse over parse for explicit error handling without exceptions. Separated schema definition for reuse in tests. Left business logic as TODO for service layer."
alternatives_considered:
  - "class-validator with decorators - rejected for runtime overhead"
  - "Manual validation - rejected for type safety"
quality_signals:
  - metric: "type_safety"
    value: "high"
  - metric: "error_handling"
    value: "comprehensive"
  - metric: "testability"
    value: "high"
confidence: 0.9
evidence_anchors:
  - {ref: "zod:docs:safeParse", kind: x-doc}
  - {ref: "express:docs:error-handling", kind: x-doc}
assumptions:
  - "userService exists and is imported"
  - "Error middleware handles uncaught exceptions"
safety_notes:
  - "Email validation does not prevent all injection attacks"
  - "Consider rate limiting for user creation endpoint"
next_actions:
  - "Implement userService.create method"
  - "Add authentication middleware"
  - "Write unit tests for validation logic"
```

**Evidence pattern:** Read existing codebase for patterns, reference library documentation for best practices.

---

#### Example 2: Generate Configuration Schema

**Input:**
```yaml
specification:
  artifact_type: "schema"
  description: "Database connection configuration"
constraints:
  must_have:
    - "JSON Schema draft-07"
    - "Required fields: host, port, database"
    - "Optional: ssl, poolSize, timeout"
  should_have:
    - "Sensible defaults where appropriate"
format: "json"
```

**Output:**
```yaml
content:
  $schema: "http://json-schema.org/draft-07/schema#"
  title: "DatabaseConfig"
  type: "object"
  required: ["host", "port", "database"]
  properties:
    host:
      type: "string"
      description: "Database server hostname"
      examples: ["localhost", "db.example.com"]
    port:
      type: "integer"
      minimum: 1
      maximum: 65535
      description: "Database server port"
      default: 5432
    database:
      type: "string"
      description: "Database name"
      minLength: 1
    ssl:
      type: "boolean"
      description: "Enable SSL/TLS connection"
      default: true
    poolSize:
      type: "integer"
      minimum: 1
      maximum: 100
      description: "Connection pool size"
      default: 10
    timeout:
      type: "integer"
      minimum: 0
      description: "Connection timeout in milliseconds"
      default: 30000
  additionalProperties: false
metadata:
  type: "schema"
  format: "json"
constraints_used:
  - constraint: "JSON Schema draft-07"
    satisfied: true
    notes: "$schema declaration included"
  - constraint: "Required fields: host, port, database"
    satisfied: true
    notes: "Listed in required array"
  - constraint: "Optional: ssl, poolSize, timeout"
    satisfied: true
    notes: "Not in required, have defaults"
  - constraint: "Sensible defaults"
    satisfied: true
    notes: "port=5432 (PostgreSQL), ssl=true, poolSize=10, timeout=30s"
rationale: "Used PostgreSQL port as default assuming most common use case. SSL enabled by default for security. Pool size 10 balances resource usage with concurrency."
alternatives_considered:
  - "MySQL port 3306 - rejected, PostgreSQL more common in modern stacks"
quality_signals:
  - metric: "completeness"
    value: "high"
  - metric: "documentation"
    value: "descriptions and examples included"
confidence: 0.95
evidence_anchors:
  - {ref: "json-schema:draft-07:spec", kind: x-doc}
assumptions:
  - "PostgreSQL is the target database"
  - "Production deployment expects SSL"
safety_notes:
  - "Consider encrypting credentials in actual config files"
  - "poolSize limits should match database max_connections"
next_actions:
  - "Add validation for connection string format"
  - "Consider environment variable substitution"
```

### Verification

- [ ] All required constraints marked as satisfied
- [ ] Artifact format matches requested format
- [ ] Quality signals include at least correctness and completeness
- [ ] Rationale explains key design decisions
- [ ] Safety notes address security considerations

**Verification tools:** Read (for pattern consistency), schema validators, linters

### Safety Constraints

- `mutation`: false
- `requires_checkpoint`: false
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- Generated code must not contain hardcoded secrets or credentials
- Flag any security-sensitive patterns in generated content
- Do not generate content that violates constraints - report conflicts instead
- Include safety_notes for any security-relevant artifact

### Composition Patterns

**Commonly follows:**
- `compare` - Generate solution based on comparison winner
- `plan` - Generate artifacts specified in plan
- `classify` - Generate based on classified requirements
- `discover` - Generate to address discovered gaps

**Commonly precedes:**
- `verify` - Generated artifacts should be verified
- `mutate` - Generated content may be written to files
- `critique` - Generated plans should be critiqued

**Anti-patterns:**
- Never generate without constraints (unbounded generation)
- Avoid generate for retrieval (use `search` or `retrieve`)
- Do not use generate for analysis (use `measure`, `compare`, etc.)

**Workflow references:**
- See `reference/composition_patterns.md#capability-gap-analysis` for plan generation
- See `reference/composition_patterns.md#debug-code-change` for code generation in fixes
