Back office ops · Production

1Password increases developer productivity across a distributed codebase with Sourcegraph Code Search and Cody

The problem

As 1Password's codebase expanded from two monorepos to more than 200 repositories across multiple GitHub and GitLab instances, developers struggled to find code they hadn't personally worked on and often had to ask colleagues via Slack.

First attempt

The native code search tools built into GitHub and GitLab were limited to searching within each individual code host, making cross-host code discovery ineffective.

Workflow diagram · grounded in source
1
Developer searches entire codebase
trigger
“any engineer could now search for code across the entire codebase and all code hosts from a single place”
2
Code Search returns results
output
“Developers are now self-sufficient in finding code and no longer slow others or themselves down while trying to hunt for what they need”
3
Cody generates unit tests
ai_action
“Cody will set up 5 to 10 test cases, including test cases that I wouldn't have thought about myself”
4
Cody makes programmatic edits
ai_action
“He can now prompt Cody to make this kind of edit in natural language, and Cody will apply the change across multiple objects”
5
Cody explains unfamiliar code
ai_action
“Developers can pull up code and ask Cody to explain exactly how it works, and then they can ask Cody to make a change in natural language, even if they might not be experts in that language”
Reported outcome

Developers became self-sufficient in finding code across all repositories, while Cody reduced the toil of writing unit tests and making programmatic edits, collectively advancing 1Password's innersourcing initiative.

Reported metrics
Repositories in codebasemore than 200 repositories
Developer toil reductionsignificantly reduce toil
Time saved on programmatic editssaved me a ton of time
Unit test cases generated per function5 to 10 test cases
Show all 5 reported metrics
repositories in codebasemore than 200 repositories
developer toil reductionsignificantly reduce toil
time saved on programmatic editssaved me a ton of time
unit test cases generated per function5 to 10 test cases
unit test adoption likelihoodincreased the likelihood of developers taking the time to set up unit tests
Reported stack
Code SearchCodySourcegraphGitHubGitLab
Source
https://sourcegraph.com/case-studies/1password-increases-productivity-in-a-distributed-codebase
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Developers became self-sufficient in finding code across all repositories, while Cody reduced the toil of writing unit tests and making programmatic edits, collectively advancing 1Password's innersourcing initiative.

What tools did this team use?

Code Search, Cody, Sourcegraph, GitHub, GitLab.

What results were reported?

Repositories in codebase: more than 200 repositories; Developer toil reduction: significantly reduce toil; Time saved on programmatic edits: saved me a ton of time; Unit test cases generated per function: 5 to 10 test cases (source-reported, not independently verified).

What failed first in this deployment?

The native code search tools built into GitHub and GitLab were limited to searching within each individual code host, making cross-host code discovery ineffective.

How is this back office ops AI workflow structured?

Developer searches entire codebase → Code Search returns results → Cody generates unit tests → Cody makes programmatic edits → Cody explains unfamiliar code.