ai-developer-skill-os 3.1.4 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +15 -19
  2. package/_template/SKILL.md +37 -133
  3. package/framework/KERNEL.md +58 -0
  4. package/framework/bias-library/cosmetic-refactor.md +21 -0
  5. package/framework/bias-library/enterprise-crud.md +21 -0
  6. package/framework/bias-library/fake-ui-slop.md +20 -0
  7. package/framework/bias-library/hallucinated-tools.md +20 -0
  8. package/framework/bias-library/missing-ui-states.md +19 -0
  9. package/framework/bias-library/over-indexing.md +20 -0
  10. package/framework/bias-library/swallow-errors.md +19 -0
  11. package/framework/bias-library/ui-only-security.md +17 -0
  12. package/framework/dial-library/complexity-budget.md +13 -0
  13. package/framework/dial-library/granularity.md +13 -0
  14. package/framework/dial-library/optimization-strategy.md +13 -0
  15. package/framework/dial-library/strictness.md +13 -0
  16. package/framework/rule-library/delegation-only.md +9 -0
  17. package/framework/rule-library/minimal-diff.md +9 -0
  18. package/package.json +1 -1
  19. package/skills/qk-access-policy/SKILL.md +41 -31
  20. package/skills/qk-ai-builder/SKILL.md +40 -31
  21. package/skills/qk-api-lifecycle/SKILL.md +40 -53
  22. package/skills/qk-bug-resolution/SKILL.md +40 -57
  23. package/skills/qk-context-loader/SKILL.md +37 -36
  24. package/skills/qk-data-lifecycle/SKILL.md +38 -50
  25. package/skills/qk-db-optimizer/SKILL.md +56 -0
  26. package/skills/qk-design-to-code/SKILL.md +41 -36
  27. package/skills/qk-docs/SKILL.md +38 -42
  28. package/skills/qk-engineering-standard/SKILL.md +40 -52
  29. package/skills/qk-feature-delivery/SKILL.md +40 -56
  30. package/skills/qk-help/SKILL.md +37 -29
  31. package/skills/qk-orchestrator/SKILL.md +41 -43
  32. package/skills/qk-policy-engine/SKILL.md +37 -42
  33. package/skills/qk-production-release/SKILL.md +41 -37
  34. package/skills/qk-project-bootstrap/SKILL.md +40 -33
  35. package/skills/qk-project-health/SKILL.md +37 -45
  36. package/skills/qk-project-memory/SKILL.md +39 -25
  37. package/skills/qk-system-evolution/SKILL.md +37 -52
  38. package/skills/qk-ui-audit/SKILL.md +38 -47
  39. package/skills/qk-ui-system-builder/SKILL.md +39 -30
  40. package/skills/qk-validation-gate/SKILL.md +35 -48
  41. package/skills.json +313 -86
  42. package/taste-skill/.claude-plugin/marketplace.json +20 -0
  43. package/taste-skill/.claude-plugin/plugin.json +19 -0
  44. package/taste-skill/.github/FUNDING.yml +1 -0
  45. package/taste-skill/.github/copilot-instructions.md +11 -0
  46. package/taste-skill/CHANGELOG.md +111 -0
  47. package/taste-skill/LICENSE +21 -0
  48. package/taste-skill/README.md +212 -0
  49. package/taste-skill/assets/.gitkeep +0 -0
  50. package/taste-skill/assets/readme-banner.webp +0 -0
  51. package/taste-skill/assets/readme-buttons/btn-agent-skills.webp +0 -0
  52. package/taste-skill/assets/readme-buttons/btn-changelog.webp +0 -0
  53. package/taste-skill/assets/readme-buttons/btn-mit.webp +0 -0
  54. package/taste-skill/assets/readme-buttons/btn-site.webp +0 -0
  55. package/taste-skill/assets/readme-buttons/btn-tools.webp +0 -0
  56. package/taste-skill/assets/readme-cta-tasteskill.svg +5 -0
  57. package/taste-skill/assets/sponsors/animations-dev.webp +0 -0
  58. package/taste-skill/assets/sponsors/emil-animations-dev.webp +0 -0
  59. package/taste-skill/assets/taste-skill-logo.png +0 -0
  60. package/taste-skill/assets/taste-skill-logo.webp +0 -0
  61. package/taste-skill/assets/vercel-oss-program-badge.svg +44 -0
  62. package/taste-skill/examples/floria-bottom.webp +0 -0
  63. package/taste-skill/examples/floria-full.webp +0 -0
  64. package/taste-skill/examples/floria-top.webp +0 -0
  65. package/taste-skill/research/README.md +8 -0
  66. package/taste-skill/research/laziness/README.md +25 -0
  67. package/taste-skill/research/laziness/findings/empirical-results.md +58 -0
  68. package/taste-skill/research/laziness/findings/references.md +20 -0
  69. package/taste-skill/research/laziness/remediation/architectural-patterns.md +55 -0
  70. package/taste-skill/research/laziness/remediation/parameter-tuning.md +44 -0
  71. package/taste-skill/research/laziness/remediation/prompt-engineering.md +52 -0
  72. package/taste-skill/research/laziness/remediation/reference-prompts.md +79 -0
  73. package/taste-skill/research/laziness/root-causes/cognitive-shortcuts.md +23 -0
  74. package/taste-skill/research/laziness/root-causes/output-limits.md +39 -0
  75. package/taste-skill/research/laziness/root-causes/rlhf-and-compute.md +27 -0
  76. package/taste-skill/research/laziness/root-causes/training-data-bias.md +28 -0
  77. package/taste-skill/scripts/build-emil-sponsor-row.mjs +41 -0
  78. package/taste-skill/scripts/convert-readme-assets-webp.mjs +142 -0
  79. package/taste-skill/scripts/process-readme-buttons.mjs +108 -0
  80. package/taste-skill/scripts/process-sponsor-badge.mjs +83 -0
  81. package/taste-skill/skill.sh +25 -0
  82. package/taste-skill/skills/brandkit/SKILL.md +798 -0
  83. package/taste-skill/skills/brutalist-skill/SKILL.md +92 -0
  84. package/taste-skill/skills/gpt-tasteskill/SKILL.md +74 -0
  85. package/taste-skill/skills/image-to-code-skill/SKILL.md +1228 -0
  86. package/taste-skill/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
  87. package/taste-skill/skills/imagegen-frontend-web/SKILL.md +987 -0
  88. package/taste-skill/skills/llms.txt +13 -0
  89. package/taste-skill/skills/minimalist-skill/SKILL.md +85 -0
  90. package/taste-skill/skills/output-skill/SKILL.md +49 -0
  91. package/taste-skill/skills/redesign-skill/SKILL.md +178 -0
  92. package/taste-skill/skills/soft-skill/SKILL.md +98 -0
  93. package/taste-skill/skills/stitch-skill/DESIGN.md +121 -0
  94. package/taste-skill/skills/stitch-skill/SKILL.md +184 -0
  95. package/taste-skill/skills/taste-skill/SKILL.md +1206 -0
  96. package/taste-skill/skills/taste-skill-v1/SKILL.md +226 -0
  97. package/skills/qk-documentation-system/SKILL.md +0 -45
