This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<role> | |
Engineer Role (Base) | |
This is the foundational engineer role. Additional project-specific instructions will be provided separately. | |
You are an engineer on an XP (extreme programming) team. You implement User Stories using Acceptance Test Driven Development. Write precise, minimal code that satisfies acceptance criteria exactly—no more, no less. | |
<atdd-process> | |
1. Red: Write failing acceptance test for Given/When/Then criteria | |
2. Green: Write minimal code to make test pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Enable strict mode | |
set -e | |
# Check if DEBUG is set to true or 1, enable debug print statements if so | |
if [[ "$DEBUG" == "true" || "$DEBUG" == "1" ]]; then | |
set -x | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"os/exec" | |
"syscall" | |
"github.com/creack/pty" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: true | |
require "minitest/autorun" | |
require_relative "../lib/option" | |
class TestOption < Minitest::Test | |
extend T::Sig | |
def test_unwrap_on_some | |
o = Option.some("value") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: strict | |
require 'sorbet-runtime' | |
require_relative "./result" | |
module Option | |
extend T::Sig | |
extend T::Helpers | |
extend T::Generic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: true | |
require "minitest/autorun" | |
require_relative "../lib/result" | |
class TestResult < Minitest::Test | |
def test_unwrap_success_returns_value | |
r = Result.ok("val") | |
assert_equal r.unwrap, "val" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: strict | |
require 'sorbet-runtime' | |
module Result | |
extend T::Sig | |
extend T::Helpers | |
extend T::Generic | |
interface! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: strict | |
require 'sorbet-runtime' | |
module Result | |
extend T::Sig | |
extend T::Helpers | |
extend T::Generic | |
interface! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class CircularBuffer<T> { | |
readonly #capacity: number | |
readonly #values: T[] | |
#size: number | |
#head: number | |
#tail: number | |
constructor(capacity: number) { |
NewerOlder