AntiCode Guy

5.8K posts

AntiCode Guy banner
AntiCode Guy

AntiCode Guy

@AntiCodeGuy

IT ↔️ Business translator | Building IT systems for businesses at https://t.co/hZc7YdY2QD Content: AI, automation, and development for business

Thailand Bergabung Kasım 2023
78 Mengikuti372 Pengikut
Tweet Disematkan
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Most people fail at goals because they treat million-dollar dreams like single actions. Your brain can't process "build a business" - but it can handle "write for 30 minutes today." Here's the complete system you can use to break any massive goal into Tuesday afternoon actions:
English
1
0
0
83
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Migrating Knowledgebase With AI [Part 6] While working on a data migration from Notion to another system, my AI agent wrote a script, then started checking whether that script could actually run by doing a cold dry-run on a small batch of documents. Based on the results, it sent me back a list of documents that couldn't be migrated under the established algorithm - because those files had identical names. Since it was using the name as the identifier for pages and their correspondence, it couldn't figure out which one goes where. After I gave it instructions, the work continued, and after a while the agent produced a final summary: how many documents there were originally, how many were moved, how many weren't. In the end, all documents were successfully migrated, and the Notion structure was reproduced exactly in the new knowledge base. Everything worked great. All in all, the entire knowledge base migration from Notion to another system took me no more than 15 minutes - including prompting the AI, the initial problem statement, and building the execution plan together with Claude.
AntiCode Guy tweet media
English
0
0
0
7
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Migrating Knowledgebase With AI [Part 5] For every AI project I create a separate repository. On my computer there's a dedicated folder for repositories where I keep the source code of various projects - and now I also put AI agent working files there. Even if a task doesn't involve a source code repository at all, I simply create a folder for it and point the AI agent at that folder. And it starts working right from there. While solving the knowledge base migration task, I created exactly such a folder and dropped just one file into it - a single prompt file: that same Markdown file which, as you may recall, contains the entire structured technical specification for the task, including both API keys for both systems (Notion and the target system where the data needs to be migrated). Now all that's needed is to launch the AI agent from this folder, and reference the corresponding file. The initial prompt in this case looks dead simple: "Read the file -filename-." After which the AI agent experiences a short circuit - kicks into high gear and gets to work. First it checks API access. If access is confirmed, it proceeds to read the documents in Notion and in the new system via their respective APIs. Then comes the development of a Python script that will recursively walk through each document, determine its structure through one API, and then move it accordingly into the new system through the other API.
AntiCode Guy tweet media
English
0
0
0
8
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Oh, wow, that was unexpected... Mom, I'm in AI now!
AntiCode Guy tweet media
English
0
0
0
17
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Migrating Knowledgebase With AI [Part 4] Let's get back to working with the API using coding agents. At this stage, all you need to do is explain the task to Claude (regular Claude chat, not Code) and ask it to write a prompt for the coding agent (Claude Code this time) - a structured task that describes all the context we've covered in the current chat, laying out all the original requirements. It's better to immediately ask the AI to save this prompt in Markdown (.md) format so it's easy for the agent to read. And to make sure nothing gets missed, all the requirements should be included in this prompt right away - API keys included. While Claude was drafting the prompt, my job as a human meatbag was to go into Notion, open Settings -> Connections -> Develop or manage integrations -> Internal integrations -> Create a new integration -> fill out the form and hit Create. Then open the newly created integration, and in the Internal integration secret field click Show -> Copy, thereby grabbing that precious API key. Next, I needed to go into the new system where the data from Notion will be imported, create an API key there in roughly the same way as in Notion itself. And finally, paste these keys into the prompt that was already written for Claude. The prompt is written in MD format, and we can simply save it to a separate file from Claude chat artifact. And this is where one of the key moments in working with AI agents begins...
AntiCode Guy tweet media
English
0
0
0
34
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Migrating Knowledgebase With AI [Part 3] What should you do if your knowledge base doesn’t have an API that can be used for migration, like in my example? The system you’re working with might be closed, and you only have access through the interface. This task is more complex, but AI can still handle it, since modern AI agents have access to browsers via plugins. For example, Claude - which I’m using to solve this problem - has a Chrome plugin and can switch between tabs, dragging files into the target system according to the structure it sees in the Notion tab. This essentially replicates the manual work I would do if AI weren’t available. Even for AI, this kind of manual dragging takes a lot of time, because every virtual mouse movement consumes valuable tokens, and it’s still not as fast as a human. Of course, over time this mechanism will improve and become cheaper, but for now it’s quite painful to watch it try to drag files one under another, taking about 20 seconds per action - something you can do in a fraction of a second. So in reality, this is still a process that’s much faster to do manually, using your own cognitive and mechanical abilities. In other words, the drag-and-dropper profession is safe for the foreseeable future.
AntiCode Guy tweet media
English
0
0
0
12
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
You don't need to write prompts to AI
English
0
0
0
15
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Migrating Knowledgebase With AI [Part 2] Exporting and importing using the built-in functions of Notion and the new Notion-like tool turned out to be fairly straightforward. However, after the data was migrated, I realized - with a mix of horror on one side and excitement about a new challenge on the other - that all documents ended up arranged in a simple flat structure. In other words, the nested hierarchy that existed in the original Notion knowledge base was not preserved. The reason is that the export generated by Notion is simply a collection of documents, and it contains no information about the hierarchical relationships between them. To preserve that structure, one would need to create a custom format - for example, a JSON file describing the hierarchy and mapping, or some other set of metadata that would tell the new system how the documents should be arranged relative to one another. But of course, the challenge was accepted, and I started figuring out how to solve this problem with the help of artificial intelligence. After a short review of the documentation for both systems, it turned out that they provide APIs - meaning it is possible to connect to them remotely, read and modify documents, their content, and their structure. Exactly what we need. In other words, by writing a small program we can connect to the old knowledge base in Notion, read its structure, then connect to the new knowledge base through its API, locate the files corresponding to the Notion structure, and move them into the correct hierarchy. As soon as the API allows all of this, the task becomes feasible for software components. And that is exactly what we are going to do with a coding agent.
AntiCode Guy tweet media
English
0
0
0
9
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Migrating Knowledgebase With AI The task is to migrate a knowledge base from Notion to another Notion-like tool - essentially a Notion clone, but open-source. This can be done manually, of course, by simply copying and pasting document content from the old Notion into the new system. But being the lazy people we are, we're obviously not going that route. Especially considering that the source knowledge base contains hundreds of documents, and transferring all of that by hand might not be back-breaking work, but it's certainly tedious, monotonous, boring, and repetitive. In short, exactly the kind of task we delegate to either code or artificial intelligence. The first stage is fairly straightforward, because Notion has an export feature that lets you dump all documents from the current workspace into an archive, choosing the format you need: PDF or Markdown. We obviously go with Markdown, since it's well-readable by AI and, more importantly, it's the exact requirement of the new tool that will be consuming this archive. The new service includes an import function for Notion's exported archive, because Notion is a well-known leader among this category of tools. And a system that aspires to resemble it naturally offers a migration path from the market leader - which is a pretty logical and sensible move.
AntiCode Guy tweet media
English
0
0
0
21
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
How to Avoid Losing Context in a Complex Project When Working with AI [Part 5] You don't need to write everything in the prompt every time, you don't need to clarify details that might be important for the project implementation, you don't need to remember what to do next - everything will already be recorded in the progress.md plan. All you need to do in the initiating prompt of a new session is ask the agent to read the agent-instructions.md file and proceed with the current stage. This way, each session's prompt will be very short, everything will happen much faster and more conveniently. And, naturally, the work of the AI agents themselves will become more structured and consistent, because there is a clear algorithm of actions and a step-by-step plan to follow. This approach also makes it possible to work on your project with several agents simultaneously. Or, for example, if you have Claude Code and Codex, and Claude Code has run out of limits for the current session, Codex can pick up and continue working right where Claude left off - which is very convenient for uninterrupted progress on the project. So, inspired by my previous posts, for your next AI project, create an agent-instructions.md and a progress.md - and let me know how it goes.
AntiCode Guy tweet media
English
0
0
0
4
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
How to Avoid Losing Context in a Complex Project When Working with AI [Part 4] The progress.md file, in addition to tracking project progress, should contain obstacles, difficulties, and details of the research conducted during the current session. Very often a situation arises where an agent fails to complete a task within a single session - running into some obstacles or discovering a bug. And since the session needs to end (for example, you've run out of tokens, or the workday is simply over), it makes sense to record all the artifacts found up to that point, new knowledge gained, or - if we're hunting for a bug - all the details relevant to its potential fix. All of this should be included either in a separate log or in the progress file progress.md itself. This doesn't really matter much, since that other file will be read when a new agent receives its context. This way, you end up with a set of documents that any AI agent works with at the beginning and end of each session. Meaning: it comes in, reads the agent-instructions.md, the agent instructions say that project progress is tracked in progress.md, it reads the completed stages there, finds the current one, and immediately understands what it needs to do.
AntiCode Guy tweet media
English
0
0
0
8
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
How to Avoid Losing Context in a Complex Project When Working with AI [Part 3] For describing the details of current progress, you can use the same progress.md document that I've been talking about in my previous posts. But if the context grows too large, or the project itself is complex - for example, developing a sophisticated information system or an application that implies multiple long working sessions over an extended period of time - it's better to move this into a separate file where you can describe the activity log in detail. In that case, you need to add a link from progress.md pointing to the log file, so that when executing specific tasks, the AI agent will open that log and update the progress there. All of this should also be reflected in the agent instructions file agent-instructions.md, which I mentioned earlier. In other words, the agent instructions should point your AI workers to these three files: 1. the instructions file itself, 2. the progress file, 3. and the log file, if it exists separately from the progress file. And it's essential to specify that the log must be continuously updated as tasks are completed. The workflow looks like this: a task gets done, it gets written to the log, and then marked with a checkmark in the progress file.
AntiCode Guy tweet media
English
0
0
0
4
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
How to Avoid Losing Context in a Complex Project When Working with AI [Part 2] Before starting a project, along with the agent instructions, ask it to create a separate progress.md file (you can read about agent instructions in previous posts). progress.md should contain a detailed action plan and implementation roadmap for the entire project. It makes sense to create it at the very first stage, as soon as you kick off the project. Ask the AI agent to plan out everything that needs to be done within this project. Of course, review the task list it compiled and align on it together. Make corrections if necessary, then ask the agent to format the document as an interactive (for itself) to-do list. Meaning it should contain checkboxes to mark current progress. So after the first prompt, all tasks will have empty checkboxes - no progress yet. Going forward, the file should also include a brief description of the current stage so that the next agent in each new session can immediately get up to speed with the context. This description should cover a quick overview of the stage's tasks, what was done last, and what needs to be done right now.
AntiCode Guy tweet media
English
0
0
1
16
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
How to Avoid Losing Context in a Complex Project When Working with AI Imagine you're working with a large codebase. Not just some simple website, but a full-fledged application - a big system with a tangled structure, complex architecture, and multiple subsystems that interact with each other. Or you're building a system, an app, or something else entirely from scratch. Obviously, you can't get by with a single prompt on a project like this, and there's no way to get everything done within one agent session. First, the context window won't be large enough - it keeps getting compressed, and context gets lost. Second, you might simply run out of tokens allocated for the current session, which is typical for Claude, for example. Or you just run out of time and need to come back to the project later. One way or another, all of this calls for some kind of progress tracker. We're not reinventing the wheel here. Just like on any real-life project carried out by people, we haven't come up with anything better than a project management tool. Or, to put it simply, a task list with completion statuses. Our agents need roughly the same thing - just in a simplified form, without all the unnecessary bells and whistles that humans require to feel comfortable in this ruthless environment that forces you to work. For an AI agent, a single file that tracks this progress is enough. How to create one and what to keep in mind - I'll cover in the next posts.
AntiCode Guy tweet media
English
0
0
0
8
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
Before the emergence of modern AI, WordPress remained the most common choice for website development
English
0
0
0
8
AntiCode Guy
AntiCode Guy@AntiCodeGuy·
It makes sense to include the current project progress in the agent instructions file agent-instructions.md - a step-by-step plan in to-do list format showing which steps were already completed by previous agents in previous sessions, what still remains, and which step we're on right now. This helps work on the project in parallel without losing track, because obviously most projects don't finish the moment you start them. And it's important to sometimes just recall the context - where we left off and what stage we're currently at. So, at the beginning of a large project, or at the end of a session with a repository, ask the AI agent to write instructions for itself, so it can start the next session by reading those very instructions. Agent instructions should include: 1) A brief project description, to quickly understand the context of what's happening. 2) Project progress in to-do list format, to immediately pick up the current task and understand what's already been done. For large projects, this should be a link to a specific file where progress is tracked. 3) Agent behavior specifics, where you can specify the communication language for simpler interaction and faster progress. 4) Project file structure, to let the agent quickly find the right files and understand where to look under different circumstances. 5) Access instructions. For example, if the agent needs to connect to a server, specify where to find the key on the local machine, or which login and host to use. And anything else you consider necessary - whatever your agent typically lacks when working on a task.
AntiCode Guy tweet media
English
0
0
1
5