User Tools

Site Tools


kb:bestpractices:ai

AI-Assisted Work

This page collects practical recommendations for using AI assistants effectively in daily work, software engineering, documentation, and other professional activities.

The goal is to improve the quality, efficiency, consistency, and reliability of AI-assisted work. These practices are largely independent of specific AI models or tools.

Managing Chat Context

Start Fresh Conversations with Summaries

As an AI conversation grows longer, it is often beneficial to start a new conversation rather than continuing indefinitely.

Long conversations accumulate context that may no longer be relevant. This increases token consumption and can make it harder for the AI to focus on the important information.

Better practice:

  1. Ask the AI to summarize the current conversation, including important decisions, requirements, constraints, unresolved questions, and next steps.
  2. Review the summary for completeness and accuracy.
  3. Start a new conversation and use the summary as the initial context.
  4. Include relevant files, code, or references that the new conversation will need.

Benefits:

  1. Lower token consumption: Less historical context needs to be processed, potentially reducing costs and latency.
  2. Better focus: The AI works with a smaller, more relevant context.
  3. Improved reliability: Reduces the risk of important instructions getting lost among irrelevant conversation history.
  4. Easier handover: Summaries can be reused in other tools, models, or by colleagues.

Important: Summarization is lossy. Critical details, exact requirements, code, and decisions should be preserved explicitly. Also, starting a new conversation does not automatically reduce costs if the entire history was already being truncated or cached efficiently.

Persistent Instructions: AGENTS.md and Skills

Repeatedly explaining the same project structure, conventions, coding standards, or workflows wastes time and tokens.

Persistent instructions and reusable AI skills help make AI-assisted work more consistent and reproducible.

AGENTS.md – Project-Level Instructions

An AGENTS.md file provides instructions to AI coding agents working within a repository or directory.

It can describe:

  1. Project architecture and directory structure.
  2. Coding conventions and naming rules.
  3. Build, test, and validation procedures.
  4. Dependencies and development tools.
  5. Known limitations and common pitfalls.
  6. Expectations for documentation, commits, and code reviews.

Better practice:

  1. Maintain an AGENTS.md file in repositories that are regularly used with AI coding agents.
  2. Keep instructions concise, actionable, and specific to the project.
  3. Reference existing documentation instead of duplicating it.
  4. Store the file in Git so changes can be reviewed and maintained by the team.
  5. Update instructions when project conventions or workflows change.

Not every AI tool automatically recognizes AGENTS.md. Some use alternative instruction files or require explicit configuration. Check the capabilities of the tools being used.

Skills – Reusable AI Workflows

AI skills package reusable instructions, procedures, examples, and supporting resources for recurring tasks.

Unlike general project instructions, a skill typically describes how to perform a particular task.

Examples include:

  1. Reviewing code against team conventions.
  2. Generating release notes from a changelog.
  3. Preparing technical documentation.
  4. Analyzing test results.
  5. Performing a structured architecture review.
  6. Creating consistent customer-facing reports.

Better practice:

  1. Create skills for recurring tasks with clearly defined procedures and expected results.
  2. Make skills sufficiently specific to produce consistent outcomes.
  3. Include validation steps and examples where useful.
  4. Version-control shared skills and maintain them collaboratively.
  5. Review skills regularly as tools and workflows evolve.

Skills are not standardized across all AI platforms. Their format, discovery, execution, and supported capabilities depend on the particular tool.

Choosing Between Instructions and Skills

Mechanism Best suited for
AGENTS.md Persistent project context, conventions, and rules
Skills Reusable procedures for specific tasks
Conversation prompts Task-specific goals, inputs, and requirements

These mechanisms complement each other.

A useful principle is to keep stable knowledge in persistent instructions, repeatable procedures in skills, and the immediate objective in the conversation.

Further Topics

The following practices will be documented and expanded over time.

Providing Effective Context

  • State the objective and expected output clearly.
  • Provide relevant background, constraints, and examples.
  • Reference authoritative project documentation.
  • Distinguish requirements from preferences and assumptions.

Iterative Work and Verification

  • Break complex tasks into manageable steps.
  • Review intermediate results before proceeding.
  • Ask the AI to identify assumptions, uncertainties, and potential problems.
  • Independently verify important technical claims, generated code, and calculations.
  • Use automated tests and established review processes wherever possible.

Security and Confidentiality

  • Follow organizational policies when sharing information with AI services.
  • Avoid exposing credentials, secrets, personal data, or confidential customer information.
  • Understand which information is transmitted to external services and how it is processed.
  • Review AI-generated code and commands before execution, especially when they modify systems or data.
  • Treat external content retrieved by AI agents as untrusted input.

Sharing Knowledge and Lessons Learned

  • Document effective prompts, workflows, and practical examples.
  • Share successful approaches with colleagues.
  • Record limitations and failures, not only successful results.
  • Prefer reusable instructions and skills over repeatedly solving the same problem.

This page is a living collection of better practices. Recommendations should be updated as AI tools, capabilities, and practical experience evolve.

kb/bestpractices/ai.txt · Last modified: by joerg.hampel