
Module 2: Task Definition & Tech Stack and Constraints
1. Overview & Learning Objectives
Once your context and high-level vision are set, the model still needs explicit instructions on what action to take and what boundaries govern the work. Without a clear task and technical constraints, AI often produces broad overviews instead of concrete deliverables, or picks libraries, patterns, and assumptions that do not fit your environment.
In this module, you will learn how to turn grounded context into an unambiguous assignment—for both general AI work and application code generation. By the end of this module, you will be able to:
- Write a clear, actionable Objective using specific verbs and defined deliverables so the model knows exactly what to produce.
- Set Scope & Boundaries for general tasks so the response stays focused, practical, and relevant.
- Specify the Tech Stack & Technical Constraints (languages, versions, frameworks, hosting/runtime limits, and what to avoid) so generated code slots straight into your build.
2. Why Task & Constraints Matter Together
A strong task tells the model what to build or do; strong constraints tell the model how it must fit into the real world:
- For general AI tasks: Saying “help me with this” invites guesswork. Saying “extract three key risks from this text and group them by impact” gives the model a clear job and a clear boundary.
- For application code: Asking for “a script” or “a component” often leads to outdated syntax, heavy dependencies, or incompatible versions. Stating the exact language, version, framework, and forbidden libraries keeps the output aligned with your project.
3. Core Building Blocks
A. General AI Application
- Actionable Objective: Start with a direct verb (e.g., audit, summarise, compare, draft, restructure) and name the exact deliverable.
- Inputs & Scope: Specify what source material to use and what is out of scope for this step.
- Practical Guardrails: State depth, tone, or accuracy limits (such as flagging missing facts rather than filling gaps).
B. Application Code Generation
- Tech Stack & Versions: List the exact language(s), runtime, frameworks, and key libraries or versions in use.
- Environment & Integration Constraints: Note target platforms, browsers, servers, or existing code conventions the output must respect.
- Exclusions (“Do Not Use”): Explicitly rule out unwanted frameworks, deprecated methods, or unnecessary external packages.
4. Workflow Diagram
Use this flow when drafting the Task Definition / Tech Stack & Constraints stage of a prompt:
Plaintext
[Grounded Base Prompt / Spec]
│
▼
[Define Action Verb & Deliverable] (or [Specify Stack & Versions])
│
▼
[Set Scope & Practical Guardrails] (or [State Runtime & Exclusions])
│
▼
[Actionable Task & Stack Spec] ──► Ready for Constraints / Interface Spec
5. Practical Examples
Example 1: General Application (Career / Application Workflow)
Task & Boundaries: Compare a candidate’s verified role history against a target job specification and produce a gap-and-alignment table. Only use facts present in the provided profile and job spec; mark any unverified requirement as “Not evidenced.” Keep explanations concise and factual without marketing fluff.
Example 2: Application Code (Web Component)
Tech Stack & Constraints: Write this in vanilla JavaScript (ES6+) and standard HTML5/CSS3 compatible with modern WordPress themes. Do not require jQuery, React, or external build tools. Keep dependencies to zero so it can run cleanly as a standalone snippet inside a page.
6. Hands-On Exercise
- Take the Context block you created in Module 1 (or use a real task/feature you are working on).
- Add a Task section with one clear action verb, the exact output you want, and at least two boundaries (such as scope limits, version requirements, or tools/libraries to avoid).
- Run it with your AI tool and check: did it deliver the exact type of output you asked for within your technical or practical limits?
