home/coding/prompt-engineering-67

Prompt Engineering

GPTClaudeDeepSeek··1,188 copies·updated 2026-07-14
prompt-engineering-67.prompt
# Prompt Engineering

Build reliable, testable, versioned system prompts in 9 incremental steps. Each step adds one concept -- from simple typed blocks to composable reasoning strategies, runtime guards, and prompt pipelines.

!!! tip "This is the recommended starting point for prompt engineering"
    This guide walks you through the complete prompt system step by step. For deep reference on individual features, see the [PromptBlocks](../prompting/blocks.md), [ConversationFlow](../prompting/flows.md), [Strategies](../prompting/strategies.md), [Guards](../prompting/guards.md), and [Context](../prompting/context.md) pages.

## What You'll Build

A prompt system for a data analyst agent with typed blocks, priority-based token budgeting, composable reasoning strategies, runtime guards, dynamic context injection, conversation flows that evolve across turns, version control, and automated testing. The same patterns used in production agent systems where prompt quality determines agent quality.

## Concepts

Most frameworks treat prompts as strings. Promptise treats them as **software components** -- composable, versioned, testable, debuggable. Prompts have types, priorities, lifecycle hooks, and debugging tools. They compose from independent parts. They adapt at runtime based on context. They drop gracefully when the context window gets tight.

The prompt system has three layers:

1. **PromptBlocks** -- typed building blocks (identity, rules, format, examples, context) with priorities that determine what survives when the context window is tight
2. **Strategies and perspectives** -- control how the agent reasons (chain-of-thought, self-critique, decompose) and from what angle (analyst, critic, advisor)
3. **Guards** -- enforce policy before and after generation (content filtering, length limits, schema validation with retry)

---

## Step 1: Typed Blocks

Start with the `@prompt` decorator and typed blocks instead of raw strings:

when to use it

Community prompt sourced from the open-source GitHub repo promptise-com/Foundry (Apache-2.0). A "Prompt Engineering" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

promptise-com/Foundry · Apache-2.0