System dev logs, drafts
- 6 Devlogs
- 107 Total hours
This feature ensures the git commit history remains clean from wips, and the closure when the development of a requirement is finished remains frictionless by automating git operations such as path finding, worktree and branch deletion. Leaving the workspace clean and ready to restart the workflow again for a new update or extra feature.
Once the builder has complete the implementation, perform a final commit with all changes implemented and staged When the builder runs the command collapse within the worktree to finish the workflow, Then the engine should:
- Merge the final commit to the main branch
- The implementation of the requirement
wipsare preserved in the final commit squash.- The history has only one commit with the wip changes
- The merge is complete successfully
- Delete the worktree & branch once the commit is present in the main branch to ensure no data is lost and the req name is availability for future implementations
- Unlink the symlink connection of the markdown editor for the specific docs folder and link to the
maindocs tree
spawn command is now connected to the orchestrator in the package.json so that it can later be publish in npm and make it fully global accessible in the developer system by using the -g flagjest that stress test the spawn engine under different scenarios and flags, implement a cool ghost typist so that no questions arise why testing, since those are handle by the ghost typist and test itself.ENOENT.e2e spawn engine in action
- Create a folder with the prefix if not previously created and move the main worktree dir and other worktrees present there
- Handle the
config-system.jsonpresence if not handle its creation- Create a new worktree with the artifact in lowercase as name and branch to work within the folder with the project identifier prefix
- Connect the
docsof the new worktree to the folder in the markdown editor- Open a VS code instance
I develop the initial part of the system requirement of a workflow orchestrator that interacts with git and the system files to create a frictionless, fast and intuitive experience when bringing ideas to live.
Creating and isolated environment that ensures the change log remains pristine and connected to a specific Requirement artifact and its context and market value.
The command that triggers the first part of the orchestrator is spawn with a string argument that will be the name of the requirement to implement e.g: req023. It can be called with different flags to modify the behavior of the orchestrator and achieve different functionalities:
--symlink or -s
--code or -c
Only trigger the command with the -s flag:
docs of the new worktree to the folder in the markdown editorTrigger the command with the -s & -c flag:
docs of the new worktree to the folder in the markdown editorOnly trigger the command with the -c flag:
Trigger the command without flags:
To handle the underlying mechanism of git such as the way it manages the links from the main worktree to its linked ones, how to move them without breaking the linkage and how to heal the systme once the main woerktree is moved represent a challenge that involve some hours of debugging, logs, investigation and testing to make it properly set up the initial state of the system and continue with the worktree creation.
Now that the system is getting to its final shape one of the most important tools it should integrate is git, but how to do it properly to ensure a pristine commit history to understand the project, its progression, what has been implemented and how the project as evolved over time.
Also easily look backwards for quickly identification of the implementation details we are looking for. Nor in a messy uncontextualized way but rather having clear context on what are those changes related to, which requisite is being implemented, refactor or updated
Managing docs and code within the same repository carries the risk of “micro commit bloat” only small work and temporary struggle that doesn’t carry a significant weight when backward looking in the future fill the commit history. When reviewing you don’t what to see hundreds of micro commits that doesn’t actually inform of a complete feature.
I’ve analize the possible architectural decision including:
But the one that must be picked is the one that adresses the edge cases:
The final decision combines some of the previously mention alternatives and discards others but to make it short the solution is to use worktrees, one per requirement implementation and then clean it out, but this also comes with the frictions of having to update the symlink connection to the markdown editor of preference.
Visually explained the architecture is in a digrama below
Semantic commits
The repository becomes self-documenting. Generating >“release notes”, “architectural change log” or revising >the project evolution becomes a mathematical query:
git log --grep="^type"
Structural Bracket Identifier
This makes it possible to audit the overall evolution of a >specific requirement implementation or architectural >decision over the project life by usinggit log --grep="[ID]". Ease the debugging process and version control >navigation.
Git-Tree
Concurrent file work history collapse solution: by using >the git-tree the edge case of losing track of multi line >edits that belong to different REQs in the same file is >handled gracefully by the work tree capabilities
Dashboard blindness solution: Eliminates dashboard >blindness by using the symlink connection
Finding paths to create symlinks, moving trees to a parent folder so the development can began, the squashing of the commits for a clean history and the merge of wortrees to the main branch migth represent minutes of administrative friction. So the implementation of a script that ease the friction parts of the workflow to ensure the developer never gets out of flow due to administrative stuff is a foundational add on to the system.
This engine ensures there is no need for manually refactoring of links that connect the related files across the project. Simply imagining updating hundreds of broken links when a name or folder is change, that is not acceptable.
Also helps reducing the friction when creating connections like thinking the relative path to the file.
This way is avoid the debt of having broken links across the traceability system and friction of connecting files is reduce to 0.
File mapping
Engineer FileSelectionHelper.js which uses a recursive algorithm that serves as a helper method for data collection using node for file path extraction that works as follows:
Connections Mapping
Implement a helper function PathExtractionHelper.js that will take the found files by FileSelectionHelper.js build a map of the artifacts and the files that mention a connection to them.
Algorithm behavior:
@trace REQ-001 @
Traceability Pipeline Class
To ensure clean code, concern separation and functionality encapsulation I develop a class that contains methods that make possible the traceability engine.
Methods capabilities:
artifact.md fileEngine execution
Once the separated functionalities are encapsulated in its methods and helpers the engine must be orchestrated to provided the expected behavior for this the AutoLinkRefactorExecutionThread.js ensures the execution works as intended leveraging the tools available to ensure the acceptance criteria expected outcome is fulfilled.
Testing
To ensure system integrity this implementation includes 2 test suits:
CORE FEATURES
Engineer the requirements structure & artifacts including:
Define a symlink connection usage from the markdown editor to the project folder with the git system
Engineer the architectural decision records structure and artifacts including:
Created a central MOC dashboard that maps automatically ADRs, REQs and Vertical slicing diagrams. Includes also an architectural diagram that gives a big picture of how the system behaves.