automate 0.1.4-preview
See the version list below for details.
dotnet tool install --global automate --version 0.1.4-preview
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local automate --version 0.1.4-preview
#tool dotnet:?package=automate&version=0.1.4-preview&prerelease
nuke :add-package automate --version 0.1.4-preview
autōmate
Templatize patterns from your own codebase, make them programmable, then share them with your team.
What is it?
It is a tool for Tech Leads, Lead Developers or Tech Consultants to give their fellow contributors tools that learn to apply the coding patterns in their codebases.
It works like this:
- You identify a pattern in your codebase. eg. It might be a layer pattern (an interface) or a vertical slice pattern (a domain pattern), or a way to compose certain components together that is done similarly in multiple places.
- You pick and chose from your codebase files and folders where the code exists for this pattern right now.
- Those files are automatically extracted for you into a template.
- You name the pattern, and you define some attributes for it. The things that could be variable in it, when it gets used elsewhere. (eg: the names of things in the pattern)
- You modify the files in the template to add placeholders for the attributes that you defined, that will be substituted when the template is rendered.
- Optionally, you define additional commands that will be executed on the codebase before and after the template is applied. eg. you want to run some automated tests to verify the code has not been broken.
- Optionally, you define constraints about where the pattern can be re-used in a codebase (eg. only in certain languages etc).
- A toolkit is automatically built for you containing this template, and containing a custom executable tool (CLI or IDE plugin) to help apply it to a codebase.
- You ship this toolkit to your team to use.
- They download and run the toolkit (CLI or IDE plugin), and they fill values for the attributes that you defined, tailored for their specific use case.
- The toolkit renders the template (folders, files etc) into their codebase automatically. (additional commands are run on the codebase).
At some point later, you will want to change the pattern. Refactor it, or modify it, or fix a defect in it, etc.
- You open the pattern, and change the template, optionally change the commands and change the constraints.
- An upgraded toolkit version is created for you automatically containing this upgrade.
- You ship this upgraded toolkit to your team to use.
- They download and run the upgraded toolkit (CLI or IDE plugin) to upgrade their codebase.
- The toolkit detects the previous files/folders that were written before, and detects the previous attribute configuration that was used before. The toolkit re-applies the upgraded pattern (and again, the additional commands are rerun again).
What problem does it solve?
Often, for many software teams (that include individuals varying degrees of expertise from novice to expert) a Tech Lead/Lead Dev/Tech Consultant needs to make some key technical decisions about how things need to get done in that codebase. Architecturally , structurally or in the implementation - all these decisions are constraints on the codebase. Keeping things small, well defined, and consistent is often the key to managing complexity. So that contributors to this codebase can have a single, unified and simpler understanding of the codebase. A reasonable, shared mental model of the codebase, so that they can move freely across the codebase and not fear changing any part of it.
Being able to construct codebases in this way is earned over the years of doing similar things in other codebases over and over again. As this is done patterns emerge and they are adapted and improved for each codebase where they are applied. No two codebases are the same, but the patterns are often very similar. Often improving over time as those that define and refine them learn more each time they are applied from the context of the current codebase.
The primary challenge a Tech Lead/Lead Dev/Tech Consultant has is: communicating this knowledge in a form that can be learnt and reused by others, and also adapted for the current codebase. Learning by doing is key, but learning from experience through demonstration is an effective way we can avoid repeating the lessons learned and expensive mistakes from the past.
One of the main challenges in codebases for team is that others in the codebase will naturally re-invent unfamiliar or more novel code patterns because they lack the knowledge that other team members have, or they are unaware that the other team members already possesses this kind of knowledge. Teams are also fluid over time, with members coming and going. So the learning process is continuous and relentless.
Another major challenge is not knowing how to solve certain problems in the codebase nor where to put certain solutions in the code. This results in solutions being peppered around the codebase as workarounds are introduced, and pilled upon each other. This leads to the big-ball-of-mud which becomes un-navigable for a team as time moves forward.
A Tech Lead/Lead Dev/Tech Consultant needs to remain vigilant to ensure that established patterns and architectures are not violated because of lack of knowledge of other team members. Whilst, they also need to change as the software evolves, and as new constraints are defined.
Today's, languages and development tools (IDEs) are so general purpose that they cannot be used to help enforce or constrict the programmer from working around these implied constraints. Codebase specific tools, fit for purpose, must be used to enforce these constraints.
Tech Lead/Lead Dev/Tech Consultant could use a little help from their codebase specific tools.
Does this apply to you?
If these assumptions about your software team are all true, then you might consider taking a look at this tool.
You work on a codebase with others - you are working in a software team.
You are the Tech Lead/Lead Dev/Tech Consultant of the team. (or have some other well respected, position of responsibility in the team).
You contribute code yourself to this codebase, and you communicate often with others on your team about the code.
You have some coding patterns, or can create some coding patterns, that are worth sharing in this specific codebase.
Your team values: consistency, clarity, and maintainability.
You accept that you can be wrong sometimes, and that your codebase necessarily changes over time.
If this sounds like your situation then maybe we can help you define (and enforce) some codebase specific coding patterns for your team to reuse.
Getting Started
This project is in early prototype stage. Take a look at our prototype scenario for a detailed example of use.
Install the tool:
dotnet tool install --global automate
Navigate to your codebase, and harvest your first pattern from it.
automate create pattern "MyPattern1"
Add attributes, elements and code templates, and make it programmable.
automate edit add-attribute "Name" --isrequired
Generate a toolkit/plugin for applying the pattern.
automate build toolkit
Share the built toolkit with your team/community to use.
Learn more
At present we are in a validation stage. Validation, viability and research work is captured in the docs
and discovery
folders.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.3.1 | 90 | 10/30/2024 |
1.3.0 | 324 | 5/14/2023 |
1.2.0 | 184 | 5/7/2023 |
1.1.0 | 493 | 11/5/2022 |
1.0.7 | 481 | 10/29/2022 |
1.0.5 | 468 | 10/15/2022 |
1.0.4 | 506 | 10/3/2022 |
1.0.3 | 492 | 9/28/2022 |
1.0.2 | 462 | 9/25/2022 |
1.0.1 | 487 | 9/19/2022 |
0.2.7-preview | 255 | 8/9/2022 |
0.2.6-preview | 244 | 7/3/2022 |
0.2.5-preview | 212 | 6/20/2022 |
0.2.4-preview | 209 | 6/17/2022 |
0.2.3-preview | 273 | 6/12/2022 |
0.2.2-preview | 283 | 6/9/2022 |
0.2.1-preview | 330 | 6/5/2022 |
0.2.0-preview | 259 | 6/4/2022 |
0.1.13-preview | 269 | 5/31/2022 |
0.1.12-preview | 234 | 5/29/2022 |
0.1.11-preview | 251 | 5/27/2022 |
0.1.10-preview | 250 | 5/17/2022 |
0.1.9-preview | 257 | 5/16/2022 |
0.1.8-preview | 249 | 4/25/2022 |
0.1.7-preview | 246 | 3/28/2022 |
0.1.6-preview | 311 | 3/18/2022 |
0.1.5-preview | 258 | 3/11/2022 |
0.1.4-preview | 256 | 3/6/2022 |
0.1.1-preview | 279 | 2/23/2022 |