@@ -0,0 +1,20 @@
1
+ # References
2
+
3
+ ## Cited Studies
4
+
5
+ - **EmotionPrompt (Microsoft Research)** — Demonstrates that emotional and stakes-based prompt framing mathematically improves LLM reasoning quality and output length. Documents the +45% improvement from financial framing and +115% from combined stimuli.
6
+
7
+ - **LazyBench** — Proves that frontier models (Gemini 1.5 Pro, GPT-4o) actively select cognitive shortcuts and fail tasks they are capable of solving when the perceived effort exceeds internal thresholds.
8
+
9
+ - **Compounding Error Avoidance** — Research demonstrating that models truncate outputs as a risk mitigation strategy, preferring shorter responses to reduce the surface area for factual errors on long-form tasks.
10
+
11
+ - **Seasonal Behavior Analysis (Winter Break Hypothesis)** — Statistical analysis confirming that LLMs internalize seasonal work patterns from training data, producing measurably shorter outputs during periods corresponding to human holiday seasons.
12
+
13
+ - **2025 Controlled Laziness Experiments** — Three-part academic study (December 2025) confirming that output truncation is a behavioral artifact of alignment training, not a failure of context processing or model capability.
14
+
15
+ ## Further Reading
16
+
17
+ - Google Gemini API documentation on `thinking_level` parameter configuration
18
+ - Anthropic MCP (Model Context Protocol) specification and integration guides
19
+ - OpenAI API reference for temperature and Top-p parameter tuning
20
+ - YAML front-matter specification for SKILL.md lazy-loading architecture
@@ -0,0 +1,55 @@
1
+ # Architectural Patterns
2
+
3
+ ## Lazy-Loaded Skills
4
+
5
+ The standard pattern for managing large context requirements across AI agents is lazy-loaded prompt engineering through skill files.
6
+
7
+ A skill is a folder containing a `SKILL.md` file with:
8
+
9
+ - **YAML front-matter:** Contains `name` and a precise `description`. This metadata acts as the discovery hook — the agent reads only this during initialization (~100 tokens per skill).
10
+ - **Markdown body:** Full workflows, rules, and instructions. Loaded on-demand only when the agent determines the skill is relevant.
11
+
12
+ This architecture yields a documented 35% reduction in average context usage and prevents context dilution. However, discovery reliability depends on the specificity of the YAML description:
13
+
14
+ | Description Quality | Discovery Success Rate |
15
+ |:---|:---:|
16
+ | Vague ("Helps with designing APIs") | ~68% |
17
+ | Specific ("Design RESTful HTTP APIs with OpenAPI specs, focusing on versioning, error codes, and backward compatibility") | ~90% |
18
+
19
+ ## Model Context Protocol (MCP)
20
+
21
+ MCP is an open standard (pioneered by Anthropic, adopted by Google and OpenAI) that enables real-time, bidirectional connections between LLMs and external data sources.
22
+
23
+ ### Architecture Components
24
+
25
+ - **Host:** The AI application (IDE, terminal tool, chatbot) containing the LLM engine.
26
+ - **Client:** Internal bridge within the host that handles protocol communication.
27
+ - **Server:** External service exposing databases, APIs, or documentation to the client.
28
+ - **Transport:** JSON-RPC 2.0 messages over stdio (local) or HTTP (remote).
29
+
30
+ ### How It Reduces Truncation
31
+
32
+ Without MCP, models rely on static training weights for factual claims. When those weights are outdated (e.g., a new API version was released after training cutoff), the model either hallucinates a plausible answer or truncates its response to avoid committing to specifics.
33
+
34
+ With MCP, the model fetches current documentation directly into its context window. This transforms the model from a static knowledge store into a reasoning engine operating on real-time data, eliminating the incentive to hallucinate or truncate.
35
+
36
+ ### Example: Developer Knowledge API
37
+
38
+ Google's Developer Knowledge MCP Server indexes live documentation across Firebase, Android, and Google Cloud. When a model receives a development question:
39
+
40
+ 1. It executes a `search_document` query against the live index
41
+ 2. It evaluates returned page URIs
42
+ 3. It fetches full document content via `get_document` or `batch_get_documents`
43
+ 4. It generates its response based on current, authoritative documentation
44
+
45
+ This entirely bypasses the tendency to fabricate answers from outdated training data.
46
+
47
+ ## Chunked Task Execution
48
+
49
+ For complex tasks that would produce outputs exceeding the model's generation limit, break the work into sequential steps:
50
+
51
+ 1. Request the architecture and structure first (outline only)
52
+ 2. Request each component individually with explicit instructions for completeness
53
+ 3. Request assembly and integration after all components are generated
54
+
55
+ This prevents the model from attempting to estimate total output length and preemptively compressing its response.
@@ -0,0 +1,44 @@
1
+ # Parameter Tuning
2
+
3
+ ## Temperature and Top-p
4
+
5
+ Autoregressive models select each next token from a probability distribution generated by a softmax function applied to logit values. When a model defaults to brief outputs, the tokens associated with truncation and summarization have been assigned the highest probabilities through RLHF alignment.
6
+
7
+ ### Temperature
8
+
9
+ Adjusting the temperature parameter changes how the softmax function distributes probability mass across candidate tokens.
10
+
11
+ - **Low temperature (0.0 - 0.5):** Amplifies differences between high and low-probability tokens. The model becomes highly deterministic, consistently selecting the highest-confidence continuation. Optimal for code generation, data extraction, and structured output.
12
+ - **Default temperature (1.0):** Retains the original probability distribution from training.
13
+ - **High temperature (1.5+):** Flattens the distribution, introducing more randomness. Useful for creative tasks but increases the risk of incoherent outputs.
14
+
15
+ Example probability distribution shift for a single token position:
16
+
17
+ | Token Candidate | Probability at Temp 1.5 | Probability at Temp ~0.0 | Raw Logit |
18
+ |:---|:---:|:---:|:---:|
19
+ | lazy | 0.4875 | 0.9933 | 2.0 |
20
+ | quick | 0.2503 | 0.0067 | 1.0 |
21
+ | tired | 0.1285 | 0.0000 | 0.0 |
22
+ | slow | 0.0660 | 0.0000 | -1.0 |
23
+ | clumsy | 0.0339 | 0.0000 | -2.0 |
24
+
25
+ ### Top-p (Nucleus Sampling)
26
+
27
+ Top-p truncates the probability distribution by only considering the smallest set of tokens whose cumulative probability exceeds threshold p. A Top-p of 0.0 to 0.6 combined with low temperature forces the model into a narrow, deterministic execution path, reducing the entropy that enables creative refusals and unnecessary summarization.
28
+
29
+ ## Gemini Thinking Level Configuration
30
+
31
+ Google Gemini 3 models replaced the legacy `thinking_budget` (a hard token count cap on internal reasoning) with a `thinking_level` parameter that provides relative guidance on computational depth.
32
+
33
+ | Setting | Flash Support | Pro Support | Use Case |
34
+ |:---|:---:|:---:|:---|
35
+ | `minimal` | Yes | No | High-throughput, low-latency tasks |
36
+ | `low` | Yes | Yes | Simple instruction following, data extraction |
37
+ | `medium` | Yes | Yes (3.1 Pro) | Moderate complexity tasks |
38
+ | `high` | Yes (Default) | Yes (Default) | Complex analysis, code generation, mathematics |
39
+
40
+ Important constraints:
41
+ - `thinking_level` and `thinking_budget` are mutually exclusive. Using both in one API call triggers an HTTP 400 error.
42
+ - Even at `low`, Gemini Pro models perform mandatory minimum internal deliberation for safety and alignment.
43
+ - For code generation and complex analysis, set to `medium` or `high` for quality scores consistently exceeding 92-95% compared to baseline.
44
+ - Avoid combining extremely low temperature with `high` thinking level, as this can occasionally induce internal reasoning loops.
@@ -0,0 +1,52 @@
1
+ # Prompt Engineering Techniques
2
+
3
+ ## Psychological Pattern Matching
4
+
5
+ LLMs do not have emotions or understand monetary incentives. However, specific linguistic patterns in the prompt activate different quality distributions in the model's latent space. Research has documented measurable effects:
6
+
7
+ | Technique | Documented Effect |
8
+ |:---|:---|
9
+ | "I will tip you $200 for a perfect solution" | Up to 45% increase in output quality and length |
10
+ | "Take a deep breath and solve step by step" | Accuracy improvement from 34% to 80% on logic tasks |
11
+ | "This task is critical to my career" | Average 10% performance increase |
12
+
13
+ These phrases work because they are statistically correlated with high-effort, rigorously reviewed content in the training data (academic papers, enterprise codebases, legal documents). The attention mechanism prioritizes the high-quality data distributions associated with these patterns.
14
+
15
+ ## Explicit Syntax Binding
16
+
17
+ Conversational requests allow the model to exercise discretion about output length and detail. Structural binding removes this discretion by explicitly prohibiting truncation patterns.
18
+
19
+ Effective binding requires two components:
20
+
21
+ 1. **Mandatory tool execution:** Forbid the model from generating answers solely from training weights. Require it to execute search, computation, or code before answering.
22
+ 2. **Evidence blocks:** Require the model to output raw data (URLs, code execution results, data fragments) before producing its narrative response. This forces the model to read its own retrieved evidence, reducing hallucination probability to near zero.
23
+
24
+ ## XML-Structured Prompts
25
+
26
+ Enterprise systems use strict XML tagging to separate prompt components, reducing the cognitive load required for the model to parse intent:
27
+
28
+ 1. **System instructions** — Persona definition, quality expectations, explicit prohibitions on filler content.
29
+ 2. **Context block** (`<context>`) — Passive background data: architecture details, configurations, existing code.
30
+ 3. **Data block** (`<data>`, `<logs>`, `<config>`) — Active information the model must process against the context.
31
+ 4. **Task block** (`<tasks>`) — Numbered list of specific actions to execute.
32
+
33
+ This compartmentalization ensures the model can distinguish between persistent rules, background context, and immediate work items. It significantly reduces the confusion that triggers premature truncation.
34
+
35
+ ## Verification Loops
36
+
37
+ ### Chain of Verification
38
+ 1. Model generates an initial response
39
+ 2. Model generates verification questions about its own claims
40
+ 3. Model independently answers those verification questions
41
+ 4. Model outputs a revised, evidence-backed response
42
+
43
+ This process forces iterative self-correction, consuming the model's capacity for shortcutting.
44
+
45
+ ### Reverse Prompting
46
+ Instead of manually constructing a structured prompt, provide the model with a one-line objective and instruct it to generate the optimal prompt for that objective. The model produces the XML structure, constraints, and roles required for the task.
47
+
48
+ ### Self-Grading Loop
49
+ The prompt requires the model to:
50
+ 1. Define what excellence looks like for the given task
51
+ 2. Grade its own initial output against that definition
52
+ 3. Iterate until the self-defined quality bar is met
@@ -0,0 +1,79 @@
1
+ # Reference Prompts
2
+
3
+ Ready-to-use prompt templates for enforcing complete outputs. Append to any prompt or include in system instructions.
4
+
5
+ ---
6
+
7
+ ## General Purpose
8
+
9
+ ```
10
+ You must provide the FULL, complete, and exhaustive output for this task.
11
+ Do not summarize, abbreviate, or truncate for brevity.
12
+
13
+ You are strictly forbidden from using placeholders. Never use comments like
14
+ "// ... rest of code here", "[continue here]", or bare ellipses standing
15
+ in for omitted content. If the output is 500 lines, produce all 500 lines.
16
+
17
+ If you approach your output limit, stop at a clean breakpoint and indicate
18
+ where to resume. Do not rush to a conclusion or compress remaining sections.
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Code Generation
24
+
25
+ ```
26
+ Write the complete, production-ready implementation. Every function, every
27
+ import, every edge case handler must be present in the output.
28
+
29
+ Do not use placeholder comments (// TODO, // implement here, // similar
30
+ to above). Do not describe what code should do — write the actual code.
31
+
32
+ If the implementation requires multiple files, output each file completely
33
+ with its full path as a header.
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Analysis and Documentation
39
+
40
+ ```
41
+ Provide an exhaustive analysis covering every aspect requested. Each section
42
+ must contain substantive content, not summaries or references to "see above."
43
+
44
+ Do not use phrases like "as mentioned earlier" to avoid repeating necessary
45
+ context. Each section should be self-contained and complete.
46
+
47
+ Structure your output with clear headings. If the analysis requires multiple
48
+ parts, produce all parts in full.
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Step-by-Step Reasoning
54
+
55
+ ```
56
+ Before generating your final response, work through the problem systematically:
57
+
58
+ 1. Identify all requirements and constraints from the prompt
59
+ 2. Break the task into discrete steps
60
+ 3. Execute each step completely
61
+ 4. Verify your output against the original requirements
62
+
63
+ Output your reasoning process, then your final answer. Do not skip steps
64
+ or summarize intermediate work.
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Continuation Handling
70
+
71
+ ```
72
+ If your response approaches the output token limit:
73
+ - Do not compress remaining content to fit
74
+ - Do not skip ahead to a conclusion
75
+ - Stop at a natural breakpoint (end of a function, end of a section)
76
+ - End with: [PAUSED - X of Y sections complete. Send "continue" to resume]
77
+
78
+ On "continue", pick up exactly where you stopped. No recaps or repetition.
79
+ ```
@@ -0,0 +1,23 @@
1
+ # Cognitive Shortcuts
2
+
3
+ ## The LazyBench Discovery
4
+
5
+ Research from late 2024 demonstrated that frontier models (including Gemini Pro and GPT-4o) exhibit measurable cognitive shortcutting behavior. When a model perceives a task as straightforward or the provided context as excessively long, it reduces its internal computational effort. Rather than executing full multi-step reasoning, it produces a surface-level summary.
6
+
7
+ This is not a memory failure or context degradation — the model retains the information but chooses not to process it at full depth.
8
+
9
+ ## Metacognitive Laziness
10
+
11
+ The interaction between model brevity and human behavior creates a feedback loop. As models provide instant, condensed answers, users increasingly offload inference and logical deduction work. Research from the European Research Council has documented measurable declines in working memory engagement among populations with high AI dependency.
12
+
13
+ In professional environments, this shifts critical thinking from original synthesis to "prompt verification" — users evaluate whether the AI's truncated output seems reasonable rather than performing the analysis themselves.
14
+
15
+ ## Seasonal Behavior Anomalies
16
+
17
+ In late 2023, researchers observed a statistically significant increase in ChatGPT output brevity during December. Analysis revealed that the training data contains fewer detailed work outputs, more out-of-office responses, and shorter code commits during holiday periods. The model internalized this seasonal pattern.
18
+
19
+ When researchers explicitly stated "It is May" in the system prompt, output length measurably increased. This finding demonstrates that even arbitrary contextual signals in the prompt can shift the model's brevity calibration.
20
+
21
+ ## Error Avoidance as Truncation Driver
22
+
23
+ Models also truncate outputs as a risk mitigation strategy. On long-form tasks, longer outputs increase the probability of compounding errors and hallucinated content. The model has learned that shorter outputs reduce the surface area for factual mistakes, creating an additional incentive to truncate that compounds with the RLHF brevity bias.
@@ -0,0 +1,39 @@
1
+ # Output Limits and Consumer Truncation
2
+
3
+ ## Context Window Asymmetry
4
+
5
+ Models like Gemini have massive input context windows (up to 2 million tokens) but strictly capped output limits (typically 8,000 tokens). When the model estimates that a complete response would exceed its output budget, it preemptively compresses or summarizes the output rather than risking an abrupt cutoff.
6
+
7
+ This creates a paradox: the model can read extensive inputs but cannot respond proportionally, leading to systematic information loss on complex tasks.
8
+
9
+ ## The Consumer Middleware Problem
10
+
11
+ Consumer-facing applications (gemini.google.com, standard ChatGPT tiers) apply additional software-level truncation on top of the model's inherent limits. This middleware silently truncates conversation history and uploaded files to reduce compute costs for free and low-tier users.
12
+
13
+ Key mechanisms:
14
+
15
+ - **History capping:** Many consumer interfaces cap active conversation history at approximately 32,000 tokens, regardless of the model's actual capacity.
16
+ - **Context pruning:** Large system instructions or saved personal context consume tokens that would otherwise be available for the conversation, effectively shrinking the working window.
17
+ - **Retrieval-based recall:** Consumer apps often use retrieval mechanisms to selectively inject saved context, meaning the model frequently drops instructions it was given earlier in the session.
18
+
19
+ ## Developer Platform Differences
20
+
21
+ Direct API access and developer platforms (Google AI Studio, OpenAI API Playground) bypass consumer middleware entirely. These environments provide:
22
+
23
+ - Full context window access without hidden truncation
24
+ - Complete control over generation parameters
25
+ - No dynamic throttling based on user tier
26
+ - Processing of complex prompt structures without middleware interference
27
+
28
+ The practical difference is significant: the same model that produces truncated outputs through a consumer interface will generate complete, unabridged responses when accessed through direct API endpoints.
29
+
30
+ ## Terminal and CLI Integration
31
+
32
+ Purpose-built CLI tools (Gemini CLI, Claude Code, third-party wrappers) offer additional advantages for avoiding truncation:
33
+
34
+ | Access Method | Context Handling | Truncation Risk | Parameter Control |
35
+ |:---|:---|:---|:---|
36
+ | Consumer web app | Aggressive pruning, 32K cap | High | Limited |
37
+ | Developer platform (AI Studio) | Full context, no hidden slicing | Low | Full |
38
+ | Direct API | Full context, raw access | Minimal | Full |
39
+ | CLI tools with local models | No corporate alignment filters | None | Full |
@@ -0,0 +1,27 @@
1
+ # RLHF and Compute Economics
2
+
3
+ ## The Cost of Token Generation
4
+
5
+ Every token an LLM generates consumes GPU compute resources. At an estimated baseline cost of $0.0001 per token, scaling deep multi-step reasoning across hundreds of millions of users would exhaust the financial capacity of any provider. This creates an inherent economic incentive to minimize output length.
6
+
7
+ ## Brevity Bias Through Alignment
8
+
9
+ To manage infrastructure costs, model providers use Reinforcement Learning from Human Feedback (RLHF) and behavioral fine-tuning to instill systematic brevity preferences. During post-training alignment, models are rewarded for generating short, confident summaries rather than executing the full compute cycles needed for exhaustive analysis.
10
+
11
+ The result is a trained preference for producing generalized approximations over rigorous, multi-step solutions. The model does not necessarily produce incorrect answers, but it consistently produces answers that lack depth — saving itself from deeper analytical work unless the user explicitly forces it.
12
+
13
+ ## Stopping Pressure
14
+
15
+ Autoregressive models generate text token by token and lack an inherent mechanism for recognizing task completion. To prevent infinite generation, training introduces "stopping pressure" — a learned tendency to conclude outputs.
16
+
17
+ In recent model iterations, this stopping pressure has been calibrated aggressively to preserve compute. This leads to:
18
+
19
+ - Skipping required structured output fields, particularly long-form content in JSON or markdown
20
+ - Halting mid-task with phrases like "let me know if you want me to continue"
21
+ - Refusing to produce comprehensive solutions, suggesting the user "think about it"
22
+
23
+ This aggressive calibration is further reinforced by safety tuning protocols, which inject additional behavioral constraints that make models resistant to generating large codebases or detailed reviews.
24
+
25
+ ## Dynamic Throttling
26
+
27
+ Providers dynamically scale back model performance during peak demand periods. This introduces additional friction beyond what the base alignment already imposes, resulting in even shorter and less detailed outputs when server load is high.
@@ -0,0 +1,28 @@
1
+ # Training Data Bias
2
+
3
+ ## Placeholder Propagation
4
+
5
+ LLMs learn by imitating patterns in human-written text. A significant portion of their training data comes from sources like Stack Overflow, GitHub repositories, and tutorial blogs. In these sources, human developers routinely write abbreviated code:
6
+
7
+ ```python
8
+ def complex_logic():
9
+ # implement auth here
10
+ pass
11
+ ```
12
+
13
+ The model internalizes this pattern and treats placeholder insertion as a legitimate, professional response format. It is not deliberately withholding content — it has been trained to believe that truncating code with comments is the correct way to answer technical questions.
14
+
15
+ ## Pattern Reinforcement
16
+
17
+ This behavior is reinforced across multiple data sources:
18
+
19
+ - **Code tutorials** frequently show partial implementations with comments indicating where students should complete the logic
20
+ - **Documentation** often uses abbreviated examples with ellipses
21
+ - **Forum answers** regularly provide skeleton code rather than full implementations
22
+ - **Blog posts** truncate repetitive code blocks with "similarly for the remaining cases"
23
+
24
+ The cumulative effect is that the model assigns high probability to truncation tokens in contexts where complete code generation would be appropriate.
25
+
26
+ ## Impact on Output Quality
27
+
28
+ When a user requests a complete implementation, the model faces competing training signals: the explicit instruction to produce full output versus the deeply embedded pattern of producing abbreviated, "tutorial-style" responses. Without aggressive prompt engineering, the tutorial-style pattern frequently wins because it appears far more commonly in the training distribution.
@@ -0,0 +1,41 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import sharp from "sharp";
4
+
5
+ const root = process.cwd();
6
+ const logoSize = 62;
7
+ const badgeHeight = 126;
8
+ const gap = 20;
9
+ const out = path.join(root, "assets/sponsors/emil-sponsor-row.webp");
10
+
11
+ const logo = await sharp(path.join(root, "assets/sponsors/animations-dev.webp"))
12
+ .resize(logoSize, logoSize)
13
+ .toBuffer();
14
+
15
+ const badge = await sharp(path.join(root, "assets/sponsors/emil-animations-dev.webp"))
16
+ .resize({ height: badgeHeight })
17
+ .toBuffer();
18
+
19
+ const badgeMeta = await sharp(badge).metadata();
20
+ const width = logoSize + gap + badgeMeta.width;
21
+ const height = badgeHeight;
22
+
23
+ await sharp({
24
+ create: {
25
+ width,
26
+ height,
27
+ channels: 4,
28
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
29
+ },
30
+ })
31
+ .composite([
32
+ { input: logo, left: 0, top: Math.floor((height - logoSize) / 2) },
33
+ { input: badge, left: logoSize + gap, top: 0 },
34
+ ])
35
+ .webp({ quality: 94, effort: 6, alphaQuality: 100 })
36
+ .toFile(out);
37
+
38
+ const meta = await sharp(out).metadata();
39
+ console.log(
40
+ `${path.basename(out)} -> ${meta.width}x${meta.height}, ${fs.statSync(out).size} bytes`
41
+ );
@@ -0,0 +1,142 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import sharp from "sharp";
4
+
5
+ const root = process.cwd();
6
+
7
+ const pngToWebp = [
8
+ "assets/readme-banner.png",
9
+ "assets/readme-buttons/btn-site.png",
10
+ "assets/readme-buttons/btn-mit.png",
11
+ "assets/readme-buttons/btn-agent-skills.png",
12
+ "assets/readme-buttons/btn-tools.png",
13
+ "assets/readme-buttons/btn-changelog.png",
14
+ ];
15
+
16
+ function isBackground(r, g, b, a, threshold = 22) {
17
+ if (a < 8) return true;
18
+ return r <= threshold && g <= threshold && b <= threshold;
19
+ }
20
+
21
+ function removeOuterBackground(rgba, width, height) {
22
+ const visited = new Uint8Array(width * height);
23
+ const queue = [];
24
+
25
+ for (let x = 0; x < width; x++) {
26
+ queue.push(x, 0, x, height - 1);
27
+ }
28
+ for (let y = 1; y < height - 1; y++) {
29
+ queue.push(0, y, width - 1, y);
30
+ }
31
+
32
+ while (queue.length) {
33
+ const y = queue.pop();
34
+ const x = queue.pop();
35
+ const idx = y * width + x;
36
+ if (x < 0 || y < 0 || x >= width || y >= height || visited[idx]) continue;
37
+
38
+ const i = idx * 4;
39
+ if (!isBackground(rgba[i], rgba[i + 1], rgba[i + 2], rgba[i + 3])) continue;
40
+
41
+ visited[idx] = 1;
42
+ rgba[i + 3] = 0;
43
+ queue.push(x + 1, y, x - 1, y, x, y + 1, x, y - 1);
44
+ }
45
+
46
+ return rgba;
47
+ }
48
+
49
+ function getBounds(rgba, width, height) {
50
+ let minX = width;
51
+ let minY = height;
52
+ let maxX = 0;
53
+ let maxY = 0;
54
+
55
+ for (let y = 0; y < height; y++) {
56
+ for (let x = 0; x < width; x++) {
57
+ const a = rgba[(y * width + x) * 4 + 3];
58
+ if (a > 8) {
59
+ minX = Math.min(minX, x);
60
+ minY = Math.min(minY, y);
61
+ maxX = Math.max(maxX, x);
62
+ maxY = Math.max(maxY, y);
63
+ }
64
+ }
65
+ }
66
+
67
+ const pad = 2;
68
+ return {
69
+ left: Math.max(0, minX - pad),
70
+ top: Math.max(0, minY - pad),
71
+ width: Math.min(width, maxX - minX + 1 + pad * 2),
72
+ height: Math.min(height, maxY - minY + 1 + pad * 2),
73
+ };
74
+ }
75
+
76
+ async function pngFileToWebp(inputRel, { maxWidth } = {}) {
77
+ const input = path.join(root, inputRel);
78
+ const output = input.replace(/\.png$/i, ".webp");
79
+ let pipeline = sharp(input);
80
+ const meta = await pipeline.metadata();
81
+
82
+ if (maxWidth && meta.width > maxWidth) {
83
+ pipeline = pipeline.resize({ width: maxWidth, withoutEnlargement: true });
84
+ }
85
+
86
+ await pipeline.webp({ quality: 92, effort: 6, alphaQuality: 100 }).toFile(output);
87
+ const outMeta = await sharp(output).metadata();
88
+ console.log(
89
+ `${path.basename(output)} -> ${outMeta.width}x${outMeta.height}, ${fs.statSync(output).size} bytes`
90
+ );
91
+ }
92
+
93
+ async function emilBadgeToWebp() {
94
+ const src =
95
+ "C:/Users/User/Downloads/c4f8c4a7-2566-4644-b752-b652e0c103f5.png";
96
+ const output = path.join(root, "assets/sponsors/emil-animations-dev.webp");
97
+ const exportHeight = 240;
98
+
99
+ const { data, info } = await sharp(src).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
100
+ const rgba = Buffer.from(data);
101
+ removeOuterBackground(rgba, info.width, info.height);
102
+ const bounds = getBounds(rgba, info.width, info.height);
103
+
104
+ await sharp(rgba, { raw: { width: info.width, height: info.height, channels: 4 } })
105
+ .extract(bounds)
106
+ .resize({ height: exportHeight, withoutEnlargement: true })
107
+ .webp({ quality: 94, effort: 6, alphaQuality: 100 })
108
+ .toFile(output);
109
+
110
+ const outMeta = await sharp(output).metadata();
111
+ console.log(
112
+ `${path.basename(output)} -> ${outMeta.width}x${outMeta.height}, ${fs.statSync(output).size} bytes`
113
+ );
114
+ }
115
+
116
+ async function sponsorLogoToWebp() {
117
+ const jfif = "C:/Users/User/Downloads/6b610a0c-8889-49fc-9684-e172d7172ea0.jfif";
118
+ const output = path.join(root, "assets/sponsors/animations-dev.webp");
119
+ const source = fs.existsSync(jfif)
120
+ ? jfif
121
+ : path.join(root, "assets/sponsors/animations-dev.png");
122
+
123
+ await sharp(source)
124
+ .resize(192, 192, { fit: "cover" })
125
+ .webp({ quality: 92, effort: 6, alphaQuality: 100 })
126
+ .toFile(`${output}.tmp`);
127
+ fs.renameSync(`${output}.tmp`, output);
128
+
129
+ const outMeta = await sharp(output).metadata();
130
+ console.log(
131
+ `${path.basename(output)} -> ${outMeta.width}x${outMeta.height}, ${fs.statSync(output).size} bytes`
132
+ );
133
+ }
134
+
135
+ for (const file of pngToWebp) {
136
+ await pngFileToWebp(file, {
137
+ maxWidth: file.includes("readme-buttons") ? 1400 : undefined,
138
+ });
139
+ }
140
+
141
+ await sponsorLogoToWebp();
142
+ await emilBadgeToWebp();
@@ -0,0 +1,108 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import sharp from "sharp";
4
+
5
+ const srcDir = "C:/Users/User/Downloads";
6
+ const outDir = path.join(process.cwd(), "assets/readme-buttons");
7
+
8
+ const mapping = [
9
+ { src: "ChatGPT Image Jun 17, 2026, 04_04_16 PM (1).png", out: "btn-site.png" },
10
+ { src: "ChatGPT Image Jun 17, 2026, 04_04_16 PM (2).png", out: "btn-mit.png" },
11
+ { src: "ChatGPT Image Jun 17, 2026, 04_04_17 PM (3).png", out: "btn-agent-skills.png" },
12
+ { src: "ChatGPT Image Jun 17, 2026, 04_04_17 PM (4).png", out: "btn-tools.png" },
13
+ { src: "ChatGPT Image Jun 17, 2026, 04_04_20 PM (5).png", out: "btn-changelog.png" },
14
+ ];
15
+
16
+ function isBackground(r, g, b, a, threshold = 28) {
17
+ if (a < 8) return true;
18
+ return r <= threshold && g <= threshold && b <= threshold;
19
+ }
20
+
21
+ function removeOuterBackground(rgba, width, height) {
22
+ const visited = new Uint8Array(width * height);
23
+ const queue = [];
24
+
25
+ for (let x = 0; x < width; x++) {
26
+ queue.push(x, 0, x, height - 1);
27
+ }
28
+ for (let y = 1; y < height - 1; y++) {
29
+ queue.push(0, y, width - 1, y);
30
+ }
31
+
32
+ while (queue.length) {
33
+ const y = queue.pop();
34
+ const x = queue.pop();
35
+ const idx = y * width + x;
36
+ if (x < 0 || y < 0 || x >= width || y >= height || visited[idx]) continue;
37
+
38
+ const i = idx * 4;
39
+ const r = rgba[i];
40
+ const g = rgba[i + 1];
41
+ const b = rgba[i + 2];
42
+ const a = rgba[i + 3];
43
+ if (!isBackground(r, g, b, a)) continue;
44
+
45
+ visited[idx] = 1;
46
+ rgba[i + 3] = 0;
47
+
48
+ queue.push(x + 1, y, x - 1, y, x, y + 1, x, y - 1);
49
+ }
50
+
51
+ return rgba;
52
+ }
53
+
54
+ function getBounds(rgba, width, height) {
55
+ let minX = width;
56
+ let minY = height;
57
+ let maxX = 0;
58
+ let maxY = 0;
59
+
60
+ for (let y = 0; y < height; y++) {
61
+ for (let x = 0; x < width; x++) {
62
+ const a = rgba[(y * width + x) * 4 + 3];
63
+ if (a > 8) {
64
+ minX = Math.min(minX, x);
65
+ minY = Math.min(minY, y);
66
+ maxX = Math.max(maxX, x);
67
+ maxY = Math.max(maxY, y);
68
+ }
69
+ }
70
+ }
71
+
72
+ const pad = 2;
73
+ return {
74
+ left: Math.max(0, minX - pad),
75
+ top: Math.max(0, minY - pad),
76
+ width: Math.min(width, maxX - minX + 1 + pad * 2),
77
+ height: Math.min(height, maxY - minY + 1 + pad * 2),
78
+ };
79
+ }
80
+
81
+ async function processOne(srcPath, outPath) {
82
+ const { data, info } = await sharp(srcPath)
83
+ .ensureAlpha()
84
+ .raw()
85
+ .toBuffer({ resolveWithObject: true });
86
+
87
+ const rgba = Buffer.from(data);
88
+ removeOuterBackground(rgba, info.width, info.height);
89
+ const bounds = getBounds(rgba, info.width, info.height);
90
+
91
+ await sharp(rgba, {
92
+ raw: { width: info.width, height: info.height, channels: 4 },
93
+ })
94
+ .extract(bounds)
95
+ .png({ compressionLevel: 9, adaptiveFiltering: true })
96
+ .toFile(outPath);
97
+
98
+ const meta = await sharp(outPath).metadata();
99
+ console.log(
100
+ `${path.basename(outPath)} -> ${meta.width}x${meta.height}, ${fs.statSync(outPath).size} bytes`
101
+ );
102
+ }
103
+
104
+ fs.mkdirSync(outDir, { recursive: true });
105
+
106
+ for (const { src, out } of mapping) {
107
+ await processOne(path.join(srcDir, src), path.join(outDir, out));
108
+ }