Have you ever noticed how differently we think about software when we're designing it versus when we're actually using it? As developers, we often get caught up in the technical implementation details - classes, functions, data structures - but users think in terms of questions and answers, prompts and responses. What if we could bridge this cognitive gap with a computing model that more naturally aligns with how humans think about interactions?
Enter PnR (Prompt and Response) Computing - a paradigm that reimagines software as a collection of natural language prompts and their corresponding responses, all driven by clear intentions. Let me show you why this approach offers some unique cognitive advantages, and then we'll look at a practical example.
The Cognitive Advantage of PnR Computing
Traditional computing models follow a rigid input-process-output pattern. While this works well in controlled environments, it doesn't capture how humans naturally think about interactions. In real-world scenarios:
Inputs aren't raw data - they're interpreted through layers of context and understanding
Outputs aren't final - they often trigger new inputs or require further interpretation
Intentions matter - the "why" behind an action is as important as the action itself
PnR computing addresses these aspects by:
- Representing software state as a collection of prompt-response pairs
- Making intentions explicit first-class citizens in the model
- Supporting natural language expressions for both prompts and responses
- Allowing multi-stage transformations of information
A Practical Example: Form Handling
Let's look at how PnR computing changes how we think about something as common as a multi-stage form. Instead of thinking about form fields and validation logic, we'll think in terms of prompts, responses, and intentions.
Here's how we might define a simple onboarding flow:
const pnrConfig = {
"cpuxId": "onboarding-flow",
"stages": [
{ "id": 0, "name": "Identity" },
{ "id": 1, "name": "Contact" },
{ "id": 2, "name": "Preferences" }
],
"pnrSet": [
{
"prompt": "What is your name?",
"key": "name",
"stages": [0], // When to ask
"responseStages": [0, 2] // When the response is relevant
},
{
"prompt": "What is your preferred contact method?",
"key": "contactMethod",
"stages": [1],
"responseStages": [1, 2],
"options": ["Email", "Phone", "Post"]
}
]
}
The resulting flow can be seen through the link below
or dive into the academic paper for a deeper understanding of the theoretical foundations.
What do you think about this approach to software design? Have you encountered situations where traditional computing models felt disconnected from human thinking? Share your thoughts in the comments!
SOCIAL SHARE CARD GENERATOR