Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Coding with AI best practices #7406

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

mateuszo
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Feb 25, 2025

⚠️ No Changeset found

Latest commit: f368112

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

- AI is not a replacement for your knowledge and experience.
- AI is a tool to help you code faster and more efficiently.
- AI is not a replacement for your ability to reason and think.
- AI is just predicts what would be the most likely outcome for the given input.
Copy link
Contributor

@michaelKurowski michaelKurowski Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just remove this line and the meaning would be the same.
I feel like it's intuitive to know that AI responds to input.

What may be non-obvious is context that is being attached and effective communication. The "empathy" element that I was talking about on our last call. Just like you'd need to explain some things to another dev, you have to transfer this knowledge to the AI.

- AI is just predicts what would be the most likely outcome for the given input.
There's also some randomness added to the process, so the results might be inconcistent.
- AI can make silly mistakes. But it can do amazing things at the same time. Don't get disappointed too fast.
- Don’t extrapolate your vision of intelligence on AI. AI is a different form of intelligence than human intelligence.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI doesn't work the same way like human intelligence does. Some things that are easy to humans, are hard for AI, while some things that are hard for humans, are easy for AI.

I think we could also give examples of AI failing to do arithmetics or count "r" in strawberry.

- Don’t extrapolate your vision of intelligence on AI. AI is a different form of intelligence than human intelligence.
It can make silly mistakes. But it can do amazing things at the same time. Don't get disappointed too fast.
- Be flexible with your expectations of the output.
- AI cannot see the results of the code yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not by default, also we should probably double-check this thing about allowing AI to see "the browser", you can also copy-paste terminal. So maybe more accurate would be "AI does not see the results of the code by default"

- [Cursor](https://www.cursor.com/)
- [Windsurf](https://windsurf.dev/)

GitHub Copilot is not recommended. Agent mode is coming soon but we have not tested it yet.
Copy link
Contributor

@michaelKurowski michaelKurowski Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Copilot is not recommended, but we do provide a context for it attached ootb.

Just because copilot is poor, doesn't mean we can allow ourselves to completely ignore it. It is the most known tool in this domain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we should explain why agent mode is a big deal

Comment on lines +45 to +47
### LLM models

- Claude
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, we don't support specific LLM model, it's the job of IDE to provide models. Just because we most extensively tested claude, doesn't mean we target claude exclusively. I'm not even sure you can switch context depending on the model.
I'd say we recommend claude and that's about it, but this may get old fast if IDEs start to switch models automatically depending on the task


- Claude

## Workflows
Copy link
Contributor

@michaelKurowski michaelKurowski Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styles of work? Workflow feels... a bit automated? Like CI/CD
May be misleading


## Workflows

//TODO: elaborate on this points
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should state that they're not mutually exclusive and that you can do it both ways

- keep files small
- edit the context when needed
- when something goes wrong retry or revert
- ask AI to check the codebase for examples
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when the AI goes against conventions

Alokai provides a set of AI contexts that can be used to code with AI.
//TODO: explain what are AI contexts

## Expectations Management
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'd add that AI is made to work with it iteratively. I know people who think that it's one-off tool. You give it a task and if it failed, then they think AI is incapable of performing the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants