🏃 Research Product Spec → Plan Implementation → Implement Plan
- GitHub Staff
- http://digitarald.de
- @digitarald
{ | |
"inputs": [ | |
{ | |
"type": "promptString", | |
"id": "github-pat", | |
"password": true, | |
"description": "GitHub Personal Access Token (PAT, https://github.com/settings/personal-access-tokens/new)" | |
} | |
], | |
"servers": { |
The software development landscape is experiencing a fundamental transformation. Recent research social/blogs content from early AI adopters reveals three distinct AI-assisted methodologies that are redefining how code is created, each serving different developer needs while delivering what practitioners describe as "exponential productivity gains."
Developers tackling complex projects with significant architectural requirements are finding success with highly structured AI workflows that emphasize thorough planning before implementation:
{ | |
"github.copilot.chat.experimental.codeGeneration.useInstructionFiles": true, | |
"github.copilot.chat.experimental.codeGeneration.instructions": [ | |
{ | |
"text": "Use concise one-liners when possible, but avoid sacrificing clarity for brevity." | |
}, | |
{ | |
"text": "Comment any generated code that has complex logic, especially around asynchronous operations or state management." | |
}, | |
{ |
- Default to Server Components in
app/
, only using Client Components with'use client'
if they use hooks likeuseState
oruseRouter
, or DOM interactions. - Fetching data in Server Components: use
fetch()
, avoiduseEffect
. - For TypeScript: Enforce interfaces and types for all props and state.
- Nest
layout.tsx
files for consistent UI across sections. - For async operations: prefer
async/await
, add appropriate error handling and UI loading states.
-
Core Concepts:
- FastHTML Basics: Framework for building fast, scalable web applications using pure Python. Integrates seamlessly with HTML, CSS, and JavaScript via HTMX.
- ASGI and Uvicorn: FastHTML operates on ASGI with Uvicorn as the ASGI server. Starlette provides high-level functionality on top of ASGI.
-
Routing and HTTP Methods:
- Route Definitions: Use
@rt
decorator to define routes. Function names (get
,post
,put
,delete
) map directly to HTTP methods. - Dynamic Routing: Use path parameters and types for dynamic route handling. Example:
@rt("/{fname:path}.{ext:static}")
.
- Route Definitions: Use
-
HTML and Components:
-
Component Creation: Build reusable components using Python functions that return HTML elements. Example:
def hero(title, statement): return Div(H1(title), P(statement), cls="hero")
.
import fs from "fs"; | |
import path from "path"; | |
import matter from "gray-matter"; | |
import { bundleMDX } from "mdx-bundler"; | |
export const POSTS_PATH = path.join(process.cwd(), "data/_posts"); | |
export const getSourceOfFile = (fileName) => { | |
return fs.readFileSync(path.join(POSTS_PATH, fileName)); | |
}; |
<script> | |
console.log('%cline-height: 1.5', 'line-height: 1.5; background-color: red; color: white') | |
console.log('%cline-height: 1.5em', 'line-height: 1.5em; background-color: red; color: white') | |
console.log('%cline-height: 50px', 'line-height: 50px; background-color: red; color: white') | |
</script> | |
See DevTools Console |
Long Frames: Main | |
16-20: 2156 | |
20-40: 1015 | |
40-60: 203 | |
60-80: 116 | |
80-100: 95 | |
100-120: 61 | |
120-140: 44 | |
140-160: 24 | |
160-180: 33 |